Package lumis.portal.page.webresource
Class SeoWebResourceUtil
- java.lang.Object
-
- lumis.portal.page.webresource.SeoWebResourceUtil
-
public class SeoWebResourceUtil extends Object
Utility class to call methods from lumis.service.seo.SeoServiceUtil without project dependency- Since:
- 10.1.0
- Version:
- $Revision: 20413 $ $Date: 2017-07-20 16:57:40 -0300 (Thu, 20 Jul 2017) $
-
-
Constructor Summary
Constructors Constructor Description SeoWebResourceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URL
getCanonicalUrl(String pageId, Locale locale)
Returns the canonical URL for the specifiedpage
SeoRule
if defined.static String
getPageDescription(String pageId, Locale locale)
Returns the description for the specifiedpage
SeoRule
if defined.static String
getPageSocialDescription(String pageId, Locale locale)
Returns the social description for the specifiedpage
SeoRule
if defined.static String
getPageSocialImageFileId(String pageId, Locale locale)
Returns the social image file id for the specifiedpage
SeoRule
if defined.static String
getPageSocialTitle(String pageId, Locale locale)
Returns the social title for the specifiedpage
SeoRule
if defined.static String
getPageTitle(String pageId, Locale locale)
Returns the title for the specifiedpage
SeoRule
if defined.static String
getPageTitlePattern(String pageId, Locale locale)
Returns the page title pattern for the given page and locale.static String
getUrlPathByChannelId(String channelId, Locale locale)
Returns the url path for the specifiedchannel
SeoRule
if defined.static String
getUrlPathByPageId(String pageId, Locale locale)
Returns the url path for the specifiedPageConfig#getId( page)
SeoRule
if defined.
-
-
-
Method Detail
-
getCanonicalUrl
public static URL getCanonicalUrl(String pageId, Locale locale) throws PortalException
Returns the canonical URL for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
- Returns:
- the
canonicalUrl
ornull
if no canonical URL is defined. - Throws:
PortalException
- Since:
- 10.1.0
-
getPageTitle
public static String getPageTitle(String pageId, Locale locale) throws PortalException
Returns the title for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the title- Returns:
- The title or
null
if no title is defined. - Throws:
PortalException
- Since:
- 10.1.0
-
getPageDescription
public static String getPageDescription(String pageId, Locale locale) throws PortalException
Returns the description for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the description- Returns:
- The description or
null
if no description is defined. - Throws:
PortalException
- Since:
- 10.1.0
-
getUrlPathByPageId
public static String getUrlPathByPageId(String pageId, Locale locale) throws PortalException
Returns the url path for the specifiedPageConfig#getId( page)
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the urlPath- Returns:
- The urlPath of the desired channel or
null
- Throws:
PortalException
- Since:
- 10.1.0
-
getUrlPathByChannelId
public static String getUrlPathByChannelId(String channelId, Locale locale) throws PortalException
Returns the url path for the specifiedchannel
SeoRule
if defined.- Parameters:
channelId
- The identifier of theChannelConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the urlPath- Returns:
- The urlPath of the desired channel or
null
- Throws:
PortalException
- Since:
- 10.1.0
-
getPageSocialTitle
public static String getPageSocialTitle(String pageId, Locale locale) throws PortalException
Returns the social title for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the title- Returns:
- The social title or
null
if no social title is defined. - Throws:
PortalException
- Since:
- 10.1.0
-
getPageSocialDescription
public static String getPageSocialDescription(String pageId, Locale locale) throws PortalException
Returns the social description for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to theSeoRule
locale
- Thelocale
of theSeoRule
containing the description- Returns:
- The social description or
null
if no social description is defined. - Throws:
PortalException
- Since:
- 10.1.0
-
getPageSocialImageFileId
public static String getPageSocialImageFileId(String pageId, Locale locale) throws PortalException
Returns the social image file id for the specifiedpage
SeoRule
if defined.- Parameters:
pageId
- The identifier of thePageConfig
linked to the SeoRulelocale
- TheLocale
of theSeoRule
containing the image- Returns:
- The social image file id or
null
if no social image is defined. - Throws:
PortalException
- Since:
- 10.2.0
-
getPageTitlePattern
public static String getPageTitlePattern(String pageId, Locale locale) throws PortalException
Returns the page title pattern for the given page and locale.- Parameters:
pageId
- the page.locale
- the locale.- Returns:
- the page title pattern for the given page and locale.
- Throws:
PortalException
- Since:
- 10.2.0
-
-