Package com.logicaldoc.cmis
Class LDRepository
java.lang.Object
com.logicaldoc.cmis.LDRepository
LogicalDOC implementation of a CMIS Repository
- Since:
- 6.5.1
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a user to the repositoryvoidappendContent(org.apache.chemistry.opencmis.commons.server.CallContext context, String documentId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, boolean isLastChunk) Appends content into existing filevoidcancelCheckOut(String objectId) voidcheckIn(org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, Boolean major, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.data.Properties properties, String checkinComment) voidcheckOut(org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.spi.Holder<Boolean> contentCopied) org.apache.chemistry.opencmis.commons.data.ObjectDatacreate(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) Create dispatch for AtomPubcreateDocument(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream) CMIS createDocumentcreateDocumentFromSource(org.apache.chemistry.opencmis.commons.server.CallContext context, String sourceId, String folderId) createFolder(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId) CMIS moveObjectvoiddeleteObject(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS deleteObjectvoiddeleteObjectOrCancelCheckOut(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) org.apache.chemistry.opencmis.commons.data.FailedToDeleteDatadeleteTree(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId, Boolean continueOnFailure) CMIS deleteTreeorg.apache.chemistry.opencmis.commons.data.AclCMIS getACLorg.apache.chemistry.opencmis.commons.data.AllowableActionsgetAllowableActions(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS getAllowableActionsList<org.apache.chemistry.opencmis.commons.data.ObjectData> getAllVersions(String objectId) org.apache.chemistry.opencmis.commons.data.ObjectInFolderListgetChildren(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId, String filter, boolean includeAllowableActions, boolean includePathSegment, int maxItems, int skipCount, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS getChildrenorg.apache.chemistry.opencmis.commons.data.ObjectListgetContentChanges(org.apache.chemistry.opencmis.commons.spi.Holder<String> changeLogToken, int max) org.apache.chemistry.opencmis.commons.data.ContentStreamgetContentStream(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, BigInteger offset, BigInteger length) CMIS getContentStreamList<org.apache.chemistry.opencmis.commons.data.ObjectData> getDocumentLastChanges(long minDate, int max) List<org.apache.chemistry.opencmis.commons.data.ObjectData> getFolderLastChanges(long minDate, int max) org.apache.chemistry.opencmis.commons.data.ObjectDatagetFolderParent(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId) CMIS getFolderParentgetId()org.apache.chemistry.opencmis.commons.data.ObjectDatagetObject(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, String versionServicesId, String filter, Boolean includeAllowableActions, Boolean includeAcl, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS getObjectorg.apache.chemistry.opencmis.commons.data.ObjectDatagetObjectByPath(org.apache.chemistry.opencmis.commons.server.CallContext context, String path, String filter, Boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, org.apache.chemistry.opencmis.commons.data.ExtensionsData extension) CMIS getObjectByPathorg.apache.chemistry.opencmis.commons.server.ObjectInfogetObjectInfo(String objectId, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler handler) List<org.apache.chemistry.opencmis.commons.data.ObjectParentData> getObjectParents(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, String filter, Boolean includeAllowableActions, Boolean includeRelativePathSegment, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS getObjectParentsorg.apache.chemistry.opencmis.commons.data.RepositoryInfogetRepositoryInfo(org.apache.chemistry.opencmis.commons.server.CallContext context, String latestChangeLogToken) CMIS getRepositoryInfogetRoot()org.apache.chemistry.opencmis.commons.definitions.TypeDefinitiongetTypeDefinition(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId) CMIS getTypeDefinitionorg.apache.chemistry.opencmis.commons.definitions.TypeDefinitionListgetTypesChildren(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId, boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount) CMIS getTypesChildrenList<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypesDescendants(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId, BigInteger depth, Boolean includePropertyDefinitions) CMIS getTypesDescendantsorg.apache.chemistry.opencmis.commons.data.ObjectDatamoveObject(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, String targetFolderId, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS moveObjectorg.apache.chemistry.opencmis.commons.data.ObjectListvoidsetHistoryDao(DocumentHistoryDAO historyDao) voidsetTemplateDao(TemplateDAO templateDao) org.apache.chemistry.opencmis.commons.data.ObjectDataupdateProperties(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.data.Properties properties, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS updateProperties
-
Constructor Details
-
LDRepository
Constructor.- Parameters:
root- root foldersid- The Session identifier
-
-
Method Details
-
addUser
Adds a user to the repository- Parameters:
user- the usernamereadOnly- if the user must be read-only
-
getRepositoryInfo
public org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo(org.apache.chemistry.opencmis.commons.server.CallContext context, String latestChangeLogToken) CMIS getRepositoryInfo- Parameters:
context- call contextlatestChangeLogToken- a token that indicates the time stamp of the last update- Returns:
- the repository representation
-
getTypesChildren
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList getTypesChildren(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId, boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount) CMIS getTypesChildren- Parameters:
context- call contexttypeId- identifier of the typeincludePropertyDefinitions- id the property definitions must be includedmaxItems- maximum number of childrenskipCount- if the children must be counted- Returns:
- the list of type definitions
-
getTypeDefinition
public org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId) CMIS getTypeDefinition- Parameters:
context- call contexttypeId- identifier of the type- Returns:
- the type definition
-
getTypesDescendants
public List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypesDescendants(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId, BigInteger depth, Boolean includePropertyDefinitions) CMIS getTypesDescendants- Parameters:
context- the call contexttypeId- identifier of the typedepth- a depth specificationincludePropertyDefinitions- if property definitions must be included- Returns:
- the list of type definitions
-
createDocumentFromSource
-
create
public org.apache.chemistry.opencmis.commons.data.ObjectData create(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) Create dispatch for AtomPub- Parameters:
context- call contextproperties- the propertiesfolderId- identifier of the parent foldercontentStream- stream of the document to createobjectInfos- informations- Returns:
- the newly created object
-
appendContent
public void appendContent(org.apache.chemistry.opencmis.commons.server.CallContext context, String documentId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, boolean isLastChunk) throws IOException, PersistenceException Appends content into existing file- Parameters:
context- call contextdocumentId- identifier of the documentcontentStream- binary content of the file to appendisLastChunk- if this is the last chunk- Throws:
IOException- I/O errorPersistenceException- Error in the data layer
-
createDocument
public String createDocument(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream) CMIS createDocument- Parameters:
context- call contextproperties- the folder's propertiesfolderId- identifier of the parent foldercontentStream- binary content of the file to create- Returns:
- the new document's identifier
-
createFolder
public String createFolder(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.data.Properties properties, String folderId) CMIS moveObject- Parameters:
context- call contextproperties- the folder's propertiesfolderId- identifier of the parent folder- Returns:
- the created folder's identifier
-
moveObject
public org.apache.chemistry.opencmis.commons.data.ObjectData moveObject(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, String targetFolderId, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS moveObject- Parameters:
context- call contextobjectId- identifier of the file/foldertargetFolderId- identifier of the target folderobjectInfos- informations- Returns:
- the moved object
-
deleteObjectOrCancelCheckOut
public void deleteObjectOrCancelCheckOut(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) -
deleteObject
public void deleteObject(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS deleteObject- Parameters:
context- call contextobjectId- identifier of the file/folder
-
deleteTree
public org.apache.chemistry.opencmis.commons.data.FailedToDeleteData deleteTree(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId, Boolean continueOnFailure) CMIS deleteTree- Parameters:
context- call contextfolderId- identifier of the foldercontinueOnFailure- if the execution must continue even in presence of an issue- Returns:
- informations about the failure
-
updateProperties
public org.apache.chemistry.opencmis.commons.data.ObjectData updateProperties(org.apache.chemistry.opencmis.commons.server.CallContext context, org.apache.chemistry.opencmis.commons.spi.Holder<String> objectId, org.apache.chemistry.opencmis.commons.data.Properties properties, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS updateProperties- Parameters:
context- the call contextobjectId- identifier of the objectproperties- the propertiesobjectInfos- informations- Returns:
- the updated object
-
getObjectInfo
public org.apache.chemistry.opencmis.commons.server.ObjectInfo getObjectInfo(String objectId, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler handler) -
checkOut
-
cancelCheckOut
-
checkIn
-
getObject
public org.apache.chemistry.opencmis.commons.data.ObjectData getObject(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, String versionServicesId, String filter, Boolean includeAllowableActions, Boolean includeAcl, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS getObject- Parameters:
context- the call contextobjectId- identifier of the file/folerversionServicesId- version specificationfilter- optional filterincludeAllowableActions- if the allowable actions must be includedincludeAcl- if the ACL must be includedobjectInfos- informations- Returns:
- the file/folder
-
getObjectByPath
public org.apache.chemistry.opencmis.commons.data.ObjectData getObjectByPath(org.apache.chemistry.opencmis.commons.server.CallContext context, String path, String filter, Boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, org.apache.chemistry.opencmis.commons.data.ExtensionsData extension) CMIS getObjectByPath- Parameters:
context- the call contextpath- path of the file/folderfilter- the filter(optional)includeAllowableActions- if the allowable actions must be includedincludeRelationships- if the relationship must be includedrenditionFilter- the rendition filter(optional)includePolicyIds- if the policies must be includedincludeAcl- if the ACL must be includedextension- the extension- Returns:
- the file/folder at the given path
-
getAllowableActions
public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS getAllowableActions- Parameters:
context- the call contextobjectId- identifier of the file/folder- Returns:
- the allowable actions
-
getAcl
public org.apache.chemistry.opencmis.commons.data.Acl getAcl(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS getACL- Parameters:
context- the call contextobjectId- identifier of the file/folder- Returns:
- the ACL
-
getContentStream
public org.apache.chemistry.opencmis.commons.data.ContentStream getContentStream(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, BigInteger offset, BigInteger length) CMIS getContentStream- Parameters:
context- the call contextobjectId- identifier of the file/folderoffset- not supported, leave nulllength- not supported, leave null- Returns:
- the stream
-
getChildren
public org.apache.chemistry.opencmis.commons.data.ObjectInFolderList getChildren(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId, String filter, boolean includeAllowableActions, boolean includePathSegment, int maxItems, int skipCount, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) throws PersistenceException CMIS getChildren- Parameters:
context- the call contextfolderId- identifier of the folderfilter- optional filterincludeAllowableActions- if the allowable actions must be includedincludePathSegment- if the path segmentmaxItems- maximum number of itemsskipCount- skip the count of childrenobjectInfos- informations- Returns:
- the list of children
- Throws:
PersistenceException- error at data layer
-
getFolderParent
public org.apache.chemistry.opencmis.commons.data.ObjectData getFolderParent(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId) CMIS getFolderParent- Parameters:
context- the call contextfolderId- identifier of the folder- Returns:
- the parent object
-
getObjectParents
public List<org.apache.chemistry.opencmis.commons.data.ObjectParentData> getObjectParents(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId, String filter, Boolean includeAllowableActions, Boolean includeRelativePathSegment, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler objectInfos) CMIS getObjectParents- Parameters:
context- the call contextobjectId- identifier of the file/folderfilter- an optional filterincludeAllowableActions- if the allowable actions must be includedincludeRelativePathSegment- if the path segment must be includedobjectInfos- informations- Returns:
- list of parents
-
query
-
getAllVersions
-
getId
-
setTemplateDao
-
getContentChanges
public org.apache.chemistry.opencmis.commons.data.ObjectList getContentChanges(org.apache.chemistry.opencmis.commons.spi.Holder<String> changeLogToken, int max) throws org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException - Throws:
org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException
-
getDocumentLastChanges
public List<org.apache.chemistry.opencmis.commons.data.ObjectData> getDocumentLastChanges(long minDate, int max) -
getFolderLastChanges
public List<org.apache.chemistry.opencmis.commons.data.ObjectData> getFolderLastChanges(long minDate, int max) -
getRoot
-
setHistoryDao
-