|
||||||||||
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<DocumentRepositoryEntry> pt.digitalis.dif.dem.objects.parameters.types.DocumentParameter
public class DocumentParameter
/** This class will define a numeric Parameter.
It will hold information relative to the Parameter value, ID key and validation constraints.
Constructor Summary | |
---|---|
DocumentParameter()
|
Method Summary | |
---|---|
List<String> |
getSupportedClasses()
|
BigDecimal |
getValueAsBigDecimal(IDIFContext context)
|
boolean |
getValueAsBoolean(IDIFContext context)
|
Date |
getValueAsDate(IDIFContext context)
|
DocumentRepositoryEntry |
getValueAsDocument(IDIFContext context)
Returns the parameter value as a Document Note: Only Document types parameters will correctly respond to this method. |
Double |
getValueAsDouble(IDIFContext context)
|
Long |
getValueAsLong(IDIFContext context)
|
String |
getValueAsString(IDIFContext context)
Returns the parameter value as a String |
boolean |
isNumeric()
|
boolean |
isStringSetterSupported()
|
ParameterErrorList |
refreshParameterValue(IStageInstance stageInstance)
Updates the value of the parameter from the relevant sources. |
ParameterErrorList |
setValue(DocumentRepositoryEntry value,
IStageInstance stageInstance,
boolean initializationInProgress)
Sets the value of the parameter and runs all constraints and validations |
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, automaticConstraints, clone, convertObjectToString, forceInitialize, getConstraints, getFormLinked, getId, getLanguage, getMessages, getParameterScope, getParentID, getParentType, getRules, getValidators, getValue, hasFormBeenSubmited, hasValue, initialize, isAllowAnonymous, isFirstInitialization, isFormConfigurable, isPersistToRepository, isReadonly, isReferencedInARuleFromAnotherParameter, isRequired, logWarning, setDefaultValue, setDefaultValue, setFirstInitialization, setFormConfigurable, setFormLinked, setReferencedInARuleFromAnotherParameter, setRequired, setValue, setValueFromString, toString, validateParameterValue |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DocumentParameter()
Method Detail |
---|
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) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readIParameter.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 DocumentRepositoryEntry getValueAsDocument(IDIFContext context) throws ParameterException
IParameter
ParameterException
getValueAsDocument
in interface IParameter<DocumentRepositoryEntry>
getValueAsDocument
in class AbstractParameter<DocumentRepositoryEntry>
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readAbstractParameter.getValueAsDocument(pt.digitalis.dif.controller.interfaces.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<DocumentRepositoryEntry>
getValueAsString
in class AbstractParameter<DocumentRepositoryEntry>
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readAbstractParameter.getValueAsString(pt.digitalis.dif.controller.interfaces.IDIFContext)
public boolean isNumeric()
IParameter.isNumeric()
public boolean isStringSetterSupported()
isStringSetterSupported
in interface IParameter<DocumentRepositoryEntry>
isStringSetterSupported
in class AbstractParameter<DocumentRepositoryEntry>
AbstractParameter.isStringSetterSupported()
public ParameterErrorList refreshParameterValue(IStageInstance stageInstance)
IParameter
refreshParameterValue
in interface IParameter<DocumentRepositoryEntry>
refreshParameterValue
in class AbstractParameter<DocumentRepositoryEntry>
stageInstance
- the DIF stage to read if needed
AbstractParameter.refreshParameterValue(pt.digitalis.dif.dem.interfaces.IStageInstance)
public ParameterErrorList setValue(DocumentRepositoryEntry value, IStageInstance stageInstance, boolean initializationInProgress)
AbstractParameter
setValue
in interface IParameter<DocumentRepositoryEntry>
setValue
in class AbstractParameter<DocumentRepositoryEntry>
value
- the value to setstageInstance
- the DIF stage to read if needed. WARNING: If null is interpreted like an initialization and no scope
repositories will be accessed/updated.initializationInProgress
- T if called within the dif parameter initialization
AbstractParameter.setValue(java.lang.Object,
pt.digitalis.dif.dem.interfaces.IStageInstance, boolean)
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 |