Interface IWebsiteBaseURL

  • All Known Subinterfaces:
    IWebsiteMainBaseURL
    All Known Implementing Classes:
    WebsiteProcessActionHandler.BaseURL

    @StableMinor(version="14.0",
                 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: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    See Also:
    Website
    • 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 a HttpServletRequest 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.

        Overrides:
        toString in class Object
        Returns:
        this base URL as a string.
        Since:
        6.2.0
      • 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