|
|||||||||||
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.Phase
This class represents a phase in Publication Lifecycle for a Content Item. 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 |
Phase()
If this constructor is used, the phase definition needs to be set with the setPhaseDefinition method. |
|
Phase(BigDecimal id)
Constructor. |
|
Phase(com.arsdigita.persistence.DataObject obj)
|
|
Phase(com.arsdigita.persistence.OID oid)
Constructor. |
protected |
Phase(String type)
|
Method Summary | |
protected void |
afterSave()
|
void |
delete()
Delete this phase, updating the start and end times of the associated lifecycle. |
String |
getBaseDataObjectType()
|
Date |
getEndDate()
Get the end date |
String |
getLabel()
Fetches the label of the phase, which is the same as the PhaseDefinition label |
Lifecycle |
getLifecycle()
Fetches the lifecycle to which this phase belongs. |
LifecycleListener |
getListener()
Get the lifecycle listener associated with this phase. |
String |
getListenerClassName()
Get the lifecycle listener associated with this phase. |
PhaseDefinition |
getPhaseDefinition()
Fetches the definition of this phase. |
Date |
getStartDate()
Get the start date. |
boolean |
hasBegun()
|
boolean |
hasEnded()
|
protected void |
initialize()
A new Phase has neither begun nor ended. |
void |
setEndDate(Date date)
Set the end date |
void |
setEndTime(Long time)
Deprecated. use setEndDate(new Date(time)) |
protected void |
setHasBegun(boolean hasBegun)
|
protected void |
setLifecycle(Lifecycle lifecycle)
Update the associated Lifecycle. |
void |
setListenerClassName(String listener)
Associate a listener to be run when this phase becomes active. |
protected void |
setPhaseDefinition(PhaseDefinition definition)
Update the definition of this phase Every Phase needs to be associated with a definition. |
void |
setStartDate(Date date)
Set the start date |
void |
setStartTime(Long time)
Deprecated. use setStartDate(new Date(time)) |
void |
start()
Starts this phase 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 phase. |
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, beforeDelete, clear, 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 Phase()
setPhaseDefinition
method.
public Phase(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 Phase(BigDecimal id) throws com.arsdigita.domain.DataObjectNotFoundException
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by id and Phase.BASE_DATA_OBJECT_TYPE
.
id
- The id
for the retrieved
DataObject
.public Phase(com.arsdigita.persistence.DataObject obj)
protected Phase(String type)
Method Detail |
protected void initialize()
public String getBaseDataObjectType()
public String getLabel()
public Date getStartDate()
public void setStartTime(Long time)
time
- The start time (milliseconds since Jan 1, 1970)public void setStartDate(Date date)
date
- The start datepublic Date getEndDate()
public void setEndTime(Long time)
time
- The end time (milliseconds since Jan 1, 1970), null
if this phase never ends.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 Lifecycle getLifecycle()
protected void setLifecycle(Lifecycle lifecycle)
lifecycle
- The associated lifecyclepublic PhaseDefinition getPhaseDefinition()
protected void setPhaseDefinition(PhaseDefinition definition)
definition
- The phase definitionpublic void delete()
protected void afterSave()
public void start()
protected void stop()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |