|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.contextfw.web.application.request.RequestParameter
public class RequestParameter
Provides functionality to access on GET/POST-parameter.
Integers, floats and booleans can be represented as a string in many ways. For instance decimal point can be '.' or ','. Also other means of representation are possible, i.e. scientific form
Therefore it is the implentors responsibility to decide what kind of representations are accepted.
| Constructor Summary | |
|---|---|
RequestParameter(String name,
String publicName,
javax.servlet.http.HttpServletRequest request)
Constructs new HiveParameter This constructor should not be called explicitly. |
|
| Method Summary | |
|---|---|
void |
clearOptions()
|
void |
clearValues()
|
Boolean |
getBooleanValue()
Returns parameter value as a boolean. |
Boolean |
getBooleanValue(Boolean def)
Returns parameter value as a boolean. |
Boolean[] |
getBooleanValues()
Returns all parameter values in a table of floats Booleans are parsed simply using Boolean.parseBoolean(). |
Boolean[] |
getBooleanValues(Boolean[] def)
|
Double |
getDoubleValue()
Returns parameter value as a double. |
Double |
getDoubleValue(Double def)
Returns parameter value as a double. |
Double[] |
getDoubleValues()
Returns all parameter values in a table of doubles When doubles are handled, system accepts both ways to represent decimal points. |
Double[] |
getDoubleValues(Double[] def)
Returns all parameter values in a table of doubles When doubles are handled, system accepts both ways to represent decimal points. |
Float |
getFloatValue()
Returns parameter value as a float. |
Float |
getFloatValue(Float def)
Returns parameter value as a long. |
Float[] |
getFloatValues()
Returns all parameter values in a table of floats When floats are handled, system accepts both ways to represent decimal points. |
Float[] |
getFloatValues(Float[] def)
|
Integer |
getIntValue()
Returns parameter value as an integer. |
Integer |
getIntValue(Integer def)
Returns parameter value as an integer. |
Integer[] |
getIntValues()
Returns all parameter values in a table of integers |
Integer[] |
getIntValues(Integer[] def)
|
Long |
getLongValue()
Returns parameter value as a long integer. |
Long |
getLongValue(Long def)
Returns parameter value as a long. |
Long[] |
getLongValues()
Returns all parameter values in a table of long integers |
Long[] |
getLongValues(Long[] def)
|
Object |
getModifier()
|
String |
getName()
|
Object |
getOptions()
|
int |
getStatus()
|
String |
getStringValue()
Returns parameter value as a string. |
String |
getStringValue(String def)
Returns parameter value as a string. |
String[] |
getStringValues()
Returns all parameter values in a table of strings |
String[] |
getStringValues(String[] def)
Returns all parameter values in a table of strings |
boolean |
hasValue()
|
boolean |
hasValue(boolean strict)
|
String |
publicName()
|
void |
setModifier(Object modifier)
|
void |
setOptions(Object options)
|
void |
setPublicName(String name)
|
void |
setStatus(int status)
|
void |
setValue(boolean value)
|
void |
setValue(double value)
|
void |
setValue(float value)
|
void |
setValue(int value)
|
void |
setValue(long value)
|
void |
setValue(String value)
|
void |
setValues(boolean[] values)
|
void |
setValues(double[] values)
|
void |
setValues(float[] values)
|
void |
setValues(int[] values)
|
void |
setValues(long[] values)
|
void |
setValues(String[] values)
|
int |
valueCount()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestParameter(String name,
String publicName,
javax.servlet.http.HttpServletRequest request)
Constructs new HiveParameter
This constructor should not be called explicitly.
name - Parameter name, which corresponds to the equal
GET/POST-value(s).| Method Detail |
|---|
public int valueCount()
public String getStringValue()
Returns parameter value as a string.
If parameter has multiple values, then only the first value is returned.
public String getStringValue(String def)
Returns parameter value as a string.
If parameter has multiple values, then only the first value is returned.
def - Default value. Can be null.
public String[] getStringValues()
Returns all parameter values in a table of strings
NoValueException - Thrown if parameter has no value(s), or request is ignored.public String[] getStringValues(String[] def)
Returns all parameter values in a table of strings
def - Default values
public Integer getIntValue()
throws NumberFormatException
Returns parameter value as an integer.
If parameter has multiple values, then only the first value is returned.
NumberFormatException - Thrown if parameter cannot be parsed to integer.public Integer getIntValue(Integer def)
Returns parameter value as an integer.
If parameter has multiple values, then only the first value is returned.
def - Default value
public Long getLongValue()
throws NumberFormatException
Returns parameter value as a long integer.
If parameter has multiple values, then only the first value is returned.
NumberFormatException - Thrown if parameter cannot be parsed to long integer.public Long getLongValue(Long def)
Returns parameter value as a long.
If parameter has multiple values, then only the first value is returned.
def - Default value
public Long[] getLongValues()
throws NumberFormatException
Returns all parameter values in a table of long integers
NoValueException - Thrown if parameter has no value(s), or if request is
ignored.
NumberFormatException - Thrown if any of the parameter values cannot be parsed to
long integerpublic Long[] getLongValues(Long[] def)
public Integer[] getIntValues()
throws NumberFormatException
Returns all parameter values in a table of integers
NumberFormatException - Thrown if any of the parameter values cannot be parsed to intpublic Integer[] getIntValues(Integer[] def)
public Float getFloatValue()
throws NumberFormatException
Returns parameter value as a float.
If parameter has multiple values, then only the first value is returned.
When floats are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
NumberFormatException - Thrown if parameter cannot be parsed to float.public Float getFloatValue(Float def)
Returns parameter value as a long.
If parameter has multiple values, then only the first value is returned.
When floats are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
def - Default value
public Float[] getFloatValues()
throws NumberFormatException
Returns all parameter values in a table of floats
When floats are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
NumberFormatException - Thrown if any of the parameter values cannot be parsed to
float.public Float[] getFloatValues(Float[] def)
public Double getDoubleValue()
throws NumberFormatException
Returns parameter value as a double.
If parameter has multiple values, then only the first value is returned.
When doubles are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
NumberFormatException - Thrown if parameter cannot be parsed to double.public Double getDoubleValue(Double def)
Returns parameter value as a double.
If parameter has multiple values, then only the first value is returned.
When doubles are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
def - Default value
public Double[] getDoubleValues()
throws NumberFormatException
Returns all parameter values in a table of doubles
When doubles are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
NumberFormatException - Thrown if any of the parameter values cannot be parsed to
doubles.public Double[] getDoubleValues(Double[] def)
Returns all parameter values in a table of doubles
When doubles are handled, system accepts both ways to represent decimal points. This means, that decimal point can be represented with '.' or ','. For example "123.435" or "123,345" are both accepted.
NumberFormatException - Thrown if any of the parameter values cannot be parsed to
doubles.public Boolean getBooleanValue()
Returns parameter value as a boolean.
If parameter has multiple values, then only the first value is returned.
Booleans are parsed simply using Boolean.parseBoolean().
Refer J2SE-documentation for more information.
NoValueException - Thrown if parameter has no value, or if request is ignored.public Boolean getBooleanValue(Boolean def)
Returns parameter value as a boolean.
If parameter has multiple values, then only the first value is returned.
Booleans are parsed simply using Boolean.parseBoolean().
Refer J2SE-documentation for more information.
def - Default value
public Boolean[] getBooleanValues()
Returns all parameter values in a table of floats
Booleans are parsed simply using Boolean.parseBoolean().
Refer J2SE-documentation for more information.
NoValueException - Thrown if parameter has no value(s), or if request is
ignored.public Boolean[] getBooleanValues(Boolean[] def)
public boolean hasValue(boolean strict)
public boolean hasValue()
public String getName()
public void setPublicName(String name)
public void setValue(String value)
public void setValues(String[] values)
public void setValue(int value)
public void setValues(int[] values)
public void setValue(long value)
public void setValues(long[] values)
public void setValue(float value)
public void setValues(float[] values)
public void setValue(double value)
public void setValues(double[] values)
public void setValue(boolean value)
public void setValues(boolean[] values)
public void clearValues()
public void clearOptions()
public Object getOptions()
public void setOptions(Object options)
public int getStatus()
public void setStatus(int status)
public String publicName()
public Object getModifier()
public void setModifier(Object modifier)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||