Class CmisRepository
- java.lang.Object
-
- org.ametys.plugins.workspaces.cmis.CmisRepository
-
public class CmisRepository extends Object
Helper class to retreive CMIS objects
-
-
Constructor Summary
Constructors Constructor Description CmisRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeContentStream(CallContext context, Project project, Holder<String> objectIdHolder, Boolean overwriteFlag, ContentStream contentStream, boolean append, CmisServiceFactory factory)
CMIS setContentStream, deleteContentStream, and appendContentStream.String
createDocument(CallContext context, Properties properties, Project project, String folderId, ContentStream contentStream, VersioningState versioningState, CmisServiceFactory factory)
Create a new document in a folderString
createFolder(CallContext context, Properties properties, Project project, String folderId, CmisServiceFactory factory)
Create a new folder in another onevoid
deleteObject(CallContext context, String objectId, CmisServiceFactory factory)
CMIS deleteObject.FailedToDeleteData
deleteTree(CallContext context, Project project, String folderId, CmisServiceFactory factory)
CMIS deleteTree.ObjectInFolderList
getChildren(CallContext context, String folderId, Project project, String filter, Boolean includeAllowableActions, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get children of a folderContentStream
getContentStream(CallContext context, String objectId, BigInteger offset, BigInteger length, CmisServiceFactory factory)
get the inputstream to read a fileObjectData
getFolderParent(CallContext context, Project project, String folderId, String filter, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS getFolderParent.ObjectData
getObject(CallContext context, Project project, String objectId, String versionServicesId, String filter, Boolean includeAllowableActions, Boolean includeAcl, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
getObjectObjectData
getObjectByPath(CallContext context, Project project, String folderPath, String filter, boolean includeAllowableActions, boolean includeACL, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get an object by it's pathList<ObjectParentData>
getObjectParents(CallContext context, String objectId, Project project, String filter, Boolean includeAllowableActions, Boolean includeRelativePathSegment, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get the parents of an objectRepositoryInfo
getRepositoryInfo(CallContext context, Project project, CmisServiceFactory factory)
retreive informations for a repositoryTypeDefinitionList
getTypeChildren(CallContext context, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, CmisServiceFactory factory)
getTypeChildrenTypeDefinition
getTypeDefinition(CallContext context, String typeId, CmisServiceFactory factory)
getTypeDefinitionObjectData
moveObject(CallContext context, Project project, Holder<String> objectId, String targetFolderId, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS moveObject.ObjectData
updateProperties(CallContext context, Project project, Holder<String> objectIdHolder, Properties properties, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS updateProperties.
-
-
-
Constructor Detail
-
CmisRepository
public CmisRepository()
-
-
Method Detail
-
getRepositoryInfo
public RepositoryInfo getRepositoryInfo(CallContext context, Project project, CmisServiceFactory factory)
retreive informations for a repository- Parameters:
context
- call contextproject
- projectfactory
- factory- Returns:
- RepositoryInfo
-
getTypeDefinition
public TypeDefinition getTypeDefinition(CallContext context, String typeId, CmisServiceFactory factory)
getTypeDefinition- Parameters:
context
- call contexttypeId
- type IDfactory
- factory- Returns:
- the type definition
-
getTypeChildren
public TypeDefinitionList getTypeChildren(CallContext context, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, CmisServiceFactory factory)
getTypeChildren- Parameters:
context
- contexttypeId
- typeIdincludePropertyDefinitions
- includePropertyDefinitionsmaxItems
- maxItemsskipCount
- skipCountfactory
- factory- Returns:
- the type definition list
-
getObject
public ObjectData getObject(CallContext context, Project project, String objectId, String versionServicesId, String filter, Boolean includeAllowableActions, Boolean includeAcl, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
getObject- Parameters:
context
- contextproject
- ProjectobjectId
- objectIdversionServicesId
- versionServicesIdfilter
- filterincludeAllowableActions
- includeAllowableActionsincludeAcl
- includeAclobjectInfos
- objectInfosfactory
- factory- Returns:
- ObjectData ObjectData
-
getChildren
public ObjectInFolderList getChildren(CallContext context, String folderId, Project project, String filter, Boolean includeAllowableActions, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get children of a folder- Parameters:
context
- call contextfolderId
- folder Idproject
- Projectfilter
- filtersincludeAllowableActions
- allowable actionsincludePathSegment
- include path segmentmaxItems
- max itemsskipCount
- skip countobjectInfos
- object infosfactory
- factory- Returns:
- ObjectInFolderList
-
getObjectParents
public List<ObjectParentData> getObjectParents(CallContext context, String objectId, Project project, String filter, Boolean includeAllowableActions, Boolean includeRelativePathSegment, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get the parents of an object- Parameters:
context
- call contextobjectId
- Object Idproject
- Projectfilter
- filtersincludeAllowableActions
- allowable actionsincludeRelativePathSegment
- relative path segmentobjectInfos
- object infosfactory
- factory- Returns:
- List of ObjectParentData
-
getContentStream
public ContentStream getContentStream(CallContext context, String objectId, BigInteger offset, BigInteger length, CmisServiceFactory factory)
get the inputstream to read a file- Parameters:
context
- call contextobjectId
- object Idoffset
- offsetlength
- lenghtfactory
- factory- Returns:
- ContentStream
-
getObjectByPath
public ObjectData getObjectByPath(CallContext context, Project project, String folderPath, String filter, boolean includeAllowableActions, boolean includeACL, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
get an object by it's path- Parameters:
context
- call contextproject
- ProjectfolderPath
- path of the object/folderfilter
- filters for metadataincludeAllowableActions
- allowable actionsincludeACL
- ACLobjectInfos
- infosfactory
- factory- Returns:
- datas of the object
-
createFolder
public String createFolder(CallContext context, Properties properties, Project project, String folderId, CmisServiceFactory factory)
Create a new folder in another one- Parameters:
context
- call contextproperties
- propertiesproject
- ProjectfolderId
- folder Idfactory
- factory- Returns:
- id of the created folder
-
createDocument
public String createDocument(CallContext context, Properties properties, Project project, String folderId, ContentStream contentStream, VersioningState versioningState, CmisServiceFactory factory)
Create a new document in a folder- Parameters:
context
- call contextproperties
- propertiesproject
- ProjectfolderId
- folder IdcontentStream
- content StreamversioningState
- versionning Statefactory
- factory- Returns:
- id of the created document
-
deleteObject
public void deleteObject(CallContext context, String objectId, CmisServiceFactory factory)
CMIS deleteObject.- Parameters:
context
- call contextobjectId
- object IDfactory
- factory
-
getFolderParent
public ObjectData getFolderParent(CallContext context, Project project, String folderId, String filter, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS getFolderParent.- Parameters:
context
- call contextproject
- ProjectfolderId
- folder Idfilter
- filtersobjectInfos
- objectInfosfactory
- factory- Returns:
- ObjectData
-
deleteTree
public FailedToDeleteData deleteTree(CallContext context, Project project, String folderId, CmisServiceFactory factory)
CMIS deleteTree.- Parameters:
context
- call contextproject
- ProjectfolderId
- folder Idfactory
- factory- Returns:
- FailedToDeleteData
-
updateProperties
public ObjectData updateProperties(CallContext context, Project project, Holder<String> objectIdHolder, Properties properties, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS updateProperties.- Parameters:
context
- call contextproject
- ProjectobjectIdHolder
- objectId in a holderproperties
- propertiesobjectInfos
- object infosfactory
- factory- Returns:
- ObjectData
-
changeContentStream
public void changeContentStream(CallContext context, Project project, Holder<String> objectIdHolder, Boolean overwriteFlag, ContentStream contentStream, boolean append, CmisServiceFactory factory)
CMIS setContentStream, deleteContentStream, and appendContentStream.- Parameters:
context
- call contextproject
- ProjectobjectIdHolder
- object Id in a holderoverwriteFlag
- overwritecontentStream
- inputStreamappend
- appendfactory
- factory
-
moveObject
public ObjectData moveObject(CallContext context, Project project, Holder<String> objectId, String targetFolderId, ObjectInfoHandler objectInfos, CmisServiceFactory factory)
CMIS moveObject.- Parameters:
context
- call contextproject
- ProjectobjectId
- objectId in a holdertargetFolderId
- folderIdobjectInfos
- objectInfosfactory
- factory- Returns:
- ObjectData
-
-