com.ibm.workplace.wcm.api
Interface AbstractTemplateItemProperties

All Known Subinterfaces:
ContentTemplateItemProperties, DxContentPageTemplateItemProperties, SiteAreaTemplateItemProperties

public interface AbstractTemplateItemProperties

The item properties for a content template or site area template.


Field Summary
static java.lang.String DEFAULT_PRESENTATION_IDENTIFIER
          String to indicate that the render modes should fallback to the default presentation template.
static java.lang.String SUMMARY_PRESENTATION_IDENTIFIER
          String to indicate the render mode for the Summary Presentation
 
Method Summary
 java.util.Set<java.lang.String> getAllSupportedRenderModes()
          Returns the all render modes supported by this Authoring Template.
 DocumentId<PresentationTemplate> getDefaultPresentationTemplate()
          Retrieve the default presentation template for this authoring template.
 DocumentId<PresentationTemplate> getPresentationTemplateForMode(java.lang.String p_renderModeName)
          Get the presentation template the defined for the given render mode.
 DocumentId<PresentationTemplate> getPresentationTemplateForModes(java.util.List<java.lang.String> p_renderModeNames)
          Get the presentation template the defined for the given render modes.
 FileComponent getPreviewImage()
          Retrieve the "Preview-image" resource.
 java.util.Set<java.lang.String> getRenderModesForPresentationTemplate(DocumentId p_presentationTemplateId)
          Returns the set of render modes that use the same presentation template
 boolean hasPresentationTemplateForMode(java.lang.String p_renderModeName)
          Returns true if a presentation template is defined for the given render mode.
 boolean hasPreviewImage()
          Returns true if this template has a defined "Preview-image".
 boolean isWorkflowEnabled()
          Returns whether user defined workflow has been enabled.
 void removeRenderMode(java.lang.String p_renderModeName)
          Remove the render mode from this template.
 void setDefaultPresentationTemplate(DocumentId p_presentationTemplateId)
          Set the default presentation template for this authoring template.
 void setPresentationTemplateForMode(java.lang.String p_renderModeName, DocumentId p_presentationTemplateId)
          Set the default presentation template for the target mode for this authoring template.
 void setWorkflowEnabled(boolean p_enabled)
          Control whether user defined Workflow will be enabled on the items created from this template on creation.
 

Field Detail

DEFAULT_PRESENTATION_IDENTIFIER

static final java.lang.String DEFAULT_PRESENTATION_IDENTIFIER
String to indicate that the render modes should fallback to the default presentation template.

See Also:
Constant Field Values

SUMMARY_PRESENTATION_IDENTIFIER

static final java.lang.String SUMMARY_PRESENTATION_IDENTIFIER
String to indicate the render mode for the Summary Presentation

See Also:
Constant Field Values
Method Detail

setDefaultPresentationTemplate

void setDefaultPresentationTemplate(DocumentId p_presentationTemplateId)
Set the default presentation template for this authoring template. This Presentation Template will be used to render content created by this authoring template if no authoring template to presentation template mapping is found along the site path.

Parameters:
p_presentationTemplateId - the DocumentId of the presentation template to set as the default. Use null to specify that no default should be defined.
Since:
8.5 CF7

getDefaultPresentationTemplate

DocumentId<PresentationTemplate> getDefaultPresentationTemplate()
                                                                throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                                                                       com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Retrieve the default presentation template for this authoring template. This can be null.

Returns:
the default presentation template
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 PresentationTemplate DocumentId cannot be retrieved
Since:
8.5 CF7

setPresentationTemplateForMode

void setPresentationTemplateForMode(java.lang.String p_renderModeName,
                                    DocumentId p_presentationTemplateId)
Set the default presentation template for the target mode for this authoring template. This presentation template will be used to render content created by this authoring template when a render is invoked with the specified render mode. Set a null presentation template to remove the presentation template for the mode. The render mode name is used in URLs, so only valid URL characters are allowed. Valid characters are a-z, A-Z, 0-9 and the special characters " $-_.+!*(),". The render mode name can not be 'default' as this name is reserved to indicate the default presentation template. See DEFAULT_PRESENTATION_IDENTIFIER. The render mode name "summary" indicates the "Summary Presentation". See SUMMARY_PRESENTATION_IDENTIFIER.

