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
public class CmsCmisRepository extends A_CmsCmisRepository
Repository instance for CMIS repositories.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.LogLOGThe logger instance for this class.static java.lang.StringPARAM_DESCRIPTIONThe description parameter name.static java.lang.StringPARAM_PROJECTThe project parameter name.static java.lang.StringPARAM_PROPERTYThe property parameter name.static java.lang.StringPARAM_RENDITIONThe 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
Constructors Constructor Description CmsCmisRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)Adds a configuration parameter to this parameter configurable class instance.protected voidcheckWriteAccess()Checks whether we have write access to this repository and throws an exception otherwise.java.lang.StringcreateDocument(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.StringcreateDocumentFromSource(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.StringcreateFolder(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.StringcreateRelationship(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.voiddeleteContentStream(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.voiddeleteObject(CmsCmisCallContext context, java.lang.String objectId, boolean allVersions)Deletes a CMIS object.org.apache.chemistry.opencmis.commons.data.FailedToDeleteDatadeleteTree(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.AclgetAcl(CmsCmisCallContext context, java.lang.String objectId, boolean onlyBasicPermissions)Gets the ACL for an object.org.apache.chemistry.opencmis.commons.data.AllowableActionsgetAllowableActions(CmsCmisCallContext context, java.lang.String objectId)Gets the allowable actions for an object.org.apache.chemistry.opencmis.commons.data.ObjectListgetCheckedOutDocs(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.ObjectInFolderListgetChildren(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 CmsObjectgetCmsObject(CmsCmisCallContext context)Initializes a CMS context for the authentication data contained in a call context.CmsParameterConfigurationgetConfiguration()Returns the parameters of this configurable class instance, ornullif the class does not need any parameters.org.apache.chemistry.opencmis.commons.data.ContentStreamgetContentStream(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.StringgetDescription()Gets the description of the repository.CmsRepositoryFiltergetFilter()Gets the repository filter.org.apache.chemistry.opencmis.commons.data.ObjectDatagetFolderParent(CmsCmisCallContext context, java.lang.String folderId, java.lang.String filter)Corresponds to CMIS getFolderParent service method.java.lang.StringgetId()Gets the repository id.java.lang.StringgetName()Gets the name of the repository.org.apache.chemistry.opencmis.commons.data.ObjectDatagetObject(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.ObjectDatagetObjectByPath(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.ObjectListgetObjectRelationships(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.PropertiesgetProperties(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.RepositoryInfogetRepositoryInfo()Gets the repository information for this repository.protected java.lang.StringgetResourceTypeFromProperties(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.TypeDefinitionListgetTypeChildren(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.TypeDefinitiongetTypeDefinition(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 CmsCmisTypeManagergetTypeManager()Gets the type manager instance.voidinitConfiguration()Initializes a configuration after all parameters have been added.voidinitializeCms(CmsObject cms)Initializes this repository with an admin CMS object.voidmoveObject(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.ObjectListquery(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.voidsetContentStream(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.voidsetFilter(CmsRepositoryFilter filter)Sets the repository filter.voidsetName(java.lang.String name)Sets the name for this repository.voidupdateProperties(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
-
-
-
-
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_CmsConfigurationParameterHandlerAdds a configuration parameter to this parameter configurable class instance.- Parameters:
paramName- the name of the parameterparamValue- 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_CmsCmisRepositoryCreates 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:
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_CmsCmisRepositoryCopies 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:
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_CmsCmisRepositoryCreates 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:
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_CmsCmisRepositoryCreates 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:
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_CmsCmisRepositoryDeletes the content stream of an object.- Parameters:
context- the call contextobjectId- the object idchangeToken- 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_CmsCmisRepositoryDeletes a CMIS object.- Parameters:
context- the call contextobjectId- the id of the object to deleteallVersions- 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_CmsCmisRepositoryDeletes 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:
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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryGets the allowable actions for an object.- Parameters:
context- the call contextobjectId- 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_CmsCmisRepositoryCorresponds 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_CmsCmisRepositoryGets 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:
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_CmsConfigurationParameterHandlerReturns the parameters of this configurable class instance, ornullif the class does not need any parameters.- Returns:
- the parameters of this configurable class instance,
or
nullif 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_CmsCmisRepositoryGets 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:
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 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:
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_CmsCmisRepositoryGets the description of the repository.- Returns:
- the repository description
- See Also:
I_CmsCmisRepository.getDescription()
-
getFilter
public CmsRepositoryFilter getFilter()
Description copied from interface:I_CmsRepositoryGets 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_CmsCmisRepositoryCorresponds to CMIS getFolderParent service method.- Parameters:
context- the call contextfolderId- the folder idfilter- 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_CmsCmisRepositoryGets the repository id.- Returns:
- the repository id
- See Also:
I_CmsCmisRepository.getId()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsCmisRepositoryGets 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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryReads 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:
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_CmsCmisRepositoryGets the parents of an object.- Parameters:
context- the call contextobjectId- 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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryGets 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_CmsCmisRepositoryGets 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:
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_CmsCmisRepositoryGets a type definition by id.- Parameters:
context- the call contexttypeId- 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_CmsCmisRepositoryGets 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:
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_CmsConfigurationParameterHandlerInitializes 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_CmsRepositoryInitializes 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_CmsCmisRepositoryMoves an object.- Parameters:
context- the call contextobjectId- the object idtargetFolderId- source source folder idsourceFolderId- 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_CmsCmisRepositoryPerforms a query on the repository.- Specified by:
queryin interfaceI_CmsCmisRepository- Overrides:
queryin 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:
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_CmsCmisRepositorySets 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:
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_CmsRepositorySets 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_CmsRepositorySets 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_CmsCmisRepositoryUpdates the properties for an object.- Parameters:
context- the call contextobjectId- the object idchangeToken- the change tokenproperties- 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 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
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 propertiesdefaultValue- 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
-
-