|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<String,String> org.apache.sling.api.request.RequestDispatcherOptions
public class RequestDispatcherOptions
RequestDispatcherOptions
are used in the
SlingHttpServletRequest.getRequestDispatcher(org.apache.sling.api.resource.Resource, RequestDispatcherOptions)
method, to give more control on some aspects of the include/forward
mechanism. Typical use cases include:
Field Summary | |
---|---|
static String |
OPT_ADD_SELECTORS
When dispatching, add the value provided by this option to the RequestPathInfo selectors. |
static String |
OPT_FORCE_RESOURCE_TYPE
When dispatching, use the value provided by this option as the resource type, instead of the one defined by the Resource . |
static String |
OPT_REPLACE_SELECTORS
When dispatching, replace RequestPathInfo selectors by the value
provided by this option. |
static String |
OPT_REPLACE_SUFFIX
When dispatching, replace the RequestPathInfo suffix by the value
provided by this option |
Constructor Summary | |
---|---|
RequestDispatcherOptions()
Creates an instance with no options set. |
|
RequestDispatcherOptions(String options)
Creates a new instances setting options by parsing the given options string as follows:
If the string is empty or null no options are set. |
Method Summary | |
---|---|
String |
getAddSelectors()
Returns the OPT_ADD_SELECTORS option or null if
not set. |
String |
getForceResourceType()
Returns the OPT_FORCE_RESOURCE_TYPE option or null
if not set. |
String |
getReplaceSelectors()
Returns the OPT_REPLACE_SELECTORS option or null
if not set. |
String |
getReplaceSuffix()
Returns the OPT_REPLACE_SUFFIX option or null if
not set. |
void |
setAddSelectors(String additionalSelectors)
Sets the OPT_ADD_SELECTORS option to the given
additionalSelectors if not null . |
void |
setForceResourceType(String resourceType)
Sets the OPT_FORCE_RESOURCE_TYPE option to the given
resourceType if not null . |
void |
setReplaceSelectors(String replaceSelectors)
Sets the OPT_REPLACE_SELECTORS option to the given
replaceSelectors if not null . |
void |
setReplaceSuffix(String replaceSuffix)
Sets the OPT_REPLACE_SUFFIX option to the given
replaceSuffix if not null . |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final String OPT_FORCE_RESOURCE_TYPE
Resource
.
public static final String OPT_REPLACE_SELECTORS
RequestPathInfo
selectors by the value
provided by this option. If this value contains an empty string, all
original selectors are removed.
public static final String OPT_ADD_SELECTORS
RequestPathInfo
selectors.
public static final String OPT_REPLACE_SUFFIX
RequestPathInfo
suffix by the value
provided by this option
Constructor Detail |
---|
public RequestDispatcherOptions()
public RequestDispatcherOptions(String options)
options
string as follows:
null
no options are set.RequestDispatcherOptions
object is created with the
OPT_FORCE_RESOURCE_TYPE
field set to the
string.RequestDispatcherOptions
object is created
from the name value pair list.
options
- The options to set.Method Detail |
---|
public void setForceResourceType(String resourceType)
OPT_FORCE_RESOURCE_TYPE
option to the given
resourceType
if not null
.
public String getForceResourceType()
OPT_FORCE_RESOURCE_TYPE
option or null
if not set.
public void setAddSelectors(String additionalSelectors)
OPT_ADD_SELECTORS
option to the given
additionalSelectors
if not null
.
public String getAddSelectors()
OPT_ADD_SELECTORS
option or null
if
not set.
public void setReplaceSelectors(String replaceSelectors)
OPT_REPLACE_SELECTORS
option to the given
replaceSelectors
if not null
.
If this value contains an empty string, all
original selectors are removed.
public String getReplaceSelectors()
OPT_REPLACE_SELECTORS
option or null
if not set.
public void setReplaceSuffix(String replaceSuffix)
OPT_REPLACE_SUFFIX
option to the given
replaceSuffix
if not null
.
public String getReplaceSuffix()
OPT_REPLACE_SUFFIX
option or null
if
not set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |