Package org.opencms.cmis
Class A_CmsCmisRepository
java.lang.Object
org.opencms.cmis.A_CmsCmisRepository
- All Implemented Interfaces:
I_CmsCmisRepository,I_CmsConfigurationParameterHandler,I_CmsRepository
- Direct Known Subclasses:
CmsCmisRepository
Abstract repository superclass.
This class was introduced to separate the CMIS methods which are not supported from those which are, so only unsupported operations and utility should go into this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringcmis:all permission.static final Stringcmis:read permission.static final Stringcmis:write permission.protected CmsCmisTypeManagerThe type manager instance.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjectToFolder(CmsCmisCallContext context, String objectId, String folderId, boolean allVersions) Adds an object to a folder (multifiling).org.apache.chemistry.opencmis.commons.data.AclapplyAcl(CmsCmisCallContext context, String objectId, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation) Applies ACL to an object.org.apache.chemistry.opencmis.commons.data.AclapplyAcl(CmsCmisCallContext context, String objectId, org.apache.chemistry.opencmis.commons.data.Acl aces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation) Changes the ACL for an object.voidapplyPolicy(CmsCmisCallContext context, String policyId, String objectId) Applies a policy to an object.voidcancelCheckOut(CmsCmisCallContext context, String objectId) Cancels a checkout.voidcheckIn(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, boolean major, org.apache.chemistry.opencmis.commons.data.Properties properties, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, String checkinComment, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Checks in a document.voidcheckOut(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<Boolean> contentCopied) Checks out an object.createPolicy(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Creates a policy.protected byte[]extractRange(byte[] content, BigInteger offset, BigInteger length) Copies a range of bytes from an array into a new array.protected StringgetAcePrincipalName(CmsObject cms, CmsUUID principalId) Gets a user-readable name for a principal id read from an ACE.List<org.apache.chemistry.opencmis.commons.data.ObjectData> getAllVersions(CmsCmisCallContext context, String objectId, String versionSeriesId, String filter, boolean includeAllowableActions) Gets all versions of an object.List<org.apache.chemistry.opencmis.commons.data.ObjectData> getAppliedPolicies(CmsCmisCallContext context, String objectId, String filter) Gets the policies for an object.org.apache.chemistry.opencmis.commons.data.ObjectListgetContentChanges(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> changeLogToken, boolean includeProperties, String filter, boolean includePolicyIds, boolean includeAcl, BigInteger maxItems) Gets content changes from the repository.org.apache.chemistry.opencmis.commons.data.ObjectDatagetObjectOfLatestVersion(CmsCmisCallContext context, String objectId, String versionSeriesId, boolean major, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Gets the object of the latest version.protected List<CmsProperty> getOpenCmsProperties(Map<String, org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties) Helper method to create OpenCms property objects from a map of CMIS properties.org.apache.chemistry.opencmis.commons.data.PropertiesgetPropertiesOfLatestVersion(CmsCmisCallContext context, String objectId, String versionSeriesId, boolean major, String filter) Gets the properties of the latest version.protected RuntimeExceptionHelper method to create exceptions for unsupported features.org.apache.chemistry.opencmis.commons.data.ObjectListquery(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.voidremoveObjectFromFolder(CmsCmisCallContext context, String objectId, String folderId) Unfiles an object from a folder.voidremovePolicy(CmsCmisCallContext context, String policyId, String objectId) Removes a policy from an object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencms.cmis.I_CmsCmisRepository
createDocument, createDocumentFromSource, createFolder, createRelationship, deleteContentStream, deleteObject, deleteTree, getAcl, getAllowableActions, getCheckedOutDocs, getChildren, getConfiguration, getContentStream, getDescendants, getDescription, getFilter, getFolderParent, getId, getName, getObject, getObjectByPath, getObjectParents, getObjectRelationships, getProperties, getRenditions, getRepositoryInfo, getTypeChildren, getTypeDefinition, getTypeDescendants, moveObject, setContentStream, updatePropertiesMethods inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
addConfigurationParameter, initConfigurationMethods inherited from interface org.opencms.repository.I_CmsRepository
getTranslation, initializeCms, isTranslationEnabled, setFilter, setName, setTranslation
-
Field Details
-
CMIS_ALL
cmis:all permission.- See Also:
-
CMIS_READ
cmis:read permission.- See Also:
-
CMIS_WRITE
cmis:write permission.- See Also:
-
m_typeManager
The type manager instance.
-
-
Constructor Details
-
A_CmsCmisRepository
public A_CmsCmisRepository()
-
-
Method Details
-
addObjectToFolder
public void addObjectToFolder(CmsCmisCallContext context, String objectId, String folderId, boolean allVersions) Description copied from interface:I_CmsCmisRepositoryAdds an object to a folder (multifiling).- Specified by:
addObjectToFolderin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idfolderId- the folder idallVersions- flag to include all versions- See Also:
-
applyAcl
public org.apache.chemistry.opencmis.commons.data.Acl applyAcl(CmsCmisCallContext context, String objectId, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation) Description copied from interface:I_CmsCmisRepositoryApplies ACL to an object.- Specified by:
applyAclin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idaddAces- the ACEs to addremoveAces- the ACEs to removeaclPropagation- the ACL propagation- Returns:
- the new ACL
- See Also:
-
applyAcl
public org.apache.chemistry.opencmis.commons.data.Acl applyAcl(CmsCmisCallContext context, String objectId, org.apache.chemistry.opencmis.commons.data.Acl aces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation) Description copied from interface:I_CmsCmisRepositoryChanges the ACL for an object.- Specified by:
applyAclin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idaces- the access control entriesaclPropagation- the propagation mode- Returns:
- the new ACL
- See Also:
-
applyPolicy
Description copied from interface:I_CmsCmisRepositoryApplies a policy to an object.- Specified by:
applyPolicyin interfaceI_CmsCmisRepository- Parameters:
context- the call contextpolicyId- the policy idobjectId- the object id- See Also:
-
cancelCheckOut
Description copied from interface:I_CmsCmisRepositoryCancels a checkout.- Specified by:
cancelCheckOutin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object id- See Also:
-
checkIn
public void checkIn(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, boolean major, org.apache.chemistry.opencmis.commons.data.Properties properties, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, String checkinComment, List<String> policies, org.apache.chemistry.opencmis.commons.data.Acl addAces, org.apache.chemistry.opencmis.commons.data.Acl removeAces) Description copied from interface:I_CmsCmisRepositoryChecks in a document.- Specified by:
checkInin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idmajor- the major version flagproperties- the propertiescontentStream- the content streamcheckinComment- the check-in commentpolicies- the policiesaddAces- the ACEs to addremoveAces- the ACEs to remove- See Also:
-
checkOut
public void checkOut(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<Boolean> contentCopied) Description copied from interface:I_CmsCmisRepositoryChecks out an object.- Specified by:
checkOutin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idcontentCopied- indicator whether the content was copied- See Also:
-
createPolicy
public String createPolicy(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, 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_CmsCmisRepositoryCreates a policy.- Specified by:
createPolicyin interfaceI_CmsCmisRepository- Parameters:
context- the call contextproperties- the propertiesfolderId- the folder idpolicies- the policiesaddAces- the ACEs to addremoveAces- the ACEs to remove- Returns:
- the new object id
- See Also:
-
getAllVersions
public List<org.apache.chemistry.opencmis.commons.data.ObjectData> getAllVersions(CmsCmisCallContext context, String objectId, String versionSeriesId, String filter, boolean includeAllowableActions) Description copied from interface:I_CmsCmisRepositoryGets all versions of an object.- Specified by:
getAllVersionsin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idversionSeriesId- the version series idfilter- the property filter stringincludeAllowableActions- the flag to include allowable actions- Returns:
- the list of versions
- See Also:
-
getAppliedPolicies
public List<org.apache.chemistry.opencmis.commons.data.ObjectData> getAppliedPolicies(CmsCmisCallContext context, String objectId, String filter) Description copied from interface:I_CmsCmisRepositoryGets the policies for an object.- Specified by:
getAppliedPoliciesin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idfilter- the property filter- Returns:
- the policies for the object
- See Also:
-
getContentChanges
public org.apache.chemistry.opencmis.commons.data.ObjectList getContentChanges(CmsCmisCallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> changeLogToken, boolean includeProperties, String filter, boolean includePolicyIds, boolean includeAcl, BigInteger maxItems) Description copied from interface:I_CmsCmisRepositoryGets content changes from the repository.- Specified by:
getContentChangesin interfaceI_CmsCmisRepository- Parameters:
context- the call contextchangeLogToken- the change log tokenincludeProperties- flag to include propertiesfilter- filter string for propertiesincludePolicyIds- flag to include policy idsincludeAcl- flag to include ACLsmaxItems- maximum number of items to return- Returns:
- the list of content changes
- See Also:
-
getObjectOfLatestVersion
public org.apache.chemistry.opencmis.commons.data.ObjectData getObjectOfLatestVersion(CmsCmisCallContext context, String objectId, String versionSeriesId, boolean major, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Description copied from interface:I_CmsCmisRepositoryGets the object of the latest version.- Specified by:
getObjectOfLatestVersionin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idversionSeriesId- the version series idmajor- flag to get the latest major versionfilter- the property filterincludeAllowableActions- flag to include allowable actionsincludeRelationships- flag to include relationshipsrenditionFilter- filter string for renditionsincludePolicyIds- flag to include policiesincludeAcl- flag to include ACLs- Returns:
- the data for the latest version
- See Also:
-
getPropertiesOfLatestVersion
public org.apache.chemistry.opencmis.commons.data.Properties getPropertiesOfLatestVersion(CmsCmisCallContext context, String objectId, String versionSeriesId, boolean major, String filter) Description copied from interface:I_CmsCmisRepositoryGets the properties of the latest version.- Specified by:
getPropertiesOfLatestVersionin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the object idversionSeriesId- the version series idmajor- flag to access the latest major versionfilter- the property filter string- Returns:
- the properties from the latest version
- 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_CmsCmisRepositoryPerforms a query on the repository.- Specified by:
queryin interfaceI_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:
-
removeObjectFromFolder
Description copied from interface:I_CmsCmisRepositoryUnfiles an object from a folder.- Specified by:
removeObjectFromFolderin interfaceI_CmsCmisRepository- Parameters:
context- the call contextobjectId- the id of the object to unfilefolderId- the folder from which the object should be unfiled- See Also:
-
removePolicy
Description copied from interface:I_CmsCmisRepositoryRemoves a policy from an object.- Specified by:
removePolicyin interfaceI_CmsCmisRepository- Parameters:
context- the call contextpolicyId- the policy idobjectId- the object id- See Also:
-
extractRange
Copies a range of bytes from an array into a new array.- Parameters:
content- the content arrayoffset- the start offset in the arraylength- the length of the range- Returns:
- the bytes from the given range of the content
-
getAcePrincipalName
Gets a user-readable name for a principal id read from an ACE.- Parameters:
cms- the current CMS contextprincipalId- the principal id from the ACE- Returns:
- the name of the principle
-
getOpenCmsProperties
protected List<CmsProperty> getOpenCmsProperties(Map<String, org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties) Helper method to create OpenCms property objects from a map of CMIS properties.- Parameters:
properties- the CMIS properties- Returns:
- the OpenCms properties
-
notSupported
Helper method to create exceptions for unsupported features.- Returns:
- the created exception
-