org.opencms.cmis
Class CmsCmisRepository

java.lang.Object
  extended by org.opencms.cmis.A_CmsCmisRepository
      extended by org.opencms.cmis.CmsCmisRepository
All Implemented Interfaces:
I_CmsCmisRepository, I_CmsConfigurationParameterHandler, I_CmsRepository

public class CmsCmisRepository
extends A_CmsCmisRepository

Repository instance for CMIS repositories.


Field Summary
protected static org.apache.commons.logging.Log LOG
          The logger instance for this class.
static java.lang.String PARAM_DESCRIPTION
          The description parameter name.
static java.lang.String PARAM_PROJECT
          The project parameter name.
static java.lang.String PARAM_PROPERTY
          The property parameter name.
static java.lang.String PARAM_RENDITION
          The rendition parameter name.
 
Fields inherited from class org.opencms.cmis.A_CmsCmisRepository
CMIS_ALL, CMIS_READ, CMIS_WRITE, m_typeManager
 
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
 
Constructor Summary
CmsCmisRepository()
           
 
Method Summary
 void addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
          Adds a configuration parameter to this parameter configurable class instance.
protected  void checkWriteAccess()
          Checks whether we have write access to this repository and throws an exception otherwise.
 java.lang.String createDocument(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, java.lang.String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, java.util.List<java.lang.String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces)
          Creates a new document.
 java.lang.String createDocumentFromSource(CmsCmisCallContext context, java.lang.String sourceId, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, java.lang.String folderId, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, java.util.List<java.lang.String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces)
          Copies a document.
 java.lang.String createFolder(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, java.lang.String folderId, java.util.List<java.lang.String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces)
          Creates a new folder.
 java.lang.String createRelationship(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, java.util.List<java.lang.String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces)
          Creates a relationship.
 void deleteContentStream(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken)
          Deletes the content stream of an object.
 void deleteObject(CmsCmisCallContext context, java.lang.String objectId, boolean allVersions)
          Deletes a CMIS object.
 org.apache.chemistry.opencmis.commons.data.FailedToDeleteData deleteTree(CmsCmisCallContext context, java.lang.String folderId, boolean allVersions, org.apache.chemistry.opencmis.commons.enums.UnfileObject unfileObjects, boolean continueOnFailure)
          Deletes a whole file tree.
 org.apache.chemistry.opencmis.commons.data.Acl getAcl(CmsCmisCallContext context, java.lang.String objectId, boolean onlyBasicPermissions)
          Gets the ACL for an object.
 org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(CmsCmisCallContext context, java.lang.String objectId)
          Gets the allowable actions for an object.
 org.apache.chemistry.opencmis.commons.data.ObjectList getCheckedOutDocs(CmsCmisCallContext context, java.lang.String folderId, java.lang.String filter, java.lang.String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Corresponds to CMIS getCheckedOutDocs service method.
 org.apache.chemistry.opencmis.commons.data.ObjectInFolderList getChildren(CmsCmisCallContext context, java.lang.String folderId, java.lang.String filter, java.lang.String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, boolean includePathSegment, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Gets the children of a folder.
protected  CmsObject getCmsObject(CmsCmisCallContext context)
          Initializes a CMS context for the authentication data contained in a call context.
 CmsParameterConfiguration getConfiguration()
          Returns the parameters of this configurable class instance, or null if the class does not need any parameters.
 org.apache.chemistry.opencmis.commons.data.ContentStream getContentStream(CmsCmisCallContext context, java.lang.String objectId, java.lang.String streamId, java.math.BigInteger offset, java.math.BigInteger length)
          Gets the content stream for a CMIS object.
 java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> getDescendants(CmsCmisCallContext context, java.lang.String folderId, java.math.BigInteger depth, java.lang.String filter, boolean includeAllowableActions, boolean includePathSegment, boolean foldersOnly)
           
 java.lang.String getDescription()
          Gets the description of the repository.
 CmsRepositoryFilter getFilter()
          Gets the repository filter.
 org.apache.chemistry.opencmis.commons.data.ObjectData getFolderParent(CmsCmisCallContext context, java.lang.String folderId, java.lang.String filter)
          Corresponds to CMIS getFolderParent service method.
 java.lang.String getId()
          Gets the repository id.
 java.lang.String getName()
          Gets the name of the repository.
 org.apache.chemistry.opencmis.commons.data.ObjectData getObject(CmsCmisCallContext context, java.lang.String objectId, java.lang.String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, boolean includePolicyIds, boolean includeAcl)
          Gets the data for a CMIS object.
 org.apache.chemistry.opencmis.commons.data.ObjectData getObjectByPath(CmsCmisCallContext context, java.lang.String path, java.lang.String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, boolean includePolicyIds, boolean includeAcl)
          Reads a CMIS object by path.
 java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectParentData> getObjectParents(CmsCmisCallContext context, java.lang.String objectId, java.lang.String filter, boolean includeAllowableActions, boolean includeRelativePathSegment)
          Gets the parents of an object.
 org.apache.chemistry.opencmis.commons.data.ObjectList getObjectRelationships(CmsCmisCallContext context, java.lang.String objectId, boolean includeSubRelationshipTypes, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, java.lang.String typeId, java.lang.String filter, boolean includeAllowableActions, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Gets the relationships for an object.
 org.apache.chemistry.opencmis.commons.data.Properties getProperties(CmsCmisCallContext context, java.lang.String objectId, java.lang.String filter)
          Gets the properties for a CMIS object.
protected  java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectData> getRelationshipObjectData(CmsCmisCallContext context, CmsObject cms, CmsResource resource, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, java.util.Set<java.lang.String> filterSet, boolean includeAllowableActions)
          Gets the relationship data for a given resource.
protected  java.util.List<I_CmsCmisRenditionProvider> getRenditionProviders(CmsCmisRenditionFilter filter)
          Gets the rendition providers matching the given filter.
 java.util.List<org.apache.chemistry.opencmis.commons.data.RenditionData> getRenditions(CmsCmisCallContext context, java.lang.String objectId, java.lang.String renditionFilter, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Gets the renditions for a CMIS object.
 org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo()
          Gets the repository information for this repository.
protected  java.lang.String getResourceTypeFromProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties, java.lang.String defaultValue)
          Extracts the resource type from a set of CMIS properties.
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(CmsCmisCallContext context, java.lang.String typeId, boolean includePropertyDefinitions, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Gets the children of a given type.
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(CmsCmisCallContext context, java.lang.String typeId)
          Gets a type definition by id.
 java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(CmsCmisCallContext context, java.lang.String typeId, java.math.BigInteger depth, boolean includePropertyDefinitions)
          Gets the type descendants.
protected  CmsCmisTypeManager getTypeManager()
          Gets the type manager instance.
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 void initializeCms(CmsObject cms)
          Initializes this repository with an admin CMS object.
 void moveObject(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId, java.lang.String targetFolderId, java.lang.String sourceFolderId)
          Moves an object.
 org.apache.chemistry.opencmis.commons.data.ObjectList query(CmsCmisCallContext context, java.lang.String statement, boolean searchAllVersions, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Performs a query on the repository.
 void setContentStream(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId, boolean overwriteFlag, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream)
          Sets the content stream of an object.
 void setFilter(CmsRepositoryFilter filter)
          Sets the repository filter.
 void setName(java.lang.String name)
          Sets the name for this repository.
 void updateProperties(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken, org.apache.chemistry.opencmis.commons.data.Properties properties)
          Updates the properties for an object.
 
Methods inherited from class org.opencms.cmis.A_CmsCmisRepository
addObjectToFolder, applyAcl, applyAcl, applyPolicy, cancelCheckOut, checkIn, checkOut, createPolicy, extractRange, getAcePrincipalName, getAllVersions, getAppliedPolicies, getContentChanges, getObjectOfLatestVersion, getOpenCmsProperties, getPropertiesOfLatestVersion, notSupported, removeObjectFromFolder, removePolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_DESCRIPTION

public static final java.lang.String PARAM_DESCRIPTION
The description parameter name.

See Also:
Constant Field Values

PARAM_PROJECT

public static final java.lang.String PARAM_PROJECT
The project parameter name.

See Also:
Constant Field Values

PARAM_PROPERTY

public static final java.lang.String PARAM_PROPERTY
The property parameter name.

See Also:
Constant Field Values

PARAM_RENDITION

public static final java.lang.String PARAM_RENDITION
The rendition parameter name.

See Also:
Constant Field Values

LOG

protected static final org.apache.commons.logging.Log LOG
The logger instance for this class.

Constructor Detail

CmsCmisRepository

public CmsCmisRepository()
Method Detail

addConfigurationParameter

public void addConfigurationParameter(java.lang.String paramName,
                                      java.lang.String paramValue)
Description copied from interface: I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.

Parameters:
paramName - the name of the parameter
paramValue - the value for the parameter
See Also:
I_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)

createDocument

public java.lang.String createDocument(CmsCmisCallContext context,
                                       org.apache.chemistry.opencmis.commons.data.Properties propertiesObj,
                                       java.lang.String folderId,
                                       org.apache.chemistry.opencmis.commons.data.ContentStream contentStream,
                                       org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState,
                                       java.util.List<java.lang.String> policies,
                                       org.apache.chemistry.opencmis.commons.data.Acl addAces,
                                       org.apache.chemistry.opencmis.commons.data.Acl removeAces)
Description copied from interface: I_CmsCmisRepository
Creates a new document.

Parameters:
context - the call context
propertiesObj - the properties
folderId - the parent folder id
contentStream - the content stream
versioningState - the versioning state
policies - the policies
addAces - the access control entries
removeAces - the access control entries to remove
Returns:
the object id of the new document
See Also:
I_CmsCmisRepository.createDocument(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.data.Properties, java.lang.String, org.apache.chemistry.opencmis.commons.data.ContentStream, org.apache.chemistry.opencmis.commons.enums.VersioningState, java.util.List, org.apache.chemistry.opencmis.commons.data.Acl, org.apache.chemistry.opencmis.commons.data.Acl)

createDocumentFromSource

public java.lang.String createDocumentFromSource(CmsCmisCallContext context,
                                                 java.lang.String sourceId,
                                                 org.apache.chemistry.opencmis.commons.data.Properties propertiesObj,
                                                 java.lang.String folderId,
                                                 org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState,
                                                 java.util.List<java.lang.String> policies,
                                                 org.apache.chemistry.opencmis.commons.data.Acl addAces,
                                                 org.apache.chemistry.opencmis.commons.data.Acl removeAces)
Description copied from interface: I_CmsCmisRepository
Copies a document.

Parameters:
context - the call context
sourceId - the source object id
propertiesObj - the properties
folderId - the target folder id
versioningState - the versioning state
policies - the policies
addAces - the ACEs to add
removeAces - the ACES to remove
Returns:
the object id of the new document
See Also:
I_CmsCmisRepository.createDocumentFromSource(org.opencms.cmis.CmsCmisCallContext, java.lang.String, org.apache.chemistry.opencmis.commons.data.Properties, java.lang.String, org.apache.chemistry.opencmis.commons.enums.VersioningState, java.util.List, org.apache.chemistry.opencmis.commons.data.Acl, org.apache.chemistry.opencmis.commons.data.Acl)

createFolder

public java.lang.String createFolder(CmsCmisCallContext context,
                                     org.apache.chemistry.opencmis.commons.data.Properties propertiesObj,
                                     java.lang.String folderId,
                                     java.util.List<java.lang.String> policies,
                                     org.apache.chemistry.opencmis.commons.data.Acl addAces,
                                     org.apache.chemistry.opencmis.commons.data.Acl removeAces)
Description copied from interface: I_CmsCmisRepository
Creates a new folder.

Parameters:
context - the call context
propertiesObj - the properties
folderId - the parent folder id
policies - the policies
addAces - the ACEs to add
removeAces - the ACEs to remove
Returns:
the object id of the created folder
See Also:
I_CmsCmisRepository.createFolder(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.data.Properties, java.lang.String, java.util.List, org.apache.chemistry.opencmis.commons.data.Acl, org.apache.chemistry.opencmis.commons.data.Acl)

createRelationship

public java.lang.String createRelationship(CmsCmisCallContext context,
                                           org.apache.chemistry.opencmis.commons.data.Properties properties,
                                           java.util.List<java.lang.String> policies,
                                           org.apache.chemistry.opencmis.commons.data.Acl addAces,
                                           org.apache.chemistry.opencmis.commons.data.Acl removeAces)
Description copied from interface: I_CmsCmisRepository
Creates a relationship.

Parameters:
context - the call context
properties - the properties
policies - the policies
addAces - the ACEs to add
removeAces - the ACEs to remove
Returns:
the new relationship id
See Also:
I_CmsCmisRepository.createRelationship(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.data.Properties, java.util.List, org.apache.chemistry.opencmis.commons.data.Acl, org.apache.chemistry.opencmis.commons.data.Acl)

deleteContentStream

public void deleteContentStream(CmsCmisCallContext context,
                                org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId,
                                org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken)
Description copied from interface: I_CmsCmisRepository
Deletes the content stream of an object.

Parameters:
context - the call context
objectId - the object id
changeToken - the change token
See Also:
I_CmsCmisRepository.deleteContentStream(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.spi.Holder, org.apache.chemistry.opencmis.commons.spi.Holder)

deleteObject

public void deleteObject(CmsCmisCallContext context,
                         java.lang.String objectId,
                         boolean allVersions)
Description copied from interface: I_CmsCmisRepository
Deletes a CMIS object.

Parameters:
context - the call context
objectId - the id of the object to delete
allVersions - flag to delete all version
See Also:
I_CmsCmisRepository.deleteObject(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean)

deleteTree

public org.apache.chemistry.opencmis.commons.data.FailedToDeleteData deleteTree(CmsCmisCallContext context,
                                                                                java.lang.String folderId,
                                                                                boolean allVersions,
                                                                                org.apache.chemistry.opencmis.commons.enums.UnfileObject unfileObjects,
                                                                                boolean continueOnFailure)
Description copied from interface: I_CmsCmisRepository
Deletes a whole file tree.

Parameters:
context - the call context
folderId - the folder id
allVersions - flag to include all versions
unfileObjects - flag to unfile objects
continueOnFailure - flag to continue on failure
Returns:
data containing the objects which weren'T deleted successfully
See Also:
I_CmsCmisRepository.deleteTree(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.UnfileObject, boolean)

getAcl

public org.apache.chemistry.opencmis.commons.data.Acl getAcl(CmsCmisCallContext context,
                                                             java.lang.String objectId,
                                                             boolean onlyBasicPermissions)
Description copied from interface: I_CmsCmisRepository
Gets the ACL for an object.

Parameters:
context - the call context
objectId - the object id
onlyBasicPermissions - flag to only get basic permissions
Returns:
the ACL for the object
See Also:
I_CmsCmisRepository.getAcl(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean)

getAllowableActions

public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(CmsCmisCallContext context,
                                                                                       java.lang.String objectId)
Description copied from interface: I_CmsCmisRepository
Gets the allowable actions for an object.

Parameters:
context - the call context
objectId - the object id
Returns:
the allowable actions
See Also:
I_CmsCmisRepository.getAllowableActions(org.opencms.cmis.CmsCmisCallContext, java.lang.String)

getCheckedOutDocs

public org.apache.chemistry.opencmis.commons.data.ObjectList getCheckedOutDocs(CmsCmisCallContext context,
                                                                               java.lang.String folderId,
                                                                               java.lang.String filter,
                                                                               java.lang.String orderBy,
                                                                               boolean includeAllowableActions,
                                                                               org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                               java.lang.String renditionFilter,
                                                                               java.math.BigInteger maxItems,
                                                                               java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Corresponds to CMIS getCheckedOutDocs service method.

Returns:
a list of CMIS objects
See Also:
I_CmsCmisRepository.getCheckedOutDocs(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, java.math.BigInteger, java.math.BigInteger)

getChildren

public org.apache.chemistry.opencmis.commons.data.ObjectInFolderList getChildren(CmsCmisCallContext context,
                                                                                 java.lang.String folderId,
                                                                                 java.lang.String filter,
                                                                                 java.lang.String orderBy,
                                                                                 boolean includeAllowableActions,
                                                                                 org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                                 java.lang.String renditionFilter,
                                                                                 boolean includePathSegment,
                                                                                 java.math.BigInteger maxItems,
                                                                                 java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Gets the children of a folder.

Parameters:
context - the call context
folderId - the parent folder id
filter - the property filter
orderBy - the ordering clause
includeAllowableActions - flag to include allowable actions
includeRelationships - flag to include relations
renditionFilter - the rendition filter string
includePathSegment - flag to include the path segment
maxItems - the maximum number of items
skipCount - the index from which to start
Returns:
the object information
See Also:
I_CmsCmisRepository.getChildren(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, boolean, java.math.BigInteger, java.math.BigInteger)

getConfiguration

public CmsParameterConfiguration getConfiguration()
Description copied from interface: I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, or null if the class does not need any parameters.

Returns:
the parameters of this configurable class instance, or null if the class does not need any parameters
See Also:
I_CmsCmisRepository.getConfiguration()

getContentStream

public org.apache.chemistry.opencmis.commons.data.ContentStream getContentStream(CmsCmisCallContext context,
                                                                                 java.lang.String objectId,
                                                                                 java.lang.String streamId,
                                                                                 java.math.BigInteger offset,
                                                                                 java.math.BigInteger length)
Description copied from interface: I_CmsCmisRepository
Gets the content stream for a CMIS object.

Parameters:
context - the call context
objectId - the object id
streamId - the rendition stream id
Returns:
the content stream
See Also:
I_CmsCmisRepository.getContentStream(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, java.math.BigInteger, java.math.BigInteger)

getDescendants

public java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> getDescendants(CmsCmisCallContext context,
                                                                                                         java.lang.String folderId,
                                                                                                         java.math.BigInteger depth,
                                                                                                         java.lang.String filter,
                                                                                                         boolean includeAllowableActions,
                                                                                                         boolean includePathSegment,
                                                                                                         boolean foldersOnly)
Parameters:
context - the call context
folderId - the folder id
depth - the maximum depth
filter - the property filter
includeAllowableActions - flag to include allowable actions
includePathSegment - flag to include path segments
foldersOnly - flag to ignore documents and only return folders
Returns:
the list of descendants
See Also:
I_CmsCmisRepository.getDescendants(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.math.BigInteger, java.lang.String, boolean, boolean, boolean)

getDescription

public java.lang.String getDescription()
Description copied from interface: I_CmsCmisRepository
Gets the description of the repository.

Returns:
the repository description
See Also:
I_CmsCmisRepository.getDescription()

getFilter

public CmsRepositoryFilter getFilter()
Description copied from interface: I_CmsRepository
Gets the repository filter.

Returns:
the repository filter
See Also:
I_CmsCmisRepository.getFilter()

getFolderParent

public org.apache.chemistry.opencmis.commons.data.ObjectData getFolderParent(CmsCmisCallContext context,
                                                                             java.lang.String folderId,
                                                                             java.lang.String filter)
Description copied from interface: I_CmsCmisRepository
Corresponds to CMIS getFolderParent service method.

Parameters:
context - the call context
folderId - the folder id
filter - the property filter
Returns:
the parent object data
See Also:
I_CmsCmisRepository.getFolderParent(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String)

getId

public java.lang.String getId()
Description copied from interface: I_CmsCmisRepository
Gets the repository id.

Returns:
the repository id
See Also:
I_CmsCmisRepository.getId()

getName

public java.lang.String getName()
Description copied from interface: I_CmsCmisRepository
Gets the name of the repository.

Returns:
the name of the repository
See Also:
I_CmsCmisRepository.getName()

getObject

public org.apache.chemistry.opencmis.commons.data.ObjectData getObject(CmsCmisCallContext context,
                                                                       java.lang.String objectId,
                                                                       java.lang.String filter,
                                                                       boolean includeAllowableActions,
                                                                       org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                       java.lang.String renditionFilter,
                                                                       boolean includePolicyIds,
                                                                       boolean includeAcl)
Description copied from interface: I_CmsCmisRepository
Gets the data for a CMIS object.

Parameters:
context - the CMIS call context
objectId - the id of the object
filter - the property filter
includeAllowableActions - flag to include allowable actions
includeRelationships - flag to include relationships
renditionFilter - the rendition filter string
includePolicyIds - flag to include policy ids
includeAcl - flag to include ACLs
Returns:
the CMIS object data
See Also:
I_CmsCmisRepository.getObject(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, boolean, boolean)

getObjectByPath

public org.apache.chemistry.opencmis.commons.data.ObjectData getObjectByPath(CmsCmisCallContext context,
                                                                             java.lang.String path,
                                                                             java.lang.String filter,
                                                                             boolean includeAllowableActions,
                                                                             org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                             java.lang.String renditionFilter,
                                                                             boolean includePolicyIds,
                                                                             boolean includeAcl)
Description copied from interface: I_CmsCmisRepository
Reads a CMIS object by path.

Parameters:
context - the call context
path - the repository path
filter - the property filter string
includeAllowableActions - flag to include allowable actions
includeRelationships - flag to include relationships
renditionFilter - the rendition filter string
includePolicyIds - flag to include policy ids
includeAcl - flag to include ACLs
Returns:
the object data
See Also:
I_CmsCmisRepository.getObjectByPath(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, boolean, boolean)

getObjectParents

public java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectParentData> getObjectParents(CmsCmisCallContext context,
                                                                                                    java.lang.String objectId,
                                                                                                    java.lang.String filter,
                                                                                                    boolean includeAllowableActions,
                                                                                                    boolean includeRelativePathSegment)
Description copied from interface: I_CmsCmisRepository
Gets the parents of an object.

Parameters:
context - the call context
objectId - the object id
Returns:
the data for the object parents
See Also:
I_CmsCmisRepository.getObjectParents(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, boolean, boolean)

getObjectRelationships

public org.apache.chemistry.opencmis.commons.data.ObjectList getObjectRelationships(CmsCmisCallContext context,
                                                                                    java.lang.String objectId,
                                                                                    boolean includeSubRelationshipTypes,
                                                                                    org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection,
                                                                                    java.lang.String typeId,
                                                                                    java.lang.String filter,
                                                                                    boolean includeAllowableActions,
                                                                                    java.math.BigInteger maxItems,
                                                                                    java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Gets the relationships for an object.

Parameters:
context - the call context
objectId - the object id
includeSubRelationshipTypes - flag to include relationship subtypes
relationshipDirection - the direction for the relations
typeId - the relation type id
filter - the property filter
includeAllowableActions - flag to include allowable actions
maxItems - the maximum number of items to return
skipCount - the number of items to skip
Returns:
the relationships for the object
See Also:
I_CmsCmisRepository.getObjectRelationships(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection, java.lang.String, java.lang.String, boolean, java.math.BigInteger, java.math.BigInteger)

getProperties

public org.apache.chemistry.opencmis.commons.data.Properties getProperties(CmsCmisCallContext context,
                                                                           java.lang.String objectId,
                                                                           java.lang.String filter)
Description copied from interface: I_CmsCmisRepository
Gets the properties for a CMIS object.

Parameters:
context - the call context
objectId - the CMIS object id
filter - the property filter string
Returns:
the set of properties
See Also:
I_CmsCmisRepository.getProperties(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String)

getRenditions

public java.util.List<org.apache.chemistry.opencmis.commons.data.RenditionData> getRenditions(CmsCmisCallContext context,
                                                                                              java.lang.String objectId,
                                                                                              java.lang.String renditionFilter,
                                                                                              java.math.BigInteger maxItems,
                                                                                              java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Gets the renditions for a CMIS object.

Parameters:
context - the call context
objectId - the object id
renditionFilter - the rendition filter
maxItems - the maximum number of renditions
skipCount - the number of renditions to skip
Returns:
the list of renditions
See Also:
I_CmsCmisRepository.getRenditions(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.lang.String, java.math.BigInteger, java.math.BigInteger)

getRepositoryInfo

public org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo()
Description copied from interface: I_CmsCmisRepository
Gets the repository information for this repository.

Returns:
the repository info
See Also:
I_CmsCmisRepository.getRepositoryInfo()

getTypeChildren

public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(CmsCmisCallContext context,
                                                                                            java.lang.String typeId,
                                                                                            boolean includePropertyDefinitions,
                                                                                            java.math.BigInteger maxItems,
                                                                                            java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Gets the children of a given type.

Parameters:
context - the call context
typeId - the parent type id
includePropertyDefinitions - flag to include property definitions
maxItems - the maximum number of items to return
skipCount - the number of items to skip
Returns:
the list of child type definitions
See Also:
I_CmsCmisRepository.getTypeChildren(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean, java.math.BigInteger, java.math.BigInteger)

getTypeDefinition

public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(CmsCmisCallContext context,
                                                                                          java.lang.String typeId)
Description copied from interface: I_CmsCmisRepository
Gets a type definition by id.

Parameters:
context - the call context
typeId - the type id
Returns:
the type definition for the given id
See Also:
I_CmsCmisRepository.getTypeDefinition(org.opencms.cmis.CmsCmisCallContext, java.lang.String)

getTypeDescendants

public java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(CmsCmisCallContext context,
                                                                                                                    java.lang.String typeId,
                                                                                                                    java.math.BigInteger depth,
                                                                                                                    boolean includePropertyDefinitions)
Description copied from interface: I_CmsCmisRepository
Gets the type descendants.

Parameters:
context - the call context
typeId - the parent type id
depth - the maximum type depth
includePropertyDefinitions - flag to include the property definitions for types
Returns:
the list of type definitions
See Also:
I_CmsCmisRepository.getTypeDescendants(org.opencms.cmis.CmsCmisCallContext, java.lang.String, java.math.BigInteger, boolean)

initConfiguration

public void initConfiguration()
                       throws CmsConfigurationException
Description copied from interface: I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.

Throws:
CmsConfigurationException - if something goes wrong
See Also:
I_CmsConfigurationParameterHandler.initConfiguration()

initializeCms

public void initializeCms(CmsObject cms)
                   throws CmsException
Description copied from interface: I_CmsRepository
Initializes this repository with an admin CMS object.

Parameters:
cms - an admin CMS object
Throws:
CmsException - if something goes wrong
See Also:
I_CmsRepository.initializeCms(org.opencms.file.CmsObject)

moveObject

public void moveObject(CmsCmisCallContext context,
                       org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId,
                       java.lang.String targetFolderId,
                       java.lang.String sourceFolderId)
Description copied from interface: I_CmsCmisRepository
Moves an object.

Parameters:
context - the call context
objectId - the object id
targetFolderId - source source folder id
sourceFolderId - the target folder id
See Also:
I_CmsCmisRepository.moveObject(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.spi.Holder, java.lang.String, java.lang.String)

query

public org.apache.chemistry.opencmis.commons.data.ObjectList query(CmsCmisCallContext context,
                                                                   java.lang.String statement,
                                                                   boolean searchAllVersions,
                                                                   boolean includeAllowableActions,
                                                                   org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                   java.lang.String renditionFilter,
                                                                   java.math.BigInteger maxItems,
                                                                   java.math.BigInteger skipCount)
Description copied from interface: I_CmsCmisRepository
Performs a query on the repository.

Specified by:
query in interface I_CmsCmisRepository
Overrides:
query in class A_CmsCmisRepository
Parameters:
context - the call context
statement - the query
searchAllVersions - flag to search all versions
includeAllowableActions - flag to include allowable actions
includeRelationships - flag to include relationships
renditionFilter - the filter string for renditions
maxItems - the maximum number of items to return
skipCount - the number of items to skip
Returns:
the query result objects
See Also:
I_CmsCmisRepository.query(org.opencms.cmis.CmsCmisCallContext, java.lang.String, boolean, boolean, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships, java.lang.String, java.math.BigInteger, java.math.BigInteger)

setContentStream

public void setContentStream(CmsCmisCallContext context,
                             org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId,
                             boolean overwriteFlag,
                             org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken,
                             org.apache.chemistry.opencmis.commons.data.ContentStream contentStream)
Description copied from interface: I_CmsCmisRepository
Sets the content stream of an object.

Parameters:
context - the call context
objectId - the id of the object
overwriteFlag - flag to overwrite the content stream
changeToken - the change token
contentStream - the new content stream
See Also:
I_CmsCmisRepository.setContentStream(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.spi.Holder, boolean, org.apache.chemistry.opencmis.commons.spi.Holder, org.apache.chemistry.opencmis.commons.data.ContentStream)

setFilter

public void setFilter(CmsRepositoryFilter filter)
Description copied from interface: I_CmsRepository
Sets the repository filter.

Parameters:
filter - the repository filter
See Also:
I_CmsRepository.setFilter(org.opencms.repository.CmsRepositoryFilter)

setName

public void setName(java.lang.String name)
Description copied from interface: I_CmsRepository
Sets the name for this repository.

Parameters:
name - the name to use for the repository
See Also:
I_CmsRepository.setName(java.lang.String)

updateProperties

public void updateProperties(CmsCmisCallContext context,
                             org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> objectId,
                             org.apache.chemistry.opencmis.commons.spi.Holder<java.lang.String> changeToken,
                             org.apache.chemistry.opencmis.commons.data.Properties properties)
Description copied from interface: I_CmsCmisRepository
Updates the properties for an object.

Parameters:
context - the call context
objectId - the object id
changeToken - the change token
properties - the properties
See Also:
I_CmsCmisRepository.updateProperties(org.opencms.cmis.CmsCmisCallContext, org.apache.chemistry.opencmis.commons.spi.Holder, org.apache.chemistry.opencmis.commons.spi.Holder, org.apache.chemistry.opencmis.commons.data.Properties)

checkWriteAccess

protected void checkWriteAccess()
Checks whether we have write access to this repository and throws an exception otherwise.


getCmsObject

protected CmsObject getCmsObject(CmsCmisCallContext context)
Initializes a CMS context for the authentication data contained in a call context.

Parameters:
context - the call context
Returns:
the initialized CMS context

getRelationshipObjectData

protected java.util.List<org.apache.chemistry.opencmis.commons.data.ObjectData> getRelationshipObjectData(CmsCmisCallContext context,
                                                                                                          CmsObject cms,
                                                                                                          CmsResource resource,
                                                                                                          org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection,
                                                                                                          java.util.Set<java.lang.String> filterSet,
                                                                                                          boolean includeAllowableActions)
                                                                                                   throws CmsException
Gets the relationship data for a given resource.

Parameters:
context - the call context
cms - the CMS context
resource - the resource
relationshipDirection - the relationship direction
filterSet - the property filter
includeAllowableActions - true if allowable actions should be included
Returns:
the list of relationship data
Throws:
CmsException - if something goes wrong

getRenditionProviders

protected java.util.List<I_CmsCmisRenditionProvider> getRenditionProviders(CmsCmisRenditionFilter filter)
Gets the rendition providers matching the given filter.

Parameters:
filter - the rendition filter
Returns:
the rendition providers matching the filter

getResourceTypeFromProperties

protected java.lang.String getResourceTypeFromProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties,
                                                         java.lang.String defaultValue)
Extracts the resource type from a set of CMIS properties.

Parameters:
properties - the CMIS properties
defaultValue - the default value
Returns:
the resource type property, or the default value if the property was not found

getTypeManager

protected CmsCmisTypeManager getTypeManager()
Gets the type manager instance.

Returns:
the type manager instance