com.ibm.workplace.wcm.api
Interface Content

All Superinterfaces:
ContentComponentContainer, Document, Editable, EditableItem, Hierarchical, Item, Localized, Placeable, com.ibm.workplace.wcm.api.RenderSearchIndexable, TemplatedDocument, com.ibm.workplace.wcm.api.Visibility, WCMApiObject, WorkflowedDocument

public interface Content
extends ContentComponentContainer, TemplatedDocument, Placeable, Hierarchical, com.ibm.workplace.wcm.api.RenderSearchIndexable, com.ibm.workplace.wcm.api.Visibility

A Content object represents a Content item in the WCM repository. Each Content object is based on an AuthoringTemplate, which defines its base properties and attributes (such as Workflow, security etc.)

Content objects can be created and saved through the API, and existing ones can be retrieved to be edited and saved.

Content objects can contain components that are defined in the AuthoringTemplate which do not exist in the component library (ie. they exist only on the Content item itself). These components are referred to as 'content components'. New content components cannot be added to a Content object through the API - only ones that are defined on the template may be manipulated. The Content interface also provides methods to access the item's workflow properties. This includes moving the item to the next stage in the workflow, creating a draft, checking its published/expired status etc.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.workplace.wcm.api.RenderSearchIndexable
com.ibm.workplace.wcm.api.RenderSearchIndexable.Mode
 
Nested classes/interfaces inherited from interface com.ibm.workplace.wcm.api.Visibility
com.ibm.workplace.wcm.api.Visibility.Scope
 
Method Summary
 Content cancelDraft()
          Deprecated. use cancelDraftDocument() instead.
 Content createDraft()
          Deprecated. use createDraftDocument() instead.
 DocumentId getDirectParent()
          Deprecated. Since 8.0, use Hierarchical.getParentId()
 DocumentIdIterator getLinkedParents()
          Return an iterator of parent DocumentIds this content is linked to.
 DocumentIdIterator getParents()
          Returns an iterator of the parent DocumentIds of this content.
 
Methods inherited from interface com.ibm.workplace.wcm.api.ContentComponentContainer
addComponent, componentIterator, createComponent, getCombinedCategoryIds, getComponent, getComponentByReference, getComponentNames, hasComponent, removeComponent, setComponent
 
Methods inherited from interface com.ibm.workplace.wcm.api.Editable
addAuthors, addCategoryIds, addContributorAccessMembers, addDeleteAccessMembers, addEditAccessMembers, addEditorAccessMembers, addHistoryLogEntry, addLiveAccessMembers, addManagerAccessMembers, addMembersForAccess, addOwners, addReadAccessMembers, addUserAccessMembers, isChanged, removeAuthors, removeCategoryIds, removeContributorAccessMembers, removeDeleteAccessMembers, removeEditAccessMembers, removeEditorAccessMembers, removeLiveAccessMembers, removeManagerAccessMembers, removeMembersForAccess, removeOwners, removeReadAccessMembers, removeUserAccessMembers, setContributorAccessInheritance, setDescriptionTextProviderKey, setDescriptionTextProviderName, setEditorAccessInheritance, setInheritance, setKeywords, setManagerAccessInheritance, setPropagation, setTitleTextProviderKey, setTitleTextProviderName, setUserAccessInheritance
 
Methods inherited from interface com.ibm.workplace.wcm.api.Document
getAuthors, getCategoryIds, getContributorAccessMembers, getCreator, getDeleteAccessMembers, getDescription, getDescriptionTextProviderKey, getDescriptionTextProviderName, getEditAccessMembers, getEditorAccessMembers, getHistoryLog, getId, getInheritedContributorAccessMembers, getInheritedEditorAccessMembers, getInheritedManagerAccessMembers, getInheritedUserAccessMembers, getKeywords, getLastModifier, getLiveAccessMembers, getManagerAccessMembers, getMembersForAccess, getMembersForInheritedAccess, getOwnerLibrary, getOwners, getProject, getReadAccessMembers, getSourceWorkspace, getTitle, getTitleTextProviderKey, getTitleTextProviderName, getUserAccessMembers, getVersionCatalog, getVersionStrategy, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasProfile, hasProject, hasReadAccess, hasReadAccess, isContributorAccessInherited, isEditorAccessInherited, isInherited, isManagerAccessInherited, isNew, isPropagated, isUserAccessInherited, isWorkflowed
 
