Class TypeManagerImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.opencmis.impl.util.TypeManagerImpl
-
- All Implemented Interfaces:
org.apache.chemistry.opencmis.server.support.TypeManager
public class TypeManagerImpl extends Object implements org.apache.chemistry.opencmis.server.support.TypeManager
Manages a type system for a repository.Types can be added, the inheritance can be managed and type can be retrieved for a given type id.
Structures are not copied when returned.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_TYPE_CHILDREN
protected Map<String,String>
propQueryNameToId
protected Map<String,org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
typesMap
-
Constructor Summary
Constructors Constructor Description TypeManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addInheritedProperties(Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> propDefs, org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type)
protected void
addInheritedPropertyDefinitions(Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> propDefs, Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> superPropDefs)
void
addTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type)
void
addTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type, boolean addInheritedProperties)
Add a type to the type system.protected static List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
cloneTypes(List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> types, int depth, boolean includePropertyDefinitions)
Returns a clone of a types tree.void
deleteTypeDefinition(String typeId)
String
getPropertyIdForQueryName(String propQueryName)
String
getPropertyIdForQueryName(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition, String propQueryName)
List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
getRootTypes()
org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer
getTypeById(String typeId)
org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
getTypeByQueryName(String typeQueryName)
org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList
getTypeChildren(String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount)
org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
getTypeDefinition(String typeId)
Collection<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
getTypeDefinitionList()
List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
getTypeDescendants(String typeId, int depth, Boolean includePropertyDefinitions)
boolean
hasType(String typeId)
Checks if a type is known.void
updateTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition)
-
-
-
Field Detail
-
DEFAULT_MAX_TYPE_CHILDREN
public static final int DEFAULT_MAX_TYPE_CHILDREN
- See Also:
- Constant Field Values
-
typesMap
protected Map<String,org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> typesMap
-
-
Method Detail
-
getTypeById
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer getTypeById(String typeId)
- Specified by:
getTypeById
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
getTypeDefinition
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(String typeId)
-
hasType
public boolean hasType(String typeId)
Checks if a type is known.- Parameters:
typeId
- the type id- Returns:
true
if known- Since:
- 5.9.3
-
getTypeByQueryName
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeByQueryName(String typeQueryName)
- Specified by:
getTypeByQueryName
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
getTypeChildren
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount)
-
getTypeDescendants
public List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(String typeId, int depth, Boolean includePropertyDefinitions)
-
getTypeDefinitionList
public Collection<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDefinitionList()
- Specified by:
getTypeDefinitionList
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
getRootTypes
public List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getRootTypes()
- Specified by:
getRootTypes
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
addTypeDefinition
public void addTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type, boolean addInheritedProperties)
Add a type to the type system. Add type to children of parent types. If specified, add all properties from inherited types.,- Specified by:
addTypeDefinition
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
- Parameters:
type
- new type to add
-
addTypeDefinition
public void addTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type)
-
getPropertyIdForQueryName
public String getPropertyIdForQueryName(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition, String propQueryName)
- Specified by:
getPropertyIdForQueryName
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
addInheritedProperties
protected void addInheritedProperties(Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> propDefs, org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type)
-
addInheritedPropertyDefinitions
protected void addInheritedPropertyDefinitions(Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> propDefs, Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> superPropDefs)
-
cloneTypes
protected static List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> cloneTypes(List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> types, int depth, boolean includePropertyDefinitions)
Returns a clone of a types tree.Removes properties on the clone if requested, cuts the children of the clone if the depth is exceeded.
-
updateTypeDefinition
public void updateTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition)
- Specified by:
updateTypeDefinition
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
deleteTypeDefinition
public void deleteTypeDefinition(String typeId)
- Specified by:
deleteTypeDefinition
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-
-