|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.DefaultComponent org.nuxeo.ecm.core.lifecycle.impl.LifeCycleServiceImpl
public class LifeCycleServiceImpl
Life cycle service implementation.
LifeCycleService
Field Summary | |
---|---|
static ComponentName |
NAME
|
Constructor Summary | |
---|---|
LifeCycleServiceImpl()
|
Method Summary | |
---|---|
void |
followTransition(Document doc,
String transitionName)
Follows a given transition. |
LifeCycle |
getLifeCycleByName(String name)
Returns a life cycle given its name. |
LifeCycle |
getLifeCycleFor(Document doc)
Returns the life cycle a given document follows. |
String |
getLifeCycleNameFor(String typeName)
Returns the lifecycle name that the given type follows. |
Collection<LifeCycle> |
getLifeCycles()
Returns all the registered life cycles. |
List<String> |
getNonRecursiveTransitionForDocType(String docTypeName)
Returns a list of transition for which, when a it is followed, it should no recurse in its children. |
Collection<String> |
getTypesFor(String lifeCycleName)
Returns the types which follow a given life cycle. |
Map<String,String> |
getTypesMapping()
Returns the mapping from types to life cycle names. |
void |
initialize(Document doc)
Initializes the life cycle for the given document. |
void |
initialize(Document doc,
String initialStateName)
Initializes the life cycle for the given document. |
void |
registerExtension(Extension extension)
Register extensions. |
void |
reinitLifeCycle(Document doc)
Sets the current state to the initial state as defined by the associated lifecycle. |
void |
unregisterExtension(Extension extension)
Unregisters an extension. |
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
activate, applicationStarted, deactivate, getAdapter, registerContribution, unregisterContribution |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ComponentName NAME
Constructor Detail |
---|
public LifeCycleServiceImpl()
Method Detail |
---|
public LifeCycle getLifeCycleByName(String name)
LifeCycleService
getLifeCycleByName
in interface LifeCycleService
name
- the life cycle's name
public LifeCycle getLifeCycleFor(Document doc)
LifeCycleService
getLifeCycleFor
in interface LifeCycleService
doc
- the document instance
public String getLifeCycleNameFor(String typeName)
LifeCycleService
getLifeCycleNameFor
in interface LifeCycleService
typeName
- the type's name
public Collection<LifeCycle> getLifeCycles()
LifeCycleService
getLifeCycles
in interface LifeCycleService
public Collection<String> getTypesFor(String lifeCycleName)
LifeCycleService
getTypesFor
in interface LifeCycleService
lifeCycleName
- a string holding the name of the life cycle
public Map<String,String> getTypesMapping()
LifeCycleService
getTypesMapping
in interface LifeCycleService
public void initialize(Document doc) throws LifeCycleException
LifeCycleService
Document state will be set to the life cycle initial state.
initialize
in interface LifeCycleService
doc
- the document instance
LifeCycleException
public void initialize(Document doc, String initialStateName) throws LifeCycleException
LifeCycleService
Tries to set given state on document, if it's a valid initial state.
initialize
in interface LifeCycleService
doc
- the document instanceinitialStateName
- the initial state name
LifeCycleException
public void followTransition(Document doc, String transitionName) throws LifeCycleException
LifeCycleService
followTransition
in interface LifeCycleService
doc
- the Document instancetransitionName
- the transition name
LifeCycleException
public void reinitLifeCycle(Document doc) throws LifeCycleException
LifeCycleService
reinitLifeCycle
in interface LifeCycleService
LifeCycleException
public void registerExtension(Extension extension) throws Exception
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to register
Exception
- if any error occurspublic void unregisterExtension(Extension extension) throws Exception
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregister
Exception
- if any error occurspublic List<String> getNonRecursiveTransitionForDocType(String docTypeName)
LifeCycleService
BulkLifeCycleChangeListener
will listen to the transition
taken event and call a follow transition on the children of the document
if the document is folderish. It check this list of transition to find
out if it should recurse.
getNonRecursiveTransitionForDocType
in interface LifeCycleService
docTypeName
- The doc type
BulkLifeCycleChangeListener
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |