Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.model
Class AbstractDocument

java.lang.Object
  extended by org.nuxeo.ecm.core.model.AbstractDocument
All Implemented Interfaces:
Document, DocumentContainer, Lockable, PropertyContainer, VersionableDocument

public abstract class AbstractDocument
extends Object
implements Document

Abstract document that implements code independent on the model implementation.

The Document implementors MUST extend this class and not directly implement the Document interface.

Author:
Julien Anguenot

Constructor Summary
AbstractDocument()
           
 
Method Summary
 boolean followTransition(String transition)
          Follows a given life cycle transition.
 Collection<String> getAllowedStateTransitions()
          Returns the allowed state transitions for this document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.model.Document
addFacet, getAllFacets, getFacets, getLastModified, getLifeCyclePolicy, getLifeCycleState, getName, getParent, getPath, getRepository, getSession, getSystemProp, getType, getUUID, hasFacet, isFolder, isProxy, readDocumentPart, remove, removeFacet, save, setCurrentLifeCycleState, setLifeCyclePolicy, setSystemProp, writeDocumentPart
 
Methods inherited from interface org.nuxeo.ecm.core.model.DocumentContainer
addChild, getChild, getChildren, getChildren, getChildrenIds, hasChild, hasChildren, orderBefore, removeChild, resolvePath
 
Methods inherited from interface org.nuxeo.ecm.core.model.PropertyContainer
exportFlatMap, exportMap, exportMap, getBoolean, getContent, getDate, getDirtyFields, getDouble, getLong, getProperties, getProperty, getPropertyIterator, getPropertyValue, getString, importFlatMap, importMap, isPropertySet, removeProperty, setBoolean, setContent, setDate, setDouble, setLong, setPropertyValue, setString
 
Methods inherited from interface org.nuxeo.ecm.core.versioning.VersionableDocument
checkIn, checkOut, getBaseVersion, getCheckinComment, getLastVersion, getSourceDocument, getVersion, getVersionCreationDate, getVersionLabel, getVersions, getVersionSeriesId, getVersionsIds, getWorkingCopy, hasVersions, isCheckedOut, isLatestMajorVersion, isLatestVersion, isMajorVersion, isVersion, isVersionSeriesCheckedOut, restore
 
Methods inherited from interface org.nuxeo.ecm.core.model.Lockable
getLock, removeLock, setLock
 

Constructor Detail

AbstractDocument

public AbstractDocument()
Method Detail

followTransition

public boolean followTransition(String transition)
                         throws LifeCycleException
Description copied from interface: Document
Follows a given life cycle transition.

This will update the current life cycle of the document.

Specified by:
followTransition in interface Document
Parameters:
transition - the name of the transition to follow
Returns:
a boolean representing the status if the operation
Throws:
LifeCycleException

getAllowedStateTransitions

public Collection<String> getAllowedStateTransitions()
                                              throws LifeCycleException
Description copied from interface: Document
Returns the allowed state transitions for this document.

Specified by:
getAllowedStateTransitions in interface Document
Returns:
a collection of state transitions as string
Throws:
LifeCycleException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.