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="15.0", 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: 25304 $ $Date: 2022-10-22 22:51:05 -0300 (Sat, 22 Oct 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 java.net.URL
getCanonicalUrl()
Returns the URL used for the canonical URL link element for theAbstractPageWebResourceDataProvider.pageWebResource
.protected java.lang.String
getDescription()
Returns the description for the page web resource.protected java.util.List<java.lang.String>
getKeywords()
Returns the keywords for the page web resource.protected java.util.Map<java.lang.String,java.lang.String>
getMetaTags()
Returns the meta tags map for the page web resource.protected java.lang.String
getSimpleTitle()
Returns the simple title for the page web resource.protected java.lang.String
getTitlePattern()
Returns the pattern to be used when resolving the title ornull
if there's no specific title pattern.protected java.lang.String
getUrlPath()
Returns the URL path.protected java.lang.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 java.lang.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 java.util.List<java.lang.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 java.lang.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 java.lang.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 java.util.Map<java.lang.String,java.lang.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 java.net.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 java.lang.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 java.lang.String getUrlPath()
Description copied from class:AbstractPageWebResourceDataProvider
Returns the URL path.- Overrides:
getUrlPath
in classAbstractPageWebResourceDataProvider
- Returns:
- the URL path.
-
-