Interface AbsolutePortalURLBuilder


@ProviderType public interface AbsolutePortalURLBuilder
Provides builders for constructing absolute URLs pointing to portal resources.

Each for[Resource] method returns a URL builder for the named resource. Algorithms may differ between builders. In general, the builders construct URLs that honor existing proxy paths unless a CDN host is being used.

See Also:
  • BuildableAbsolutePortalURLBuilder
  • Method Details

    • forBrowserModule

      BrowserModuleAbsolutePortalURLBuilder forBrowserModule(String browserModulePath)
      Returns a URL builder for AMD JavaScript files.
      Parameters:
      browserModulePath - the browser module path (e.g. /o/js/resolved-module/... or a legacy config generator module path too)
      Returns:
      a URL builder for AMD JavaScript files
    • forBundleScript

      BundleScriptAbsolutePortalURLBuilder forBundleScript(org.osgi.framework.Bundle bundle, String relativeURL)
      Returns a URL builder for bundle JavaScript files.
      Parameters:
      bundle - the bundle that contains the resource
      relativeURL - the JavaScript file relative URL
      Returns:
      a URL builder for module scripts
    • forBundleStylesheet

      BundleStylesheetAbsolutePortalURLBuilder forBundleStylesheet(org.osgi.framework.Bundle bundle, String relativeURL)
      Returns a URL builder for bundle stylesheets.
      Parameters:
      bundle - the bundle that contains the resource
      relativeURL - the stylesheets relative URL
      Returns:
      a URL builder for module stylesheets
    • forComboRequest

      Returns a URL builder for JavaScript combo servlet requests.
      Returns:
      a URL builder for combo servlet requests
    • forESModule

      ESModuleAbsolutePortalURLBuilder forESModule(String webContextPath, String esModulePath)
      Returns a URL builder for an ECMAScript module.
      Parameters:
      webContextPath - the context path where the module lives
      esModulePath - the module path (e.g. /js/index.js)
      Returns:
      a URL builder for ESM scripts
    • forPortalImage

      PortalImageAbsolutePortalURLBuilder forPortalImage(String relativeURL)
      Returns a URL builder for portal images. Image resources live in com.liferay.portal.kernel.util.Portal#PATH_IMAGE.
      Parameters:
      relativeURL - the image's relative URL
      Returns:
      a URL builder for portal images
    • forPortalMainResource

      PortalMainResourceAbsolutePortalURLBuilder forPortalMainResource(String relativeURL)
      Returns a URL builder for portal's main resources. Main resources live in com.liferay.portal.kernel.util.Portal#PATH_MAIN.
      Parameters:
      relativeURL - the resource's relative URL
      Returns:
      a URL builder for portal's main resources
    • forPortletDependency

      PortletDependencyAbsolutePortalURLBuilder forPortletDependency(com.liferay.portal.kernel.model.portlet.PortletDependency portletDependency, String cssURN, String javaScriptURN)
      Returns a URL builder for portlet dependency resources. Portlet dependency resources live in the portal's root path.
      Parameters:
      portletDependency - the portlet dependency resource
      cssURN - the URN for CSS portlet dependency resources
      javaScriptURN - the URN for JavaScript portlet dependency resources
      Returns:
      a URL builder for portlet dependency resources
    • forServlet

      ServletAbsolutePortalURLBuilder forServlet(String requestURL)
      Returns a URL builder for requests to dynamic content returned by servlets.
      Parameters:
      requestURL - the API's request URL
      Returns:
      a URL builder for API requests