This project has retired. For details please refer to its Attic page.
TypeManager 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.server.support;
20  
21  import java.util.Collection;
22  import java.util.List;
23  
24  import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
25  import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
26  
27  public interface TypeManager {
28  
29      /**
30       * return a type definition from the type definition id
31       * 
32       * @param typeId
33       *            id of the type definition
34       * @return type definition for this id
35       */
36      TypeDefinitionContainer getTypeById(String typeId);
37  
38      /**
39       * return a type definition from the type query name or null if not found
40       * 
41       * @param typeQueryName
42       *            query name of the type definition
43       * @return type definition for this query name
44       */
45      TypeDefinition getTypeByQueryName(String typeQueryName);
46  
47      /**
48       * return a list of all types known in this repository
49       * 
50       * @return
51       */
52      Collection<TypeDefinitionContainer> getTypeDefinitionList();
53  
54      /**
55       * return a list of the root types as defined in the CMIS spec (for
56       * document, folder, policy and relationship
57       * 
58       * @return
59       */
60      List<TypeDefinitionContainer> getRootTypes();
61  
62      /**
63       * retrieve the property id from a type for a given property query name 
64       * 
65       * @param typeDefinition
66       *      type definition containing query name
67       * @param propQueryName
68       *      query name of property
69       * @return
70       *      property id of property or null if not found
71       */
72      String getPropertyIdForQueryName(TypeDefinition typeDefinition, String propQueryName);
73  
74  }