Class RequestPathInfoWrapper

  • All Implemented Interfaces:
    RequestPathInfo

    public class RequestPathInfoWrapper
    extends java.lang.Object
    implements RequestPathInfo
    The 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestPathInfoWrapper

        public RequestPathInfoWrapper​(@NotNull
                                      @NotNull RequestPathInfo delegate)
    • Method Detail

      • getRequestPathInfo

        @NotNull
        public @NotNull RequestPathInfo getRequestPathInfo()
        Returns the original RequestPathInfo object wrapped by this object.
        Returns:
        The wrapped request path info.
      • getExtension

        @Nullable
        public @Nullable java.lang.String getExtension()
        Description copied from interface: RequestPathInfo
        Returns the extension from the URL or 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.

        Specified by:
        getExtension in interface RequestPathInfo
        Returns:
        The extension from the request URL.
      • getSuffix

        @Nullable
        public @Nullable java.lang.String getSuffix()
        Description copied from interface: RequestPathInfo
        Returns the suffix part of the URL or 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.

        Specified by:
        getSuffix in interface RequestPathInfo
        Returns:
        The suffix part of the request URL.
      • getSuffixResource

        @Nullable
        public @Nullable Resource getSuffixResource()
        Description copied from interface: RequestPathInfo
        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.

        The suffix is expected to be the absolute path to the resource suitable as an argument to the ResourceResolver.getResource(String) method.

        Specified by:
        getSuffixResource in interface RequestPathInfo
        Returns:
        The suffix resource or null.