Class SlingRequestPathInfo
- java.lang.Object
-
- org.apache.sling.engine.impl.request.SlingRequestPathInfo
-
- All Implemented Interfaces:
org.apache.sling.api.request.RequestPathInfo
public class SlingRequestPathInfo extends Object implements org.apache.sling.api.request.RequestPathInfo
Sling request URI parser that provides SlingRequestPathInfo for the current request, based on the path of the Resource. The values provided by this depend on the Resource.getPath() value, as the ResourceResolver might use all or only part of the request URI path to locate the resource (see also SLING-60 ). What we're after is the remainder of the path, the part that was not used to locate the Resource, and we split that part in different subparts: selectors, extension and suffix. see SlingRequestPathInfoTest for a number of examples.
-
-
Constructor Summary
Constructors Constructor Description SlingRequestPathInfo(org.apache.sling.api.resource.Resource r)
Break requestPath as required by SlingRequestPathInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExtension()
String
getResourcePath()
String[]
getSelectors()
String
getSelectorString()
String
getSuffix()
org.apache.sling.api.resource.Resource
getSuffixResource()
SlingRequestPathInfo
merge(org.apache.sling.api.request.RequestDispatcherOptions options)
SlingRequestPathInfo
merge(org.apache.sling.api.request.RequestPathInfo baseInfo)
String
toString()
-
-
-
Method Detail
-
merge
public SlingRequestPathInfo merge(org.apache.sling.api.request.RequestPathInfo baseInfo)
-
merge
public SlingRequestPathInfo merge(org.apache.sling.api.request.RequestDispatcherOptions options)
-
getExtension
public String getExtension()
- Specified by:
getExtension
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
getSelectors
public String[] getSelectors()
- Specified by:
getSelectors
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
getSelectorString
public String getSelectorString()
- Specified by:
getSelectorString
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
getSuffix
public String getSuffix()
- Specified by:
getSuffix
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
getSuffixResource
public org.apache.sling.api.resource.Resource getSuffixResource()
- Specified by:
getSuffixResource
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
getResourcePath
public String getResourcePath()
- Specified by:
getResourcePath
in interfaceorg.apache.sling.api.request.RequestPathInfo
-
-