|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.excalibur.source.SourceParameters
This class holds parameters for a Source
object.
It differs from the usual Parameters object because it can hold
more than one value for a parameter, as is the case for HTTP
request parameters.
Only particular kinds of Source
implementations, such as
URLSource
support this kind of
parameters, passed as the SourceResolver.URI_PARAMETERS
entry
in the parameters
argument of
SourceResolver.resolveURI(String, String, Map)
.
Constructor Summary | |
SourceParameters()
Standard Constructor creating an empty parameters object |
|
SourceParameters(java.lang.String queryString)
Construct a new object from a queryString |
Method Summary | |
void |
add(SourceParameters parameters)
Add all parameters from the incoming parameters object. |
java.lang.Object |
clone()
Returns a copy of the parameters object. |
boolean |
containsParameter(java.lang.String name)
Test if a value for this parameter exists. |
static SourceParameters |
create(Configuration conf)
Create a new parameters object from the children of the configuration. |
java.lang.String |
getEncodedQueryString()
Build a query string and encode each parameter value. |
Parameters |
getFirstParameters()
Create a Parameters object. |
java.lang.String |
getParameter(java.lang.String name)
Get the value of a parameter. |
java.lang.String |
getParameter(java.lang.String name,
java.lang.String defaultValue)
Get the value of a parameter. |
boolean |
getParameterAsBoolean(java.lang.String name,
boolean defaultValue)
Get the boolean value of a parameter. |
int |
getParameterAsInteger(java.lang.String name,
int defaultValue)
Get the integer value of a parameter. |
java.util.Map |
getParameterMap()
Returns an immutable java.util.Map containing parameter names as keys and parameter values as map values. |
java.util.Iterator |
getParameterNames()
Get all parameter names. |
java.util.Iterator |
getParameterValues(java.lang.String name)
Get all values of a parameter. |
java.lang.String[] |
getParameterValuesAsArray(java.lang.String name)
Get all values of a parameter. |
java.lang.String |
getQueryString()
Build a query string. |
boolean |
hasParameters()
Test if there are any parameters. |
void |
removeParameter(java.lang.String name)
Remove all values for this parameter |
void |
setParameter(java.lang.String name,
java.lang.String value)
Add a parameter. |
void |
setSingleParameterValue(java.lang.String name,
java.lang.String value)
Set the value of this parameter to the given value. |
java.lang.String |
toString()
Overriding toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SourceParameters()
public SourceParameters(java.lang.String queryString)
Method Detail |
public static SourceParameters create(Configuration conf)
null
is returned.
public void setParameter(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value of the parameter.public java.lang.String getParameter(java.lang.String name)
name
- The name of the parameter.
null
public java.lang.String getParameter(java.lang.String name, java.lang.String defaultValue)
name
- The name of the parameter.defaultValue
- The default value if the parameter does not exist.
defaultValue
public int getParameterAsInteger(java.lang.String name, int defaultValue)
name
- The name of the parameter.defaultValue
- The default value if the parameter does not exist.
defaultValue
public boolean getParameterAsBoolean(java.lang.String name, boolean defaultValue)
name
- The name of the parameter.defaultValue
- The default value if the parameter does not exist.
defaultValue
public boolean containsParameter(java.lang.String name)
name
- The name of the parameter.
true
if a value exists, otherwise false
public java.util.Iterator getParameterValues(java.lang.String name)
name
- The name of the parameter.
public java.lang.String[] getParameterValuesAsArray(java.lang.String name)
name
- The name of the parameter.
public java.util.Iterator getParameterNames()
public Parameters getFirstParameters()
public java.lang.String getQueryString()
null
is returned.public java.lang.String getEncodedQueryString()
null
is returned.public void add(SourceParameters parameters)
public java.lang.String toString()
public java.lang.Object clone()
public boolean hasParameters()
public void setSingleParameterValue(java.lang.String name, java.lang.String value)
public void removeParameter(java.lang.String name)
public java.util.Map getParameterMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |