it.sistematica.isharedoc.opencmis.indatabase.storedobj.api
Interface Filing

All Known Subinterfaces:
Document, DocumentVersion, Folder, MultiFiling, SingleFiling, VersionedDocument
All Known Implementing Classes:
AbstractMultiFilingImpl, AbstractSingleFilingImpl, DocumentVersionImpl, FolderImpl, ItemImpl, VersionedDocumentImpl

public interface Filing

Path is the capability of an object to get accessed by a path in addition to the identifier. Paths are hierarchical, each object with a path has a parent where the parent is always a folder. Paths do not exist on its own but are part of other objects (documents and folders). Most of the functionality is defined in interfaces that are subclasses.

Author:
Jens

Field Summary
static java.lang.String PATH_SEPARATOR
          character indicating how folders are separated within a path string.
 
Method Summary
 java.util.List<Folder> getParents(java.lang.String user)
          return a list of parents the principal has access to. for single parent object this list must contain only one element. returns an empty list if this is an unfiled document.
 boolean hasParent()
          usually true except for the root folder, optimized call that just tests existence to provide information for AtomPub links (much cheaper than calling getParents() and test for empty result.
 void move(Folder oldParent, Folder newParent)
          Move an object to a different folder.
 

Field Detail

PATH_SEPARATOR

static final java.lang.String PATH_SEPARATOR
character indicating how folders are separated within a path string. This char must not be a valid character of an object name.

See Also:
Constant Field Values
Method Detail

getParents

java.util.List<Folder> getParents(java.lang.String user)
return a list of parents the principal has access to. for single parent object this list must contain only one element. returns an empty list if this is an unfiled document.

Parameters:
user - user id
Returns:
list of parent folders

hasParent

boolean hasParent()
usually true except for the root folder, optimized call that just tests existence to provide information for AtomPub links (much cheaper than calling getParents() and test for empty result.

Returns:
true if object has a parent, false if it is a root object

move

void move(Folder oldParent,
          Folder newParent)
Move an object to a different folder. Source and target object are persisted in this call as part of a transactional step.

Parameters:
newParent - new parent folder for the object