Package com.liferay.portal.url.builder
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 Summary
Modifier and TypeMethodDescriptionforBrowserModule
(String browserModulePath) Returns a URL builder for AMD JavaScript files.forBundleScript
(org.osgi.framework.Bundle bundle, String relativeURL) Returns a URL builder for bundle JavaScript files.forBundleStylesheet
(org.osgi.framework.Bundle bundle, String relativeURL) Returns a URL builder for bundle stylesheets.Returns a URL builder for JavaScript combo servlet requests.forESModule
(String webContextPath, String esModulePath) Returns a URL builder for an ECMAScript module.forPortalImage
(String relativeURL) Returns a URL builder for portal images.forPortalMainResource
(String relativeURL) Returns a URL builder for portal's main resources.forPortletDependency
(com.liferay.portal.kernel.model.portlet.PortletDependency portletDependency, String cssURN, String javaScriptURN) Returns a URL builder for portlet dependency resources.forServlet
(String requestURL) Returns a URL builder for requests to dynamic content returned by servlets.
-
Method Details
-
forBrowserModule
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 resourcerelativeURL
- 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 resourcerelativeURL
- the stylesheets relative URL- Returns:
- a URL builder for module stylesheets
-
forComboRequest
ComboRequestAbsolutePortalURLBuilder forComboRequest()Returns a URL builder for JavaScript combo servlet requests.- Returns:
- a URL builder for combo servlet requests
-
forESModule
Returns a URL builder for an ECMAScript module.- Parameters:
webContextPath
- the context path where the module livesesModulePath
- the module path (e.g. /js/index.js)- Returns:
- a URL builder for ESM scripts
-
forPortalImage
Returns a URL builder for portal images. Image resources live incom.liferay.portal.kernel.util.Portal#PATH_IMAGE
.- Parameters:
relativeURL
- the image's relative URL- Returns:
- a URL builder for portal images
-
forPortalMainResource
Returns a URL builder for portal's main resources. Main resources live incom.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 resourcecssURN
- the URN for CSS portlet dependency resourcesjavaScriptURN
- the URN for JavaScript portlet dependency resources- Returns:
- a URL builder for portlet dependency resources
-
forServlet
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
-