Parameters:
p_renderModeName - The name of the target render mode to associate with this presentation template
p_presentationTemplateId - the DocumentId of the presentation template to set as the default. Use null to specify that no default should be defined.
Throws:
java.lang.IllegalArgumentException - if the ID is not that of a presentation template
Since:
8.5 CF7

getPresentationTemplateForMode

DocumentId<PresentationTemplate> getPresentationTemplateForMode(java.lang.String p_renderModeName)
                                                                throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                                                                       com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Get the presentation template the defined for the given render mode. This can be null if there are no presentation templates for the given render mode.

Parameters:
p_renderModeName - the name of the target render modes. Should not be null.
Returns:
the presentation template for the specified mode
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 PresentationTemplate DocumentId cannot be retrieved
Since:
8.5 CF7

getPresentationTemplateForModes

DocumentId<PresentationTemplate> getPresentationTemplateForModes(java.util.List<java.lang.String> p_renderModeNames)
                                                                 throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                                                                        com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Get the presentation template the defined for the given render modes. The presentation template that is returned is the presentation template for the first mode in the list that has a mapped presentation template. This can be null if there are no presentation templates for any of the render modes in the list. The String "default" can be put in the render mode name list in order to indicate that the default presentation template should be used. See DEFAULT_PRESENTATION_IDENTIFIER. The render mode name "summary" indicates the "Summary Presentation". See SUMMARY_PRESENTATION_IDENTIFIER.

Parameters:
p_renderModeNames - the names of the target render modes. Should not be null.
Returns:
the presentation template for the specified mode
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 PresentationTemplate DocumentId cannot be retrieved
Since:
8.5 CF7

hasPresentationTemplateForMode

boolean hasPresentationTemplateForMode(java.lang.String p_renderModeName)
Returns true if a presentation template is defined for the given render mode. Otherwise false is returned.

Parameters:
p_renderModeName - the name of the target render mode
Returns:
true if a presentation template is defined for the given render mode. Otherwise false is returned.
Since:
8.5 CF7

getAllSupportedRenderModes

java.util.Set<java.lang.String> getAllSupportedRenderModes()
Returns the all render modes supported by this Authoring Template. Each render mode will have a corresponding mapped presentation template.

Returns:
Set of names of the supported render modes.
Since:
8.5 CF7

removeRenderMode

void removeRenderMode(java.lang.String p_renderModeName)
Remove the render mode from this template.

Parameters:
p_renderModeName - the name of the render mode to remove
Since:
8.5 CF7

getRenderModesForPresentationTemplate

java.util.Set<java.lang.String> getRenderModesForPresentationTemplate(DocumentId p_presentationTemplateId)
Returns the set of render modes that use the same presentation template

Parameters:
p_presentationTemplateId - the DocumentId of the presentation mapped to a render mode
Returns:
The names of the render modes
Throws:
java.lang.IllegalArgumentException - if the ID is not that of a presentation template
Since:
8.5 CF7

setWorkflowEnabled

void setWorkflowEnabled(boolean p_enabled)
Control whether user defined Workflow will be enabled on the items created from this template on creation.

Parameters:
p_enabled - true to enable workflow, otherwise false to disable workflow
Since:
8.5CF7

isWorkflowEnabled

boolean isWorkflowEnabled()
Returns whether user defined workflow has been enabled. This flag will only apply at the time the item is created from the template.

Returns:
true if the item can have a user definable workflow, otherwise if the system will control workflow then false will be returned.
Since:
8.5CF7

hasPreviewImage

boolean hasPreviewImage()
Returns true if this template has a defined "Preview-image". This resource will be used to replace the out of the box icon for all content created using this template.

Returns:
true if this template has a defined "Preview-image"
Since:
8.5CF9

getPreviewImage

FileComponent getPreviewImage()
Retrieve the "Preview-image" resource. This file should be either a image that will be displayed directory OR a zip that

Returns:
the "Preview-image" resource
Since:
8.5CF9