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.math.BigInteger;
22 import java.util.List;
23
24 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
25 import org.apache.chemistry.opencmis.commons.data.ObjectData;
26 import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
27 import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
28 import org.apache.chemistry.opencmis.commons.data.ObjectList;
29 import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
30 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
31
32 /**
33 * Navigation Service interface.
34 *
35 * <p>
36 * <em>
37 * See the CMIS 1.0 and CMIS 1.1 specifications for details on the operations, parameters,
38 * exceptions and the domain model.
39 * </em>
40 * </p>
41 */
42 public interface NavigationService {
43
44 /**
45 * Gets the list of child objects contained in the specified folder.
46 *
47 * @param repositoryId
48 * the identifier for the repository
49 * @param folderId
50 * the identifier for the folder
51 * @param filter
52 * <em>(optional)</em> a comma-separated list of query names that
53 * defines which properties must be returned by the repository
54 * (default is repository specific)
55 * @param orderBy
56 * <em>(optional)</em> a comma-separated list of query names that
57 * define the order of the result set. Each query name must be
58 * followed by the ascending modifier "ASC" or the descending
59 * modifier "DESC" (default is repository specific)
60 * @param includeAllowableActions
61 * <em>(optional)</em> if {@code true}, then the repository must
62 * return the available actions for each object in the result set
63 * (default is {@code false})
64 * @param includeRelationships
65 * <em>(optional)</em> indicates what relationships in which the
66 * objects participate must be returned (default is
67 * {@link IncludeRelationships#NONE})
68 * @param renditionFilter
69 * <em>(optional)</em> indicates what set of renditions the
70 * repository must return whose kind matches this filter (default
71 * is {@code "cmis:none"})
72 * @param includePathSegment
73 * <em>(optional)</em> if {@code true}, returns a path segment
74 * for each child object for use in constructing that object's
75 * path (default is {@code false})
76 * @param maxItems
77 * <em>(optional)</em> the maximum number of items to return in a
78 * response (default is repository specific)
79 * @param skipCount
80 * <em>(optional)</em> number of potential results that the
81 * repository MUST skip/page over before returning any results
82 * (default is 0)
83 * @param extension
84 * extension data
85 * @return the list of children
86 */
87 ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
88 Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
89 Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
90
91 /**
92 * Gets the set of descendant objects contained in the specified folder or
93 * any of its child folders.
94 *
95 * @param repositoryId
96 * the identifier for the repository
97 * @param folderId
98 * the identifier for the folder
99 * @param depth
100 * the number of levels of depth in the folder hierarchy from
101 * which to return results
102 * @param filter
103 * <em>(optional)</em> a comma-separated list of query names that
104 * defines which properties must be returned by the repository
105 * (default is repository specific)
106 * @param includeAllowableActions
107 * <em>(optional)</em> if {@code true}, then the repository must
108 * return the available actions for each object in the result set
109 * (default is {@code false})
110 * @param includeRelationships
111 * <em>(optional)</em> indicates what relationships in which the
112 * objects participate must be returned (default is
113 * {@link IncludeRelationships#NONE})
114 * @param renditionFilter
115 * <em>(optional)</em> indicates what set of renditions the
116 * repository must return whose kind matches this filter (default
117 * is {@code "cmis:none"})
118 * @param includePathSegment
119 * <em>(optional)</em> if {@code true}, returns a path segment
120 * for each child object for use in constructing that object's
121 * path (default is {@code false})
122 * @param extension
123 * extension data
124 * @return the tree of descendants
125 **/
126 List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth, String filter,
127 Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
128 Boolean includePathSegment, ExtensionsData extension);
129
130 /**
131 * Gets the set of descendant folder objects contained in the specified
132 * folder.
133 *
134 * @param repositoryId
135 * the identifier for the repository
136 * @param folderId
137 * the identifier for the folder
138 * @param depth
139 * the number of levels of depth in the folder hierarchy from
140 * which to return results
141 * @param filter
142 * <em>(optional)</em> a comma-separated list of query names that
143 * defines which properties must be returned by the repository
144 * (default is repository specific)
145 * @param includeAllowableActions
146 * <em>(optional)</em> if {@code true}, then the repository must
147 * return the available actions for each object in the result set
148 * (default is {@code false})
149 * @param includeRelationships
150 * <em>(optional)</em> indicates what relationships in which the
151 * objects participate must be returned (default is
152 * {@link IncludeRelationships#NONE})
153 * @param renditionFilter
154 * <em>(optional)</em> indicates what set of renditions the
155 * repository must return whose kind matches this filter (default
156 * is {@code "cmis:none"})
157 * @param includePathSegment
158 * <em>(optional)</em> if {@code true}, returns a path segment
159 * for each child object for use in constructing that object's
160 * path (default is {@code false})
161 * @param extension
162 * extension data
163 * @return the folder tree
164 **/
165 List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth, String filter,
166 Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
167 Boolean includePathSegment, ExtensionsData extension);
168
169 /**
170 * Gets the parent folder(s) for the specified non-folder, fileable object.
171 *
172 * @param repositoryId
173 * the identifier for the repository
174 * @param objectId
175 * the identifier for the object
176 * @param filter
177 * <em>(optional)</em> a comma-separated list of query names that
178 * defines which properties must be returned by the repository
179 * (default is repository specific)
180 * @param includeAllowableActions
181 * <em>(optional)</em> if {@code true}, then the repository must
182 * return the available actions for each object in the result set
183 * (default is {@code false})
184 * @param includeRelationships
185 * <em>(optional)</em> indicates what relationships in which the
186 * objects participate must be returned (default is
187 * {@link IncludeRelationships#NONE})
188 * @param renditionFilter
189 * <em>(optional)</em> indicates what set of renditions the
190 * repository must return whose kind matches this filter (default
191 * is {@code "cmis:none"})
192 * @param includeRelativePathSegment
193 * <em>(optional)</em> if {@code true}, returns a relative path
194 * segment for each parent object for use in constructing that
195 * object's path (default is {@code false})
196 * @param extension
197 * extension data
198 * @return the list of parents
199 */
200 List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
201 Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
202 Boolean includeRelativePathSegment, ExtensionsData extension);
203
204 /**
205 * Gets the parent folder object for the specified folder object.
206 *
207 * @param repositoryId
208 * the identifier for the repository
209 * @param folderId
210 * the identifier for the folder
211 * @param filter
212 * <em>(optional)</em> a comma-separated list of query names that
213 * defines which properties must be returned by the repository
214 * (default is repository specific)
215 * @param extension
216 * extension data
217 * @return the folder parent
218 */
219 ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension);
220
221 /**
222 * Gets the list of documents that are checked out that the user has access
223 * to.
224 *
225 * @param repositoryId
226 * the identifier for the repository
227 * @param folderId
228 * the identifier for the folder
229 * @param filter
230 * <em>(optional)</em> a comma-separated list of query names that
231 * defines which properties must be returned by the repository
232 * (default is repository specific)
233 * @param orderBy
234 * <em>(optional)</em> a comma-separated list of query names that
235 * define the order of the result set. Each query name must be
236 * followed by the ascending modifier "ASC" or the descending
237 * modifier "DESC" (default is repository specific)
238 * @param includeAllowableActions
239 * <em>(optional)</em> if {@code true}, then the repository must
240 * return the available actions for each object in the result set
241 * (default is {@code false})
242 * @param includeRelationships
243 * <em>(optional)</em> indicates what relationships in which the
244 * objects participate must be returned (default is
245 * {@link IncludeRelationships#NONE})
246 * @param renditionFilter
247 * <em>(optional)</em> indicates what set of renditions the
248 * repository must return whose kind matches this filter (default
249 * is {@code "cmis:none"})
250 * @param maxItems
251 * <em>(optional)</em> the maximum number of items to return in a
252 * response (default is repository specific)
253 * @param skipCount
254 * <em>(optional)</em> number of potential results that the
255 * repository MUST skip/page over before returning any results
256 * (default is 0)
257 * @param extension
258 * extension data
259 * @return the list of checked out documents
260 */
261 ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
262 Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
263 BigInteger maxItems, BigInteger skipCount, ExtensionsData extension);
264 }