com.arsdigita.cms.lifecycle
Class LifecycleService

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.cms.lifecycle.LifecycleService

public class LifecycleService
extends com.arsdigita.domain.DomainObject

This class provides method in associating ACSObject to Lifecycle and methods to access the association.

Version:
$Revision: #12 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Jack Chung (flattop@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String ITEM
           
static String ITEM_ID
           
static String LIFECYCLE
           
static String LIFECYCLE_ID
           
static String OBJECT_ID
           
static String SERVICE_ID
           
static String versionId
           
 
Constructor Summary
protected LifecycleService()
           
protected LifecycleService(BigDecimal id)
           
protected LifecycleService(com.arsdigita.persistence.DataObject obj)
           
protected LifecycleService(com.arsdigita.persistence.OID oid)
           
 
Method Summary
protected  void afterDelete()
          Remove the lifecycle if it doesn't have any remaining LifecycleService components
protected  void beforeDelete()
           
protected  com.arsdigita.kernel.ACSObject getACSObject()
          Get the ACSObject associated with this LifecycleService.
protected  BigDecimal getACSObjectID()
           
protected  Lifecycle getLifecycle()
           
static Lifecycle getLifecycle(com.arsdigita.kernel.ACSObject object)
          Get the lifecycle for an ACSObject.
protected  BigDecimal getLifecycleID()
           
protected static LifecycleService getLifecycleService(com.arsdigita.kernel.ACSObject object)
           
protected  void initialize()
           
static boolean removeLifecycle(com.arsdigita.kernel.ACSObject object)
          Remove the lifecycle for an ACSObject.
protected  void setACSObject(com.arsdigita.kernel.ACSObject object)
          Set the ACSObject associated with this LifecycleService.
static boolean setLifecycle(com.arsdigita.kernel.ACSObject obj, Lifecycle cycle)
          Set the lifecycle for a versioned object.
protected  void setLifecycle(Lifecycle lifecycle)
           
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterSave, beforeSave, clear, delete, disconnect, equals, get, getBaseDataObjectType, 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

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values

SERVICE_ID

public static final String SERVICE_ID
See Also:
Constant Field Values

OBJECT_ID

public static final String OBJECT_ID
See Also:
Constant Field Values

LIFECYCLE_ID

public static final String LIFECYCLE_ID
See Also:
Constant Field Values

LIFECYCLE

public static final String LIFECYCLE
See Also:
Constant Field Values

ITEM

public static final String ITEM
See Also:
Constant Field Values

ITEM_ID

public static final String ITEM_ID
See Also:
Constant Field Values
Constructor Detail

LifecycleService

protected LifecycleService()

LifecycleService

protected LifecycleService(com.arsdigita.persistence.OID oid)
                    throws com.arsdigita.domain.DataObjectNotFoundException

LifecycleService

protected LifecycleService(BigDecimal id)
                    throws com.arsdigita.domain.DataObjectNotFoundException
Parameters:
id - The ID of the ACSObject

LifecycleService

protected LifecycleService(com.arsdigita.persistence.DataObject obj)
Method Detail

initialize

protected void initialize()

getACSObjectID

protected BigDecimal getACSObjectID()

getACSObject

protected com.arsdigita.kernel.ACSObject getACSObject()
Get the ACSObject associated with this LifecycleService.


setACSObject

protected void setACSObject(com.arsdigita.kernel.ACSObject object)
Set the ACSObject associated with this LifecycleService.


getLifecycleID

protected BigDecimal getLifecycleID()

getLifecycle

protected Lifecycle getLifecycle()

setLifecycle

protected void setLifecycle(Lifecycle lifecycle)

setLifecycle

public static boolean setLifecycle(com.arsdigita.kernel.ACSObject obj,
                                   Lifecycle cycle)
Set the lifecycle for a versioned object. Apply a tag to the object to mark the current version.

Parameters:
cycle - the lifecycle to be applied
Returns:
true is lifecycle service is updated, false if added

getLifecycle

public static Lifecycle getLifecycle(com.arsdigita.kernel.ACSObject object)
Get the lifecycle for an ACSObject. Returns null if this object does not have an associated lifecycle.


getLifecycleService

protected static LifecycleService getLifecycleService(com.arsdigita.kernel.ACSObject object)

removeLifecycle

public static boolean removeLifecycle(com.arsdigita.kernel.ACSObject object)
Remove the lifecycle for an ACSObject.

Returns:
true is lifecycle service is removed, false if no lifecycle was associated

beforeDelete

protected void beforeDelete()

afterDelete

protected void afterDelete()
Remove the lifecycle if it doesn't have any remaining LifecycleService components



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC