com.arsdigita.cms.contenttypes
Class MultiPartArticle

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.versioning.VersionedACSObject
                  extended bycom.arsdigita.cms.ContentItem
                      extended bycom.arsdigita.cms.ContentPage
                          extended bycom.arsdigita.cms.contenttypes.MultiPartArticle
All Implemented Interfaces:
com.arsdigita.auditing.Audited, com.arsdigita.cms.CustomCopy

public class MultiPartArticle
extends com.arsdigita.cms.ContentPage

CMS content type that represents a multi-part article.

Version:
$Id: //cms/content-types/mparticle/dev/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java#6 $
Author:
Dave Turner

Field Summary
static String ARTICLE
           
static String BASE_DATA_OBJECT_TYPE
          data object type for this domain object
static int DOWN
           
static String RANK
          named query parameters
static String SECTION
           
static String SECTIONS
           
static String SUMMARY
          PDL property names
static int SUMMARY_LENGTH
           
static int UP
          rank direction changes
 
Fields inherited from class com.arsdigita.cms.ContentPage
LAUNCH_DATE, PAGES_IN_CATEGORY, PAGES_IN_FOLDER, QUERY_CATEGORY_ID, QUERY_PAGE, QUERY_ROOT_ID, QUERY_TYPE, TITLE, versionId
 
Fields inherited from class com.arsdigita.cms.ContentItem
ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, LANGUAGE, LIVE, NAME, PARENT, PENDING, VERSION, VERSIONS
 
Fields inherited from class com.arsdigita.versioning.VersionedACSObject
IS_DELETED, MASTER
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
MultiPartArticle()
          Default constructor.
MultiPartArticle(BigDecimal id)
          Constructor.
MultiPartArticle(com.arsdigita.persistence.DataObject obj)
          Constructor.
MultiPartArticle(com.arsdigita.persistence.OID id)
          Constructor.
MultiPartArticle(String type)
          Constructor.
 
Method Summary
 void addSection(ArticleSection section)
          Add the specified ArticleSection to this object.
 void addSection(ArticleSection section, int rank)
           
 void addSection(ArticleSection section, Integer rank)
          Add the specified ArticleSection to this object.
 void beforeSave()
           
 void changeSectionRank(ArticleSection section, BigDecimal dest)
           
 void changeSectionRank(ArticleSection source, int destRank)
          Change the rank of the sections with the given id within this object.
 void changeSectionRank(BigDecimal sectionID, BigDecimal dest)
           
 void changeSectionRank(BigDecimal sectionID, int rank)
          Change the rank of a given ArticleSection in this object.
 String getBaseDataObjectType()
           
protected  int getMaxRank()
          Returns the highest section rank.
protected  int getRank(BigDecimal sectionID)
           
 String getSearchSummary()
           
 ArticleSectionCollection getSections()
          Get the collection of sections.
 String getSummary()
          Accessor.
 void removeSection(ArticleSection section)
          Remove the given ArticleSection from this object.
 void setSummary(String summary)
          Accessor.
 
Methods inherited from class com.arsdigita.cms.ContentPage
getContentBundle, getDisplayName, getLaunchDate, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getTitle, setLaunchDate, setName, setPagesQueryParameters, setPagesQueryParameters, setTitle
 
Methods inherited from class com.arsdigita.cms.ContentItem
addCategory, addPendingVersion, afterSave, assertDraft, assertLive, assertMaster, assertPending, beforeDelete, canPublishToFS, copy, copy, copyProperty, copyProperty, copyServices, copyServicesFrom, createLiveVersion, createPendingVersion, get, getCategories, getCategoryCollection, getChildren, getContentSection, getContentType, getCreationDate, getCreationIP, getCreationUser, getDraftVersion, getLanguage, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser, getLifecycle, getLiveVersion, getLocale, getName, getParent, getPath, getPathInfo, getPathInfo, getPathNoJsp, getPendingVersions, getPublicVersion, getVersion, getWorkingVersion, initialize, isDraftVersion, isLive, isLiveVersion, isPendingVersion, isPublished, makeCopy, promotePendingVersion, publish, publishToFS, removeCategory, removeLifecycle, removePendingVersion, set, setContentSection, setContentType, setDefaultCategory, setLanguage, setLifecycle, setLive, setLiveVersion, setParent, setVersion, setVersionRecursively, unpublish, unpublishFromFS
 
