public class RequestPathInfoWrapper extends java.lang.Object implements RequestPathInfo
RequestPathInfoWrapper
class is a default wrapper
class around a RequestPathInfo
which may be extended to amend
the functionality of the original request path info object.Constructor and Description |
---|
RequestPathInfoWrapper(@NotNull RequestPathInfo delegate) |
Modifier and Type | Method and Description |
---|---|
@Nullable java.lang.String |
getExtension()
Returns the extension from the URL or
null if the request
URL does not contain an extension. |
@NotNull RequestPathInfo |
getRequestPathInfo()
Returns the original
RequestPathInfo object wrapped by
this object. |
@NotNull java.lang.String |
getResourcePath()
Return the "resource path" part of the URL, what comes before selectors,
extension and suffix.
|
@NotNull java.lang.String[] |
getSelectors()
Returns the selectors decoded from the request URL as an array of
strings.
|
@Nullable java.lang.String |
getSelectorString()
Returns the selectors decoded from the request URL as string.
|
@Nullable java.lang.String |
getSuffix()
Returns the suffix part of the URL or
null if the request
URL does not contain a suffix. |
@Nullable Resource |
getSuffixResource()
Returns the resource addressed by the suffix or null if the request does
not have a suffix or the suffix does not address an accessible resource.
|
public RequestPathInfoWrapper(@NotNull @NotNull RequestPathInfo delegate)
@NotNull public @NotNull RequestPathInfo getRequestPathInfo()
RequestPathInfo
object wrapped by
this object.@NotNull public @NotNull java.lang.String getResourcePath()
RequestPathInfo
Resource.getPath()
.
Rather it is equal to the
resolution path metadata property
of the resource.getResourcePath
in interface RequestPathInfo
@Nullable public @Nullable java.lang.String getExtension()
RequestPathInfo
null
if the request
URL does not contain an extension.
Decomposition of the request URL is defined in the Decomposition of a Request URL above.
getExtension
in interface RequestPathInfo
@Nullable public @Nullable java.lang.String getSelectorString()
RequestPathInfo
null
if the request has no selectors.
Decomposition of the request URL is defined in the Decomposition of a Request URL above.
getSelectorString
in interface RequestPathInfo
null
RequestPathInfo.getSelectors()
@NotNull public @NotNull java.lang.String[] getSelectors()
RequestPathInfo
selector string
by splitting the string on
dots. Returns an empty array if the request has no selectors.
Decomposition of the request URL is defined in the Decomposition of a Request URL above.
getSelectors
in interface RequestPathInfo
RequestPathInfo.getSelectorString()
@Nullable public @Nullable java.lang.String getSuffix()
RequestPathInfo
null
if the request
URL does not contain a suffix.
Decomposition of the request URL is defined in the Decomposition of a Request URL above.
getSuffix
in interface RequestPathInfo
@Nullable public @Nullable Resource getSuffixResource()
RequestPathInfo
The suffix is expected to be the absolute path to the resource suitable
as an argument to the
ResourceResolver.getResource(String)
method.
getSuffixResource
in interface RequestPathInfo
null
.Copyright © 2022 The Apache Software Foundation. All rights reserved.