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="16.1", 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: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
-
-
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 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
getTitle()
Returns the 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 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 java.lang.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 java.lang.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 java.lang.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 java.net.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 java.util.List<java.lang.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 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 classAbstractPageWebResourceDataProvider
- Returns:
- the meta tags map.
- Throws:
PortalException
-
getSimpleTitle
protected java.lang.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
-
-