Interface IWebsiteManager

  • All Known Subinterfaces:
    IWebsiteManagerSPI
    All Known Implementing Classes:
    WebsiteManager

    @StableMinor(version="14.1",
                 sinceVersion="6.2")
    public interface IWebsiteManager
    Provides high-level operations on portal websites.
    Since:
    6.2.0
    Version:
    $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IWebsiteBaseURL getWebsiteBaseURL​(URI uri)
      Returns the website base URL that serves the given URI or null if there's no base URL that serves the given URI.
      If the given URI is not absolute or is opaque, null will be returned.
      This method will not fallback to default website if no website can relativize the given URI.
      IWebsiteBaseURL getWebsiteBaseURL​(HttpServletRequest request)
      Returns the website's base URL that a request corresponds to.
      URI getWebsiteBaseURLAsURI​(URI uri)
      Returns the website base URL as a URI that serves the given URI or null if there's no base URL that serves the given URI.
      If the given URI is not absolute or is opaque, null will be returned.
      This method will not fallback to default website if no website can relativize the given URI.
    • Method Detail

      • getWebsiteBaseURL

        IWebsiteBaseURL getWebsiteBaseURL​(HttpServletRequest request)
                                   throws PortalException
        Returns the website's base URL that a request corresponds to.

        If the request does not correspond to any configured website base URL but there is a website configured as default, a website base URL will be dynamically generated and returned, referencing the default website in IWebsiteBaseURL.getWebsite(), as if it was an additional base URL of the default website.

        If the request does not corresponds to any configured website base URL and there is no website configured as default, null is returned.

        Parameters:
        request - the request.
        Returns:
        the website base URL, or null if no website base URL corresponds to the request.
        Throws:
        PortalException
        Since:
        6.2.0
      • getWebsiteBaseURL

        IWebsiteBaseURL getWebsiteBaseURL​(URI uri)
                                   throws PortalException
        Returns the website base URL that serves the given URI or null if there's no base URL that serves the given URI.
        If the given URI is not absolute or is opaque, null will be returned.
        This method will not fallback to default website if no website can relativize the given URI.
        Parameters:
        uri - the URI.
        Returns:
        the website base URL that serves the given URI or null if there's no base URL that serves the given URI.
        Throws:
        NullPointerException - if the given URI is null.
        PortalException
        Since:
        10.4.0
      • getWebsiteBaseURLAsURI

        URI getWebsiteBaseURLAsURI​(URI uri)
                            throws PortalException
        Returns the website base URL as a URI that serves the given URI or null if there's no base URL that serves the given URI.
        If the given URI is not absolute or is opaque, null will be returned.
        This method will not fallback to default website if no website can relativize the given URI.
        Parameters:
        uri - the URI.
        Returns:
        the website base URL as URI that serves the given URI or null if there's no base URL that serves the given URI.
        Throws:
        NullPointerException - if the given URI is null.
        PortalException
        Since:
        10.4.0