|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uoc.pfc.j2ee.jalonsod.mtp.request.ParameterInstance
public abstract class ParameterInstance
File: ParameterInstance.java
Created: 2012-05-01
Holds one parameter value from the request. The parameterInstance
is related to one
parameter
metadata from configuration.
FormInstance
,
Parameter
Field Summary | |
---|---|
protected Parameter |
parameter
The configuration metadata parameter wich belongs to this parameterInstance. |
static java.lang.Integer |
VALIDATION_DATATYPE_CONVERSION_ERROR
The parameter does not pass datatype conversion validation for the value. |
static java.lang.Integer |
VALIDATION_FUNCTION_ERROR
The parameter value does not pass function validation. |
static java.lang.Integer |
VALIDATION_NOT_VALIDATED
The parameter is not yet validated. |
static java.lang.Integer |
VALIDATION_OK
The parameter is fully validated. |
static java.lang.Integer |
VALIDATION_REQUIRED_VALUE_IS_NULL
The parameter value is null but it's required. |
protected java.lang.Integer |
validationStatus
The validation status of the parameterInstance. |
Constructor Summary | |
---|---|
protected |
ParameterInstance(Parameter parameter)
|
Method Summary | |
---|---|
static ParameterInstance |
createParameterInstance(Parameter parameter)
Factory method to create new ParameterInstance subtypes. |
abstract java.lang.Object |
getDefaultValue()
Returns the default value of the parameterInstance with appropriate datatype. |
Parameter |
getParameter()
|
java.lang.Integer |
getValidationStatus()
|
abstract java.lang.Object |
getValue()
Returns the value of the parameterInstance . |
void |
setParameter(Parameter parameter)
|
abstract void |
setStringValue(java.lang.String value)
Sets the value of the parameterInstance received in a string and converted to
appropriate datatype. |
void |
setValidationStatus(java.lang.Integer validationStatus)
|
abstract void |
setValue(java.lang.Object value)
Sets the value of the parameterInstance . |
void |
setValueAsDefault()
Sets the value of this parameterInstance with the default value defined in
the parameter metadata from configuration. |
abstract java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Integer VALIDATION_NOT_VALIDATED
public static final java.lang.Integer VALIDATION_DATATYPE_CONVERSION_ERROR
public static final java.lang.Integer VALIDATION_REQUIRED_VALUE_IS_NULL
public static final java.lang.Integer VALIDATION_FUNCTION_ERROR
public static final java.lang.Integer VALIDATION_OK
protected Parameter parameter
parameter
wich belongs to this parameterInstance.
protected java.lang.Integer validationStatus
Constructor Detail |
---|
protected ParameterInstance(Parameter parameter)
Method Detail |
---|
public static ParameterInstance createParameterInstance(Parameter parameter)
parameter
- the configuration metadata parameter
associated with this object.
parameterInstance
object of appropriate subtype.public void setValueAsDefault()
parameterInstance
with the default value defined in
the parameter
metadata from configuration.
public Parameter getParameter()
public void setParameter(Parameter parameter)
public java.lang.Integer getValidationStatus()
public void setValidationStatus(java.lang.Integer validationStatus)
public abstract java.lang.Object getValue()
parameterInstance
.
parameterInstance
. The datatype varies according to
parameter
subtype from configuration.public abstract void setValue(java.lang.Object value)
parameterInstance
.
value
- the value of the parameterInstance
. The datatype must be appropiate
according datatype of parameter
metadata from configuration.public abstract void setStringValue(java.lang.String value) throws MTPException
parameterInstance
received in a string and converted to
appropriate datatype.
value
- the string with the value to convert.
MTPException
- throws when the value cannot be converted to appropriate datatype.public abstract java.lang.Object getDefaultValue()
public abstract java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |