com.arsdigita.cms
Class AuthoringKit

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.cms.AuthoringKit

public class AuthoringKit
extends com.arsdigita.kernel.ACSObject

An AuthoringKit contains a collection of authoring steps that are used for authoring a particular content type.

Version:
$Revision: #16 $ $Date: 2004/04/07 $
Author:
Jack Chung (flattop@arsdigita.com), Stanislav Freidin (sfreidin@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
protected static String CONTENT_TYPE
           
protected static String CREATE_COMPONENT
           
protected static String STEPS
           
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
  AuthoringKit()
          Default constructor.
  AuthoringKit(BigDecimal id)
          Constructor.
  AuthoringKit(com.arsdigita.persistence.DataObject obj)
           
  AuthoringKit(com.arsdigita.persistence.OID oid)
          Constructor.
protected AuthoringKit(String type)
           
 
Method Summary
 boolean addStep(AuthoringStep step, BigDecimal ordering)
          Add a Step to this AuthoringKit.
 AuthoringStep createStep(String label, String description, String component)
          Create a new Step for this AuthoringKit, and add it to the kit.
 AuthoringStep createStep(String label, String description, String component, BigDecimal ordering)
          Deprecated.  
 AuthoringStep createStep(String labelKey, String labelBundle, String descriptionKey, String descriptionBundle, String component, BigDecimal ordering)
          Create a Step for this AuthoringKit.
 String getBaseDataObjectType()
           
 ContentType getContentType()
          Get the ContentType associated with this kit.
 String getCreateComponent()
          Get the java classname for the component to create the content item using this kit.
 BigDecimal getLastOrdering()
          Get the ordering of the last step in the authoring kit.
 BigDecimal getOrdering(AuthoringStep step)
          Get the ordering of a step for this kit
 AuthoringStepCollection getSteps()
          Get the steps for this kit sorted by the ordering
 boolean removeStep(AuthoringStep step)
          Remove a step from this kit.
protected  void setContentType(ContentType type)
          Set the ContentType associated with this kit.
 void setCreateComponent(String component)
          Set the java classname for the component to create the content item using this kit.
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, 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

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

CREATE_COMPONENT

protected static final String CREATE_COMPONENT
See Also:
Constant Field Values

CONTENT_TYPE

protected static final String CONTENT_TYPE
See Also:
Constant Field Values

STEPS

protected static final String STEPS
See Also:
Constant Field Values
Constructor Detail

AuthoringKit

public AuthoringKit()
Default constructor. This creates a new authoring kit.


AuthoringKit

public AuthoringKit(com.arsdigita.persistence.OID oid)
             throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. The contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.

Parameters:
oid - The OID for the retrieved DataObject.

AuthoringKit

public AuthoringKit(BigDecimal id)
             throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. The contained DataObject is retrieved from the persistent storage mechanism with an OID specified by id and AuthoringKit.BASE_DATA_OBJECT_TYPE.

Parameters:
id - The id for the retrieved DataObject.

AuthoringKit

public AuthoringKit(com.arsdigita.persistence.DataObject obj)

AuthoringKit

protected AuthoringKit(String type)
Method Detail

getBaseDataObjectType

public String getBaseDataObjectType()
Returns:
the base PDL object type for this kit. Child classes should override this method to return the correct value

getCreateComponent

public String getCreateComponent()
Get the java classname for the component to create the content item using this kit.


setCreateComponent

public void setCreateComponent(String component)
Set the java classname for the component to create the content item using this kit.


getContentType

public ContentType getContentType()
Get the ContentType associated with this kit.


setContentType

protected void setContentType(ContentType type)
Set the ContentType associated with this kit.


createStep

public AuthoringStep createStep(String label,
                                String description,
                                String component,
                                BigDecimal ordering)
Deprecated.  


createStep

public AuthoringStep createStep(String labelKey,
                                String labelBundle,
                                String descriptionKey,
                                String descriptionBundle,
                                String component,
                                BigDecimal ordering)
Create a Step for this AuthoringKit. The Step created will be saved.

Parameters:
labelKey - Label Key for this step. It is used to look up the actual value of the label located in the LabelBundle
labelBundle - The name of the ResourceBundle where the labelKey is located
descriptionKey - Description Key for this step. It is used to look up the actual value of the description located in the DescriptionBundle
descriptionBundle - The name of the ResourceBundle where the descriptionKey is located
component - The java classname of the component associated with this kit.
ordering - An ordering for this step in the kit. Lower number appears in the beginning of the kit.

addStep

public boolean addStep(AuthoringStep step,
                       BigDecimal ordering)
Add a Step to this AuthoringKit. If the step is already added to the Kit, the ordering will be updated.

Parameters:
step - the step to add
ordering - An ordering for this step in the kit. Lower number appears in the beginning of the kit.
Returns:
true is step is added and false if ordering is updated

createStep

public AuthoringStep createStep(String label,
                                String description,
                                String component)
Create a new Step for this AuthoringKit, and add it to the kit. The new Step will automatically be saved.

Parameters:
label - Label for this step.
description - Description for this step.
component - The java classname of the component associated with this kit.
Returns:
the new authoring step
See Also:
addStep(AuthoringStep, BigDecimal)

getOrdering

public BigDecimal getOrdering(AuthoringStep step)
Get the ordering of a step for this kit

Returns:
the ordering, or null if the step is not associated to this kit

getLastOrdering

public BigDecimal getLastOrdering()
Get the ordering of the last step in the authoring kit. If the kit contains no steps, return 0.


removeStep

public boolean removeStep(AuthoringStep step)
Remove a step from this kit.

Returns:
true is the step is removed, false otherwise.

getSteps

public AuthoringStepCollection getSteps()
Get the steps for this kit sorted by the ordering



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