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.Map;
23
24 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
25 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
26
27 /**
28 * Base type definition interface.
29 *
30 * @cmis 1.0
31 */
32 public interface TypeDefinition extends Serializable, ExtensionsData {
33
34 /**
35 * Returns the type ID.
36 *
37 * @return the type ID, not {@code null}
38 *
39 * @cmis 1.0
40 */
41 String getId();
42
43 /**
44 * Returns the local name.
45 *
46 * @return the local name
47 *
48 * @cmis 1.0
49 */
50 String getLocalName();
51
52 /**
53 * Returns the local namespace.
54 *
55 * @return the local namespace
56 *
57 * @cmis 1.0
58 */
59 String getLocalNamespace();
60
61 /**
62 * Returns the display name.
63 *
64 * @return the display name
65 *
66 * @cmis 1.0
67 */
68 String getDisplayName();
69
70 /**
71 * Returns the query name
72 *
73 * @return the query name
74 *
75 * @cmis 1.0
76 */
77 String getQueryName();
78
79 /**
80 * Returns the property description.
81 *
82 * @return returns the description
83 *
84 * @cmis 1.0
85 */
86 String getDescription();
87
88 /**
89 * Returns the base object type ID.
90 *
91 * @return the base object type ID
92 *
93 * @cmis 1.0
94 */
95 BaseTypeId getBaseTypeId();
96
97 /**
98 * Returns the parent type ID.
99 *
100 * @return the parent type ID or {@code null} if the type is a base type
101 *
102 * @cmis 1.0
103 */
104 String getParentTypeId();
105
106 /**
107 * Returns if an object of this type can be created.
108 *
109 * @return {@code true} if an object of this type can be created;
110 * {@code false} if creation of objects of this type is not
111 * possible; {@code null} - unknown (noncompliant repository)
112 *
113 * @cmis 1.0
114 */
115 Boolean isCreatable();
116
117 /**
118 * Returns if an object of this type can be filed.
119 *
120 * @return {@code true} if an object of this type can be filed;
121 * {@code false} if an object of this type cannot be filed;
122 * {@code null} - unknown (noncompliant repository)
123 *
124 * @cmis 1.0
125 */
126 Boolean isFileable();
127
128 /**
129 * Returns if this type is queryable.
130 *
131 * @return {@code true} if this type is queryable; {@code false} if this
132 * type is not queryable; {@code null} - unknown (noncompliant
133 * repository)
134 *
135 * @cmis 1.0
136 */
137 Boolean isQueryable();
138
139 /**
140 * Returns if this type is full text indexed.
141 *
142 * @return {@code true} if this type is full text indexed; {@code false} if
143 * this type is not full text indexed; {@code null} - unknown
144 * (noncompliant repository)
145 *
146 * @cmis 1.0
147 */
148 Boolean isFulltextIndexed();
149
150 /**
151 * Returns if this type is included in queries that query the super type.
152 *
153 * @return {@code true} if this type is included; {@code false} if this type
154 * is not included; {@code null} - unknown (noncompliant repository)
155 *
156 * @cmis 1.0
157 */
158 Boolean isIncludedInSupertypeQuery();
159
160 /**
161 * Returns if objects of this type are controllable by policies.
162 *
163 * @return {@code true} if objects are controllable by policies;
164 * {@code false} if objects are not controllable by policies;
165 * {@code null} - unknown (noncompliant repository)
166 *
167 * @cmis 1.0
168 */
169 Boolean isControllablePolicy();
170
171 /**
172 * Returns if objects of this type are controllable by ACLs.
173 *
174 * @return {@code true} if objects are controllable by ACLs; {@code false}
175 * if objects are not controllable by ACLs; {@code null} - unknown
176 * (noncompliant repository)
177 *
178 * @cmis 1.0
179 */
180 Boolean isControllableAcl();
181
182 /**
183 * Returns the property definitions of this type.
184 *
185 * @return the property definitions or {@code null} if the property
186 * definitions were not requested
187 *
188 * @cmis 1.0
189 */
190 Map<String, PropertyDefinition<?>> getPropertyDefinitions();
191
192 /**
193 * Returns type mutability flags.
194 *
195 * @return type mutability flags
196 *
197 * @cmis 1.1
198 */
199 TypeMutability getTypeMutability();
200 }