Package org.opencms.cmis
Class CmsCmisRepository
java.lang.Object
org.opencms.cmis.A_CmsCmisRepository
org.opencms.cmis.CmsCmisRepository
- All Implemented Interfaces:
I_CmsCmisRepository
,I_CmsConfigurationParameterHandler
,I_CmsRepository
Repository instance for CMIS repositories.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Log
The logger instance for this class.static final String
The description parameter name.static final String
The project parameter name.static final String
The property parameter name.static final String
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationParameter
(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.protected void
Checks whether we have write access to this repository and throws an exception otherwise.createDocument
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Creates a new document.createDocumentFromSource
(CmsCmisCallContext context, String sourceId, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Copies a document.createFolder
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Creates a new folder.createRelationship
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, List<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<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<String> changeToken) Deletes the content stream of an object.void
deleteObject
(CmsCmisCallContext context, String objectId, boolean allVersions) Deletes a CMIS object.org.apache.chemistry.opencmis.commons.data.FailedToDeleteData
deleteTree
(CmsCmisCallContext context, 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, String objectId, boolean onlyBasicPermissions) Gets the ACL for an object.org.apache.chemistry.opencmis.commons.data.AllowableActions
getAllowableActions
(CmsCmisCallContext context, String objectId) Gets the allowable actions for an object.org.apache.chemistry.opencmis.commons.data.ObjectList
getCheckedOutDocs
(CmsCmisCallContext context, String folderId, String filter, String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Corresponds to CMIS getCheckedOutDocs service method.org.apache.chemistry.opencmis.commons.data.ObjectInFolderList
getChildren
(CmsCmisCallContext context, String folderId, String filter, String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePathSegment, BigInteger maxItems, 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.Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.org.apache.chemistry.opencmis.commons.data.ContentStream
getContentStream
(CmsCmisCallContext context, String objectId, String streamId, BigInteger offset, BigInteger length) Gets the content stream for a CMIS object.List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer>
getDescendants
(CmsCmisCallContext context, String folderId, BigInteger depth, String filter, boolean includeAllowableActions, boolean includePathSegment, boolean foldersOnly) Gets the description of the repository.Gets the repository filter.org.apache.chemistry.opencmis.commons.data.ObjectData
getFolderParent
(CmsCmisCallContext context, String folderId, String filter) Corresponds to CMIS getFolderParent service method.getId()
Gets the repository id.getName()
Gets the name of the repository.org.apache.chemistry.opencmis.commons.data.ObjectData
getObject
(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Gets the data for a CMIS object.org.apache.chemistry.opencmis.commons.data.ObjectData
getObjectByPath
(CmsCmisCallContext context, String path, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Reads a CMIS object by path.List<org.apache.chemistry.opencmis.commons.data.ObjectParentData>
getObjectParents
(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, boolean includeRelativePathSegment) Gets the parents of an object.org.apache.chemistry.opencmis.commons.data.ObjectList
getObjectRelationships
(CmsCmisCallContext context, String objectId, boolean includeSubRelationshipTypes, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, String typeId, String filter, boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount) Gets the relationships for an object.org.apache.chemistry.opencmis.commons.data.Properties
getProperties
(CmsCmisCallContext context, String objectId, String filter) Gets the properties for a CMIS object.protected List<org.apache.chemistry.opencmis.commons.data.ObjectData>
getRelationshipObjectData
(CmsCmisCallContext context, CmsObject cms, CmsResource resource, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, Set<String> filterSet, boolean includeAllowableActions) Gets the relationship data for a given resource.protected List<I_CmsCmisRenditionProvider>
Gets the rendition providers matching the given filter.List<org.apache.chemistry.opencmis.commons.data.RenditionData>
getRenditions
(CmsCmisCallContext context, String objectId, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Gets the renditions for a CMIS object.org.apache.chemistry.opencmis.commons.data.RepositoryInfo
Gets the repository information for this repository.protected String
getResourceTypeFromProperties
(Map<String, org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties, String defaultValue) Extracts the resource type from a set of CMIS properties.Gets the repository-specific file translations.org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList
getTypeChildren
(CmsCmisCallContext context, String typeId, boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount) Gets the children of a given type.org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
getTypeDefinition
(CmsCmisCallContext context, String typeId) Gets a type definition by id.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer>
getTypeDescendants
(CmsCmisCallContext context, String typeId, BigInteger depth, boolean includePropertyDefinitions) Gets the type descendants.protected CmsCmisTypeManager
Gets the type manager instance.void
Initializes a configuration after all parameters have been added.void
initializeCms
(CmsObject cms) Initializes this repository with an admin CMS object.boolean
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).void
moveObject
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, String targetFolderId, String sourceFolderId) Moves an object.org.apache.chemistry.opencmis.commons.data.ObjectList
query
(CmsCmisCallContext context, String statement, boolean searchAllVersions, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Performs a query on the repository.void
setContentStream
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, boolean overwriteFlag, org.apache.chemistry.opencmis.commons.spi.Holder<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
Sets the name for this repository.void
setTranslation
(CmsResourceTranslator translator, boolean enabled) Sets the repository-specific file translationsvoid
updateProperties
(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<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
-
Field Details
-
PARAM_DESCRIPTION
The description parameter name.- See Also:
-
PARAM_PROJECT
The project parameter name.- See Also:
-
PARAM_PROPERTY
The property parameter name.- See Also:
-
PARAM_RENDITION
The rendition parameter name.- See Also:
-
LOG
The logger instance for this class.
-
-
Constructor Details
-
CmsCmisRepository
public CmsCmisRepository()
-
-
Method Details
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
-
createDocument
public String createDocument(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, List<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 contextpropertiesObj
- the propertiesfolderId
- the parent folder idcontentStream
- the content streamversioningState
- the versioning statepolicies
- the policiesaddAces
- the access control entriesremoveAces
- the access control entries to remove- Returns:
- the object id of the new document
- See Also:
-
createDocumentFromSource
public String createDocumentFromSource(CmsCmisCallContext context, String sourceId, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, org.apache.chemistry.opencmis.commons.enums.VersioningState versioningState, List<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 contextsourceId
- the source object idpropertiesObj
- the propertiesfolderId
- the target folder idversioningState
- the versioning statepolicies
- the policiesaddAces
- the ACEs to addremoveAces
- the ACES to remove- Returns:
- the object id of the new document
- See Also:
-
createFolder
public String createFolder(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties propertiesObj, String folderId, List<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 contextpropertiesObj
- the propertiesfolderId
- the parent folder idpolicies
- the policiesaddAces
- the ACEs to addremoveAces
- the ACEs to remove- Returns:
- the object id of the created folder
- See Also:
-
createRelationship
public String createRelationship(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, List<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 contextproperties
- the propertiespolicies
- the policiesaddAces
- the ACEs to addremoveAces
- the ACEs to remove- Returns:
- the new relationship id
- See Also:
-
deleteContentStream
public void deleteContentStream(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<String> changeToken) Description copied from interface:I_CmsCmisRepository
Deletes the content stream of an object.- Parameters:
context
- the call contextobjectId
- the object idchangeToken
- the change token- See Also:
-
deleteObject
Description copied from interface:I_CmsCmisRepository
Deletes a CMIS object.- Parameters:
context
- the call contextobjectId
- the id of the object to deleteallVersions
- flag to delete all version- See Also:
-
deleteTree
public org.apache.chemistry.opencmis.commons.data.FailedToDeleteData deleteTree(CmsCmisCallContext context, 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 contextfolderId
- the folder idallVersions
- flag to include all versionsunfileObjects
- flag to unfile objectscontinueOnFailure
- flag to continue on failure- Returns:
- data containing the objects which weren'T deleted successfully
- See Also:
-
getAcl
public org.apache.chemistry.opencmis.commons.data.Acl getAcl(CmsCmisCallContext context, String objectId, boolean onlyBasicPermissions) Description copied from interface:I_CmsCmisRepository
Gets the ACL for an object.- Parameters:
context
- the call contextobjectId
- the object idonlyBasicPermissions
- flag to only get basic permissions- Returns:
- the ACL for the object
- See Also:
-
getAllowableActions
public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(CmsCmisCallContext context, String objectId) Description copied from interface:I_CmsCmisRepository
Gets the allowable actions for an object.- Parameters:
context
- the call contextobjectId
- the object id- Returns:
- the allowable actions
- See Also:
-
getCheckedOutDocs
public org.apache.chemistry.opencmis.commons.data.ObjectList getCheckedOutDocs(CmsCmisCallContext context, String folderId, String filter, String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Corresponds to CMIS getCheckedOutDocs service method.- Returns:
- a list of CMIS objects
- See Also:
-
getChildren
public org.apache.chemistry.opencmis.commons.data.ObjectInFolderList getChildren(CmsCmisCallContext context, String folderId, String filter, String orderBy, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePathSegment, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Gets the children of a folder.- Parameters:
context
- the call contextfolderId
- the parent folder idfilter
- the property filterorderBy
- the ordering clauseincludeAllowableActions
- flag to include allowable actionsincludeRelationships
- flag to include relationsrenditionFilter
- the rendition filter stringincludePathSegment
- flag to include the path segmentmaxItems
- the maximum number of itemsskipCount
- the index from which to start- Returns:
- the object information
- See Also:
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
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:
-
getContentStream
public org.apache.chemistry.opencmis.commons.data.ContentStream getContentStream(CmsCmisCallContext context, String objectId, String streamId, BigInteger offset, BigInteger length) Description copied from interface:I_CmsCmisRepository
Gets the content stream for a CMIS object.- Parameters:
context
- the call contextobjectId
- the object idstreamId
- the rendition stream id- Returns:
- the content stream
- See Also:
-
getDescendants
public List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> getDescendants(CmsCmisCallContext context, String folderId, BigInteger depth, String filter, boolean includeAllowableActions, boolean includePathSegment, boolean foldersOnly) - Parameters:
context
- the call contextfolderId
- the folder iddepth
- the maximum depthfilter
- the property filterincludeAllowableActions
- flag to include allowable actionsincludePathSegment
- flag to include path segmentsfoldersOnly
- flag to ignore documents and only return folders- Returns:
- the list of descendants
- See Also:
-
getDescription
Description copied from interface:I_CmsCmisRepository
Gets the description of the repository.- Returns:
- the repository description
- See Also:
-
getFilter
Description copied from interface:I_CmsRepository
Gets the repository filter.- Returns:
- the repository filter
- See Also:
-
getFolderParent
public org.apache.chemistry.opencmis.commons.data.ObjectData getFolderParent(CmsCmisCallContext context, String folderId, String filter) Description copied from interface:I_CmsCmisRepository
Corresponds to CMIS getFolderParent service method.- Parameters:
context
- the call contextfolderId
- the folder idfilter
- the property filter- Returns:
- the parent object data
- See Also:
-
getId
Description copied from interface:I_CmsCmisRepository
Gets the repository id.- Returns:
- the repository id
- See Also:
-
getName
Description copied from interface:I_CmsCmisRepository
Gets the name of the repository.- Returns:
- the name of the repository
- See Also:
-
getObject
public org.apache.chemistry.opencmis.commons.data.ObjectData getObject(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Description copied from interface:I_CmsCmisRepository
Gets the data for a CMIS object.- Parameters:
context
- the CMIS call contextobjectId
- the id of the objectfilter
- the property filterincludeAllowableActions
- flag to include allowable actionsincludeRelationships
- flag to include relationshipsrenditionFilter
- the rendition filter stringincludePolicyIds
- flag to include policy idsincludeAcl
- flag to include ACLs- Returns:
- the CMIS object data
- See Also:
-
getObjectByPath
public org.apache.chemistry.opencmis.commons.data.ObjectData getObjectByPath(CmsCmisCallContext context, String path, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Description copied from interface:I_CmsCmisRepository
Reads a CMIS object by path.- Parameters:
context
- the call contextpath
- the repository pathfilter
- the property filter stringincludeAllowableActions
- flag to include allowable actionsincludeRelationships
- flag to include relationshipsrenditionFilter
- the rendition filter stringincludePolicyIds
- flag to include policy idsincludeAcl
- flag to include ACLs- Returns:
- the object data
- See Also:
-
getObjectParents
public List<org.apache.chemistry.opencmis.commons.data.ObjectParentData> getObjectParents(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, boolean includeRelativePathSegment) Description copied from interface:I_CmsCmisRepository
Gets the parents of an object.- Parameters:
context
- the call contextobjectId
- the object id- Returns:
- the data for the object parents
- See Also:
-
getObjectRelationships
public org.apache.chemistry.opencmis.commons.data.ObjectList getObjectRelationships(CmsCmisCallContext context, String objectId, boolean includeSubRelationshipTypes, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, String typeId, String filter, boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Gets the relationships for an object.- Parameters:
context
- the call contextobjectId
- the object idincludeSubRelationshipTypes
- flag to include relationship subtypesrelationshipDirection
- the direction for the relationstypeId
- the relation type idfilter
- the property filterincludeAllowableActions
- flag to include allowable actionsmaxItems
- the maximum number of items to returnskipCount
- the number of items to skip- Returns:
- the relationships for the object
- See Also:
-
getProperties
public org.apache.chemistry.opencmis.commons.data.Properties getProperties(CmsCmisCallContext context, String objectId, String filter) Description copied from interface:I_CmsCmisRepository
Gets the properties for a CMIS object.- Parameters:
context
- the call contextobjectId
- the CMIS object idfilter
- the property filter string- Returns:
- the set of properties
- See Also:
-
getRenditions
public List<org.apache.chemistry.opencmis.commons.data.RenditionData> getRenditions(CmsCmisCallContext context, String objectId, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Gets the renditions for a CMIS object.- Parameters:
context
- the call contextobjectId
- the object idrenditionFilter
- the rendition filtermaxItems
- the maximum number of renditionsskipCount
- the number of renditions to skip- Returns:
- the list of renditions
- See Also:
-
getRepositoryInfo
Description copied from interface:I_CmsCmisRepository
Gets the repository information for this repository.- Returns:
- the repository info
- See Also:
-
getTranslation
Description copied from interface:I_CmsRepository
Gets the repository-specific file translations.- Returns:
- the repository-specific file translations
- See Also:
-
getTypeChildren
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypeChildren(CmsCmisCallContext context, String typeId, boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Gets the children of a given type.- Parameters:
context
- the call contexttypeId
- the parent type idincludePropertyDefinitions
- flag to include property definitionsmaxItems
- the maximum number of items to returnskipCount
- the number of items to skip- Returns:
- the list of child type definitions
- See Also:
-
getTypeDefinition
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(CmsCmisCallContext context, String typeId) Description copied from interface:I_CmsCmisRepository
Gets a type definition by id.- Parameters:
context
- the call contexttypeId
- the type id- Returns:
- the type definition for the given id
- See Also:
-
getTypeDescendants
public List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDescendants(CmsCmisCallContext context, String typeId, BigInteger depth, boolean includePropertyDefinitions) Description copied from interface:I_CmsCmisRepository
Gets the type descendants.- Parameters:
context
- the call contexttypeId
- the parent type iddepth
- the maximum type depthincludePropertyDefinitions
- flag to include the property definitions for types- Returns:
- the list of type definitions
- See Also:
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Throws:
CmsConfigurationException
- if something goes wrong- See Also:
-
initializeCms
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:
-
isTranslationEnabled
Description copied from interface:I_CmsRepository
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).- Returns:
- true if the file translations are enabled
- See Also:
-
moveObject
public void moveObject(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, String targetFolderId, String sourceFolderId) Description copied from interface:I_CmsCmisRepository
Moves an object.- Parameters:
context
- the call contextobjectId
- the object idtargetFolderId
- source source folder idsourceFolderId
- the target folder id- See Also:
-
query
public org.apache.chemistry.opencmis.commons.data.ObjectList query(CmsCmisCallContext context, String statement, boolean searchAllVersions, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) Description copied from interface:I_CmsCmisRepository
Performs a query on the repository.- Specified by:
query
in interfaceI_CmsCmisRepository
- Overrides:
query
in classA_CmsCmisRepository
- Parameters:
context
- the call contextstatement
- the querysearchAllVersions
- flag to search all versionsincludeAllowableActions
- flag to include allowable actionsincludeRelationships
- flag to include relationshipsrenditionFilter
- the filter string for renditionsmaxItems
- the maximum number of items to returnskipCount
- the number of items to skip- Returns:
- the query result objects
- See Also:
-
setContentStream
public void setContentStream(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, boolean overwriteFlag, org.apache.chemistry.opencmis.commons.spi.Holder<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 contextobjectId
- the id of the objectoverwriteFlag
- flag to overwrite the content streamchangeToken
- the change tokencontentStream
- the new content stream- See Also:
-
setFilter
Description copied from interface:I_CmsRepository
Sets the repository filter.- Parameters:
filter
- the repository filter- See Also:
-
setName
Description copied from interface:I_CmsRepository
Sets the name for this repository.- Parameters:
name
- the name to use for the repository- See Also:
-
setTranslation
Description copied from interface:I_CmsRepository
Sets the repository-specific file translations- Parameters:
translator
- the file translationsenabled
- true if the translations should be enabled- See Also:
-
updateProperties
public void updateProperties(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<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 contextobjectId
- the object idchangeToken
- the change tokenproperties
- the properties- See Also:
-
checkWriteAccess
Checks whether we have write access to this repository and throws an exception otherwise. -
getCmsObject
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 List<org.apache.chemistry.opencmis.commons.data.ObjectData> getRelationshipObjectData(CmsCmisCallContext context, CmsObject cms, CmsResource resource, org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection, Set<String> filterSet, boolean includeAllowableActions) throws CmsException Gets the relationship data for a given resource.- Parameters:
context
- the call contextcms
- the CMS contextresource
- the resourcerelationshipDirection
- the relationship directionfilterSet
- the property filterincludeAllowableActions
- true if allowable actions should be included- Returns:
- the list of relationship data
- Throws:
CmsException
- if something goes wrong
-
getRenditionProviders
Gets the rendition providers matching the given filter.- Parameters:
filter
- the rendition filter- Returns:
- the rendition providers matching the filter
-
getResourceTypeFromProperties
protected String getResourceTypeFromProperties(Map<String, org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties, String defaultValue) Extracts the resource type from a set of CMIS properties.- Parameters:
properties
- the CMIS propertiesdefaultValue
- the default value- Returns:
- the resource type property, or the default value if the property was not found
-
getTypeManager
Gets the type manager instance.- Returns:
- the type manager instance
-