pt.digitalis.dif.dem.objects.parameters.rules
Interface IParameterRule<T>

Type Parameters:
T - generic type of the parameter
All Known Implementing Classes:
AbstractParameterRule, ParameterRuleDependent, ParameterRuleExclusive

public interface IParameterRule<T>

A parameter rule object

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Mar 31, 2009

Method Summary
 ParameterRuleAction getAction()
          Inspector for the 'action' attribute.
 String getDescriptionEndValue()
          Inspector for the 'descriptionEndValue' attribute.
 String getDescriptionStartValue()
          Inspector for the 'descriptionStartValue' attribute.
 String getDescriptionValue()
          Inspector for the 'descriptionValue' attribute.
 String getEndValue()
          Inspector for the 'endValue' attribute.
 List<String> getParameters()
          Inspector for the 'parameters' attribute.
 String getStartValue()
          Inspector for the 'startValue' attribute.
 ParameterRuleResult getValidationResult(IStageInstance stage, T value, boolean initializationInProgress, AbstractParameter<T> parameter)
          Gets the validation result for the present parameter
 String getValue()
          Inspector for the 'value' attribute.
 AbstractParameterRule<T> init(String parameterID, String parameters, ParameterRuleAction action, String value, String first, String last)
          Initializer
 void setDescriptionEndValue(String descriptionEndValue)
          Modifier for the 'descriptionEndValue' attribute.
 void setDescriptionStartValue(String descriptionStartValue)
          Modifier for the 'descriptionStartValue' attribute.
 void setDescriptionValue(String descriptionValue)
          Modifier for the 'descriptionValue' attribute.
 AbstractParameterRule<T> setEndValue(String endValue)
          Modifier for the 'endValue' attribute.
 AbstractParameterRule<T> setStartValue(String startValue)
          Modifier for the 'startValue' attribute.
 AbstractParameterRule<T> setValue(String value)
          Modifier for the 'value' attribute.
 

Method Detail

getAction

ParameterRuleAction getAction()
Inspector for the 'action' attribute.

Returns:
the action value

getDescriptionEndValue

String getDescriptionEndValue()
Inspector for the 'descriptionEndValue' attribute.

Returns:
the descriptionEndValue value

getDescriptionStartValue

String getDescriptionStartValue()
Inspector for the 'descriptionStartValue' attribute.

Returns:
the descriptionStartValue value

getDescriptionValue

String getDescriptionValue()
Inspector for the 'descriptionValue' attribute.

Returns:
the descriptionValue value

getEndValue

String getEndValue()
Inspector for the 'endValue' attribute.

Returns:
the endValue value

getParameters

List<String> getParameters()
Inspector for the 'parameters' attribute.

Returns:
the parameters value

getStartValue

String getStartValue()
Inspector for the 'startValue' attribute.

Returns:
the startValue value

getValidationResult

ParameterRuleResult getValidationResult(IStageInstance stage,
                                        T value,
                                        boolean initializationInProgress,
                                        AbstractParameter<T> parameter)
                                        throws ParameterException
Gets the validation result for the present parameter

Parameters:
stage - the current stage
value - the value to validate
initializationInProgress - T if called within the dif parameter initialization
parameter - the parameter for validation
Returns:
the validation rule validation result
Throws:
ParameterException - if the parameter does not exist

getValue

String getValue()
Inspector for the 'value' attribute.

Returns:
the value value

init

AbstractParameterRule<T> init(String parameterID,
                              String parameters,
                              ParameterRuleAction action,
                              String value,
                              String first,
                              String last)
Initializer

Parameters:
parameterID - the rule parameter ID
parameters - the list of parameters relevant for the given rule (besides the current parameter)
action - the action to perform according to the rule activation (valid or invalid)
value - the value for comparison
first - the first value for interval comparison
last - the last value for interval comparison
Returns:
the initialized object

setDescriptionEndValue

void setDescriptionEndValue(String descriptionEndValue)
Modifier for the 'descriptionEndValue' attribute.

Parameters:
descriptionEndValue - the new descriptionEndValue value to set

setDescriptionStartValue

void setDescriptionStartValue(String descriptionStartValue)
Modifier for the 'descriptionStartValue' attribute.

Parameters:
descriptionStartValue - the new descriptionStartValue value to set

setDescriptionValue

void setDescriptionValue(String descriptionValue)
Modifier for the 'descriptionValue' attribute.

Parameters:
descriptionValue - the new descriptionValue value to set

setEndValue

AbstractParameterRule<T> setEndValue(String endValue)
Modifier for the 'endValue' attribute.

Parameters:
endValue - the new endValue value to set
Returns:
the updated parameter rule instance

setStartValue

AbstractParameterRule<T> setStartValue(String startValue)
Modifier for the 'startValue' attribute.

Parameters:
startValue - the new startValue value to set
Returns:
the updated parameter rule instance

setValue

AbstractParameterRule<T> setValue(String value)
Modifier for the 'value' attribute.

Parameters:
value - the new value value to set
Returns:
the updated parameter rule instance


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.