Package lumis.portal.website
Interface IWebsiteBaseURL
-
- All Known Subinterfaces:
IWebsiteMainBaseURL
- All Known Implementing Classes:
WebsiteProcessActionHandler.BaseURL
@StableMinor(version="14.2", sinceVersion="6.2") public interface IWebsiteBaseURL
A website base URL. It defines the URLs by which a website is accessible.A base URL contains domain, port and path.
For a URL to be considered as matching this base URL it must:
- Use a hostname corresponding to the base URL's domain or a subdomain of it.
- Use the same port number of the base URL.
- Contain a path equals to or inside the path defined for the base URL.
- Since:
- 6.2.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
- See Also:
Website
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDomain()
Returns the domain of this website base URL.String
getPath()
Returns the path part of this website base URL.int
getPort()
Returns the port of this website base URL.IWebsite
getWebsite()
Returns the website this base URL belongs to.boolean
matches(HttpServletRequest request)
Returns whether aHttpServletRequest
destination matches this base URL.String
toString()
Returns a string representation of this base URL.URI
toURI(boolean secure)
Returns this base URL as a URI object.
-
-
-
Method Detail
-
getDomain
String getDomain()
Returns the domain of this website base URL.- Returns:
- the domain. Example:
my.site.com
- Since:
- 6.2.0
-
getPort
int getPort()
Returns the port of this website base URL.- Returns:
- the port of this website base URL.
- Since:
- 6.2.0
-
getPath
String getPath()
Returns the path part of this website base URL.- Returns:
- the path path of this website base URL, or an empty string
if it has no path. Never returns
null
. - Since:
- 6.2.0
-
matches
boolean matches(HttpServletRequest request)
Returns whether aHttpServletRequest
destination matches this base URL.The request is considered as matching this base URL if its destination corresponds to any resource inside it.
- Parameters:
request
- the request.- Returns:
true
if the request matches this base URL,false
otherwise.- Since:
- 6.2.0
-
toString
String toString()
Returns a string representation of this base URL.The purpose of the returned string is for simple display of this base URL and may not be compatible to any format.
-
getWebsite
IWebsite getWebsite()
Returns the website this base URL belongs to.- Returns:
- the website this base URL belongs to.
- Since:
- 6.2.0
-
toURI
URI toURI(boolean secure)
Returns this base URL as a URI object.- Parameters:
secure
- whether the URI returned is to use a secure schema or not.- Returns:
- the URI.
- Since:
- 8.0.0
-
-