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.RepositoryInfo; 26 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition; 27 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer; 28 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList; 29 30 /** 31 * Repository Service interface. 32 * 33 * <p> 34 * <em> 35 * See CMIS 1.0 specification for details on the operations, parameters, 36 * exceptions and the domain model. 37 * </em> 38 * </p> 39 */ 40 public interface RepositoryService { 41 42 /** 43 * Returns a list of CMIS repository information available from this CMIS 44 * service endpoint. 45 * 46 * In contrast to the CMIS specification this method returns repository 47 * infos not only repository ids. 48 */ 49 List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension); 50 51 /** 52 * Returns information about the CMIS repository, the optional capabilities 53 * it supports and its access control information if applicable. 54 * 55 * @param repositoryId 56 * the identifier for the repository 57 */ 58 RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension); 59 60 /** 61 * Returns the list of object types defined for the repository that are 62 * children of the specified type. 63 * 64 * @param repositoryId 65 * the identifier for the repository 66 * @param typeId 67 * <em>(optional)</em> the typeId of an object type specified in 68 * the repository (if not specified the repository MUST return 69 * all base object types) 70 * @param includePropertyDefinitions 71 * <em>(optional)</em> if <code>true</code> the repository MUST 72 * return the property definitions for each object type returned 73 * (default is <code>false</code>) 74 * @param maxItems 75 * <em>(optional)</em> the maximum number of items to return in a 76 * response (default is repository specific) 77 * @param skipCount 78 * <em>(optional)</em> number of potential results that the 79 * repository MUST skip/page over before returning any results 80 * (default is 0) 81 */ 82 TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, 83 BigInteger maxItems, BigInteger skipCount, ExtensionsData extension); 84 85 /** 86 * Returns the set of descendant object type defined for the repository 87 * under the specified type. 88 * 89 * @param repositoryId 90 * the identifier for the repository 91 * @param typeId 92 * <em>(optional)</em> the typeId of an object type specified in 93 * the repository (if not specified the repository MUST return 94 * all types and MUST ignore the value of the depth parameter) 95 * @param depth 96 * <em>(optional)</em> the number of levels of depth in the type 97 * hierarchy from which to return results (default is repository 98 * specific) 99 * @param includePropertyDefinitions 100 * <em>(optional)</em> if <code>true</code> the repository MUST 101 * return the property definitions for each object type returned 102 * (default is <code>false</code>) 103 */ 104 List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth, 105 Boolean includePropertyDefinitions, ExtensionsData extension); 106 107 /** 108 * Gets the definition of the specified object type. 109 * 110 * @param repositoryId 111 * the identifier for the repository 112 * @param typeId 113 * typeId of an object type specified in the repository 114 */ 115 TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension); 116 }