public class ParameterImpl extends java.lang.Object implements Parameter
Constructor and Description |
---|
ParameterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addDisplayRule(ParameterDisplayRule rule) |
void |
addEventData(java.lang.String key,
java.lang.Object value) |
void |
addEventParameter(java.lang.String property,
PropertyLocation location) |
void |
addEventParameter(java.lang.String property,
java.lang.String panelKey,
java.lang.String sectionKey) |
void |
addEventParameter(ValueDependent parameter) |
void |
addParameterValueDisplay(java.lang.String key,
ParameterValueDisplay value) |
void |
addPossibleValue(java.lang.Integer value,
java.lang.String description) |
void |
addPossibleValue(java.lang.Integer value,
java.lang.String description,
java.lang.String colour) |
void |
addPossibleValue(java.lang.String value,
java.lang.String description) |
void |
addPossibleValue(java.lang.String value,
java.lang.String description,
java.lang.String colour) |
void |
addValueDependency(java.lang.String property) |
void |
addValueDependency(java.lang.String property,
PropertyLocation location) |
void |
addValueDependency(ValueDependent vd) |
void |
addViewOption(java.lang.String property,
java.lang.Object value) |
boolean |
getAllowEnableDisableCallback()
Returns true/false for allowing enable/disable
callback on success/failure of a rule
|
java.util.Set<CssRule> |
getCssRules()
Get CSS Rules for this parameter
|
int |
getDataType() |
java.lang.Object |
getDefaultValue()
Get the defaultValue
|
java.lang.String |
getDescription()
Description of the parameter
|
java.util.List<ParameterDisplayRule> |
getDisplayRules()
When to display/hide this parameter
|
java.lang.String |
getDynamicKey()
Used if there is a value that can determine whether or not to load parameters, when a list with this key is returned
all of the parameters in a section with a matching key will be removed and replaced with the list passed from the server.
|
java.lang.String |
getEvent()
Dynamic event that will be triggered by this parameter when it's state changes, this works in a similar fashion to valueDependencies except in reverse.
|
java.util.Map<java.lang.String,java.lang.Object> |
getEventData()
Any other data you want to be triggered with an event, this will be being used by the associated valueLoader after the
event has been triggered
|
java.util.List<ValueDependent> |
getEventParameters()
A list of parameter values that should be added when this Parameters event is triggered, uses ValueDependent so that we can locate values that are in
differing sections.
|
java.lang.String |
getHelpText()
If any help text is needed, define it here.
|
InputType |
getInputType()
Used for most basic input types, a user interface will be created relating to the input type
|
ListOptions |
getListOptions()
Options that will be used if this parameter is a list.
|
int |
getMaxAllowed()
max value
|
int |
getMinAllowed()
min value
|
java.lang.String |
getName()
Name of the parameter
|
java.util.Map<java.lang.String,ParameterValidation> |
getObjectValidationRules()
A set of a validation rules for objects of a parameter
|
java.lang.String |
getParameterClassName() |
java.util.Map<java.lang.String,ParameterValueDisplay> |
getParameterValueDisplays() |
java.util.List<com.hof.mi.models.report.CustomValue<?>> |
getPossibleValues()
Possible values that could be in the list, should be used for radio lists/checkbox lists and selects
|
java.lang.String |
getProperty()
Property to save the value too.
|
java.lang.String |
getSpecialInputType()
Used when a very specific input type is required that won't be very reusable for other things
|
ParameterValidation |
getValidationRules()
A set of validation rules for a parameter
|
java.util.List<ValueDependent> |
getValueDependencies()
Used if the Parameter we are setting up is dependent on something else
For Example If option 1 is select a datasource and option 2 is select a view
the views will be dependent on the datasource.
|
java.util.Map<java.lang.String,java.lang.Object> |
getViewOptions()
Options for views.
|
boolean |
isList()
Will this parameter generate a list of the defined parameter type
E.g Do you want a list of textboxes that can be added to forever
|
boolean |
isReadOnly()
Should the user be able to edit this, or will it just be for display
|
void |
setAllowEnableDisableCallback(boolean allowEnableDisableCallback) |
void |
setCssRules(java.util.Set<CssRule> cssRules)
Set the CSS Rules for this parameter
|
void |
setDataType(int dataType) |
void |
setDefaultValue(java.lang.Object defaultValue) |
void |
setDescription(java.lang.String description) |
void |
setDisplayRules(java.util.List<ParameterDisplayRule> displayRules) |
void |
setDynamicKey(java.lang.String dynamicKey)
Method to set the dynamicKey
|
void |
setEvent(java.lang.String event) |
void |
setEventData(java.util.Map<java.lang.String,java.lang.Object> eventData) |
void |
setEventParameters(java.util.List<ValueDependent> eventParameters) |
void |
setHelpText(java.lang.String helpText) |
void |
setInputType(InputType inputType) |
void |
setList(boolean list) |
void |
setListOptions(ListOptions listOptions) |
void |
setMaxAllowed(int maxAllowed) |
void |
setMinAllowed(int minAllowed) |
void |
setName(java.lang.String name) |
void |
setObjectValidationRules(java.util.Map<java.lang.String,ParameterValidation> objectValidationRules) |
void |
setParameterClassName(java.lang.String parameterClassName) |
void |
setPossibleValues(java.util.List<com.hof.mi.models.report.CustomValue<?>> possibleValues) |
void |
setProperty(java.lang.String property) |
void |
setReadOnly(boolean readOnly) |
void |
setSpecialInputType(java.lang.String specialInputType) |
void |
setValidationRules(ParameterValidation validationRules) |
void |
setValueDependencies(java.util.List<ValueDependent> valueDependencies) |
void |
setViewOptions(java.util.Map<java.lang.String,java.lang.Object> viewOptions) |
public void setPossibleValues(java.util.List<com.hof.mi.models.report.CustomValue<?>> possibleValues)
public InputType getInputType()
Parameter
getInputType
in interface Parameter
public java.lang.String getName()
Parameter
public java.lang.String getDescription()
Parameter
getDescription
in interface Parameter
public java.lang.String getProperty()
Parameter
getProperty
in interface Parameter
public java.lang.Object getDefaultValue()
Parameter
getDefaultValue
in interface Parameter
public int getDataType()
public java.lang.String getHelpText()
Parameter
getHelpText
in interface Parameter
public boolean isReadOnly()
Parameter
isReadOnly
in interface Parameter
public int getMinAllowed()
Parameter
getMinAllowed
in interface Parameter
public int getMaxAllowed()
Parameter
getMaxAllowed
in interface Parameter
public java.util.Map<java.lang.String,java.lang.Object> getViewOptions()
Parameter
getViewOptions
in interface Parameter
public java.util.List<ParameterDisplayRule> getDisplayRules()
Parameter
getDisplayRules
in interface Parameter
public void setInputType(InputType inputType)
public void setName(java.lang.String name)
public void setDescription(java.lang.String description)
public void setProperty(java.lang.String property)
public void setDefaultValue(java.lang.Object defaultValue)
public void setDataType(int dataType)
public void setHelpText(java.lang.String helpText)
public void setReadOnly(boolean readOnly)
public void setMinAllowed(int minAllowed)
public void setMaxAllowed(int maxAllowed)
public void addViewOption(java.lang.String property, java.lang.Object value)
public void setViewOptions(java.util.Map<java.lang.String,java.lang.Object> viewOptions)
public void setDisplayRules(java.util.List<ParameterDisplayRule> displayRules)
public void addDisplayRule(ParameterDisplayRule rule)
public java.util.List<com.hof.mi.models.report.CustomValue<?>> getPossibleValues()
Parameter
getPossibleValues
in interface Parameter
public void addPossibleValue(java.lang.String value, java.lang.String description)
addPossibleValue
in interface Parameter
public void addPossibleValue(java.lang.Integer value, java.lang.String description)
addPossibleValue
in interface Parameter
public void addPossibleValue(java.lang.String value, java.lang.String description, java.lang.String colour)
public void addPossibleValue(java.lang.Integer value, java.lang.String description, java.lang.String colour)
public java.lang.String getSpecialInputType()
Parameter
getSpecialInputType
in interface Parameter
public void setSpecialInputType(java.lang.String specialInputType)
public java.lang.String getParameterClassName()
getParameterClassName
in interface Parameter
public void setParameterClassName(java.lang.String parameterClassName)
public java.util.Set<CssRule> getCssRules()
getCssRules
in interface Parameter
public void setCssRules(java.util.Set<CssRule> cssRules)
public void addParameterValueDisplay(java.lang.String key, ParameterValueDisplay value)
public java.util.Map<java.lang.String,ParameterValueDisplay> getParameterValueDisplays()
getParameterValueDisplays
in interface Parameter
public void setAllowEnableDisableCallback(boolean allowEnableDisableCallback)
public boolean getAllowEnableDisableCallback()
Parameter
getAllowEnableDisableCallback
in interface Parameter
public void setList(boolean list)
public boolean isList()
Parameter
public ListOptions getListOptions()
Parameter
getListOptions
in interface Parameter
public void setListOptions(ListOptions listOptions)
public ParameterValidation getValidationRules()
Parameter
getValidationRules
in interface Parameter
public void setValidationRules(ParameterValidation validationRules)
public java.util.Map<java.lang.String,ParameterValidation> getObjectValidationRules()
Parameter
getObjectValidationRules
in interface Parameter
public void setObjectValidationRules(java.util.Map<java.lang.String,ParameterValidation> objectValidationRules)
public java.util.List<ValueDependent> getValueDependencies()
Parameter
getValueDependencies
in interface Parameter
public void setValueDependencies(java.util.List<ValueDependent> valueDependencies)
public void addValueDependency(java.lang.String property)
public void addValueDependency(java.lang.String property, PropertyLocation location)
public void addValueDependency(ValueDependent vd)
public java.lang.String getDynamicKey()
Parameter
getDynamicKey
in interface Parameter
public void setDynamicKey(java.lang.String dynamicKey)
Parameter
setDynamicKey
in interface Parameter
public java.lang.String getEvent()
Parameter
public void setEvent(java.lang.String event)
public java.util.List<ValueDependent> getEventParameters()
Parameter
getEventParameters
in interface Parameter
public void setEventParameters(java.util.List<ValueDependent> eventParameters)
public void addEventParameter(java.lang.String property, java.lang.String panelKey, java.lang.String sectionKey)
public void addEventParameter(java.lang.String property, PropertyLocation location)
public void addEventParameter(ValueDependent parameter)
public java.util.Map<java.lang.String,java.lang.Object> getEventData()
Parameter
getEventData
in interface Parameter
public void setEventData(java.util.Map<java.lang.String,java.lang.Object> eventData)
public void addEventData(java.lang.String key, java.lang.Object value)