org.apache.chemistry.opencmis.jcr
Class JcrTypeManager

java.lang.Object
  extended by org.apache.chemistry.opencmis.jcr.JcrTypeManager
All Implemented Interfaces:
TypeManager

public class JcrTypeManager
extends java.lang.Object
implements TypeManager

Type Manager.


Field Summary
static java.lang.String DOCUMENT_TYPE_ID
           
static java.lang.String DOCUMENT_UNVERSIONED_TYPE_ID
           
static java.lang.String FOLDER_TYPE_ID
           
static java.lang.String POLICY_TYPE_ID
           
static java.lang.String RELATIONSHIP_TYPE_ID
           
 
Constructor Summary
JcrTypeManager()
           
 
Method Summary
 boolean addType(TypeDefinition type)
          Adds a type to collection with inheriting base type properties.
static TypeDefinition copyTypeDefinition(TypeDefinition type)
           
 java.lang.String getPropertyIdForQueryName(TypeDefinition typeDefinition, java.lang.String propQueryName)
          retrieve the property id from a type for a given property query name
 java.util.List<TypeDefinitionContainer> getRootTypes()
          return a list of the root types as defined in the CMIS spec (for document, folder, policy and relationship
 TypeDefinition getType(java.lang.String typeId)
           
 TypeDefinitionContainer getTypeById(java.lang.String typeId)
          return a type definition from the type definition id
 TypeDefinition getTypeByQueryName(java.lang.String typeQueryName)
          return a type definition from the type query name or null if not found
 TypeDefinitionList getTypeChildren(java.lang.String typeId, boolean includePropertyDefinitions, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          See CMIS 1.0 section 2.2.2.3 getTypeChildren
 java.util.Collection<TypeDefinitionContainer> getTypeDefinitionList()
          return a list of all types known in this repository
 java.util.List<TypeDefinitionContainer> getTypesDescendants(java.lang.String typeId, java.math.BigInteger depth, java.lang.Boolean includePropertyDefinitions)
          See CMIS 1.0 section 2.2.2.4 getTypeDescendants
static boolean isVersionable(TypeDefinition typeDef)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENT_TYPE_ID

public static final java.lang.String DOCUMENT_TYPE_ID
See Also:
Constant Field Values

DOCUMENT_UNVERSIONED_TYPE_ID

public static final java.lang.String DOCUMENT_UNVERSIONED_TYPE_ID
See Also:
Constant Field Values

FOLDER_TYPE_ID

public static final java.lang.String FOLDER_TYPE_ID
See Also:
Constant Field Values

RELATIONSHIP_TYPE_ID

public static final java.lang.String RELATIONSHIP_TYPE_ID
See Also:
Constant Field Values

POLICY_TYPE_ID

public static final java.lang.String POLICY_TYPE_ID
See Also:
Constant Field Values
Constructor Detail

JcrTypeManager

public JcrTypeManager()
Method Detail

addType

public boolean addType(TypeDefinition type)
Adds a type to collection with inheriting base type properties.

Parameters:
type - type to add
Returns:
true iff the type was successfully added

getType

public TypeDefinition getType(java.lang.String typeId)

isVersionable

public static boolean isVersionable(TypeDefinition typeDef)

copyTypeDefinition

public static TypeDefinition copyTypeDefinition(TypeDefinition type)

getTypeChildren

public TypeDefinitionList getTypeChildren(java.lang.String typeId,
                                          boolean includePropertyDefinitions,
                                          java.math.BigInteger maxItems,
                                          java.math.BigInteger skipCount)
See CMIS 1.0 section 2.2.2.3 getTypeChildren


getTypesDescendants

public java.util.List<TypeDefinitionContainer> getTypesDescendants(java.lang.String typeId,
                                                                   java.math.BigInteger depth,
                                                                   java.lang.Boolean includePropertyDefinitions)
See CMIS 1.0 section 2.2.2.4 getTypeDescendants


getTypeById

public TypeDefinitionContainer getTypeById(java.lang.String typeId)
Description copied from interface: TypeManager
return a type definition from the type definition id

Specified by:
getTypeById in interface TypeManager
Parameters:
typeId - id of the type definition
Returns:
type definition for this id

getTypeByQueryName

public TypeDefinition getTypeByQueryName(java.lang.String typeQueryName)
Description copied from interface: TypeManager
return a type definition from the type query name or null if not found

Specified by:
getTypeByQueryName in interface TypeManager
Parameters:
typeQueryName - query name of the type definition
Returns:
type definition for this query name

getTypeDefinitionList

public java.util.Collection<TypeDefinitionContainer> getTypeDefinitionList()
Description copied from interface: TypeManager
return a list of all types known in this repository

Specified by:
getTypeDefinitionList in interface TypeManager
Returns:

getRootTypes

public java.util.List<TypeDefinitionContainer> getRootTypes()
Description copied from interface: TypeManager
return a list of the root types as defined in the CMIS spec (for document, folder, policy and relationship

Specified by:
getRootTypes in interface TypeManager
Returns:

getPropertyIdForQueryName

public java.lang.String getPropertyIdForQueryName(TypeDefinition typeDefinition,
                                                  java.lang.String propQueryName)
Description copied from interface: TypeManager
retrieve the property id from a type for a given property query name

Specified by:
getPropertyIdForQueryName in interface TypeManager
Parameters:
typeDefinition - type definition containing query name
propQueryName - query name of property
Returns:
property id of property or null if not found


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.