implement the getObjectByPath(...) method declared in cmis service
r-140 opened this issue · 1 comments
default implementation of getObjectByPath method provided by AbstractCmisService class needs to be overridden.
There are two required parameters:
repositoryId - the identifier for the repository
path - the path to the object
path - "/" separated list of folders
List of optional parameters:
filter - a comma-separated list of query names that defines which properties must be returned by the repository
includeAllowableActions - if true, then the repository must return the allowable actions for the object (default is false)
includeRelationships - indicates what relationships in which the object participates must be returned (default is IncludeRelationships.NONE). Possible values: NONE SOURCE, TARGET, BOTH
renditionFilter - indicates what set of renditions the repository must return whose kind matches this filter (default is cmis:none)
includePolicyIds - if true , then the repository must return the policy ids for the object (default is false )
includeAcl - if true , then the repository must return the ACL for the object (default is false)
extension - extension data
Please find cmis spec here
Use cases:
given:
repositoryId
path
when
path is blank
then
Root object returned
given:
repositoryId
path
when
path has incorrect format
then
CmisInvalidArgumentException must be thrown
given:
repositoryId
path
when
repositoryId is not blank
path is not blank and has correct format
then
object found in database by last part of path must be returned or null if object not found
given:
repositoryId
path
when
repositoryId is not blank
path is not blank and has correct format
both folder and document with the same name found
then
document must be returned.
TODO: Add uses cases for optional parameters
CmisInvalidArgumentException must be thrown
the method has been implemented. All changes are in test-reorg branch.