|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.cms.lifecycle.Lifecycle
This class represents a Publication Lifecycle for a Content Item. Associated with each Lifecycle is a set of phases. A phase can only be associated with one Lifecycle.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
versionId
|
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID |
Constructor Summary | |
protected |
Lifecycle()
If this constructor is used, the lifecycle definition needs to be set with the setLifecycleDefinition method. |
|
Lifecycle(BigDecimal id)
Constructor. |
|
Lifecycle(com.arsdigita.persistence.DataObject obj)
|
|
Lifecycle(com.arsdigita.persistence.OID oid)
Constructor. |
protected |
Lifecycle(String type)
|
Method Summary | |
Phase |
addCustomPhase(String label,
Date startDate,
Date endDate)
Adds a custom phase which is not part of the lifecycle definition. |
Phase |
addCustomPhase(String label,
Long start,
Long end)
Adds a custom phase which is not part of the lifecycle definition. |
Phase |
addPhase(PhaseDefinition pd)
Adds a phase which uses the default delay and duration from the phase definition. |
Phase |
addPhase(PhaseDefinition pd,
Date startDate)
Adds a phase which uses the supplied start date and calculate the end date using the phase definition default duration. |
Phase |
addPhase(PhaseDefinition pd,
Date startDate,
Date endDate)
Adds a phase which uses the supplied start date and end date. |
PhaseCollection |
getActivePhases()
Fetches the phases in this lifecycle that should be currently active. |
PhaseCollection |
getActivePhases(Date date)
Fetches the phases in this lifecycle that should be active at the specified time. |
String |
getBaseDataObjectType()
|
Date |
getEndDate()
Get the end date |
String |
getLabel()
Fetches the label of the lifecycle, which is the same as the label of the associated lifecycle definition. |
LifecycleDefinition |
getLifecycleDefinition()
Fetches the definition of publication lifecycle. |
LifecycleListener |
getListener()
Get the lifecycle listener associated with this phase. |
String |
getListenerClassName()
Fetches the class name of the listener associated with this lifecycle. |
PhaseCollection |
getPhases()
Fetches all phases within this lifecycle. |
Date |
getStartDate()
Get the start date. |
boolean |
hasBegun()
|
boolean |
hasEnded()
|
protected void |
initialize()
A new Lifecycle has neither begun nor ended. |
void |
setEndDate(Date date)
Set the end date |
protected void |
setHasBegun(boolean hasBegun)
|
protected void |
setLifecycleDefinition(LifecycleDefinition definition)
Update the associated definition of publication lifecycle. |
void |
setListenerClassName(String listener)
Associate a listener with this lifecycle. |
void |
setStartDate(Date date)
Set the start date |
void |
start()
Starts this lifecycle if the start date is past the current time or is undefined (in which case it is set to the current time). |
protected void |
stop()
Stop the lifecycle. |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
protected Lifecycle()
setLifecycleDefinition
method.
public Lifecycle(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by oid.
oid
- The OID
for the retrieved
DataObject
.public Lifecycle(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by id and
Lifecycle.BASE_DATA_OBJECT_TYPE
.
id
- The id
for the retrieved
DataObject
.public Lifecycle(com.arsdigita.persistence.DataObject obj)
protected Lifecycle(String type)
Method Detail |
protected void initialize()
public String getBaseDataObjectType()
public String getLabel()
public Date getStartDate()
public void setStartDate(Date date)
date
- The start datepublic Date getEndDate()
public void setEndDate(Date date)
date
- The end datepublic String getListenerClassName()
public LifecycleListener getListener()
public void setListenerClassName(String listener)
listener
- The class name of the lifecycle listenerpublic boolean hasBegun()
protected void setHasBegun(boolean hasBegun)
public boolean hasEnded()
public LifecycleDefinition getLifecycleDefinition()
protected void setLifecycleDefinition(LifecycleDefinition definition)
definition
- The lifecycle definitionpublic PhaseCollection getPhases()
delete()
method on that particular phase.
public PhaseCollection getActivePhases()
public PhaseCollection getActivePhases(Date date)
date
- The specified time.
public Phase addPhase(PhaseDefinition pd)
pd
- The phase definition
public Phase addPhase(PhaseDefinition pd, Date startDate)
pd
- The phase definitionstartDate
- Date at which the phase becomes active
public Phase addPhase(PhaseDefinition pd, Date startDate, Date endDate)
pd
- The phase definitionstartDate
- Date at which the phase becomes activeendDate
- Date at which the phase is no longer active
public Phase addCustomPhase(String label, Date startDate, Date endDate)
label
- the name of this phase.startDate
- start time of this phaseendDate
- end time of this phase If end date is null,
then this phase will never end.public Phase addCustomPhase(String label, Long start, Long end)
label
- the name of this phase.start
- start time of this phaseend
- end time of this phase If end date is null,
then this phase will never end.public void start()
protected void stop()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |