com.ibm.workplace.wcm.api
Interface SiteFrameworkContainer

All Superinterfaces:
ContentComponentContainer, Document, Editable
All Known Subinterfaces:
Site, SiteArea

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

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement
 
Method Summary
 void addSiteArea(DocumentId p_siteAreaId)
          Adds the SiteArea with a DocumentId specified by p_siteAreaId as the last child of this Site or SiteArea.
 void addTemplateMapping(DocumentId p_authoringTemplateId, DocumentId p_presentationTemplateId)
          Adds a mapping for the specified AuthoringTemplate and PresentationTemplate.
 DocumentIdIterator getAllChildren()
          Returns a depth first iterator over all children of this Site or SiteArea.
 DocumentIdIterator getChildren()
          Returns an iterator of DocumentId objects of the immediate children of this container.
 DocumentId getDefaultContent()
          Returns the DocumentId of the default Content object.
 DocumentId getTemplateMapping(DocumentId p_authoringTemplateId)
          Returns the DocumentId of the PresentationTemplate mapped to the AuthoringTemplate with the given DocumentId.
 boolean hasSiteArea(DocumentId p_siteAreaId)
          Returns true if the container has a child SiteArea with the given DocumentId.
 boolean hasTemplateMapping(DocumentId p_authoringTemplateId)
          Returns true if the container has a mapping for the AuthoringTemplate with the given DocumentId.
 void insertSiteArea(DocumentId p_priorChildId, DocumentId p_siteAreaId)
          Inserts the SiteArea with a DocumentId specified by p_siteAreaId as a child of this Site or SiteArea after the SiteArea with a DocumentId of p_priorChildId.
 void removeSiteArea(DocumentId p_siteAreaId)
          Removes a child SiteArea with the given DocumentId from this Site or SiteArea.
 void removeTemplateMapping(DocumentId p_authoringTemplateId)
          Removes the mapping for the AuthoringTemplate with the given DocumentId
 void setDefaultContent(DocumentId p_contentId)
          Sets the default Content for this Site or SiteArea if the DocumentId argument is not null.
 
Methods inherited from interface com.ibm.workplace.wcm.api.ContentComponentContainer
componentIterator, getComponent, getComponentByReference, hasComponent, setComponent
 
Methods inherited from interface com.ibm.workplace.wcm.api.Editable
addAuthors, addDeleteAccessMembers, addEditAccessMembers, addLiveAccessMembers, addOwners, addReadAccessMembers, isChanged, removeAuthors, removeDeleteAccessMembers, removeEditAccessMembers, removeLiveAccessMembers, removeOwners, removeReadAccessMembers, setDescription, setName
 
Methods inherited from interface com.ibm.workplace.wcm.api.Document
getAuthors, getDeleteAccessMembers, getDescription, getEditAccessMembers, getId, getLiveAccessMembers, getName, getOwners, getReadAccessMembers
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright statement

See Also:
Constant Field Values
Method Detail

setDefaultContent

public void setDefaultContent(DocumentId p_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:
p_contentId - the DocumentId of the Content object to be set as the default Content for this Site or SiteArea

getDefaultContent

public DocumentId getDefaultContent()
                             throws AuthorizationException,
                                    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:
AuthorizationException - if the user does not have access to default Content page
PropertyRetrievalException - if the DocumentId of the default Content page cannot be retrieved

hasTemplateMapping

public boolean hasTemplateMapping(DocumentId p_authoringTemplateId)
Returns true if the container has a mapping for the AuthoringTemplate with the given DocumentId.

Parameters:
p_authoringTemplateId - the DocumentId of the AuthoringTemplate to check
Returns:
true if a mapping exists for the AuthoringTemplate with the given DocumentId; false otherwise.

getTemplateMapping

public DocumentId getTemplateMapping(DocumentId p_authoringTemplateId)
                              throws AuthorizationException,
                                     PropertyRetrievalException
Returns the DocumentId of the PresentationTemplate mapped to the AuthoringTemplate with the given DocumentId.

Parameters:
p_authoringTemplateId - the AuthoringTemplate to look up
Returns:
the DocumentId of the PresentationTemplate
Throws:
AuthorizationException - if the user does not have the appropriate access to the PresentationTemplate
PropertyRetrievalException - if the DocumentId of the PresentationTemplate cannot be retrieved

addTemplateMapping

public void addTemplateMapping(DocumentId p_authoringTemplateId,
                               DocumentId p_presentationTemplateId)
                        throws DuplicateMappingException
Adds a mapping for the specified AuthoringTemplate and PresentationTemplate.

Parameters:
p_authoringTemplateId - the DocumentId of the AuthoringTemplate
p_presentationTemplateId - the DocumentId of the PresentationTemplate
Throws:
DuplicateMappingException - if the mapping already exists

removeTemplateMapping

public void removeTemplateMapping(DocumentId p_authoringTemplateId)
Removes the mapping for the AuthoringTemplate with the given DocumentId

Parameters:
p_authoringTemplateId - the DocumentId of the AuthoringTemplate

getChildren

public DocumentIdIterator getChildren()
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 Site or SiteArea; or an empty iterator if no immediate children are found.

getAllChildren

public DocumentIdIterator getAllChildren()
Returns a depth first iterator over all children of this Site or SiteArea.

For example, a Site Framework that looks like:

 MySite1
    SiteAreaA
       SiteAreaA1
          SiteAreaA1-1
            ContentA1-1
          SiteAreaA1-2
       SiteAreaA2
    SiteAreaB
       SiteAreaB1
 
a call to getAllChildren() for SiteAreaA1 will return DocumentId objects for the children of SiteAreaA1 in this order:

SiteAreaA1-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.

Returns:
an iterator of the DocumentIds of the children of this Site or SiteArea

hasSiteArea

public boolean hasSiteArea(DocumentId p_siteAreaId)
Returns true if the container has a child SiteArea with the given DocumentId.

Parameters:
p_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

public void addSiteArea(DocumentId p_siteAreaId)
                 throws DuplicateChildException
Adds the SiteArea with a DocumentId specified by p_siteAreaId as the last child of this Site or SiteArea.

Parameters:
p_siteAreaId - the DocumentId of the SiteArea to be added
Throws:
DuplicateChildException - if a SiteArea with the given DocumentId already exists as a child of this Site or SiteArea

insertSiteArea

public void insertSiteArea(DocumentId p_priorChildId,
                           DocumentId p_siteAreaId)
                    throws DuplicateChildException
Inserts the SiteArea with a DocumentId specified by p_siteAreaId as a child of this Site or SiteArea after the SiteArea with a DocumentId of p_priorChildId.

Parameters:
p_priorChildId - the DocumentId of the SiteArea to insert after
p_siteAreaId - the DocumentId of the SiteArea to insert
Throws:
DuplicateChildException - if a SiteArea with the given DocumentId already exists as a child of this Site or SiteArea

removeSiteArea

public void removeSiteArea(DocumentId p_siteAreaId)
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.

Parameters:
p_siteAreaId - the DocumentId of the SiteArea to remove