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
Modifier and TypeFieldDescriptionstatic final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) getPropertyIdForQueryName
(String propQueryName) getPropertyIdForQueryName
(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition, String propQueryName) List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
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>
List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
getTypeDescendants
(String typeId, int depth, Boolean includePropertyDefinitions) boolean
Checks if a type is known.void
updateTypeDefinition
(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition typeDefinition)
-
Field Details
-
DEFAULT_MAX_TYPE_CHILDREN
public static final int DEFAULT_MAX_TYPE_CHILDREN- See Also:
-
typesMap
-
propQueryNameToId
-
-
Constructor Details
-
TypeManagerImpl
public TypeManagerImpl()
-
-
Method Details
-
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
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
-
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
-
getPropertyIdForQueryName
-
addInheritedProperties
-
addInheritedPropertyDefinitions
-
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
- Specified by:
deleteTypeDefinition
in interfaceorg.apache.chemistry.opencmis.server.support.TypeManager
-