com.arsdigita.cms
Class ContentTypeWorkflowTemplate

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.cms.ContentTypeWorkflowTemplate

public class ContentTypeWorkflowTemplate
extends com.arsdigita.domain.DomainObject

This class models a three-way association that represents the default workflow template registered to a content type within a content section.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ContentTypeWorkflowTemplate.java#10 $
Author:
Michael Pih (pihman@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
protected static String CONTENT_TYPE_ID
           
protected static String SECTION_ID
           
static String versionId
           
protected static String WF_TEMPLATE_ID
           
 
Constructor Summary
protected ContentTypeWorkflowTemplate()
           
protected ContentTypeWorkflowTemplate(com.arsdigita.persistence.DataObject obj)
           
protected ContentTypeWorkflowTemplate(com.arsdigita.persistence.OID oid)
           
 
Method Summary
protected  BigDecimal getContentSectionID()
           
protected  BigDecimal getContentTypeID()
           
static com.arsdigita.workflow.simple.WorkflowTemplate getWorkflowTemplate(ContentSection section, ContentType type)
          Get the default associated workflow template for a content type in a particular content section.
protected  BigDecimal getWorkflowTemplateID()
           
static boolean removeWorkflowTemplate(ContentSection section, ContentType type)
          Remove the default workflow template association for a content type in a particular content section.
protected  void setContentSection(ContentSection section)
           
protected  void setContentType(ContentType type)
           
protected  void setWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)
           
static boolean updateWorkflowTemplate(ContentSection section, ContentType type, com.arsdigita.workflow.simple.WorkflowTemplate template)
          Associate a default workflow template for a content type in a particular content section.
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getBaseDataObjectType, getObjectType, getOID, getSession, hashCode, initialize, 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

SECTION_ID

protected static final String SECTION_ID
See Also:
Constant Field Values

CONTENT_TYPE_ID

protected static final String CONTENT_TYPE_ID
See Also:
Constant Field Values

WF_TEMPLATE_ID

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

ContentTypeWorkflowTemplate

protected ContentTypeWorkflowTemplate()

ContentTypeWorkflowTemplate

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

ContentTypeWorkflowTemplate

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

getContentSectionID

protected BigDecimal getContentSectionID()

getContentTypeID

protected BigDecimal getContentTypeID()

getWorkflowTemplateID

protected BigDecimal getWorkflowTemplateID()

setContentSection

protected void setContentSection(ContentSection section)

setContentType

protected void setContentType(ContentType type)

setWorkflowTemplate

protected void setWorkflowTemplate(com.arsdigita.workflow.simple.WorkflowTemplate template)

getWorkflowTemplate

public static com.arsdigita.workflow.simple.WorkflowTemplate getWorkflowTemplate(ContentSection section,
                                                                                 ContentType type)
Get the default associated workflow template for a content type in a particular content section.

Parameters:
section - The content section
type - The content type
Returns:
The default workflow template, null if there is none.

updateWorkflowTemplate

public static boolean updateWorkflowTemplate(ContentSection section,
                                             ContentType type,
                                             com.arsdigita.workflow.simple.WorkflowTemplate template)
Associate a default workflow template for a content type in a particular content section. If this association already exists, the previous association will be updated.

Parameters:
section - The content section
type - The content type
template - The workflow template
Returns:
true is association is added, false if updated

removeWorkflowTemplate

public static boolean removeWorkflowTemplate(ContentSection section,
                                             ContentType type)
Remove the default workflow template association for a content type in a particular content section.

Parameters:
section - The content section
type - The content type
Returns:
true if association is deleted, false otherwise


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