|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xcmis.spi.basic.BasicStorage
public abstract class BasicStorage
Basic Storage impl
| Field Summary | |
|---|---|
protected PermissionService |
permissionService
|
protected RepositoryInfo |
repositoryInfo
|
protected TypeManager |
typeManager
|
| Constructor Summary | |
|---|---|
BasicStorage(RepositoryInfo repositoryInfo,
TypeManager typeManager,
PermissionService permissionService)
|
|
| Method Summary | |
|---|---|
String |
addType(TypeDefinition type)
Add new type in repository. |
AllowableActions |
calculateAllowableActions(ObjectData object)
Calculates allowable actions for specified object. |
DocumentData |
createDocument(FolderData parent,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
ContentStream content,
List<AccessControlEntry> acl,
Collection<PolicyData> policies,
VersioningState versioningState)
Create new document with type typeDefinition using
parent as parent. |
PolicyData |
createPolicy(FolderData parent,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
List<AccessControlEntry> acl,
Collection<PolicyData> policies)
Create new policy with type typeDefinition using
parent as parent. |
RelationshipData |
createRelationship(ObjectData source,
ObjectData target,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
List<AccessControlEntry> acl,
Collection<PolicyData> policies)
Create new relationship for specified source and
target. |
Collection<DocumentData> |
getAllVersions(String versionSeriesId)
Collection of all Document in the specified version series, sorted by cmis:creationDate descending. |
ItemsIterator<ChangeEvent> |
getChangeLog(String changeLogToken)
Gets content changes. |
ItemsIterator<DocumentData> |
getCheckedOutDocuments(FolderData folder,
String orderBy)
Get checkedout objects (private working copies) that user has access to. |
String |
getId()
Gets storage unique id. |
ItemsIterator<Rendition> |
getRenditions(ObjectData object)
Get object renditions. |
RepositoryInfo |
getRepositoryInfo()
Get description of storage and its capabilities. |
ItemsIterator<TypeDefinition> |
getTypeChildren(String typeId,
boolean includePropertyDefinitions)
Iterator over object types. |
TypeDefinition |
getTypeDefinition(String typeId,
boolean includePropertyDefinition)
Get type definition for type typeId . |
Iterator<String> |
getUnfiledObjectsId()
Iterator of all unfilled documents identifiers. |
ObjectData |
moveObject(ObjectData object,
FolderData target,
FolderData source)
Move object from source to target. |
ItemsIterator<Result> |
query(Query query)
Handle specified SQL query. |
void |
removeType(String typeId)
Remove type definition for type typeId . |
void |
unfileObject(ObjectData object)
Remove non-folder fileable object from all folder where in which it is currently filed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xcmis.spi.Storage |
|---|
copyDocument, createFolder, deleteObject, deleteTree, getObjectById, getObjectByPath |
| Field Detail |
|---|
protected RepositoryInfo repositoryInfo
protected TypeManager typeManager
protected PermissionService permissionService
| Constructor Detail |
|---|
public BasicStorage(RepositoryInfo repositoryInfo,
TypeManager typeManager,
PermissionService permissionService)
| Method Detail |
|---|
public RepositoryInfo getRepositoryInfo()
getRepositoryInfo in interface Storagepublic AllowableActions calculateAllowableActions(ObjectData object)
calculateAllowableActions in interface Storageobject - object
public String addType(TypeDefinition type)
throws ConstraintException,
StorageException,
CmisRuntimeException
addType in interface TypeManagertype - the type definition
ConstraintException - if any of the following conditions are met:
TypeDefinition.getId()TypeDefinition.getBaseId()TypeDefinition.getParentId()StorageException - if type can't be added cause to storage internal
problem
NotSupportedException - if storage does not support adding new types
CmisRuntimeException
public void removeType(String typeId)
throws TypeNotFoundException,
ConstraintException,
StorageException,
CmisRuntimeException
typeId .
removeType in interface TypeManagertypeId - type Id
TypeNotFoundException - if type typeId not found in
repository
ConstraintException - if removing type violates a storage
constraint. For example, if storage already contains object of
this type
StorageException - if type can't be added cause to storage internal
problem
CmisRuntimeException
public ItemsIterator<TypeDefinition> getTypeChildren(String typeId,
boolean includePropertyDefinitions)
throws TypeNotFoundException,
CmisRuntimeException
getTypeChildren in interface TypeManagertypeId - the type id, if not null then return only
specified Object Type and its direct descendant. If
null then return base typesincludePropertyDefinitions - true if property definition
should be included false otherwise
TypeNotFoundException - if type typeId does not exist
CmisRuntimeException
public TypeDefinition getTypeDefinition(String typeId,
boolean includePropertyDefinition)
throws TypeNotFoundException,
CmisRuntimeException
typeId .
getTypeDefinition in interface TypeManagertypeId - type IdincludePropertyDefinition - if true property definition
should be included
TypeNotFoundException - if type typeId does not exist
CmisRuntimeException
public DocumentData createDocument(FolderData parent,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
ContentStream content,
List<AccessControlEntry> acl,
Collection<PolicyData> policies,
VersioningState versioningState)
throws ConstraintException,
NameConstraintViolationException,
IOException,
StorageException
typeDefinition using
parent as parent. If parent == null then
document created in unfiling state. If unfiling is not supported
ConstraintException should be thrown.
Implementation Compatibility: MUST be implemented
createDocument in interface Storageparent - parent folder or null if document should be
created in unfiling statetypeDefinition - the document type definitionproperties - the document properties. Properties whith updatability
other then Updatability.ONCREATE or
Updatability.READWRITE will be ignoredcontent - the document content. May be null.
MUST be required if the type requires it.acl - the list of ACEs to be applied to newly create document. May be
null or empty list if no ACEs to be appliedpolicies - the list of policies. May be null or empty
collection if no policies to be appliedversioningState - versioning state
ConstraintException - if any of following condition are met:
false and a value of the versioningState parameter is
other than nonetrue and and the value of the versioningState
parameter is noneparent == null and unfiling is not supportedNameConstraintViolationException - if property 'cmis:name' throws
conflict
IOException - if any i/o error occurs when try to set document
content stream
StorageException - if object can not be saved cause to storage
internal problemVersioningState
public PolicyData createPolicy(FolderData parent,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
List<AccessControlEntry> acl,
Collection<PolicyData> policies)
throws ConstraintException,
NameConstraintViolationException,
StorageException
typeDefinition using
parent as parent. If parent == null then policy
created in unfiling state.
2.2.4.5 createPolicy
Implementation Compatibility: the support for policy objects is optional,
if implementation does not support cmis:policy object-type method should
throw NotSupportedException
createPolicy in interface Storageparent - parent foldertypeDefinition - the policy type definitionproperties - the policy propertiesacl - the list of ACEs to be applied to newly created policy. May be
null or empty list if no ACEs to be appliedpolicies - the list of policies. May be null or empty
collection if no policies to be applied
ConstraintException - if parent == null and policy type
is fileable
NameConstraintViolationException - if property 'cmis:name' throws
conflict
StorageException - if object can not be saved cause to storage
internal problem
public RelationshipData createRelationship(ObjectData source,
ObjectData target,
TypeDefinition typeDefinition,
Map<String,Property<?>> properties,
List<AccessControlEntry> acl,
Collection<PolicyData> policies)
throws NameConstraintViolationException,
StorageException
source and
target.
Implementation Compatibility: the support for relationship objects is
optional, if implementation does not support cmis:relationship object-type
method should throw NotSupportedException
createRelationship in interface Storagesource - source of relationshiptarget - target of relationshiptypeDefinition - the relationship type definitionproperties - the relationship propertiesacl - the list of ACEs to be applied to newly created relationship.
May be null or empty list if no ACEs to be appliedpolicies - the list of policies. May be null or empty
collection if no policies to be applied
NameConstraintViolationException - if property 'cmis:name' throws
conflict
StorageException - if object can not be removed cause to storage
internal problem
public Collection<DocumentData> getAllVersions(String versionSeriesId)
throws ObjectNotFoundException
NotSupportedException should be
thrown.
getAllVersions in interface StorageversionSeriesId - the id of version series
ObjectNotFoundException - if version series with
versionSeriesId does not exist
public ItemsIterator<ChangeEvent> getChangeLog(String changeLogToken)
throws ConstraintException
NotSupportedException should be thrown.
getChangeLog in interface StoragechangeLogToken - if value other than null, then change
event corresponded to the value of the specified change log token
will be returned as the first result in the output. If not
specified, then will be returned the first change event recorded in
the change log. When set of changes passed is returned then
changeLogToken must contains log token corresponded to
the last change event. Then it may be used by caller for getting
next set on change events
ConstraintException - if the event corresponding to the change log
token provided as an input parameter is no longer available in the
change log. (E.g. because the change log was truncated)
public ItemsIterator<DocumentData> getCheckedOutDocuments(FolderData folder,
String orderBy)
getCheckedOutDocuments in interface Storagefolder - folder, if null then get all checked out
objects in any foldersorderBy - comma-separated list of query names and the ascending
modifier 'ASC' or the descending modifier 'DESC' for each query
name. A storage's handling of the orderBy input is storage-specific
and storage may ignore this parameter if it not able sort items
public String getId()
getId in interface Storagepublic ItemsIterator<Rendition> getRenditions(ObjectData object)
getRenditions in interface Storageobject - the object
null
public ObjectData moveObject(ObjectData object,
FolderData target,
FolderData source)
throws UpdateConflictException,
VersioningException,
NameConstraintViolationException,
StorageException
object from source to target.
If operation successful then changes saved immediately.
Implementation Compatibility: MUST be implemented
moveObject in interface Storageobject - object to be movedtarget - destination foldersource - folder from which object must be moved
UpdateConflictException - if object that is no longer current (as
determined by the storage).
VersioningException - if object is a non-current document version
NameConstraintViolationException - if moving operation cause name
conflict, e.g. destination folder already contains object with the
same name
StorageException - if object can not be moved (save changes) cause
to storage internal problem
public ItemsIterator<Result> query(Query query)
throws InvalidArgumentException
NotSupportedException should be thrown.
query in interface Storagequery - SQL query
InvalidArgumentException - if specified query is
invalidpublic void unfileObject(ObjectData object)
NotSupportedException should be thrown.
unfileObject in interface Storageobject - object
public Iterator<String> getUnfiledObjectsId()
throws StorageException
NotSupportedException should be thrown.
getUnfiledObjectsId in interface StorageStorageException - if any storage error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||