Interface SitemapLinkExternalizer
-
- All Superinterfaces:
SitemapLinkExternalizer
@ConsumerType public interface SitemapLinkExternalizer extends SitemapLinkExternalizer
This service interface is an extension of theSitemapLinkExternalizer
that provides an additional method to externalize any path in the same waySitemapLinkExternalizer.externalize(org.apache.sling.api.resource.Resource)
works.
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.sitemap.spi.common.SitemapLinkExternalizer
DEFAULT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.lang.String
externalize(Resource resource)
Implementations must return an absolute url for the given resource.@NotNull java.lang.String
externalize(ResourceResolver resourceResolver, java.lang.String path)
Returns an absolute url for the given path.@NotNull java.lang.String
externalize(SlingHttpServletRequest request, java.lang.String path)
Implementations must return an absolute url for the given path in the context of the given request.
-
-
-
Method Detail
-
externalize
@NotNull @NotNull java.lang.String externalize(SlingHttpServletRequest request, java.lang.String path)
Implementations must return an absolute url for the given path in the context of the given request.- Specified by:
externalize
in interfaceSitemapLinkExternalizer
- Returns:
- an absolute url
-
externalize
@NotNull @NotNull java.lang.String externalize(Resource resource)
Implementations must return an absolute url for the given resource.- Specified by:
externalize
in interfaceSitemapLinkExternalizer
- Returns:
- an absolute url
-
externalize
@NotNull @NotNull java.lang.String externalize(ResourceResolver resourceResolver, java.lang.String path)
Returns an absolute url for the given path. This path may include an extension, suffix or query string.- Parameters:
resourceResolver
-path
-- Returns:
- the absolute url
- Throws:
java.lang.IllegalArgumentException
- is thrown then the given string is not a path
-
-