org.kuali.student.core.validation.dto
Class ValidationResultInfo

java.lang.Object
  extended by org.kuali.student.core.validation.dto.ValidationResultInfo
All Implemented Interfaces:
Serializable

public class ValidationResultInfo
extends Object
implements Serializable

See Also:
Serialized Form

Nested Class Summary
static class ValidationResultInfo.ErrorLevel
           
 
Field Summary
protected  String element
           
private  Object invalidData
           
protected  ValidationResultInfo.ErrorLevel level
           
protected  String message
           
private static long serialVersionUID
           
 
Constructor Summary
ValidationResultInfo()
           
ValidationResultInfo(String element)
           
ValidationResultInfo(String element, Object invalidData)
           
 
Method Summary
 String getElement()
           
 ValidationResultInfo.ErrorLevel getErrorLevel()
          Returns the ValidationResult's error level
 ValidationResultInfo.ErrorLevel getLevel()
           
 String getMessage()
           
 boolean isError()
          Convenience method.
 boolean isOk()
          Convenience method.
 boolean isWarn()
          Convenience method.
 void setElement(String element)
           
 void setError(String message)
          Convenience method.
 void setLevel(ValidationResultInfo.ErrorLevel level)
           
 void setMessage(String message)
           
 void setWarning(String message)
          Convenience method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

invalidData

private transient Object invalidData

element

protected String element

level

protected ValidationResultInfo.ErrorLevel level

message

protected String message
Constructor Detail

ValidationResultInfo

public ValidationResultInfo()

ValidationResultInfo

public ValidationResultInfo(String element)

ValidationResultInfo

public ValidationResultInfo(String element,
                            Object invalidData)
Method Detail

getLevel

public ValidationResultInfo.ErrorLevel getLevel()
Returns:
the level

setLevel

public void setLevel(ValidationResultInfo.ErrorLevel level)
Parameters:
level - the level to set

getMessage

public String getMessage()
Returns:
the message

setMessage

public void setMessage(String message)
Parameters:
message - the message to set

getElement

public String getElement()

setElement

public void setElement(String element)

getErrorLevel

public ValidationResultInfo.ErrorLevel getErrorLevel()
Returns the ValidationResult's error level

Returns:

setWarning

public void setWarning(String message)
Convenience method. Adds a message with an error level of WARN

Parameters:
message - the message to add

setError

public void setError(String message)
Convenience method. Adds a message with an error level of ERROR

Parameters:
message - the message to add

isOk

public boolean isOk()
Convenience method. Returns true if getErrorLevel() == ErrorLevel.OK

Returns:
true if getErrorLevel() == ErrorLevel.OK

isWarn

public boolean isWarn()
Convenience method. Returns true if getErrorLevel() == ErrorLevel.WARN

Returns:
true if getErrorLevel() == ErrorLevel.WARN

isError

public boolean isError()
Convenience method. Returns true if getErrorLevel() == ErrorLevel.ERROR

Returns:
true if getErrorLevel() == ErrorLevel.ERROR

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.