|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IPresentationTemplate represents a Presentation
Template in the Content Server. It has a template text
and various publishing-related attributes which define the layout
of a content item when it is published.
IPresentationTemplateManager.createPresentationTemplate
and stored permanently using store.
Any field modification of the Presentation Template will not be persisted
until store is called.
The template text in Presentation Template is used for determining the layout of
a content item when published. A publishable content item needs a Presentation Template with a valid template text
and the Presentation Template needs to be attached to the Data Entry
Template of the content item.
To attach a Presentation Template to a Data Entry Template,
IDataEntryTemplateManager.attachPresentationTemplate
can be used.
An example using IPresentationTemplate can be found in the documentation for IPresentationTemplateManager.
A portlet can be associated with a Presentation Template directly or indirectly:
setting the portlet ID to the template.adding the portlet ID
to the folder. The folder must contain either a publishable Presentation Template or a content item
that has already been associated to the same portlet. The folder can be either the folder containing the template, or any parent folder of
that containing folder.
| Method Summary | |
void |
clearAssociatedPortletID()
Clears the portlet association for this Presentation Template. |
int |
getAssociatedPortletID()
Returns the object ID of the portlet associated with this Presentation Template or 0 if there is no portlet association. |
IDataEntryTemplate |
getAttachedDataEntryTemplate()
Returns the attached Data Entry Template by retrieving the latest information about the attached Data Entry Template from Content Server. |
IFolder |
getContainingFolder()
Returns the IFolder that contains this Presentation Template. |
java.lang.String |
getExtension()
Returns the filename extension of the files that are produced when a content item is published with this Presentation Template. |
java.util.Date |
getLastPublishedDate()
Returns the last time the Presentation Template was published. |
int |
getLastPublishedUserID()
Returns the ID of the user who last published the IPresentationTemplate or
throws an IllegalStateException
if the IPresentationTemplate has not been published. |
java.lang.String |
getName()
Returns the Presentation Template name. |
java.lang.String |
getPreviewURL()
Returns the URL to preview the Presentation Template. |
java.lang.String |
getPublishURL()
Returns the URL to the published Presentation Template. |
java.lang.String |
getTemplateText()
Returns the template text of this Presentation Template. |
java.lang.String |
getUUID()
Returns the Presentation Template UUID. |
boolean |
hasLastPublishedDate()
Returns true if last published date is available otherwise returns false. |
boolean |
isExpired()
Returns a boolean value indicating whether or not the Presentation Template is expired. |
boolean |
isPublishable()
Returns a boolean indicating whether or not the Presentation Template can be published. |
boolean |
isPublished()
Returns a boolean value indicating whether or not the Presentation Template is currently published. |
boolean |
isSearchable()
Returns a boolean value indicating whether a content item published with this Presentation Template could be indexed by the Search server at publishing time. |
void |
setAssociatedPortletID(int portletID)
Sets the portlet ID associated with this Presentation Template. |
void |
setExtension(java.lang.String text)
Sets the filename extension for the files that are produced when a content item is published with this Presentation Template. |
void |
setName(java.lang.String name)
Sets the name for this Presentation Template. |
void |
setSearchable(boolean flag)
Sets the boolean value indicating whether a content item published with this Presentation Template could be indexed by the Search server at publishing time. |
void |
setTemplateText(java.lang.String templateText)
Sets the template text of the Presentation Template. |
void |
store()
Stores the Presentation Template. |
| Method Detail |
public void clearAssociatedPortletID()
store is called on the template.
Calling this method twice in a row on a Presentation Template that does not have
an associated portlet will not result in an exception.
java.lang.IllegalStateException - if the Presentation Template has been deleted.setAssociatedPortletID(int),
getAssociatedPortletID()public int getAssociatedPortletID()
java.lang.IllegalStateException - if the Presentation Template has been deleted.setAssociatedPortletID(int),
clearAssociatedPortletID()
public IDataEntryTemplate getAttachedDataEntryTemplate()
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
null there is not
an attached Data Entry Template.
ContentSecurityException - if the user does not have
permission to access the attached Data Entry Template.
ContentException - if the method call
resulted in a Content Server exception.
java.lang.IllegalStateException - if the Data Entry Template has not been
persisted or has already been removed.
java.rmi.RemoteException - if there was a communication problem during
the execution of the remote method call.IPublishablePresentationTemplateManager
public IFolder getContainingFolder()
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
IFolder that contains this Presentation Template.
IFolder that contains this
Presentation Template.
ContentSecurityException - if the user does not have
permission to access the containing folder.
ContentException - if the method call
resulted in a Content Server exception.
java.lang.IllegalStateException - if the Presentation Template has
not been stored or has already been removed.
java.rmi.RemoteException - if there was a
communication problem during the execution of the remote method call.public java.lang.String getExtension()
java.lang.IllegalStateException - if the Presentation Template
has already been removed.public java.util.Date getLastPublishedDate()
IPresentationTemplate is created on the published target.
Use hasLastPublishedDate
to determine if a date is available.
java.lang.IllegalStateException - if the Presentation Template
has not been persisted, has been removed or has not been published.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public int getLastPublishedUserID()
IPresentationTemplate or
throws an IllegalStateException
if the IPresentationTemplate has not been published.
Use isPublished to check if the
IPresentationTemplate has been published.
IPresentationTemplate.
java.lang.IllegalStateException - if the Presentation Template has not
been persisted, has been removed or has not been published.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public java.lang.String getName()
java.lang.IllegalStateException - if the Presentation
Template has already been removed.public java.lang.String getPreviewURL()
IPublishablePresentationTemplateManager.previewPresentationTemplate
is called prior to this method.
Note: The returned URL is a non-gatewayed URL.
java.lang.IllegalStateException - if the Presentation Template
has not been persisted or has already been removed.IPublishablePresentationTemplateManager.previewPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.previewPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public java.lang.String getPublishURL()
IPublishablePresentationTemplateManager.publishPresentationTemplate
is called prior to this method.
If the Presentation Template is not currently published an
IllegalStateException will be thrown.
Note: The returned URL is a non-gatewayed URL.
java.lang.IllegalStateException - if the Presentation Template
has not been persisted, has been removed, or is not published.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public java.lang.String getTemplateText()
java.lang.IllegalStateException - if the Presentation
Template has already been removed.public java.lang.String getUUID()
IPresentationTemplateManager.getPresentationTemplate
to retrieve the template.
java.lang.IllegalStateException - if the Presentation
Template has not yet been stored or has already been removed.public boolean hasLastPublishedDate()
true if last published date is available otherwise returns false.
true if last published date is available otherwise returns false.
java.lang.IllegalStateException - if the Presentation Template has been removed.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public boolean isExpired()
IPublishablePresentationTemplateManager.
java.lang.IllegalStateException - if the Presentation Template has already been
removed.IPublishablePresentationTemplateManager.expirePresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.expirePresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)
public boolean isPublishable()
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
true if the Presentation Template has been persisted
and there is no attached IDataEntryTemplate.
otherwise returns false.
java.lang.IllegalStateException - if the Presentation Template has already been removed.
ContentException - if the method call
resulted in a Content Server exception.
ContentSecurityException - if the user does not have
permission to access the containing folder.
java.rmi.RemoteException - if there was a communication problem during
the execution of the remote method call.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public boolean isPublished()
IPublishablePresentationTemplateManager.
java.lang.IllegalStateException - if the Presentation Template has already been
removed.IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate),
IPublishablePresentationTemplateManager.publishPresentationTemplate(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate)public boolean isSearchable()
true.
In order for a content item to be searchable, at publishing time its
Presentation Template isSearchable
must be true and
the content item or its folder must have an associated portlet ID.
A folder is associated with portlet ID if the folder itself has an associated portlet ID or one of its parent folders has an associated portlet ID.
Use IContentItem.getAssociatedPortletID
or IFolder.getAssociatedPortletIDs
to determine if a content item or its containing folder has an associated portlet ID.
For information about associating portlet IDs with content items, refer to the
Administrator Guide for Plumtree Content Server.
Note: Content Server does not support making a publishable Presentation Template searchable.
java.lang.IllegalStateException - if the Presentation
Template has already been removed.IContentItem.getAssociatedPortletID(),
getAssociatedPortletID(),
IFolder.getAssociatedPortletIDs()public void setAssociatedPortletID(int portletID)
ContentException
will be thrown when store is called
on the template.
A portlet can only be associated with one Presentation Template or content item at a time.
If the portlet ID is already associated with another Presentation Template or content item, an
IllegalStateException will be thrown
when store is called on the template.
The ID of a portlet can be retrieved using methods in
com.plumtree.remote.prc.IPortletManager
or com.plumtree.remote.prc.IPortletTemplateManager.
The association will not be persisted until store is called.
portletID - the portlet ID to associate with the template.
java.lang.IllegalStateException - if the template has been deleted.
java.lang.IllegalArgumentException - if the portlet ID less than or equal to 0.IFolder.addAssociatedPortletID(int)public void setExtension(java.lang.String text)
text - the filename extension to be set;
cannot be null, empty, or longer than 255 characters.
java.lang.IllegalStateException - if the Presentation Template
has already been removed.
java.lang.IllegalArgumentException - if the extension is empty or longer
than 255 characters.public void setName(java.lang.String name)
name - name of the Presentation Template
The name cannot be null, empty, or longer than 255 characters.
The string used for the name will be trimmed of leading and trailing whitespace when it is stored
and is case-insensitive during name comparison.
java.lang.IllegalStateException - if the Presentation Template
has already been removed.
java.lang.IllegalArgumentException - if the
name is an empty string or longer than 255 characters.public void setSearchable(boolean flag)
true.
In order for a content item to be searchable, at publishing time its
Presentation Template isSearchable
must be true and
the content item or its folder must have an associated portlet ID.
A folder is associated with portlet ID if the folder itself has an associated portlet ID or one of its parent folders has an associated portlet ID.
Use IContentItem.getAssociatedPortletID
or IFolder.getAssociatedPortletIDs
to determine if a content item or its containing folder has an associated portlet ID.
For information about associating portlet IDs with content items, refer to the
Administrator Guide for Plumtree Content Server.
Merely setting setSearchable to true
is insufficient to enable an item to be searchable;
the item or its folder must have an associated portlet ID.
flag - a boolean value indicating whether a content item published with this Presentation Template
will be searchable in the Search server.
java.lang.IllegalStateException - if the Presentation
Template has already been removed.IContentItem.setAssociatedPortletID(int),
IFolder.addAssociatedPortletID(int)public void setTemplateText(java.lang.String templateText)
IPresentationTemplateManager.validateTemplateText
can be used to validate the template text. An ContentExceptions will be thrown
if a Presentation Template contains invalid template text when
IContentItemManager.previewContentItem,
IContentItemManager.publishContentItem,
or
IPresentationTemplateManager.validateTemplateText
is called.
Any template text modification will not be
stored permanently until store is called.
templateText - the template text to be set.
The text cannot be null but the text can be empty.
There is no limit on the length of the template text.
java.lang.IllegalStateException - if the Presentation
Template has already been removed.IPresentationTemplateManager.createPresentationTemplate(com.plumtree.remote.prc.content.folder.IFolder, java.lang.String, java.lang.String),
IPresentationTemplateManager.validateTemplateText(com.plumtree.remote.prc.content.presentationtemplate.IPresentationTemplate, java.lang.String)
public void store()
throws ContentSecurityException,
NameAlreadyInUseException,
ContentException,
java.rmi.RemoteException
ContentSecurityException - if the user
does not have the permission to store the Presentation Template.
NameAlreadyInUseException - if there is already a
Presentation Template with the given name existed in the same folder.
ContentException - if the Presentation Template is associated with
an invalid portlet ID, or the method call resulted in a Content Server exception.
java.lang.IllegalStateException - if the Presentation Template has already been removed,
or if the containing folder has been removed.
java.rmi.RemoteException - if there was a communication problem during
the execution of the remote method call.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.