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.inmemory.storedobj.api;
20
21 import java.util.List;
22
23 /**
24 * A folder is a StoredObject that that has a path and children. Children can be
25 * folder or documents
26 *
27 * @author Jens
28 */
29 public interface Children {
30
31 /**
32 * get all the children of this folder. To support paging an initial offset
33 * and a maximum number of children to retrieve can be passed
34 *
35 * @param maxItems
36 * max. number of items to return
37 * @param skipCount
38 * initial offset where to start fetching
39 * @param user
40 * @return list of children objects
41 */
42 List<StoredObject> getChildren(int maxItems, int skipCount, String user );
43
44 /**
45 * get all the children of this folder which are folders. To support paging
46 * an initial offset and a maximum number of childrent to retrieve can be
47 * passed.
48 *
49 * @param maxItems
50 * max. number of items to return
51 * @param skipCount
52 * initial offset where to start fetching
53 * @param user
54 * @return list of children folders
55 */
56 List<Folder> getFolderChildren(int maxItems, int skipCount, String user);
57
58 /**
59 * indicate if a child with the given name exists in this folder
60 *
61 * @param name
62 * name to check
63 * @return true if the name exists in the folderas child, false otherwise
64 */
65 boolean hasChild(String name);
66
67 }