pt.digitalis.dif.dem.objects.parameters.errors
Class ParameterError

java.lang.Object
  extended by pt.digitalis.dif.dem.objects.parameters.errors.ParameterError

public class ParameterError
extends Object

Defines a type that represents an error on a parameter.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
, Pedro Viegas pviegas@digitalis.pt

Constructor Summary
ParameterError()
          Constructor
ParameterError(String constraintId, ParameterConstraintResult constraintResult)
          Constructor
ParameterError(String message, ParameterErrorType errorType)
          Constructor.
 
Method Summary
 IParameterConstraint getConstraint()
          Inspector for the error constraint.
 List<String> getErrorIDs()
          Inspector for the 'errorIDs' attribute.
 ParameterErrorType getErrorType()
          Inspector for the error type.
 Exception getException()
          Inspector for the error exception.
 String getId()
          Inspector for the error ID.
 String getMessage()
          Inspector for the error message.
 IParameterRule<?> getRule()
          Inspector for the 'rule' attribute.
 IParameterValidator getValidator()
          Inspector for the validator.
 boolean isForceShowError()
          Inspector for the 'forceShowError' attribute.
 void setConstraint(String id, IParameterConstraint constraint)
          Modifier for the constraint.
 void setErrorIDs(List<String> errorIDs)
          Modifier for the 'errorIDs' attribute.
 void setException(Exception exception)
          Modifier for the exception.
 void setForceShowError(boolean forceShowError)
          Modifier for the 'forceShowError' attribute.
 void setId(String newID)
          Inspector for the error ID.
 void setMessage(String message)
          Modifier for the 'message' attribute.
 void setRule(IParameterRule<?> rule)
          Modifier for the 'rule' attribute.
 void setValidator(String id, IParameterValidator validator)
          Modifier for the validator.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterError

public ParameterError()
Constructor


ParameterError

public ParameterError(String constraintId,
                      ParameterConstraintResult constraintResult)
Constructor

Parameters:
constraintId - The constraint Id
constraintResult - The constraint result

ParameterError

public ParameterError(String message,
                      ParameterErrorType errorType)
Constructor.

Parameters:
message - the error message.
errorType - the error type
Method Detail

getConstraint

public IParameterConstraint getConstraint()
Inspector for the error constraint.

Returns:
the constraint the constraint

getErrorIDs

public List<String> getErrorIDs()
Inspector for the 'errorIDs' attribute.

Returns:
the errorIDs value

getErrorType

public ParameterErrorType getErrorType()
Inspector for the error type.

Returns:
the errorType the error type

getException

public Exception getException()
Inspector for the error exception.

Returns:
the exception the error exception

getId

public String getId()
Inspector for the error ID.

Returns:
the id the error ID.

getMessage

public String getMessage()
Inspector for the error message.

Returns:
the message the error message

getRule

public IParameterRule<?> getRule()
Inspector for the 'rule' attribute.

Returns:
the rule value

getValidator

public IParameterValidator getValidator()
Inspector for the validator.

Returns:
the validator

isForceShowError

public boolean isForceShowError()
Inspector for the 'forceShowError' attribute.

Returns:
the forceShowError value

setConstraint

public void setConstraint(String id,
                          IParameterConstraint constraint)
Modifier for the constraint.

Parameters:
id - the id of the constraint
constraint - the constraint to set

setErrorIDs

public void setErrorIDs(List<String> errorIDs)
Modifier for the 'errorIDs' attribute.

Parameters:
errorIDs - the new errorIDs value to set

setException

public void setException(Exception exception)
Modifier for the exception.

Parameters:
exception - the exception to set

setForceShowError

public void setForceShowError(boolean forceShowError)
Modifier for the 'forceShowError' attribute.

Parameters:
forceShowError - the new forceShowError value to set

setId

public void setId(String newID)
Inspector for the error ID.

Parameters:
newID - the new ID.

setMessage

public void setMessage(String message)
Modifier for the 'message' attribute.

Parameters:
message - the new message value to set

setRule

public void setRule(IParameterRule<?> rule)
Modifier for the 'rule' attribute.

Parameters:
rule - the new rule value to set

setValidator

public void setValidator(String id,
                         IParameterValidator validator)
Modifier for the validator.

Parameters:
id - the id of the validator
validator - the validator to set

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


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