|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.dem.objects.parameters.types.AbstractParameter<Date> pt.digitalis.dif.dem.objects.parameters.types.DateParameter
public class DateParameter
/** This class will define a numeric Parameter.
It will hold information relative to the Parameter value, ID key and validation constraints.
Constructor Summary | |
---|---|
DateParameter()
|
Method Summary | |
---|---|
protected String |
automaticConstraints()
To override in each parameter type class as needed |
protected String |
convertObjectToString(Object obj)
Converts an object to strong format, according to any rules necessary in conversion of the given parameter type |
List<String> |
getSupportedClasses()
|
BigDecimal |
getValueAsBigDecimal(IDIFContext context)
|
boolean |
getValueAsBoolean(IDIFContext context)
|
Date |
getValueAsDate(IDIFContext context)
|
Double |
getValueAsDouble(IDIFContext context)
|
Long |
getValueAsLong(IDIFContext context)
|
String |
getValueAsString(IDIFContext context)
Returns the parameter value as a String |
boolean |
isNumeric()
|
ParameterErrorList |
setValueFromString(String value,
IStageInstance stageInstance,
boolean initializationInProgress)
Sets the value of the parameter converting if from a string representation and runs all constraints and validations |
Methods inherited from class pt.digitalis.dif.dem.objects.parameters.types.AbstractParameter |
---|
addRule, clone, forceInitialize, getConstraints, getFormLinked, getId, getLanguage, getMessages, getParameterScope, getParentID, getParentType, getRules, getValidators, getValue, getValueAsDocument, hasFormBeenSubmited, hasValue, initialize, isAllowAnonymous, isFirstInitialization, isFormConfigurable, isPersistToRepository, isReadonly, isReferencedInARuleFromAnotherParameter, isRequired, isStringSetterSupported, logWarning, refreshParameterValue, setDefaultValue, setDefaultValue, setFirstInitialization, setFormConfigurable, setFormLinked, setReferencedInARuleFromAnotherParameter, setRequired, setValue, setValue, setValueFromString, toString, validateParameterValue |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DateParameter()
Method Detail |
---|
protected String automaticConstraints()
AbstractParameter
automaticConstraints
in class AbstractParameter<Date>
AbstractParameter.automaticConstraints()
protected String convertObjectToString(Object obj)
AbstractParameter
convertObjectToString
in class AbstractParameter<Date>
obj
- the object to convert
AbstractParameter.convertObjectToString(java.lang.Object)
public List<String> getSupportedClasses()
IParameter.getSupportedClasses()
public BigDecimal getValueAsBigDecimal(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursIParameter.getValueAsBigDecimal(pt.digitalis.dif.controller.interfaces.IDIFContext)
public boolean getValueAsBoolean(IDIFContext context)
context
- the DIF context to read if needed
IParameter.getValueAsBoolean(IDIFContext)
public Date getValueAsDate(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursIParameter.getValueAsDate(IDIFContext)
public Double getValueAsDouble(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursIParameter.getValueAsDouble(IDIFContext)
public Long getValueAsLong(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursIParameter.getValueAsLong(IDIFContext)
public String getValueAsString(IDIFContext context) throws ParameterException
IParameter
getValueAsString
in interface IParameter<Date>
getValueAsString
in class AbstractParameter<Date>
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readAbstractParameter.getValueAsString(IDIFContext)
public boolean isNumeric()
IParameter.isNumeric()
public ParameterErrorList setValueFromString(String value, IStageInstance stageInstance, boolean initializationInProgress)
IParameter
value
- the value to setstageInstance
- the DIF stage to read if needed.initializationInProgress
- T if called within the dif parameter initialization
IParameter.setValueFromString(java.lang.String,
pt.digitalis.dif.dem.interfaces.IStageInstance, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |