|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.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:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Field Summary | |
|---|---|
static java.lang.String |
OPT_ADD_SELECTORS
When dispatching, add the value provided by this option to the RequestPathInfo selectors. |
static java.lang.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 java.lang.String |
OPT_REPLACE_SELECTORS
When dispatching, replace RequestPathInfo selectors by the value
provided by this option. |
static java.lang.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(java.lang.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 | |
|---|---|
java.lang.String |
getAddSelectors()
Returns the OPT_ADD_SELECTORS option or null if
not set. |
java.lang.String |
getForceResourceType()
Returns the OPT_FORCE_RESOURCE_TYPE option or null
if not set. |
java.lang.String |
getReplaceSelectors()
Returns the OPT_REPLACE_SELECTORS option or null
if not set. |
java.lang.String |
getReplaceSuffix()
Returns the OPT_REPLACE_SUFFIX option or null if
not set. |
void |
setAddSelectors(java.lang.String additionalSelectors)
Sets the OPT_ADD_SELECTORS option to the given
additionalSelectors if not null. |
void |
setForceResourceType(java.lang.String resourceType)
Sets the OPT_FORCE_RESOURCE_TYPE option to the given
resourceType if not null. |
void |
setReplaceSelectors(java.lang.String replaceSelectors)
Sets the OPT_REPLACE_SELECTORS option to the given
replaceSelectors if not null. |
void |
setReplaceSuffix(java.lang.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 java.lang.String OPT_FORCE_RESOURCE_TYPE
Resource.
public static final java.lang.String OPT_REPLACE_SELECTORS
RequestPathInfo selectors by the value
provided by this option.
public static final java.lang.String OPT_ADD_SELECTORS
RequestPathInfo selectors.
public static final java.lang.String OPT_REPLACE_SUFFIX
RequestPathInfo suffix by the value
provided by this option
| Constructor Detail |
|---|
public RequestDispatcherOptions()
public RequestDispatcherOptions(java.lang.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(java.lang.String resourceType)
OPT_FORCE_RESOURCE_TYPE option to the given
resourceType if not null.
public java.lang.String getForceResourceType()
OPT_FORCE_RESOURCE_TYPE option or null
if not set.
public void setAddSelectors(java.lang.String additionalSelectors)
OPT_ADD_SELECTORS option to the given
additionalSelectors if not null.
public java.lang.String getAddSelectors()
OPT_ADD_SELECTORS option or null if
not set.
public void setReplaceSelectors(java.lang.String replaceSelectors)
OPT_REPLACE_SELECTORS option to the given
replaceSelectors if not null.
public java.lang.String getReplaceSelectors()
OPT_REPLACE_SELECTORS option or null
if not set.
public void setReplaceSuffix(java.lang.String replaceSuffix)
OPT_REPLACE_SUFFIX option to the given
replaceSuffix if not null.
public java.lang.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 | |||||||||