public interface AbsolutePortalURLBuilder
BuildableAbsolutePortalURLBuilder
Modifier and Type | Method and Description |
---|---|
ImageAbsolutePortalURLBuilder |
forImage(java.lang.String relativeURL)
Returns URLs for portal images.
|
MainAbsolutePortalURLBuilder |
forMain(java.lang.String relativeURL)
Returns URLs for portal's main resources.
|
ModuleAbsolutePortalURLBuilder |
forModule(org.osgi.framework.Bundle bundle,
java.lang.String relativeURL)
Returns URLs for module resources.
|
PortletDependencyAbsolutePortalURLBuilder |
forPortletDependency(com.liferay.portal.kernel.model.portlet.PortletDependency portletDependency,
java.lang.String cssURN,
java.lang.String javaScriptURN)
Returns URLs for portlet dependency resources.
|
ResourceAbsolutePortalURLBuilder |
forResource(java.lang.String relativeURL)
Returns URLs for arbitrary resources.
|
WhiteboardAbsolutePortalURLBuilder |
forWhiteboard(java.lang.String servletPattern)
Returns URLs for OSGi whiteboard servlet instances.
|
AbsolutePortalURLBuilder |
ignoreCDNHost()
Returns absolute URLs without the CDN part.
|
AbsolutePortalURLBuilder |
ignorePathProxy()
Returns absolute URLs without the proxy part.
|
ImageAbsolutePortalURLBuilder forImage(java.lang.String relativeURL)
com.liferay.portal.kernel.util.Portal#PATH_IMAGE
.
Image resources are retrieved from the CDN host when present or from the
Portal otherwise.relativeURL
- the image's relative URLMainAbsolutePortalURLBuilder forMain(java.lang.String relativeURL)
com.liferay.portal.kernel.util.Portal#PATH_MAIN
.
Main resources are always retrieved from the Portal even if a CDN host
is present.relativeURL
- the resource's relative URLModuleAbsolutePortalURLBuilder forModule(org.osgi.framework.Bundle bundle, java.lang.String relativeURL)
com.liferay.portal.kernel.util.Portal#PATH_MODULE
+ bundle's web context
path.
Module resources are retrieved from the CDN host when present or from the
Portal otherwise.bundle
- the bundle that contains the resourcerelativeURL
- the resource's relative URLPortletDependencyAbsolutePortalURLBuilder forPortletDependency(com.liferay.portal.kernel.model.portlet.PortletDependency portletDependency, java.lang.String cssURN, java.lang.String javaScriptURN)
PropsKeys#PORTLET_DEPENDENCY_CSS_URN
and
PropsKeys#PORTLET_DEPENDENCY_JAVASCRIPT_URN
) when present.
If not present, the resource will be retrieved from the CDN host when
present or the Portal itself otherwise.portletDependency
- the portlet dependency resourcecssURN
- the URN for CSS portlet dependency resourcesjavaScriptURN
- the URN for JavaScript portlet dependency resourcesResourceAbsolutePortalURLBuilder forResource(java.lang.String relativeURL)
/
or /something
if the
portal has not been installed as the ROOT webapp). See com.liferay.portal.spring.context.PortalContextLoaderListener#getPortalServletContextPath(
)
for more details.
Warning: Do not use this method unless none of the others serve your purpose. Otherwise, you may end up hard coding configurable paths.
Arbitrary resources are retrieved from the CDN host when present or from the Portal otherwise.relativeURL
- the resource's relative URLWhiteboardAbsolutePortalURLBuilder forWhiteboard(java.lang.String servletPattern)
@Component
annotation for this
method to work. OSGi whiteboard servlets live in com.liferay.portal.kernel.util.Portal#PATH_MODULE
.
Whiteboard resources are always retrieved from the Portal even if a CDN
host is present.servletPattern
- the value of the osgi.http.whiteboard.servlet.pattern
propertyAbsolutePortalURLBuilder ignoreCDNHost()
com.liferay.portal.kernel.util.Portal#getCDNHost(
javax.servlet.http.HttpServletRequest)
for details.AbsolutePortalURLBuilder ignorePathProxy()
com.liferay.portal.kernel.util.Portal#getPathProxy()
for details.