@StableMinor(version="12.3", sinceVersion="5.0") public class ContentPageWebResourceDataProvider extends DefaultPageWebResourceDataProvider
This data provider detects if the current page contains a content id as a parameter. If true, it provides the content title and introduction from the ContentManager.
pageWebResource
Constructor and Description |
---|
ContentPageWebResourceDataProvider() |
Modifier and Type | Method and Description |
---|---|
protected URL |
getCanonicalUrl()
Returns the URL used for the canonical URL link element for the
AbstractPageWebResourceDataProvider.pageWebResource . |
protected String |
getDescription()
Returns the description for the page web resource.
|
protected List<String> |
getKeywords()
Returns the keywords for the page web resource.
|
protected Map<String,String> |
getMetaTags()
Returns the meta tags map for the page web resource.
|
protected String |
getSimpleTitle()
Returns the simple title for the page web resource.
|
protected String |
getTitlePattern()
Returns the pattern to be used when resolving the title or
null if there's no specific title pattern. |
protected String |
getUrlTitle()
Returns the title to be used when generating the URL of the page web resource.
|
protected VariableResolver |
getVariableResolver()
Returns the variable resolver used to resolve title against the title pattern.
|
void |
init(PageWebResource instance)
Sets
AbstractPageWebResourceDataProvider.pageWebResource attribute with the given pageWebResource object. |
getTitle
getPageWebResourceData
public void init(PageWebResource instance) throws PortalException
AbstractPageWebResourceDataProvider
AbstractPageWebResourceDataProvider.pageWebResource
attribute with the given pageWebResource object.init
in interface IPageWebResourceDataProvider
init
in class DefaultPageWebResourceDataProvider
instance
- the page web resource this provider will
provide data for.PortalException
protected String getDescription() throws PortalException
AbstractPageWebResourceDataProvider
getDescription
in class DefaultPageWebResourceDataProvider
PortalException
protected List<String> getKeywords() throws PortalException
AbstractPageWebResourceDataProvider
getKeywords
in class DefaultPageWebResourceDataProvider
null
, but may be an
empty list to indicate there are no keywords.PortalException
protected String getSimpleTitle() throws PortalException
AbstractPageWebResourceDataProvider
getSimpleTitle
in class DefaultPageWebResourceDataProvider
null
.PortalException
protected String getUrlTitle() throws PortalException
AbstractPageWebResourceDataProvider
getUrlTitle
in class AbstractPageWebResourceDataProvider
null
if there is no specific title for URL generation.PortalException
protected Map<String,String> getMetaTags() throws PortalException
AbstractPageWebResourceDataProvider
getMetaTags
in class DefaultPageWebResourceDataProvider
PortalException
protected URL getCanonicalUrl() throws PortalException
DefaultPageWebResourceDataProvider
AbstractPageWebResourceDataProvider.pageWebResource
.
In this default implementation, the website base URL used for the canonical URL depends on the web resource's
page configuration. If the page is configured to accept only HTTP, the non-secure main base URL
is used. Otherwise, the secure main base URL
is
used. The canonical URL is then generated by appending the web resource's path to that website base URL.
getCanonicalUrl
in class DefaultPageWebResourceDataProvider
null
if the web resource does not have a canonical URL.PortalException
protected String getTitlePattern() throws PortalException
DefaultPageWebResourceDataProvider
null
if there's no specific title pattern.getTitlePattern
in class DefaultPageWebResourceDataProvider
null
if there's no specific title pattern.PortalException
protected VariableResolver getVariableResolver() throws PortalException
DefaultPageWebResourceDataProvider
getVariableResolver
in class DefaultPageWebResourceDataProvider
PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.