Package lumis.content.webresource
Class ContentPageWebResourceDataProvider
- java.lang.Object
-
- lumis.portal.page.webresource.AbstractPageWebResourceDataProvider
-
- lumis.portal.page.webresource.DefaultPageWebResourceDataProvider
-
- lumis.content.webresource.ContentPageWebResourceDataProvider
-
- All Implemented Interfaces:
IPageWebResourceDataProvider
@StableMinor(version="14.2", sinceVersion="5.0") public class ContentPageWebResourceDataProvider extends DefaultPageWebResourceDataProvider
Provides the page information based on content being rendered.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.
- Since:
- 5.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
-
Fields inherited from class lumis.portal.page.webresource.AbstractPageWebResourceDataProvider
pageWebResource
-
-
Constructor Summary
Constructors Constructor Description ContentPageWebResourceDataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URL
getCanonicalUrl()
Returns the URL used for the canonical URL link element for theAbstractPageWebResourceDataProvider.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 ornull
if there's no specific title pattern.protected String
getUrlPath()
Returns the URL path.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)
SetsAbstractPageWebResourceDataProvider.pageWebResource
attribute with the given pageWebResource object.-
Methods inherited from class lumis.portal.page.webresource.DefaultPageWebResourceDataProvider
getTitle
-
Methods inherited from class lumis.portal.page.webresource.AbstractPageWebResourceDataProvider
getPageWebResourceData
-
-
-
-
Method Detail
-
init
public void init(PageWebResource instance) throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
SetsAbstractPageWebResourceDataProvider.pageWebResource
attribute with the given pageWebResource object.- Specified by:
init
in interfaceIPageWebResourceDataProvider
- Overrides:
init
in classDefaultPageWebResourceDataProvider
- Parameters:
instance
- the page web resource this provider will provide data for.- Throws:
PortalException
-
getDescription
protected String getDescription() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the description for the page web resource.- Overrides:
getDescription
in classDefaultPageWebResourceDataProvider
- Returns:
- the description.
- Throws:
PortalException
-
getKeywords
protected List<String> getKeywords() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the keywords for the page web resource.- Overrides:
getKeywords
in classDefaultPageWebResourceDataProvider
- Returns:
- the keywords. Must not be
null
, but may be an empty list to indicate there are no keywords. - Throws:
PortalException
-
getSimpleTitle
protected String getSimpleTitle() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the simple title for the page web resource.- Overrides:
getSimpleTitle
in classDefaultPageWebResourceDataProvider
- Returns:
- the simple title. Must not be
null
. - Throws:
PortalException
-
getUrlTitle
protected String getUrlTitle() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the title to be used when generating the URL of the page web resource.- Overrides:
getUrlTitle
in classAbstractPageWebResourceDataProvider
- Returns:
- the title, or
null
if there is no specific title for URL generation. - Throws:
PortalException
-
getMetaTags
protected Map<String,String> getMetaTags() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the meta tags map for the page web resource.- Overrides:
getMetaTags
in classDefaultPageWebResourceDataProvider
- Returns:
- the meta tags map.
- Throws:
PortalException
-
getCanonicalUrl
protected URL getCanonicalUrl() throws PortalException
Description copied from class:DefaultPageWebResourceDataProvider
Returns the URL used for the canonical URL link element for theAbstractPageWebResourceDataProvider.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, thesecure main base URL
is used. The canonical URL is then generated by appending the web resource's path to that website base URL.- Overrides:
getCanonicalUrl
in classDefaultPageWebResourceDataProvider
- Returns:
- the canonical URL, or
null
if the web resource does not have a canonical URL. - Throws:
PortalException
-
getTitlePattern
protected String getTitlePattern() throws PortalException
Description copied from class:DefaultPageWebResourceDataProvider
Returns the pattern to be used when resolving the title ornull
if there's no specific title pattern.- Overrides:
getTitlePattern
in classDefaultPageWebResourceDataProvider
- Returns:
- the pattern to be used when resolving the title or
null
if there's no specific title pattern. - Throws:
PortalException
-
getVariableResolver
protected VariableResolver getVariableResolver() throws PortalException
Description copied from class:DefaultPageWebResourceDataProvider
Returns the variable resolver used to resolve title against the title pattern.- Overrides:
getVariableResolver
in classDefaultPageWebResourceDataProvider
- Returns:
- the variable resolver used to resolve title against the title pattern.
- Throws:
PortalException
-
getUrlPath
protected String getUrlPath()
Description copied from class:AbstractPageWebResourceDataProvider
Returns the URL path.- Overrides:
getUrlPath
in classAbstractPageWebResourceDataProvider
- Returns:
- the URL path.
-
-