Package lumis.portal.page.webresource
Class DefaultPageWebResourceDataProvider
- java.lang.Object
-
- lumis.portal.page.webresource.AbstractPageWebResourceDataProvider
-
- lumis.portal.page.webresource.DefaultPageWebResourceDataProvider
-
- All Implemented Interfaces:
IPageWebResourceDataProvider
- Direct Known Subclasses:
ContentPageWebResourceDataProvider
@StableMinor(version="14.2", sinceVersion="5.0") public class DefaultPageWebResourceDataProvider extends AbstractPageWebResourceDataProvider
Default page web resource data provider. Simply returns the data specified in the page properties.- 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 DefaultPageWebResourceDataProvider()
-
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
getTitle()
Returns the 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 VariableResolver
getVariableResolver()
Returns the variable resolver used to resolve title against the title pattern.void
init(PageWebResource pageWebResource)
SetsAbstractPageWebResourceDataProvider.pageWebResource
attribute with the given pageWebResource object.-
Methods inherited from class lumis.portal.page.webresource.AbstractPageWebResourceDataProvider
getPageWebResourceData, getUrlPath, getUrlTitle
-
-
-
-
Method Detail
-
init
public void init(PageWebResource pageWebResource) throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
SetsAbstractPageWebResourceDataProvider.pageWebResource
attribute with the given pageWebResource object.- Specified by:
init
in interfaceIPageWebResourceDataProvider
- Overrides:
init
in classAbstractPageWebResourceDataProvider
- Parameters:
pageWebResource
- the page web resource this provider will provide data for.- Throws:
PortalException
-
getTitle
protected String getTitle() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the title for the page web resource.- Specified by:
getTitle
in classAbstractPageWebResourceDataProvider
- Returns:
- the title. Must not be
null
. - Throws:
PortalException
-
getVariableResolver
protected VariableResolver getVariableResolver() throws PortalException
Returns the variable resolver used to resolve title against the title pattern.- Returns:
- the variable resolver used to resolve title against the title pattern.
- Throws:
PortalException
- Since:
- 10.2.0
-
getTitlePattern
protected String getTitlePattern() throws PortalException
Returns the pattern to be used when resolving the title ornull
if there's no specific title pattern.- Returns:
- the pattern to be used when resolving the title or
null
if there's no specific title pattern. - Throws:
PortalException
- Since:
- 10.2.0
-
getDescription
protected String getDescription() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the description for the page web resource.- Specified by:
getDescription
in classAbstractPageWebResourceDataProvider
- Returns:
- the description.
- Throws:
PortalException
-
getCanonicalUrl
protected URL getCanonicalUrl() throws PortalException
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 classAbstractPageWebResourceDataProvider
- Returns:
- the canonical URL, or
null
if the web resource does not have a canonical URL. - Throws:
PortalException
-
getKeywords
protected List<String> getKeywords() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the keywords for the page web resource.- Specified by:
getKeywords
in classAbstractPageWebResourceDataProvider
- Returns:
- the keywords. Must not be
null
, but may be an empty list to indicate there are no keywords. - 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 classAbstractPageWebResourceDataProvider
- Returns:
- the meta tags map.
- Throws:
PortalException
-
getSimpleTitle
protected String getSimpleTitle() throws PortalException
Description copied from class:AbstractPageWebResourceDataProvider
Returns the simple title for the page web resource.- Specified by:
getSimpleTitle
in classAbstractPageWebResourceDataProvider
- Returns:
- the simple title. Must not be
null
. - Throws:
PortalException
-
-