Class CmisServiceImpl
- java.lang.Object
-
- org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService
-
- org.ametys.plugins.workspaces.cmis.CmisServiceImpl
-
- All Implemented Interfaces:
CmisService
,ObjectInfoHandler
,AclService
,DiscoveryService
,MultiFilingService
,NavigationService
,ObjectService
,PolicyService
,RelationshipService
,RepositoryService
,VersioningService
public class CmisServiceImpl extends AbstractCmisService
AbstractCmisService implementation
-
-
Field Summary
Fields Modifier and Type Field Description private CallContext
_context
private CmisServiceFactory
_factory
private boolean
_isAuthenticated
private CmisRepository
_repository
-
Constructor Summary
Constructors Constructor Description CmisServiceImpl(CallContext context, CmisServiceFactory factory)
CmisServiceImpl implementation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private UserIdentity
authenticate(CallContext context, String projectName, CmisServiceFactory factory)
private Project
authenticateAndGetProject(String encodedProjectId)
String
createDocument(String repositoryId, Properties properties, String folderId, ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
String
createFolder(String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
void
deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension)
FailedToDeleteData
deleteTree(String repositoryId, String folderId, Boolean allVersions, UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension)
CallContext
getCallContext()
Gets the call context.ObjectInFolderList
getChildren(String repositoryId, String folderId, String filter, String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
ContentStream
getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset, BigInteger length, ExtensionsData extension)
ObjectData
getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension)
ObjectData
getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
ObjectData
getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
List<ObjectParentData>
getObjectParents(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includeRelativePathSegment, ExtensionsData extension)
private Project
getProject(String projectId, CmisServiceFactory factory)
List<RepositoryInfo>
getRepositoryInfos(ExtensionsData extension)
TypeDefinitionList
getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
TypeDefinition
getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension)
private boolean
isDocumentModuleActivated(Project project)
void
moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId, ExtensionsData extension)
void
setCallContext(CallContext context)
Sets the call context.void
setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension)
void
updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken, Properties properties, ExtensionsData extension)
-
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService
addObjectInfo, addObjectToFolder, appendContentStream, applyAcl, applyAcl, applyPolicy, bulkUpdateProperties, cancelCheckOut, checkIn, checkOut, clearObjectInfos, close, create, createDocumentFromSource, createItem, createPolicy, createRelationship, createType, deleteContentStream, deleteObject, deleteType, getAcl, getAllowableActions, getAllVersions, getAppliedPolicies, getBooleanProperty, getCheckedOutDocs, getContentChanges, getDateTimeProperty, getDescendants, getFolderTree, getIdProperty, getIntegerProperty, getObjectInfo, getObjectInfoIntern, getObjectOfLatestVersion, getObjectRelationships, getProperties, getPropertiesOfLatestVersion, getRenditions, getRepositoryInfo, getStringProperty, getTypeDescendants, query, removeObjectFromFolder, removePolicy, updateType
-
-
-
-
Field Detail
-
_factory
private CmisServiceFactory _factory
-
_context
private CallContext _context
-
_repository
private CmisRepository _repository
-
_isAuthenticated
private boolean _isAuthenticated
-
-
Constructor Detail
-
CmisServiceImpl
public CmisServiceImpl(CallContext context, CmisServiceFactory factory)
CmisServiceImpl implementation- Parameters:
context
- the call contextfactory
- the factory used to build this
-
-
Method Detail
-
authenticateAndGetProject
private Project authenticateAndGetProject(String encodedProjectId)
-
getRepositoryInfos
public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension)
- Specified by:
getRepositoryInfos
in interfaceRepositoryService
- Specified by:
getRepositoryInfos
in classAbstractCmisService
-
getTypeChildren
public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
- Specified by:
getTypeChildren
in interfaceRepositoryService
- Specified by:
getTypeChildren
in classAbstractCmisService
-
getTypeDefinition
public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension)
- Specified by:
getTypeDefinition
in interfaceRepositoryService
- Specified by:
getTypeDefinition
in classAbstractCmisService
-
getChildren
public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
- Specified by:
getChildren
in interfaceNavigationService
- Specified by:
getChildren
in classAbstractCmisService
-
getObjectParents
public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includeRelativePathSegment, ExtensionsData extension)
- Specified by:
getObjectParents
in interfaceNavigationService
- Specified by:
getObjectParents
in classAbstractCmisService
-
getObject
public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
- Specified by:
getObject
in interfaceObjectService
- Specified by:
getObject
in classAbstractCmisService
-
getContentStream
public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset, BigInteger length, ExtensionsData extension)
- Specified by:
getContentStream
in interfaceObjectService
- Overrides:
getContentStream
in classAbstractCmisService
-
getObjectByPath
public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
- Specified by:
getObjectByPath
in interfaceObjectService
- Overrides:
getObjectByPath
in classAbstractCmisService
-
createFolder
public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
- Specified by:
createFolder
in interfaceObjectService
- Overrides:
createFolder
in classAbstractCmisService
-
createDocument
public String createDocument(String repositoryId, Properties properties, String folderId, ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
- Specified by:
createDocument
in interfaceObjectService
- Overrides:
createDocument
in classAbstractCmisService
-
deleteObjectOrCancelCheckOut
public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension)
- Specified by:
deleteObjectOrCancelCheckOut
in interfaceCmisService
- Overrides:
deleteObjectOrCancelCheckOut
in classAbstractCmisService
-
deleteTree
public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions, UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension)
- Specified by:
deleteTree
in interfaceObjectService
- Overrides:
deleteTree
in classAbstractCmisService
-
getFolderParent
public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension)
- Specified by:
getFolderParent
in interfaceNavigationService
- Overrides:
getFolderParent
in classAbstractCmisService
-
updateProperties
public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken, Properties properties, ExtensionsData extension)
- Specified by:
updateProperties
in interfaceObjectService
- Overrides:
updateProperties
in classAbstractCmisService
-
setContentStream
public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension)
- Specified by:
setContentStream
in interfaceObjectService
- Overrides:
setContentStream
in classAbstractCmisService
-
moveObject
public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId, ExtensionsData extension)
- Specified by:
moveObject
in interfaceObjectService
- Overrides:
moveObject
in classAbstractCmisService
-
authenticate
private UserIdentity authenticate(CallContext context, String projectName, CmisServiceFactory factory)
-
getProject
private Project getProject(String projectId, CmisServiceFactory factory)
-
setCallContext
public void setCallContext(CallContext context)
Sets the call context. This method should only be called by the service factory.- Parameters:
context
- context
-
getCallContext
public CallContext getCallContext()
Gets the call context.- Returns:
- CallContext
-
isDocumentModuleActivated
private boolean isDocumentModuleActivated(Project project)
-
-