public class IlvRequestParameter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IlvRequestParameter.Comparator
User can specify how to compare the parameter value by setting specific operation if
user set compared to
true . |
Constructor and Description |
---|
IlvRequestParameter(String name)
The constructor with parameter name.
|
IlvRequestParameter(String name,
boolean required)
The constructor that the default parameter value is "" and
the parameter value do not need compare with default value.
|
IlvRequestParameter(String name,
boolean required,
String value)
The constructor that the parameter value do not need compare with default value.
|
IlvRequestParameter(String name,
boolean required,
String value,
boolean compared)
The constructor.
|
IlvRequestParameter(String name,
boolean required,
String value,
boolean compared,
IlvRequestParameter.Comparator operation)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
IlvRequestParameter.Comparator |
getComparator()
Return the comparison operation needed for parameter validation.
|
String |
getName()
Retrieve the parameter name.
|
String |
getValue()
Retrieve the default parameter value.
|
boolean |
isCompared()
Whether the parameter value should be compared with default value,the
default value is
false . |
boolean |
isRequired()
Whether the parameter is required for the specific request,
The default is
false . |
void |
setComparator(IlvRequestParameter.Comparator comparator)
Set the comparison operation needed for parameter validation.
|
void |
setCompared(boolean compared)
Set whether the parameter value should be compared with default value
for the specific request.
|
void |
setName(String name)
Set the paramter name.
|
void |
setRequired(boolean required)
Set the parameter is required or not for the specific request
|
void |
setValue(String value)
Set the default parameter value.
|
public IlvRequestParameter(String name)
name
- The parameter name.public IlvRequestParameter(String name, boolean required)
name
- required
- public IlvRequestParameter(String name, boolean required, String value)
name
- The parameter name.required
- Whether the parameter is required, the default value is false
.value
- The default parameter value.public IlvRequestParameter(String name, boolean required, String value, boolean compared)
name
- The parameter name.required
- Whether the parameter is required, the default value is false
.value
- The default parameter value.compared
- Whether the parameter value should be compared with default value.public IlvRequestParameter(String name, boolean required, String value, boolean compared, IlvRequestParameter.Comparator operation)
name
- The parameter name.required
- Whether the parameter is required, the default value is false
.value
- The default parameter value.compared
- Whether the parameter value should be compared with default value.operation
- The comparator operation.public String getName()
public void setName(String name)
name
- parameter name.public String getValue()
public void setValue(String value)
value
- the default parameter value.public boolean isRequired()
false
.true
if the parameter is required for the specific request,
or else false
.public void setRequired(boolean required)
required
- Whether the parameter is required.public boolean isCompared()
false
.true
if the parameter should be compared with default value,
or else false
.public void setCompared(boolean compared)
compared
- The flag of compare.public IlvRequestParameter.Comparator getComparator()
public void setComparator(IlvRequestParameter.Comparator comparator)
comparator
- The Comparator
object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.