This project has retired. For details please refer to its Attic page.
PropertyDefinition 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.definitions;
20  
21  import java.io.Serializable;
22  import java.util.List;
23  
24  import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
25  import org.apache.chemistry.opencmis.commons.enums.Cardinality;
26  import org.apache.chemistry.opencmis.commons.enums.PropertyType;
27  import org.apache.chemistry.opencmis.commons.enums.Updatability;
28  
29  /**
30   * Base property definition interface.
31   * 
32   * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
33   * 
34   */
35  public interface PropertyDefinition<T> extends Serializable, ExtensionsData {
36  
37      /**
38       * Returns the property definition id.
39       * 
40       * @return the property definition id
41       */
42      String getId();
43  
44      /**
45       * Returns the local name.
46       * 
47       * @return the local name
48       */
49      String getLocalName();
50  
51      /**
52       * Returns the local namespace.
53       * 
54       * @return the local namespace
55       */
56      String getLocalNamespace();
57  
58      /**
59       * Returns the display name.
60       * 
61       * @return the display name
62       */
63      String getDisplayName();
64  
65      /**
66       * Returns the query name
67       * 
68       * @return the query name
69       */
70      String getQueryName();
71  
72      /**
73       * Returns the property description.
74       * 
75       * @return returns the description
76       */
77      String getDescription();
78  
79      /**
80       * Returns the property type.
81       * 
82       * @return the property type
83       */
84      PropertyType getPropertyType();
85  
86      /**
87       * Returns the cardinality.
88       * 
89       * @return the cardinality
90       */
91      Cardinality getCardinality();
92  
93      /**
94       * Returns the updatability.
95       * 
96       * @return the updatability
97       */
98      Updatability getUpdatability();
99  
100     /**
101      * Returns if the property is inherited by a parent type.
102      * 
103      * @return <code>true</code> - is inherited;
104      *         <code>false</false> - is not inherited; <code>null</code> -
105      *         unknown (noncompliant repository)
106      */
107     Boolean isInherited();
108 
109     /**
110      * Returns if the property is required.
111      * 
112      * @return <code>true</code> - is required;
113      *         <code>false</false> - is not required; <code>null</code> -
114      *         unknown (noncompliant repository)
115      */
116     Boolean isRequired();
117 
118     /**
119      * Returns if the property is queryable.
120      * 
121      * @return <code>true</code> - is queryable;
122      *         <code>false</false> - is not queryable; <code>null</code> -
123      *         unknown (noncompliant repository)
124      */
125     Boolean isQueryable();
126 
127     /**
128      * Returns if the property is Orderable.
129      * 
130      * @return <code>true</code> - is Orderable;
131      *         <code>false</false> - is not Orderable; <code>null</code> -
132      *         unknown (noncompliant repository)
133      */
134     Boolean isOrderable();
135 
136     /**
137      * Returns if the property supports open choice.
138      * 
139      * @return <code>true</code> - supports open choice;
140      *         <code>false</false> - does not support open choice; <code>null</code>
141      *         - unknown or not applicable
142      */
143     Boolean isOpenChoice();
144 
145     /**
146      * Returns the default value.
147      * 
148      * @return the default value (list) or <code>null</code> if no default value
149      *         is defined
150      */
151     List<T> getDefaultValue();
152 
153     /**
154      * Returns the choices for this property.
155      * 
156      * @return the choices or <code>null</code> if no choices are defined
157      */
158     List<Choice<T>> getChoices();
159 }