Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api
Interface SiteFrameworkContainer
- All Superinterfaces:
- ContentComponentContainer, Document, Editable, EditableItem, Item, Localized, WCMApiObject, WorkflowedDocument
- All Known Subinterfaces:
- PortalPage, Site, SiteArea, SiteAreaPrototype
public interface SiteFrameworkContainer- extends ContentComponentContainer
The ability to organize and build a Site Framework is enabled by implementing the SiteFrameworkContainer interface.
A Site Framework is a hierarchy consisting of Site, SiteArea and Content objects. Site and SiteArea extends the SiteFrameworkContainer interface to provide a uniform interface when organizing and building the Site Framework.
Passing a null argument to any method of this interface will result in a NullPointerException, unless stated otherwise.
- See Also:
- Site, SiteArea
Nested Class Summary static class SiteFrameworkContainer.RenderingBehaviour
The possible rendering behaviours for a SiteArea
Method Summary void addSiteArea(DocumentId siteAreaId)
Deprecated. use Workspace.createSiteArea(parentId, siblingId, position) instead.void addTemplateMapping(DocumentId authoringTemplateId, DocumentId presentationTemplateId)
Adds a mapping for the specified AuthoringTemplate and PresentationTemplate.DocumentIdIterator getAllChildren()
Return a depth first iterator over all children of this Site or SiteArea.DocumentIdIterator getAllChildren(int workflowStatusFilter)
Return a depth first iterator over all children of this Site or SiteArea.DocumentIdIterator getAllDirectChildren()
Return a depth first iterator over all children of this Site or SiteArea, excluding ContentLinks.DocumentIdIterator getAllDirectChildren(int workflowStatusFilter)
Return a depth first iterator over all children of this Site or SiteArea, excluding ContentLinks.DocumentIdIterator getAuthoringTemplateIds()
Return an iterator of DocumentId objects for the Authoring Templates associated with this container.DocumentIdIterator getChildren()
Return an iterator of DocumentId objects of the immediate children of this container.DocumentIdIterator getChildren(int workflowStatusFilter)
Return an iterator of DocumentId objects of the immediate children of this container.DocumentId getDefaultContent()
Return the DocumentId of the default Content object.DocumentIdIterator getDirectChildren()
Return an iterator of DocumentId objects of the immediate children of this container.DocumentIdIterator getDirectChildren(int workflowStatusFilter)
Return an iterator of DocumentId objects of the immediate children of this container.DocumentIdIterator getLinkedChildren()
Return an iterator of DocumentId objects of the linked children of this container.DocumentId getParent()
Deprecated. Since 8.0, use Hierarchical.getParentId()SiteFrameworkContainer.RenderingBehaviour getRenderingBehaviour()
Get the rendering behaviour of the current SiteArea.DocumentId getTemplateMapping(DocumentId authoringTemplateId)
Return the DocumentId of the PresentationTemplate mapped to the AuthoringTemplate with the given DocumentId.boolean hasContent(DocumentId contentId)
Returns true if this SiteArea object has a direct child or link to Content with the given DocumentId.boolean hasDirectContent(DocumentId contentId)
Returns true if this SiteArea object has a direct child Content with the given DocumentId.boolean hasLinkedContent(DocumentId contentId)
Returns true if this SiteArea object has a content link to the Content with the given DocumentId.boolean hasSiteArea(DocumentId siteAreaId)
Returns true if the container has a child SiteArea with the given DocumentId.boolean hasTemplateMapping(DocumentId authoringTemplateId)
Returns true if the container is associated with the the AuthoringTemplate with the given DocumentId.void insertSiteArea(DocumentId priorChildId, DocumentId siteAreaId)
Deprecated. use Workspace.createSiteArea(parentId, siblingId, position) instead.void removeSiteArea(DocumentId siteAreaId)
Deprecated. use Workspace.delete(id) instead.void removeTemplateMapping(DocumentId authoringTemplateId)
Removes the mapping for the AuthoringTemplate with the given DocumentIdvoid setDefaultContent(DocumentId contentId)
Sets the default Content for this Site or SiteArea if the DocumentId argument is not null.void setRenderingBehaviour(SiteFrameworkContainer.RenderingBehaviour renderingBehaviour)
Sets the rendering behaviour of the current SiteArea.
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.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
Method Detail getRenderingBehaviour
SiteFrameworkContainer.RenderingBehaviour getRenderingBehaviour()
- Get the rendering behaviour of the current SiteArea.
- Returns:
- The rendering behaviour
setRenderingBehaviour
void setRenderingBehaviour(SiteFrameworkContainer.RenderingBehaviour renderingBehaviour)
- Sets the rendering behaviour of the current SiteArea.
- Parameters:
- renderingBehaviour - The rendering behaviour to set
setDefaultContent
void setDefaultContent(DocumentId contentId)
- Sets the default Content for this Site or SiteArea if the DocumentId argument is not null. The default Content is the page that is requested if only a path to the Site or SiteArea is requested.
- Parameters:
- contentId - the DocumentId of the Content object to be set as the default Content for this Site or SiteArea
getDefaultContent
DocumentId getDefaultContent() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- Returns the DocumentId of the default Content object. If there is no default Content object set, then null will be returned.
- Returns:
- the DocumentId of the default Content
- Throws:
- com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have access to default Content page
- com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if the DocumentId of the default Content page cannot be retrieved
hasTemplateMapping
boolean hasTemplateMapping(DocumentId authoringTemplateId)
- Returns true if the container is associated with the the AuthoringTemplate with the given DocumentId.
- Parameters:
- authoringTemplateId - the DocumentId of the AuthoringTemplate to check
- Returns:
- true if an association exists for the AuthoringTemplate with the given DocumentId; false otherwise.
getTemplateMapping
DocumentId getTemplateMapping(DocumentId authoringTemplateId) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- Returns the DocumentId of the PresentationTemplate mapped to the AuthoringTemplate with the given DocumentId. A PropertyRetrievalException is thrown if the authoring template is not associated with the container, or if authoring template is mapped to a presentation template, but the presentation template can not be retrieved. For PortalPages, returns null if the container is associated with the given authoring template, but the authoring template is not mapped to a presentation template.
- Parameters:
- authoringTemplateId - the AuthoringTemplate to look up
- Returns:
- the DocumentId of the PresentationTemplate
- Throws:
- com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access to the PresentationTemplate
- com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if the DocumentId of the PresentationTemplate cannot be retrieved
getAuthoringTemplateIds
DocumentIdIterator getAuthoringTemplateIds()
- Returns an iterator of DocumentId objects for the Authoring Templates associated with this container.
The user must have Read access to the Authoring Template for it to be included in the returned iterator.
- Returns:
- an iterator of DocumentId objects for the Authoring Templates associated with this container; or an empty iterator if no Authoring Templates are found.
addTemplateMapping
void addTemplateMapping(DocumentId authoringTemplateId, DocumentId presentationTemplateId) throws com.ibm.workplace.wcm.api.exceptions.DuplicateMappingException
- Adds a mapping for the specified AuthoringTemplate and PresentationTemplate. For PortalPages, the PresentationTemplate can be null to associate an authoring template that does not have a mapped presentation template.
- Parameters:
- authoringTemplateId - the DocumentId of the AuthoringTemplate
- presentationTemplateId - the DocumentId of the PresentationTemplate
- Throws:
- com.ibm.workplace.wcm.api.exceptions.DuplicateMappingException - if the mapping already exists
removeTemplateMapping
void removeTemplateMapping(DocumentId authoringTemplateId)
- Removes the mapping for the AuthoringTemplate with the given DocumentId
- Parameters:
- authoringTemplateId - the DocumentId of the AuthoringTemplate
getChildren
DocumentIdIterator getChildren()
- Returns an iterator of DocumentId objects of the immediate children of this container. The children are either SiteArea, Content or ContentLink.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content and ContentLinks. This function's performance may not scale well to a large search result set size.
- Returns:
- an iterator of DocumentId objects of the immediate children of this Site or SiteArea; or an empty iterator if no immediate children are found.
getChildren
DocumentIdIterator getChildren(int workflowStatusFilter)
- Returns an iterator of DocumentId objects of the immediate children of this container. The children are either SiteArea, Content or ContentLink.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content and ContentLinks. This function's performance may not scale well to a large search result set size. This method supports searching for draft (Workspace.WORKFLOWSTATUS_DRAFT),published (Workspace.WORKFLOWSTATUS_PUBLISHED) or expired (Workspace.WORKFLOWSTATUS_EXPIRED) items or all items regardless of their workflow status (Workspace.WORKFLOWSTATUS_ALL). A combination of workflow status can be specified using a bitwise OR. For example Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED.
- Parameters:
- workflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
- Returns:
- an iterator of DocumentId objects of the immediate children of this Site or SiteArea; or an empty iterator if no immediate children are found.
getAllChildren
DocumentIdIterator getAllChildren()
- Returns a depth first iterator over all children of this Site or SiteArea. The children are either SiteArea, Content or ContentLink.
For example, a Site Framework that looks like:
a call to getAllChildren() for SiteAreaA1 will return DocumentId objects for the children of SiteAreaA1 in this order:MySite1 SiteAreaA SiteAreaA1 SiteAreaA1-1 ContentA1-1 SiteAreaA1-2 ContentA1-1 (Link) SiteAreaA2 SiteAreaB SiteAreaB1SiteAreaA1-1, ContentA1-1, SiteAreaA1-2, ContentA1-1 (Link).
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content and ContentLinks. This function's performance may not scale well to a large search result set size.
- Returns:
- an iterator of the DocumentIds of the children of this Site or SiteArea
getAllChildren
DocumentIdIterator getAllChildren(int workflowStatusFilter)
- Returns a depth first iterator over all children of this Site or SiteArea. The children are either SiteArea, Content or ContentLink.
For example, a Site Framework that looks like:
a call to getAllChildren() for SiteAreaA1 will return DocumentId objects for the children of SiteAreaA1 in this order:MySite1 SiteAreaA SiteAreaA1 SiteAreaA1-1 ContentA1-1 SiteAreaA1-2 ContentA1-1 (Link) SiteAreaA2 SiteAreaB SiteAreaB1SiteAreaA1-1, ContentA1-1, SiteAreaA1-2, ContentA1-1 (Link).
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content and ContentLinks. This function's performance may not scale well to a large search result set size. * This method supports searching for draft (Workspace.WORKFLOWSTATUS_DRAFT),published (Workspace.WORKFLOWSTATUS_PUBLISHED) or expired (Workspace.WORKFLOWSTATUS_EXPIRED) items or all items regardless of their workflow status (Workspace.WORKFLOWSTATUS_ALL). A combination of workflow status can be specified using a bitwise OR. For example Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED.
- Parameters:
- workflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
- Returns:
- an iterator of the DocumentIds of the children of this Site or SiteArea
getDirectChildren
DocumentIdIterator getDirectChildren()
- Returns an iterator of DocumentId objects of the immediate children of this container. The children are either SiteArea or Content.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
- Returns:
- an iterator of DocumentId objects of the immediate children of this SiteArea; or an empty iterator if no immediate children are found.
getDirectChildren
DocumentIdIterator getDirectChildren(int workflowStatusFilter)
- Returns an iterator of DocumentId objects of the immediate children of this container. The children are either SiteArea or Content.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator. This method supports searching for draft (Workspace.WORKFLOWSTATUS_DRAFT),published (Workspace.WORKFLOWSTATUS_PUBLISHED) or expired (Workspace.WORKFLOWSTATUS_EXPIRED) items or all items regardless of their workflow status (Workspace.WORKFLOWSTATUS_ALL). A combination of workflow status can be specified using a bitwise OR. For example Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED.
- Parameters:
- workflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
- Returns:
- an iterator of DocumentId objects of the immediate children of this SiteArea; or an empty iterator if no immediate children are found.
getAllDirectChildren
DocumentIdIterator getAllDirectChildren()
- Returns a depth first iterator over all children of this Site or SiteArea, excluding ContentLinks. The children are either SiteArea or Content.
For example, a Site Framework that looks like:
a call to getAllDirectChildren() for SiteAreaA1 will return DocumentId objects for the children of SiteAreaA1 in this order:MySite1 SiteAreaA SiteAreaA1 SiteAreaA1-1 ContentA1-1 SiteAreaA1-2 ContentA1-1 (Link) SiteAreaA2 SiteAreaB SiteAreaB1SiteAreaA1-1, ContentA1-1, SiteAreaA1-2.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content. This function's performance may not scale well to a large search result set size.
- Returns:
- an iterator of the DocumentIds of the children of this Site or SiteArea
getAllDirectChildren
DocumentIdIterator getAllDirectChildren(int workflowStatusFilter)
- Returns a depth first iterator over all children of this Site or SiteArea, excluding ContentLinks. The children are either SiteArea or Content.
For example, a Site Framework that looks like:
a call to getAllDirectChildren() for SiteAreaA1 will return DocumentId objects for the children of SiteAreaA1 in this order:MySite1 SiteAreaA SiteAreaA1 SiteAreaA1-1 ContentA1-1 SiteAreaA1-2 ContentA1-1 (Link) SiteAreaA2 SiteAreaB SiteAreaB1SiteAreaA1-1, ContentA1-1, SiteAreaA1-2.
The user must have Read access to the SiteArea or Content for it to be included in the returned iterator.
This function will only return published Content. This function's performance may not scale well to a large search result set size. This method supports searching for draft (Workspace.WORKFLOWSTATUS_DRAFT),published (Workspace.WORKFLOWSTATUS_PUBLISHED) or expired (Workspace.WORKFLOWSTATUS_EXPIRED) items or all items regardless of their workflow status (Workspace.WORKFLOWSTATUS_ALL). A combination of workflow status can be specified using a bitwise OR. For example Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED.
- Parameters:
- workflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
- Returns:
- an iterator of the DocumentIds of the children of this Site or SiteArea
hasSiteArea
boolean hasSiteArea(DocumentId siteAreaId)
- Returns true if the container has a child SiteArea with the given DocumentId.
- Parameters:
- siteAreaId - the DocumentId of the SiteArea to check for
- Returns:
- true if the SiteArea with the given DocumentId is a child of this container; false otherwise
addSiteArea
void addSiteArea(DocumentId siteAreaId) throws com.ibm.workplace.wcm.api.exceptions.DuplicateChildException
- Deprecated. use Workspace.createSiteArea(parentId, siblingId, position) instead.
- Adds the SiteArea with a DocumentId specified by siteAreaId as the last child of this Site or SiteArea. The Site Area being added needs to be saved after this call to complete the add operation.
- Parameters:
- siteAreaId - the DocumentId of the SiteArea to be added
- Throws:
- com.ibm.workplace.wcm.api.exceptions.DuplicateChildException - if a SiteArea with the given DocumentId already exists as a child of this Site or SiteArea
- com.ibm.workplace.wcm.api.exceptions.WCMIllegalStateException - if the SiteArea can not be retrieved or the SiteArea already has a parent.
insertSiteArea
void insertSiteArea(DocumentId priorChildId, DocumentId siteAreaId) throws com.ibm.workplace.wcm.api.exceptions.DuplicateChildException
- Deprecated. use Workspace.createSiteArea(parentId, siblingId, position) instead.
- Inserts the SiteArea with a DocumentId specified by siteAreaId as a child of this Site or SiteArea after the SiteArea with a DocumentId of priorChildId. The Site Area being inserted needs to be saved after this call to complete the insert operation.
- Parameters:
- priorChildId - the DocumentId of the SiteArea to insert after
- siteAreaId - the DocumentId of the SiteArea to insert
- Throws:
- com.ibm.workplace.wcm.api.exceptions.DuplicateChildException - if a SiteArea with the given DocumentId already exists as a child of this Site or SiteArea
- com.ibm.workplace.wcm.api.exceptions.WCMIllegalStateException - if the SiteArea can not be retrieved or the SiteArea already has a parent.
removeSiteArea
void removeSiteArea(DocumentId siteAreaId)
- Deprecated. use Workspace.delete(id) instead.
- Removes a child SiteArea with the given DocumentId from this Site or SiteArea.
If the object specified by the DocumentId argument is not a child SiteArea of this Site or SiteArea, no changes occur. This method has been modified to only perform delete operation. To move a site area use Workspace.moveSiteFrameworkDocument.
- Parameters:
- siteAreaId - the DocumentId of the SiteArea to remove
- Throws:
- com.ibm.workplace.wcm.api.exceptions.WCMIllegalStateException - if there was a problem retrieving the SiteArea or removing it.
hasContent
boolean hasContent(DocumentId contentId)
- Returns true if this SiteArea object has a direct child or link to Content with the given DocumentId.
- Parameters:
- contentId - the ID of the content
- Returns:
- true if this SiteArea object has a child with the given DocumentId; false otherwise.
hasDirectContent
boolean hasDirectContent(DocumentId contentId)
- Returns true if this SiteArea object has a direct child Content with the given DocumentId.
- Parameters:
- contentId - the ID of the content
- Returns:
- true if this SiteArea object has a child with the given DocumentId; false otherwise.
hasLinkedContent
boolean hasLinkedContent(DocumentId contentId)
- Returns true if this SiteArea object has a content link to the Content with the given DocumentId.
- Parameters:
- contentId - the ID of the content
- Returns:
- true if this SiteArea object has a content link to the given DocumentId; false otherwise.
getParent
DocumentId getParent()
- Deprecated. Since 8.0, use Hierarchical.getParentId()
- Returns the DocumentId of the parent of this SiteArea.
The parent of this SiteArea may be a Site or another SiteArea.
This method will return null if the user does not have access to the parent of this SiteArea, or if this is a top level site area.
- Returns:
- the DocumentId of the parent of this SiteArea.
getLinkedChildren
DocumentIdIterator getLinkedChildren() throws com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
- Returns an iterator of DocumentId objects of the linked children of this container. The children are ContentLinks.
The user must have Read access to the ContentLink for it to be included in the returned iterator.
- Returns:
- an iterator of DocumentId objects of the immediate children of this SiteArea; or an empty iterator if no immediate children are found.
- Throws:
- com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException - if there was a problem retrieving the linked children.
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD