org.apache.chemistry.opencmis.inmemory.storedobj.impl
Class AbstractSingleFilingImpl
java.lang.Object
org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractSingleFilingImpl
- All Implemented Interfaces:
- Filing, SingleFiling, StoredObject
- Direct Known Subclasses:
- FolderImpl
public abstract class AbstractSingleFilingImpl
- extends StoredObjectImpl
- implements SingleFiling
AbstractPathImpl is the common superclass of all objects hold in the
repository that have a single parent, these are: Folders.
- Author:
- Jens
Fields inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing |
PATH_SEPARATOR |
Method Summary |
Folder |
getParent()
|
List<Folder> |
getParents()
return a list of parents. |
String |
getPath()
|
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 |
rename(String newName)
Rename an object |
void |
setParent(Folder parent)
Put the document in a folder and set the parent. |
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl |
createSystemBasePropertiesWhenCreated, fillProperties, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getProperties, getRepositoryId, getTypeId, persist, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setSystemBasePropertiesWhenCreatedDirect, setTypeId, updateSystemBasePropertiesWhenModified |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fParent
protected FolderImpl fParent
AbstractSingleFilingImpl
protected AbstractSingleFilingImpl(ObjectStoreImpl objStore)
getPath
public String getPath()
- Specified by:
getPath
in interface SingleFiling
- Returns:
getParent
public Folder getParent()
- Specified by:
getParent
in interface SingleFiling
- Returns:
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
getParents
public List<Folder> getParents()
- Description copied from interface:
Filing
- return a list of parents. 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
- Returns:
- list of parent folders
setParent
public void setParent(Folder parent)
- Description copied from interface:
SingleFiling
- Put the document in a folder and set the parent. This method should not
be used to file a document in a folder. It is used internally when a
document is filed to the folder. The document does not get persisted in
this call.
- Specified by:
setParent
in interface SingleFiling
- Parameters:
parent
- parent folder of the document to be assigned.
rename
public void rename(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
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
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.