pt.digitalis.dif.dem.objects.parameters.constraints.impl.numeric
Class AbstractNumericParameterConstraint

java.lang.Object
  extended by pt.digitalis.dif.dem.objects.parameters.constraints.AbstractParameterConstraint
      extended by pt.digitalis.dif.dem.objects.parameters.constraints.impl.numeric.AbstractNumericParameterConstraint
All Implemented Interfaces:
IParameterConstraint
Direct Known Subclasses:
ParameterConstraintMaxImpl, ParameterConstraintMinImpl, ParameterConstraintNumericImpl

public abstract class AbstractNumericParameterConstraint
extends AbstractParameterConstraint

Base implementation for numeric parameter constraints

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Nov 16, 2007

Constructor Summary
AbstractNumericParameterConstraint()
           
 
Method Summary
 boolean isSupportedClass(Class<?> clazz)
          Checks if the parameter attribute is of a supported class for this constraint to be used
abstract  boolean validateConstraint(Double value, IStageInstance stageInstance)
          Validate method with the value converted to a Double
 boolean validateConstraint(String value, IStageInstance stageInstance)
          Validates the parameter value passed as a String
 
Methods inherited from class pt.digitalis.dif.dem.objects.parameters.constraints.AbstractParameterConstraint
getErrorIDs, getErrorMessageValues, getMessages, getValidationResult, validateConstraint, validationErrorMessage, validationErrorMessage, validationErrorMessage, validationErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pt.digitalis.dif.dem.objects.parameters.constraints.IParameterConstraint
configureConstraint, getJavaScriptValidationCondition
 

Constructor Detail

AbstractNumericParameterConstraint

public AbstractNumericParameterConstraint()
Method Detail

isSupportedClass

public boolean isSupportedClass(Class<?> clazz)
Description copied from interface: IParameterConstraint
Checks if the parameter attribute is of a supported class for this constraint to be used

Parameters:
clazz - the class of the attribute on witch the constraint has been applied
Returns:
T is it is a supported class
See Also:
IParameterConstraint.isSupportedClass(java.lang.Class)

validateConstraint

public abstract boolean validateConstraint(Double value,
                                           IStageInstance stageInstance)
Validate method with the value converted to a Double

Parameters:
value - the value to compare
stageInstance - the current stage in execution
Returns:
T if the constraint is valid

validateConstraint

public boolean validateConstraint(String value,
                                  IStageInstance stageInstance)
Description copied from interface: IParameterConstraint
Validates the parameter value passed as a String

Parameters:
value - the value to validate
stageInstance - the current stage in execution
Returns:
T if the validation succeded
See Also:
IParameterConstraint.validateConstraint(java.lang.String, pt.digitalis.dif.dem.interfaces.IStageInstance)


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