public class ComponentPresentationFactory extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ALL
ALL.
|
static int |
ASP
ASP.
|
static int |
HTML
HTML.
|
static int |
JSP
JSP.
|
static int |
TEXT
TEXT.
|
static int |
XML
XML.
|
Constructor and Description |
---|
ComponentPresentationFactory(int publicationId)
Constructor for a new component presentation factory object.
|
ComponentPresentationFactory(String itemURI)
Constructor for a new component presentation factory object.
|
Modifier and Type | Method and Description |
---|---|
Collection<ComponentPresentation> |
findAllComponentPresentations(int componentId)
Retrieve a list of all component presentations for a component.
|
Collection<ComponentPresentation> |
findAllComponentPresentations(int thePublicationId,
int componentId)
Retrieve a list of all component presentations for a component.
|
Collection<ComponentPresentation> |
findAllComponentPresentations(String componentURI)
Retrieve a list of all component presentations for a component.
|
ComponentPresentation |
getComponentPresentation(int componentId,
int templateId)
Get a component presentation.
|
ComponentPresentation |
getComponentPresentation(int thePublicationId,
int componentId,
int templateId)
Get a component presentation.
|
protected ComponentPresentation |
getComponentPresentation(int thePublicationId,
int componentId,
int templateId,
String type,
String encoding) |
ComponentPresentation |
getComponentPresentation(String componentURI,
String templateURI)
Get a component presentation.
|
ComponentPresentation |
getComponentPresentationWithHighestPriority(int componentId)
Get the component presentation for a component that has the highest priority.
|
ComponentPresentation |
getComponentPresentationWithHighestPriority(String componentURI)
Get the component presentation for a component that has the highest priority.
|
ComponentPresentation |
getComponentPresentationWithLowestPriority(int componentId)
Get the component presentation for a component that has the lowest priority.
|
ComponentPresentation |
getComponentPresentationWithLowestPriority(String componentURI)
Get the component presentation for a component that has the lowest priority.
|
ComponentPresentation |
getComponentPresentationWithOutputFormat(int componentId,
String formatString)
Get a component presentation for a component, with the given output format.
|
ComponentPresentation |
getComponentPresentationWithOutputFormat(String componentURI,
String formatString)
Get a component presentation for a component, with the given output format.
|
ComponentPresentation |
getComponentPresentationWithPriority(int componentId,
int priority)
Get a component presentation for a component, with the specified priority.
|
ComponentPresentation |
getComponentPresentationWithPriority(String componentURI,
int templatePriority)
Get a component presentation for a component, with the specified priority.
|
ComponentPresentation[] |
getTaxonomyComponentPresentations(Keyword[] taxonomyKeywords,
String templateURI,
boolean includeBranchedKeywords)
This retrieves all ComponentPresentations for the specified taxonomy keyword, either directly linked to the
keyword
or a branch/child of the specified keyword.
|
ComponentPresentation[] |
getTaxonomyComponentPresentations(Keyword taxonomyKeyword,
String templateURI,
boolean includeBranchedKeywords)
This retrieves all ComponentPresentations for the specified taxonomy keyword, either directly linked to the
keyword
or a branch/child of the specified keyword.
|
Keyword[] |
getTaxonomyKeywords(String[] componentURIs,
Keyword[] contextKeywords,
TaxonomyFilter taxonomyFilter)
Retrieves the Taxonomy Keywords for a number of content items and applies a
taxonomyFilter to retrieve more related keywords.
|
Keyword[] |
getTaxonomyKeywords(String componentURI,
Keyword[] contextKeywords,
TaxonomyFilter taxonomyFilter)
Retrieves the Taxonomy Keywords for a number of content items and applies a
taxonomyFilter to retrieve more related keywords.
|
Keyword[] |
getTaxonomyKeywords(String taxonomyURI,
String[] componentURIs,
Keyword[] contextKeywords,
TaxonomyFilter taxonomyFilter)
Retrieves the Taxonomy Keywords for a number of content items and applies a
taxonomyFilter to retrieve more related keywords.
|
Keyword[] |
getTaxonomyKeywords(String taxonomyURI,
String componentURI,
Keyword[] contextKeywords,
TaxonomyFilter taxonomyFilter)
Retrieves the Taxonomy Keywords for a number of content items and applies a
taxonomyFilter to retrieve more related keywords.
|
public static final int HTML
public static final int XML
public static final int JSP
public static final int ASP
public static final int TEXT
public static final int ALL
public ComponentPresentationFactory(String itemURI)
itemURI
- A URI of an item in the publication the object should be created for.public ComponentPresentationFactory(int publicationId)
publicationId
- The id of the publication to create this object for.public ComponentPresentation getComponentPresentation(int componentId, int templateId)
componentId
- The component of the component presentation.templateId
- The template of the component presentation.public ComponentPresentation getComponentPresentation(String componentURI, String templateURI)
componentURI
- The TCM URI of the component in the component presentation.templateURI
- The TCM URI of the template in the component presentation.public ComponentPresentation[] getTaxonomyComponentPresentations(Keyword taxonomyKeyword, String templateURI, boolean includeBranchedKeywords) throws StorageException
taxonomyKeyword
- The taxonomy keyword the ComponentPresentation must be related totemplateURI
- The templateURI of the ComponentPresentationsincludeBranchedKeywords
- True if all the childKeywords of the specified facet should be includedStorageException
- If unable to retrieve ComponentPresentations for keywordpublic ComponentPresentation[] getTaxonomyComponentPresentations(Keyword[] taxonomyKeywords, String templateURI, boolean includeBranchedKeywords) throws StorageException
taxonomyKeywords
- The combined taxonomy keywords the ComponentPresentation must be related totemplateURI
- The templateURI of the ComponentPresentationsincludeBranchedKeywords
- True if all the childKeywords of the specified facet should be includedStorageException
- If unable to retrieve ComponentPresentations for keywordpublic Keyword[] getTaxonomyKeywords(String componentURI, Keyword[] contextKeywords, TaxonomyFilter taxonomyFilter)
componentURI
- THe URI of the content to search keywords forcontextKeywords
- The URIs of already selected context keywords, this
will be used to retrieve related items.taxonomyFilter
- The filter to apply to the found keywordspublic Keyword[] getTaxonomyKeywords(String[] componentURIs, Keyword[] contextKeywords, TaxonomyFilter taxonomyFilter)
componentURIs
- THe URIs of the content to search keywords forcontextKeywords
- The URIs of already selected context keywords, this
will be used to retrieve related items.taxonomyFilter
- The filter to apply to the found keywordspublic Keyword[] getTaxonomyKeywords(String taxonomyURI, String componentURI, Keyword[] contextKeywords, TaxonomyFilter taxonomyFilter)
taxonomyURI
- The URI of the TaxonomycomponentURI
- THe URI of the content to search keywords forcontextKeywords
- The URIs of already selected context keywords, this
will be used to retrieve related items.taxonomyFilter
- The filter to apply to the found keywordspublic Keyword[] getTaxonomyKeywords(String taxonomyURI, String[] componentURIs, Keyword[] contextKeywords, TaxonomyFilter taxonomyFilter)
taxonomyURI
- The URI of the Taxonomy, may be null if no specific taxonomy is requiredcomponentURIs
- THe URIs of the content to search keywords forcontextKeywords
- The URIs of already selected context keywords, this
will be used to retrieve related items.taxonomyFilter
- The filter to apply to the found keywordspublic ComponentPresentation getComponentPresentation(int thePublicationId, int componentId, int templateId)
thePublicationId
- The publication the component presentation is in.componentId
- The component of the component presentation.templateId
- The template of the component presentation.public ComponentPresentation getComponentPresentationWithHighestPriority(int componentId)
(Note: The results of this method are currently not cached)
componentId
- The component to get a component presentation for.public ComponentPresentation getComponentPresentationWithHighestPriority(String componentURI)
(Note: The results of this method are currently not cached)
componentURI
- The component to get a component presentation for.public ComponentPresentation getComponentPresentationWithLowestPriority(int componentId)
(Note: The results of this method are currently not cached)
componentId
- The component to get a component presentation for.public ComponentPresentation getComponentPresentationWithLowestPriority(String componentURI)
(Note: The results of this method are currently not cached)
componentURI
- The TCM URI of the component to get a component presentation for.public ComponentPresentation getComponentPresentationWithPriority(int componentId, int priority)
(Note: The results of this method are currently not cached)
componentId
- The component to get a component presentation for.priority
- The priority of the to be found component presentation.public ComponentPresentation getComponentPresentationWithPriority(String componentURI, int templatePriority)
(Note: The results of this method are currently not cached)
componentURI
- The TCM URI of the component to get a component presentation for.templatePriority
- The priority of the to be found component presentation.public ComponentPresentation getComponentPresentationWithOutputFormat(int componentId, String formatString)
(Note: The results of this method are currently not cached)
componentId
- The component to find a component presentation for.formatString
- The output format the component presentation should have.public ComponentPresentation getComponentPresentationWithOutputFormat(String componentURI, String formatString)
(Note: The results of this method are currently not cached)
componentURI
- The TCM URI of the component to find a component presentation for.formatString
- The output format the component presentation should have.protected ComponentPresentation getComponentPresentation(int thePublicationId, int componentId, int templateId, String type, String encoding)
public Collection<ComponentPresentation> findAllComponentPresentations(int componentId)
(Note: The results of this method are currently not cached)
componentId
- The component to findpublic Collection<ComponentPresentation> findAllComponentPresentations(int thePublicationId, int componentId)
(Note: The results of this method are currently not cached)
componentId
- The component to findthePublicationId
- The Publication ID to find the components forpublic Collection<ComponentPresentation> findAllComponentPresentations(String componentURI)
(Note: The results of this method are currently not cached)
componentURI
- The TCM URI of the relevant componentCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries