pt.digitalis.dif.dem.objects.parameters.types
Class StringParameter
java.lang.Object
pt.digitalis.dif.dem.objects.parameters.types.AbstractParameter<String>
pt.digitalis.dif.dem.objects.parameters.types.StringParameter
- All Implemented Interfaces:
- Cloneable, IEditableParameter, IParameter<String>
public class StringParameter
- extends AbstractParameter<String>
/** This class will define a numeric Parameter.
It will hold information relative to the Parameter value, ID key and validation constraints.
- Author:
- Pedro Viegas pviegas@digitalis.pt, Rodrigo Gon�alves rgoncalves@digitalis.pt
- Created on:
- Nov 23, 2007
Methods inherited from class pt.digitalis.dif.dem.objects.parameters.types.AbstractParameter |
addRule, automaticConstraints, clone, convertObjectToString, forceInitialize, getConstraints, getFormLinked, getId, getLanguage, getMessages, getParameterScope, getParentID, getParentType, getRules, getValidators, getValue, getValueAsDocument, getValueAsString, 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 |
StringParameter
public StringParameter()
getSupportedClasses
public List<String> getSupportedClasses()
- Returns:
- the list of supported class types for the parameter value
- See Also:
IParameter.getSupportedClasses()
getValueAsBigDecimal
public BigDecimal getValueAsBigDecimal(IDIFContext context)
throws ParameterException
- Parameters:
context
- the DIF context to read if needed
- Returns:
- the value of the parameter as a Double
- Throws:
ParameterException
- if a conversion error occurs- See Also:
IParameter.getValueAsBigDecimal(pt.digitalis.dif.controller.interfaces.IDIFContext)
getValueAsBoolean
public boolean getValueAsBoolean(IDIFContext context)
throws ParameterException
- Parameters:
context
- the DIF context to read if needed
- Returns:
- the value of the parameter as a boolean
- Throws:
ParameterException
- if the parameter value cannot be read- See Also:
IParameter.getValueAsBoolean(IDIFContext)
getValueAsDate
public Date getValueAsDate(IDIFContext context)
throws ParameterException
- Parameters:
context
- the DIF context to read if needed
- Returns:
- the value of the parameter as a Date
- Throws:
ParameterException
- if a conversion error occurs- See Also:
IParameter.getValueAsDate(IDIFContext)
getValueAsDouble
public Double getValueAsDouble(IDIFContext context)
throws ParameterException
- Parameters:
context
- the DIF context to read if needed
- Returns:
- the value of the parameter as a Double
- Throws:
ParameterException
- if a conversion error occurs- See Also:
IParameter.getValueAsDouble(IDIFContext)
getValueAsLong
public Long getValueAsLong(IDIFContext context)
throws ParameterException
- Parameters:
context
- the DIF context to read if needed
- Returns:
- the value of the parameter as an Long
- Throws:
ParameterException
- if a conversion error occurs- See Also:
IParameter.getValueAsLong(IDIFContext)
isNumeric
public boolean isNumeric()
- Returns:
- T if the current parameter is of a numeric type
- See Also:
IParameter.isNumeric()
setValueFromString
public ParameterErrorList setValueFromString(String value,
IStageInstance stageInstance,
boolean initializationInProgress)
- Description copied from interface:
IParameter
- Sets the value of the parameter converting if from a string representation and runs all constraints and
validations
- Parameters:
value
- the value to setstageInstance
- the DIF stage to read if needed.initializationInProgress
- T if called within the dif parameter initialization
- Returns:
- return the error messages if the validation fails
- See Also:
IParameter.setValueFromString(java.lang.String,
pt.digitalis.dif.dem.interfaces.IStageInstance, boolean)
Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.