|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- generic type of the parameterpublic interface IParameter<T>
This class will define a Parameter.
It will hold information relative to the Parameter value, ID key and validation constraints.
Method Summary | |
---|---|
IParameter<T> |
clone()
Creates a new instance of the current object |
void |
forceInitialize(boolean allowAnonymous,
Map<String,IParameterConstraint> constraints,
T defaultValue,
String formLinked,
String id,
ParameterScope parameterScope,
String parentID,
Entity parentType,
boolean persistToRepository,
boolean readonly,
boolean referencedInARuleFromAnotherParameter,
boolean required,
boolean formConfigurable,
List<IParameterRule<T>> rules,
Map<String,IParameterValidator> validators,
T value)
Parameter Initializer. |
Map<String,IParameterConstraint> |
getConstraints()
|
String |
getFormLinked()
|
String |
getId()
|
ParameterScope |
getParameterScope()
|
String |
getParentID()
|
Entity |
getParentType()
|
List<IParameterRule<T>> |
getRules()
Inspector for the 'rules' attribute. |
List<String> |
getSupportedClasses()
|
Map<String,IParameterValidator> |
getValidators()
|
T |
getValue(IDIFContext context)
Returns the parameter value. |
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 |
void |
initialize(String id,
Entity parentType,
String parentID,
boolean formConfigurable,
boolean persistToRepository,
boolean allowAnonymousAccess,
ParameterScope parameterScope,
String defaultValue,
String constraintDefinition,
Map<String,IParameterValidator> validators,
List<IParameterRule<T>> rules)
Parameter Initializer. |
boolean |
isAllowAnonymous()
|
boolean |
isFormConfigurable()
Inspector for the 'formConfigurable' attribute. |
boolean |
isNumeric()
|
boolean |
isPersistToRepository()
|
boolean |
isReadonly()
|
boolean |
isReferencedInARuleFromAnotherParameter()
Inspector for the 'referencedInARuleFromAnotherParameter' attribute. |
boolean |
isRequired()
|
boolean |
isStringSetterSupported()
|
ParameterErrorList |
refreshParameterValue(IStageInstance stageInstance)
Updates the value of the parameter from the relevant sources. |
ParameterErrorList |
setDefaultValue(IStageInstance stageInstance)
Sets the value of the parameter to its default and runs all constraints and validations |
ParameterErrorList |
setDefaultValue(IStageInstance stageInstance,
boolean initializationInProgress)
Sets the value of the parameter to its default and runs all constraints and validations |
void |
setFormConfigurable(boolean formConfigurable)
Modifier for the 'formConfigurable' attribute. |
void |
setFormLinked(String formLinked)
|
void |
setReferencedInARuleFromAnotherParameter(boolean referencedInARuleFromAnotherParameter)
Modifier for the 'referencedInARuleFromAnotherParameter' attribute. |
ParameterErrorList |
setValue(T value,
IStageInstance stageInstance)
Sets the value of the parameter and runs all constraints and validations |
ParameterErrorList |
setValue(T value,
IStageInstance stageInstance,
boolean initializationInProgress)
Sets the value of the parameter and runs all constraints and validations |
ParameterErrorList |
setValueFromString(String value,
IStageInstance stageInstance)
Sets the value of the parameter converting if from a string representation 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 |
Method Detail |
---|
IParameter<T> clone() throws CloneNotSupportedException
IParameter
clone
CloneNotSupportedException
void forceInitialize(boolean allowAnonymous, Map<String,IParameterConstraint> constraints, T defaultValue, String formLinked, String id, ParameterScope parameterScope, String parentID, Entity parentType, boolean persistToRepository, boolean readonly, boolean referencedInARuleFromAnotherParameter, boolean required, boolean formConfigurable, List<IParameterRule<T>> rules, Map<String,IParameterValidator> validators, T value)
id
- the parameter idparentType
- the parent entity typeparentID
- the id of the parent entitypersistToRepository
- if the parameter value should be persisted to the repositoryallowAnonymous
- if a USER scoped parameter should allow anonymous accessparameterScope
- the scope of the parameterdefaultValue
- the parameter default valueconstraints
- the string that defines the constraints to applyformLinked
- the form name of null if not setreadonly
- referencedInARuleFromAnotherParameter
- the new referencedInARuleFromAnotherParameter value to setrequired
- formConfigurable
- T if the form is configurablevalidators
- a validator list to validate the parameter valuesrules
- the parameter rulesvalue
- Map<String,IParameterConstraint> getConstraints()
String getFormLinked()
String getId()
ParameterScope getParameterScope()
String getParentID()
Entity getParentType()
List<IParameterRule<T>> getRules()
List<String> getSupportedClasses()
Map<String,IParameterValidator> getValidators()
T getValue(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if the parameter could not be readBigDecimal getValueAsBigDecimal(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursboolean getValueAsBoolean(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readDate getValueAsDate(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursDocumentRepositoryEntry getValueAsDocument(IDIFContext context) throws ParameterException
ParameterException
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readDouble getValueAsDouble(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursLong getValueAsLong(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if a conversion error occursString getValueAsString(IDIFContext context) throws ParameterException
context
- the DIF context to read if needed
ParameterException
- if the parameter value cannot be readvoid initialize(String id, Entity parentType, String parentID, boolean formConfigurable, boolean persistToRepository, boolean allowAnonymousAccess, ParameterScope parameterScope, String defaultValue, String constraintDefinition, Map<String,IParameterValidator> validators, List<IParameterRule<T>> rules) throws ParameterException
id
- the parameter idparentType
- the parent entity typeparentID
- the id of the parent entityformConfigurable
- if the parameter can be configured for a given formpersistToRepository
- if the parameter value should be persisted to the repositoryallowAnonymousAccess
- if a USER scoped parameter should allow anonymous accessparameterScope
- the scope of the parameterdefaultValue
- the parameter default valueconstraintDefinition
- the string that defines the constraints to applyvalidators
- a validator list to validate the parameter valuesrules
- the parameter rules
ParameterException
- if the default value can't be converted to the inner parameter typeboolean isAllowAnonymous()
boolean isFormConfigurable()
boolean isNumeric()
boolean isPersistToRepository()
boolean isReadonly()
boolean isReferencedInARuleFromAnotherParameter()
boolean isRequired()
boolean isStringSetterSupported()
ParameterErrorList refreshParameterValue(IStageInstance stageInstance)
stageInstance
- the DIF stage to read if needed
ParameterErrorList setDefaultValue(IStageInstance stageInstance)
stageInstance
- the requested stage
ParameterErrorList setDefaultValue(IStageInstance stageInstance, boolean initializationInProgress)
stageInstance
- the requested stageinitializationInProgress
- T if called within the dif parameter initialization
void setFormConfigurable(boolean formConfigurable)
formConfigurable
- the new formConfigurable value to setvoid setFormLinked(String formLinked)
formLinked
- void setReferencedInARuleFromAnotherParameter(boolean referencedInARuleFromAnotherParameter)
referencedInARuleFromAnotherParameter
- the new referencedInARuleFromAnotherParameter value to setParameterErrorList setValue(T value, IStageInstance stageInstance)
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.
ParameterErrorList setValue(T value, IStageInstance stageInstance, boolean initializationInProgress)
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
ParameterErrorList setValueFromString(String value, IStageInstance stageInstance)
value
- the value to setstageInstance
- the DIF stage to read if needed.
ParameterErrorList setValueFromString(String value, IStageInstance stageInstance, boolean initializationInProgress)
value
- the value to setstageInstance
- the DIF stage to read if needed.initializationInProgress
- T if called within the dif parameter initialization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |