public class JcrTypeManager extends Object implements TypeManager
Modifier and Type | Field and Description |
---|---|
static String |
DOCUMENT_TYPE_ID |
static String |
FOLDER_TYPE_ID |
static String |
NAMESPACE |
static String |
POLICY_TYPE_ID |
static String |
RELATIONSHIP_TYPE_ID |
Constructor and Description |
---|
JcrTypeManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addBasePropertyDefinitions(AbstractTypeDefinition type) |
static void |
addDocumentPropertyDefinitions(DocumentTypeDefinitionImpl type) |
static void |
addFolderPropertyDefinitions(FolderTypeDefinitionImpl type) |
boolean |
addType(TypeDefinition type)
Adds a type to collection with inheriting base type properties.
|
static TypeDefinition |
copyTypeDefinition(TypeDefinition type) |
static PropertyDefinition<?> |
createPropDef(String id,
String displayName,
String description,
PropertyType datatype,
Cardinality cardinality,
Updatability updateability,
boolean inherited,
boolean required)
Creates a property definition object.
|
String |
getPropertyIdForQueryName(TypeDefinition typeDefinition,
String propQueryName)
retrieve the property id from a type for a given property query name
|
List<TypeDefinitionContainer> |
getRootTypes()
return a list of the root types as defined in the CMIS spec (for
document, folder, policy and relationship
|
TypeDefinition |
getType(String typeId) |
TypeDefinitionContainer |
getTypeById(String typeId)
return a type definition from the type definition id
|
TypeDefinition |
getTypeByQueryName(String typeQueryName)
return a type definition from the type query name or null if not found
|
TypeDefinitionList |
getTypeChildren(String typeId,
boolean includePropertyDefinitions,
BigInteger maxItems,
BigInteger skipCount)
See CMIS 1.0 section 2.2.2.3 getTypeChildren
|
Collection<TypeDefinitionContainer> |
getTypeDefinitionList()
return a list of all types known in this repository
|
List<TypeDefinitionContainer> |
getTypesDescendants(String typeId,
BigInteger depth,
Boolean includePropertyDefinitions)
See CMIS 1.0 section 2.2.2.4 getTypeDescendants
|
static boolean |
isVersionable(TypeDefinition typeDef) |
public static final String DOCUMENT_TYPE_ID
public static final String FOLDER_TYPE_ID
public static final String RELATIONSHIP_TYPE_ID
public static final String POLICY_TYPE_ID
public static final String NAMESPACE
public boolean addType(TypeDefinition type)
type
- type to addtrue
iff the type was successfully addedpublic TypeDefinition getType(String typeId)
public static boolean isVersionable(TypeDefinition typeDef)
public static TypeDefinition copyTypeDefinition(TypeDefinition type)
public TypeDefinitionList getTypeChildren(String typeId, boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount)
public List<TypeDefinitionContainer> getTypesDescendants(String typeId, BigInteger depth, Boolean includePropertyDefinitions)
public TypeDefinitionContainer getTypeById(String typeId)
TypeManager
getTypeById
in interface TypeManager
typeId
- id of the type definitionpublic TypeDefinition getTypeByQueryName(String typeQueryName)
TypeManager
getTypeByQueryName
in interface TypeManager
typeQueryName
- query name of the type definitionpublic Collection<TypeDefinitionContainer> getTypeDefinitionList()
TypeManager
getTypeDefinitionList
in interface TypeManager
public List<TypeDefinitionContainer> getRootTypes()
TypeManager
getRootTypes
in interface TypeManager
public String getPropertyIdForQueryName(TypeDefinition typeDefinition, String propQueryName)
TypeManager
getPropertyIdForQueryName
in interface TypeManager
typeDefinition
- type definition containing query namepropQueryName
- query name of propertypublic static void addBasePropertyDefinitions(AbstractTypeDefinition type)
public static void addFolderPropertyDefinitions(FolderTypeDefinitionImpl type)
public static void addDocumentPropertyDefinitions(DocumentTypeDefinitionImpl type)
public static PropertyDefinition<?> createPropDef(String id, String displayName, String description, PropertyType datatype, Cardinality cardinality, Updatability updateability, boolean inherited, boolean required)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.