org.opencms.cmis
Class CmsCmisTypeManager

java.lang.Object
  extended by org.opencms.cmis.CmsCmisTypeManager

public class CmsCmisTypeManager
extends java.lang.Object

This class keeps track of all the types which should be available for a I_CmsCmisRepository.


Field Summary
static java.lang.String DOCUMENT_TYPE_ID
          CMIS type id for documents.
static java.lang.String FOLDER_TYPE_ID
          CMIS type id for folders.
static java.lang.String INHERITED_PREFIX
          Prefix for inherited properties.
static java.lang.String POLICY_TYPE_ID
          CMIS type id for policies.
static java.lang.String PROPERTY_PREFIX
          The prefix used for normal OpenCms resource properties.
static java.lang.String PROPERTY_PREFIX_DYNAMIC
          Prefix for dynamic properties.
static java.lang.String PROPERTY_PREFIX_SPECIAL
          The prefix for special properties.
static java.lang.String PROPERTY_RESOURCE_TYPE
          The name of the propery containing the resource type name.
static java.lang.String RELATIONSHIP_TYPE_ID
          CMIS type id for relationships.
static long UPDATE_INTERVAL
          Need to refresh property data after this time.
 
Constructor Summary
CmsCmisTypeManager(CmsObject adminCms, java.util.List<I_CmsPropertyProvider> propertyProviders)
          Creates a new type manager instance.
 
Method Summary
 java.util.List<java.lang.String> getCmsPropertyNames()
          Gets a list of names of OpenCms property definitions.
 I_CmsPropertyProvider getPropertyProvider(java.lang.String key)
          Gets the property provider for a given key.
 java.util.List<I_CmsPropertyProvider> getPropertyProviders()
          Gets the list of all property providers.
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getType(java.lang.String typeId)
          Gets a type definition by id.
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(java.lang.String typeId, boolean includePropertyDefinitions, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Collects the children of a type.
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(java.lang.String typeId)
          Gets the type definition for a given id in the given call context.
 java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(java.lang.String typeId, java.math.BigInteger depth, boolean includePropertyDefinitions)
          Gets the descendants of a type.
 
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
CMIS type id for documents.


FOLDER_TYPE_ID

public static final java.lang.String FOLDER_TYPE_ID
CMIS type id for folders.


INHERITED_PREFIX

public static final java.lang.String INHERITED_PREFIX
Prefix for inherited properties.

See Also:
Constant Field Values

POLICY_TYPE_ID

public static final java.lang.String POLICY_TYPE_ID
CMIS type id for policies.


PROPERTY_PREFIX

public static final java.lang.String PROPERTY_PREFIX
The prefix used for normal OpenCms resource properties.

See Also:
Constant Field Values

PROPERTY_PREFIX_DYNAMIC

public static final java.lang.String PROPERTY_PREFIX_DYNAMIC
Prefix for dynamic properties.

See Also:
Constant Field Values

PROPERTY_PREFIX_SPECIAL

public static final java.lang.String PROPERTY_PREFIX_SPECIAL
The prefix for special properties.

See Also:
Constant Field Values

PROPERTY_RESOURCE_TYPE

public static final java.lang.String PROPERTY_RESOURCE_TYPE
The name of the propery containing the resource type name.

See Also:
Constant Field Values

RELATIONSHIP_TYPE_ID

public static final java.lang.String RELATIONSHIP_TYPE_ID
CMIS type id for relationships.


UPDATE_INTERVAL

public static final long UPDATE_INTERVAL
Need to refresh property data after this time.

See Also:
Constant Field Values
Constructor Detail

CmsCmisTypeManager

public CmsCmisTypeManager(CmsObject adminCms,
                          java.util.List<I_CmsPropertyProvider> propertyProviders)
                   throws CmsException
Creates a new type manager instance.

Parameters:
adminCms - a CMS context with admin privileges
propertyProviders - list which will be filled with property providers
Throws:
CmsException - if something goes wrong
Method Detail

getCmsPropertyNames

public java.util.List<java.lang.String> getCmsPropertyNames()
Gets a list of names of OpenCms property definitions.

Returns:
the list of OpenCms property names

getPropertyProvider

public I_CmsPropertyProvider getPropertyProvider(java.lang.String key)
Gets the property provider for a given key.

Parameters:
key - the property nme
Returns:
the property provider for the given name, or null if there isn't any

getPropertyProviders

public java.util.List<I_CmsPropertyProvider> getPropertyProviders()
Gets the list of all property providers.

Returns:
the list of property providers

getType

public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getType(java.lang.String typeId)
Gets a type definition by id.

Parameters:
typeId - the type id
Returns:
the type definition

getTypeChildren

public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(java.lang.String typeId,
                                                                                            boolean includePropertyDefinitions,
                                                                                            java.math.BigInteger maxItems,
                                                                                            java.math.BigInteger skipCount)
Collects the children of a type.

Parameters:
typeId - the id of the type
includePropertyDefinitions - true if the property definitions should be included
maxItems - the maximum number of items to return
skipCount - the number of items to skip
Returns:
the children of the type

getTypeDefinition

public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(java.lang.String typeId)
Gets the type definition for a given id in the given call context.

Parameters:
typeId - the type id
Returns:
the matching type definition

getTypeDescendants

public java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(java.lang.String typeId,
                                                                                                                    java.math.BigInteger depth,
                                                                                                                    boolean includePropertyDefinitions)
Gets the descendants of a type.

Parameters:
typeId - the parent type id
depth - the depth up to which the descendant types should be collected
includePropertyDefinitions - true if the property definitions should be included
Returns:
the descendants of the type