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 SummaryConstructors
- 
Method SummaryModifier 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- 
LDRepositoryConstructor.- Parameters:
- root- root folder
- sid- The Session identifier
 
 
- 
- 
Method Details- 
addUserAdds a user to the repository- Parameters:
- user- the username
- readOnly- if the user must be read-only
 
- 
getRepositoryInfopublic org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo(org.apache.chemistry.opencmis.commons.server.CallContext context, String latestChangeLogToken) CMIS getRepositoryInfo- Parameters:
- context- call context
- latestChangeLogToken- a token that indicates the time stamp of the last update
- Returns:
- the repository representation
 
- 
getTypesChildrenpublic 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 context
- typeId- identifier of the type
- includePropertyDefinitions- id the property definitions must be included
- maxItems- maximum number of children
- skipCount- if the children must be counted
- Returns:
- the list of type definitions
 
- 
getTypeDefinitionpublic org.apache.chemistry.opencmis.commons.definitions.TypeDefinition getTypeDefinition(org.apache.chemistry.opencmis.commons.server.CallContext context, String typeId) CMIS getTypeDefinition- Parameters:
- context- call context
- typeId- identifier of the type
- Returns:
- the type definition
 
- 
getTypesDescendantspublic 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 context
- typeId- identifier of the type
- depth- a depth specification
- includePropertyDefinitions- if property definitions must be included
- Returns:
- the list of type definitions
 
- 
createDocumentFromSource
- 
createpublic 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 context
- properties- the properties
- folderId- identifier of the parent folder
- contentStream- stream of the document to create
- objectInfos- informations
- Returns:
- the newly created object
 
- 
appendContentpublic 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 context
- documentId- identifier of the document
- contentStream- binary content of the file to append
- isLastChunk- if this is the last chunk
- Throws:
- IOException- I/O error
- PersistenceException- Error in the data layer
 
- 
createDocumentpublic 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 context
- properties- the folder's properties
- folderId- identifier of the parent folder
- contentStream- binary content of the file to create
- Returns:
- the new document's identifier
 
- 
createFolderpublic 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 context
- properties- the folder's properties
- folderId- identifier of the parent folder
- Returns:
- the created folder's identifier
 
- 
moveObjectpublic 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 context
- objectId- identifier of the file/folder
- targetFolderId- identifier of the target folder
- objectInfos- informations
- Returns:
- the moved object
 
- 
deleteObjectOrCancelCheckOutpublic void deleteObjectOrCancelCheckOut(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) 
- 
deleteObjectpublic void deleteObject(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS deleteObject- Parameters:
- context- call context
- objectId- identifier of the file/folder
 
- 
deleteTreepublic 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 context
- folderId- identifier of the folder
- continueOnFailure- if the execution must continue even in presence of an issue
- Returns:
- informations about the failure
 
- 
updatePropertiespublic 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 context
- objectId- identifier of the object
- properties- the properties
- objectInfos- informations
- Returns:
- the updated object
 
- 
getObjectInfopublic org.apache.chemistry.opencmis.commons.server.ObjectInfo getObjectInfo(String objectId, org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler handler) 
- 
checkOut
- 
cancelCheckOut
- 
checkIn
- 
getObjectpublic 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 context
- objectId- identifier of the file/foler
- versionServicesId- version specification
- filter- optional filter
- includeAllowableActions- if the allowable actions must be included
- includeAcl- if the ACL must be included
- objectInfos- informations
- Returns:
- the file/folder
 
- 
getObjectByPathpublic 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 context
- path- path of the file/folder
- filter- the filter(optional)
- includeAllowableActions- if the allowable actions must be included
- includeRelationships- if the relationship must be included
- renditionFilter- the rendition filter(optional)
- includePolicyIds- if the policies must be included
- includeAcl- if the ACL must be included
- extension- the extension
- Returns:
- the file/folder at the given path
 
- 
getAllowableActionspublic org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS getAllowableActions- Parameters:
- context- the call context
- objectId- identifier of the file/folder
- Returns:
- the allowable actions
 
- 
getAclpublic org.apache.chemistry.opencmis.commons.data.Acl getAcl(org.apache.chemistry.opencmis.commons.server.CallContext context, String objectId) CMIS getACL- Parameters:
- context- the call context
- objectId- identifier of the file/folder
- Returns:
- the ACL
 
- 
getContentStreampublic 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 context
- objectId- identifier of the file/folder
- offset- not supported, leave null
- length- not supported, leave null
- Returns:
- the stream
 
- 
getChildrenpublic 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 context
- folderId- identifier of the folder
- filter- optional filter
- includeAllowableActions- if the allowable actions must be included
- includePathSegment- if the path segment
- maxItems- maximum number of items
- skipCount- skip the count of children
- objectInfos- informations
- Returns:
- the list of children
- Throws:
- PersistenceException- error at data layer
 
- 
getFolderParentpublic org.apache.chemistry.opencmis.commons.data.ObjectData getFolderParent(org.apache.chemistry.opencmis.commons.server.CallContext context, String folderId) CMIS getFolderParent- Parameters:
- context- the call context
- folderId- identifier of the folder
- Returns:
- the parent object
 
- 
getObjectParentspublic 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 context
- objectId- identifier of the file/folder
- filter- an optional filter
- includeAllowableActions- if the allowable actions must be included
- includeRelativePathSegment- if the path segment must be included
- objectInfos- informations
- Returns:
- list of parents
 
- 
query
- 
getAllVersions
- 
getId
- 
setTemplateDao
- 
getContentChangespublic 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
 
- 
getDocumentLastChangespublic List<org.apache.chemistry.opencmis.commons.data.ObjectData> getDocumentLastChanges(long minDate, int max) 
- 
getFolderLastChangespublic List<org.apache.chemistry.opencmis.commons.data.ObjectData> getFolderLastChanges(long minDate, int max) 
- 
getRoot
- 
setHistoryDao
 
-