Methods inherited from interface com.ibm.workplace.wcm.api.Item
getCreationDate, getDescription, getIdentity, getModifiedDate, getName, getTitle
 
Methods inherited from interface com.ibm.portal.Localized
getLocales
 
Methods inherited from interface com.ibm.workplace.wcm.api.EditableItem
setDescription, setName, setTitle
 
Methods inherited from interface com.ibm.workplace.wcm.api.WorkflowedDocument
addAdditionalViewers, addApprovers, approve, cancelDraftDocument, clearApprovers, createDraftDocument, decline, decline, getAdditionalViewers, getCurrentApprovers, getDateEnteredStage, getEffectiveDate, getExpiryDate, getGeneralDateOne, getGeneralDateTwo, getPendingWorkflowStatus, getPublishedDate, getPublishedId, getWorkflowId, getWorkflowStageId, getWorkflowStatus, hasApproverAccess, hasApproverAccess, hasDraft, isDraft, isDraftOfPublishedDocument, isExpired, isPublished, isWorkflowMovingBackward, nextWorkflowStage, nextWorkflowStage, nextWorkflowStage, previousWorkflowStage, previousWorkflowStage, removeAdditionalViewers, removeApprovers, restartWorkflow, setEffectiveDate, setExpiryDate, setGeneralDateOne, setGeneralDateTwo, setWorkflowId, setWorkflowId
 
Methods inherited from interface com.ibm.workplace.wcm.api.TemplatedDocument
getAuthoringTemplateID, setAuthoringTemplateID
 
Methods inherited from interface com.ibm.workplace.wcm.api.Placeable
getValidSiblingTypes
 
Methods inherited from interface com.ibm.workplace.wcm.api.Hierarchical
getParentId
 
Methods inherited from interface com.ibm.workplace.wcm.api.RenderSearchIndexable
getRenderSearchIndexMode, setRenderSearchIndexMode
 
Methods inherited from interface com.ibm.workplace.wcm.api.Visibility
getVisibilityByScope, isVisible, setVisible
 

Method Detail

getParents

DocumentIdIterator getParents()
Returns an iterator of the parent DocumentIds of this content. The parent of a content is the site area it belongs to. If this content is linked to additional site areas, the links are listed after the direct parent.

This method will only return DocumentIds of parents the user has access to.

Returns:
an iterator of the parent DocumentId of this content

getDirectParent

DocumentId getDirectParent()
Deprecated. Since 8.0, use Hierarchical.getParentId()

Return the parent DocumentId of this content. The parent of a content is the site area it belongs to.

Returns:
the ID of the parent SiteArea of this content

getLinkedParents

DocumentIdIterator getLinkedParents()
                                    throws com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
Return an iterator of parent DocumentIds this content is linked to.

Returns:
an iterator of the parent DocumentId this content is linked to.
Throws:
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException - if there was a problem retrieving the linked parents.

createDraft

Content createDraft()
                    throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                           WorkflowException
Deprecated. use createDraftDocument() instead.

Create draft copy of this content object.

NOTE: Creating a draft saves the original, so any changes already made to the original before a draft is created will be seen in both documents.

NOTE: You do not need to save the new draft after it is created, unless you have made changes to the draft document after creating the draft.

Returns:
the draft content copy
Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission
WorkflowException - if this content is not workflowable or an error occurred while creating the draft

cancelDraft

Content cancelDraft()
                    throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                           WorkflowException
Deprecated. use cancelDraftDocument() instead.

Cancels a draft document, if it exists.

NOTE: This method may be performed on either the draft or the published content.

Returns:
The associated published document. If there is no draft to cancel, this will return null.
Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission
WorkflowException - if this content is not workflowable or an error occurred while cancelling the draft