Methods inherited from class com.arsdigita.versioning.VersionedACSObject
applyTag, applyUniqueTag, autoPropagateMaster, getMaster, getRolledBackTo, getTransactions, getTransactions, isMaster, isRolledBack, isSubtype, permanentlyDelete, propagateMaster, recordAttributeChange, rollBackTo, rollBackTo, rollForward, save, setMaster, trackChanges
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, 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, clear, delete, disconnect, equals, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SUMMARY

public static final String SUMMARY
PDL property names

See Also:
Constant Field Values

SECTIONS

public static final String SECTIONS
See Also:
Constant Field Values

UP

public static final int UP
rank direction changes

See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
data object type for this domain object

See Also:
Constant Field Values

RANK

public static final String RANK
named query parameters

See Also:
Constant Field Values

ARTICLE

public static final String ARTICLE
See Also:
Constant Field Values

SECTION

public static final String SECTION
See Also:
Constant Field Values

SUMMARY_LENGTH

public static final int SUMMARY_LENGTH
See Also:
Constant Field Values
Constructor Detail

MultiPartArticle

public MultiPartArticle()
Default constructor.


MultiPartArticle

public MultiPartArticle(BigDecimal id)
                 throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. Retrieves an object instance with the given id.

Parameters:
id - the id of the object to retrieve

MultiPartArticle

public MultiPartArticle(com.arsdigita.persistence.OID id)
                 throws com.arsdigita.domain.DataObjectNotFoundException
Constructor. Retrieves an object instance with the given OID.

Parameters:
id - the object id of the object to retrieve

MultiPartArticle

public MultiPartArticle(com.arsdigita.persistence.DataObject obj)
Constructor. Create a MultiPartArticle domain object using the object data given.

Parameters:
obj - the object data to use

MultiPartArticle

public MultiPartArticle(String type)
Constructor.

Method Detail

beforeSave

public void beforeSave()

getBaseDataObjectType

public String getBaseDataObjectType()

getSummary

public String getSummary()
Accessor. Get the summary for this MultiPartArticle.


setSummary

public void setSummary(String summary)
Accessor. Set the summary for this MultiPartArticle.


addSection

public void addSection(ArticleSection section)
Add the specified ArticleSection to this object. Sets the rank of the association to be after all the other ArticleSections.

Parameters:
section - the ArticleSection to add

addSection

public void addSection(ArticleSection section,
                       Integer rank)
Add the specified ArticleSection to this object. Sets the rank of the association to the given value.

Parameters:
section - the ArticleSection to add
rank - the rank of the ArticleSection in the association.

addSection

public void addSection(ArticleSection section,
                       int rank)

getSections

public ArticleSectionCollection getSections()
Get the collection of sections.


removeSection

public void removeSection(ArticleSection section)
Remove the given ArticleSection from this object. Updates the ranks of the remaining sections.

Parameters:
section - the ArticleSection to remove

changeSectionRank

public void changeSectionRank(BigDecimal sectionID,
                              int rank)
Change the rank of a given ArticleSection in this object.


changeSectionRank

public void changeSectionRank(BigDecimal sectionID,
                              BigDecimal dest)

changeSectionRank

public void changeSectionRank(ArticleSection section,
                              BigDecimal dest)

getRank

protected int getRank(BigDecimal sectionID)

changeSectionRank

public void changeSectionRank(ArticleSection source,
                              int destRank)
Change the rank of the sections with the given id within this object. Sets the section rank to that given, and moves all other section ranks as appropriate. If the new rank is greater than the current rank, sections in between will be moved to a numerically lower rank. If the new rank is less than the current rank than sections in between will be moved to a higher rank.

Parameters:
source - the section to reorder

getMaxRank

protected int getMaxRank()
Returns the highest section rank.


getSearchSummary

public String getSearchSummary()


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