public class WebsiteUtil extends Object
Constructor and Description |
---|
WebsiteUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compareURLs(IWebsiteBaseURL firstURL,
IWebsiteBaseURL secondURL)
Compares if the URLs are equals
|
static String |
getDefaultPageWebSiteURL(HttpServletRequest request,
IPortalMode portalMode)
Returns the URL to the current website with page id to the defined portal mode.
|
static String |
getId(IWebsiteBaseURL url)
Returns the identifier of the given
website base
URL . |
static IWebsiteBaseURL |
getWebsiteBaseURLById(String id)
Returns the
website base URL based on its
identification. |
static String |
getWebsiteURL(HttpServletRequest request)
Returns the current WebsiteURL.
|
static boolean |
match(IWebsiteBaseURL baseUrl,
String uriStr)
Checks whether the given base URL matches the given URI.
|
static boolean |
match(IWebsiteBaseURL baseUrl,
URI uri)
Checks whether the given base URL matches the given URI.
|
static IWebsiteBaseURL |
resolveWebsiteBaseURLByString(String websiteStr)
Deprecated.
since 10.4.0, use
IWebsiteManager.getWebsiteBaseURL(URI) instead. |
static IWebsite |
resolveWebsiteByString(String websiteStr)
Resolves the given website string in a
website .The given string will be parsed as new
URI(String) , so that it must adhere with URI syntax. |
public static IWebsite resolveWebsiteByString(String websiteStr) throws PortalException
website
.new
URI(String)
, so that it must adhere with URI
syntax.websiteStr
- the website string to be parsed.website
.IllegalArgumentException
- if the given string is a malformed URL.IllegalArgumentException
- if the protocol isn't neither HTTP
nor HTTPS
.PortalException
resolveWebsiteBaseURLByString(String)
public static boolean compareURLs(IWebsiteBaseURL firstURL, IWebsiteBaseURL secondURL)
firstURL
- IWebsiteBaseURL
to be comparedsecondURL
- IWebsiteBaseURL
to be compared@Deprecated public static IWebsiteBaseURL resolveWebsiteBaseURLByString(String websiteStr) throws PortalException
IWebsiteManager.getWebsiteBaseURL(URI)
instead.website
base URL
.new
URI(String)
, so that it must adhere with URI
syntax.websiteStr
- the website string to be parsed.website base URL
.IllegalArgumentException
- if the given string is a malformed URL.IllegalArgumentException
- if the protocol isn't neither HTTP
nor HTTPS
.PortalException
public static boolean match(IWebsiteBaseURL baseUrl, URI uri)
baseUrl
- the base URL.uriStr
- the URI.public static boolean match(IWebsiteBaseURL baseUrl, String uriStr)
baseUrl
- the base URL.uriStr
- the URI.public static String getId(IWebsiteBaseURL url)
website base
URL
.url
- the website base URL.website base
URL
.IllegalArgumentException
- if the given object is null
.IllegalArgumentException
- if the given object's class is unknown.public static IWebsiteBaseURL getWebsiteBaseURLById(String id)
website base URL
based on its
identification.id
- the website base URL
identification.website base URL
based on its
identification.public static String getWebsiteURL(HttpServletRequest request)
request
- request in which the website is situated.public static String getDefaultPageWebSiteURL(HttpServletRequest request, IPortalMode portalMode) throws PortalException
request
- from where to find website.portalMode
- value of the portal mode for the url to be generated to.PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.