This project has retired. For details please refer to its Attic page.
BindingsObjectFactory xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.spi;
20  
21  import java.io.InputStream;
22  import java.math.BigDecimal;
23  import java.math.BigInteger;
24  import java.util.GregorianCalendar;
25  import java.util.List;
26  
27  import org.apache.chemistry.opencmis.commons.data.Ace;
28  import org.apache.chemistry.opencmis.commons.data.Acl;
29  import org.apache.chemistry.opencmis.commons.data.ContentStream;
30  import org.apache.chemistry.opencmis.commons.data.Properties;
31  import org.apache.chemistry.opencmis.commons.data.PropertyBoolean;
32  import org.apache.chemistry.opencmis.commons.data.PropertyData;
33  import org.apache.chemistry.opencmis.commons.data.PropertyDateTime;
34  import org.apache.chemistry.opencmis.commons.data.PropertyDecimal;
35  import org.apache.chemistry.opencmis.commons.data.PropertyHtml;
36  import org.apache.chemistry.opencmis.commons.data.PropertyId;
37  import org.apache.chemistry.opencmis.commons.data.PropertyInteger;
38  import org.apache.chemistry.opencmis.commons.data.PropertyString;
39  import org.apache.chemistry.opencmis.commons.data.PropertyUri;
40  import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
41  
42  /**
43   * Factory for CMIS binding objects.
44   *
45   * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
46   *
47   */
48  public interface BindingsObjectFactory {
49  
50      Ace createAccessControlEntry(String principal, List<String> permissions);
51  
52      Acl createAccessControlList(List<Ace> aces);
53  
54      <T> PropertyData<T> createPropertyData(PropertyDefinition<T> pd,
55              Object value);
56  
57      PropertyBoolean createPropertyBooleanData(String id, List<Boolean> values);
58  
59      PropertyBoolean createPropertyBooleanData(String id, Boolean value);
60  
61      PropertyId createPropertyIdData(String id, List<String> values);
62  
63      PropertyId createPropertyIdData(String id, String value);
64  
65      PropertyInteger createPropertyIntegerData(String id, List<BigInteger> values);
66  
67      PropertyInteger createPropertyIntegerData(String id, BigInteger value);
68  
69      PropertyDateTime createPropertyDateTimeData(String id, List<GregorianCalendar> values);
70  
71      PropertyDateTime createPropertyDateTimeData(String id, GregorianCalendar value);
72  
73      PropertyDecimal createPropertyDecimalData(String id, List<BigDecimal> values);
74  
75      PropertyDecimal createPropertyDecimalData(String id, BigDecimal value);
76  
77      PropertyHtml createPropertyHtmlData(String id, List<String> values);
78  
79      PropertyHtml createPropertyHtmlData(String id, String value);
80  
81      PropertyString createPropertyStringData(String id, List<String> values);
82  
83      PropertyString createPropertyStringData(String id, String value);
84  
85      PropertyUri createPropertyUriData(String id, List<String> values);
86  
87      PropertyUri createPropertyUriData(String id, String value);
88  
89      Properties createPropertiesData(List<PropertyData<?>> properties);
90  
91      ContentStream createContentStream(String filename, BigInteger length, String mimetype, InputStream stream);
92  }