public class ParameterInfo extends Object implements Cloneable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ParameterInfo.DataType
Enumeration of supported data types.
|
Constructor and Description |
---|
ParameterInfo(ParameterInfo source)
Constructs a new instance with the same information as the
specified object.
|
ParameterInfo(String name,
ParameterInfo.DataType type)
Constructs a new instance.
|
ParameterInfo(String name,
ParameterInfo.DataType type,
boolean legacy)
Constructs a new instance.
|
ParameterInfo(String name,
ParameterInfo.DataType type,
Object value,
boolean readOnly)
Constructs a new instance.
|
ParameterInfo(String name,
ParameterInfo.DataType type,
Object value,
boolean readOnly,
boolean legacy)
Constructs a new instance using the specified attributes.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone this object.
|
boolean |
equals(Object obj)
Compare the given object to this object for equality.
|
ParameterInfo.DataType |
getDataType()
The data type of this parameter.
|
String |
getName()
The name of this parameter.
|
Object |
getValue()
The value of this parameter.
|
boolean |
isLegacy()
Checks if this parameter is legacy or not.
|
boolean |
isReadOnly()
Checks if this parameter is read-only or not.
|
void |
setLegacy(boolean legacy)
Sets the legacy attribute of this parameter.
|
void |
setReadOnly(boolean readOnly)
Sets the read-only attribute of this parameter.
|
void |
setValue(Object value)
Sets the value of this parameter.
|
public ParameterInfo(ParameterInfo source)
source
- the object whose attribtes are to be copied.NullPointerException
- if the specified object is null
.public ParameterInfo(String name, ParameterInfo.DataType type)
null
and the
read-only and legacy attributes will be set to false
.name
- the name of the parameter.type
- the data type as one of the supported enum.public ParameterInfo(String name, ParameterInfo.DataType type, boolean legacy)
null
and the
legacy attribute will be set to false
.name
- the name of the parameter.type
- the data type as one of the supported enum.legacy
- indicates whether the parameter is legacy or not.public ParameterInfo(String name, ParameterInfo.DataType type, Object value, boolean readOnly)
name
- the name of the parameter.type
- the data type as one of the supported enum.value
- the (default) value for the parameter.readOnly
- indicates whether the parameter is read-only or not.public ParameterInfo(String name, ParameterInfo.DataType type, Object value, boolean readOnly, boolean legacy)
name
- the name of the parameter.type
- the data type as one of the supported enum.value
- the (default) value for the parameter.readOnly
- indicates whether the parameter is read-only or not.legacy
- indicates whether the parameter is legacy or not.public String getName()
public ParameterInfo.DataType getDataType()
public Object getValue()
DataType
or by
using instanceof
.public void setValue(Object value)
value
- the value to be set. This can be null
.public boolean isReadOnly()
If read-only, subsequent objects (such as job request) cannot change the value. Typically a read-only parameter will have a default value that cannot be changed by subsequent objects.
Note that the value can be changed in the object itself where this parameter is defined. For example if this parameter is defined in a JobType as read only parameter, its value can be changed in the JobType definition itself, but a derived JobDefinition or a Job request cannot override the value.
true
if this parameter is declared as read-only,
false
otherwise.public void setReadOnly(boolean readOnly)
readOnly
- true
to mark this parameter as read-only.public boolean isLegacy()
true
if this parameter is legacy, false
otherwise.public void setLegacy(boolean legacy)
legacy
- true
to mark this parameter as legacy.