|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.engine.impl.request.SlingRequestPathInfo
public class SlingRequestPathInfo
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.
for a number of examples.
Constructor Summary | |
---|---|
SlingRequestPathInfo(Resource r)
break requestPath as required by SlingRequestPathInfo |
Method Summary | |
---|---|
String |
getExtension()
Returns the extension from the URL or null if the request
URL does not contain an extension. |
String |
getResourcePath()
Return the "resource path" part of the URL, what comes before selectors, extension and suffix. |
String[] |
getSelectors()
Returns the selectors decoded from the request URL as an array of strings. |
String |
getSelectorString()
Returns the selectors decoded from the request URL as string. |
String |
getSuffix()
Returns the suffix part of the URL or null if the request
URL does not contain a suffix. |
SlingRequestPathInfo |
merge(RequestDispatcherOptions options)
|
SlingRequestPathInfo |
merge(RequestPathInfo baseInfo)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SlingRequestPathInfo(Resource r)
Method Detail |
---|
public SlingRequestPathInfo merge(RequestPathInfo baseInfo)
public SlingRequestPathInfo merge(RequestDispatcherOptions options)
public String toString()
toString
in class Object
public 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
public 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()
public 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
RequestPathInfo.getSelectors()
public 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
public String getResourcePath()
RequestPathInfo
Resource.getPath()
.
Rather it is equal to the
resolution path metadata property
of the resource.
getResourcePath
in interface RequestPathInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |