Interface IWebsiteBaseURL

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

    @StableMinor(version="17.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$ $Date$
    See Also:
    Website
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDomain()
      Returns the domain of this website base URL.
      java.lang.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​(javax.servlet.http.HttpServletRequest request)
      Returns whether a HttpServletRequest destination matches this base URL.
      java.lang.String toString()
      Returns a string representation of this base URL.
      java.net.URI toURI​(boolean secure)
      Returns this base URL as a URI object.
    • Method Detail

      • getDomain

        java.lang.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

        java.lang.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​(javax.servlet.http.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

        java.lang.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 java.lang.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

        java.net.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