it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl
Class AbstractMultiFilingImpl

java.lang.Object
  extended by it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl.StoredObjectImpl
      extended by it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl.AbstractMultiFilingImpl
All Implemented Interfaces:
Filing, MultiFiling, StoredObject
Direct Known Subclasses:
ItemImpl, VersionedDocumentImpl

public abstract class AbstractMultiFilingImpl
extends StoredObjectImpl
implements MultiFiling

AbstractMultiPathImpl is the common superclass of all objects hold in the repository that have multiple parent folders, these are: Folders

Author:
Jens

Field Summary
protected  java.util.List<Folder> fParents
           
 
Fields inherited from class it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl.StoredObjectImpl
fNativeObject, fObjStore, fProperties, fRepositoryId, fTypeId, ICON_SIZE, policyIds, RENDITION_MIME_TYPE_JPEG, RENDITION_MIME_TYPE_PNG, RENDITION_SUFFIX, secondaryTypeIds
 
Fields inherited from interface it.sistematica.isharedoc.opencmis.indatabase.storedobj.api.Filing
PATH_SEPARATOR
 
Constructor Summary
AbstractMultiFilingImpl(ObjectStoreImpl objStore)
           
AbstractMultiFilingImpl(ObjectStoreImpl objStore, File file)
           
 
Method Summary
 void addParent(Folder parent)
          Add this document to a new parent folder as child object
 java.util.List<Folder> 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.
 java.lang.String getPathSegment()
          retrieve the path segment of this folder
 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.
 void removeParent(Folder parent)
          Remove this object from the children of parent
 void rename(java.lang.String newName)
          Rename an object
 
Methods inherited from class it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl.StoredObjectImpl
addAcl, addAppliedPolicy, createSystemBasePropertiesWhenCreated, fillProperties, getAcl, getAllowableActions, getAppliedPolicies, getChangeToken, getConfidentialityLevel, getCreatedAt, getCreatedBy, getDeleted, getDescription, getHidden, getIconFromResourceDir, getId, getModifiedAt, getModifiedBy, getName, getNativeObject, getObjectRelationships, getObjectTemplate, getOrganization, getOriginalNativeObject, getProperties, getRenditionContent, getRenditions, getRepositoryId, getSecondaryTypeIds, getSignatureExpireDate, getSignatureStatus, getSignatureValidationDate, getSignatureValidationNote, getSignatureValidationStatus, getSigned, getType, getTypeId, hasRendition, persist, removeAcl, removePolicy, setAppliedPolicies, setConfidentialityLevel, setConfidentialityLevelId, setCreatedAt, setCreatedBy, setCustomProperties, setDeleted, setDescription, setHidden, setId, setModifiedAtNow, setModifiedBy, setName, setNativeObject, setNote, setObjectTemplate, setObjectTemplateId, setOrganization, setOrganizationId, setOriginalFileId, setProperties, setRemoteURL, setRepositoryId, setSecondaryTypeIds, setSignatureValidationNote, setSignatureValidationStatus, setStatus, setSystemBasePropertiesWhenCreatedDirect, setTypeId, testRenditionFilterForImage, updateSystemBasePropertiesWhenModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fParents

protected java.util.List<Folder> fParents
Constructor Detail

AbstractMultiFilingImpl

AbstractMultiFilingImpl(ObjectStoreImpl objStore)

AbstractMultiFilingImpl

AbstractMultiFilingImpl(ObjectStoreImpl objStore,
                        File file)
Method Detail

addParent

public void addParent(Folder parent)
Description copied from interface: MultiFiling
Add this document to a new parent folder as child object

Specified by:
addParent in interface MultiFiling
Parameters:
parent - new parent folder of the document.

removeParent

public void removeParent(Folder parent)
Description copied from interface: MultiFiling
Remove this object from the children of parent

Specified by:
removeParent in interface MultiFiling
Parameters:
parent - parent folder of the document

getParents

public java.util.List<Folder> getParents()

getParents

public java.util.List<Folder> getParents(java.lang.String user)
Description copied from interface: Filing
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.

Specified by:
getParents in interface Filing
Parameters:
user - user id
Returns:
list of parent folders

hasParent

public boolean hasParent()
Description copied from interface: Filing
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.

Specified by:
hasParent in interface Filing
Returns:
true if object has a parent, false if it is a root object

getPathSegment

public java.lang.String getPathSegment()
Description copied from interface: MultiFiling
retrieve the path segment of this folder

Specified by:
getPathSegment in interface MultiFiling
Returns:

move

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

Specified by:
move in interface Filing
newParent - new parent folder for the object

rename

public void rename(java.lang.String newName)
Description copied from interface: StoredObject
Rename an object

Specified by:
rename in interface StoredObject
Overrides:
rename in class StoredObjectImpl
Parameters:
newName - the new name of the object