org.fishbolt.common.manager.ext
Class ValidationMessage<O,S>

java.lang.Object
  extended by org.fishbolt.common.manager.ext.ValidationMessage<O,S>
Type Parameters:
O - validation object type
S - severity level type

public class ValidationMessage<O,S>
extends java.lang.Object

Validation message


Field Summary
protected  java.lang.String description
          description
protected  S severity
          severity level
protected  O source
          validation object
 
Constructor Summary
ValidationMessage(O source, S severity, java.lang.String description)
          Constructor
 
Method Summary
<T> ValidationMessage<T,S>
changeSource(T source)
          Creates new ValidationMessage with the specified source element and same message and severity level.
 java.lang.String getDescription()
          Provides a text message
 S getSeverity()
          Provides severity level
 O getSource()
          Provides a validation object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected O source
validation object


severity

protected S severity
severity level


description

protected java.lang.String description
description

Constructor Detail

ValidationMessage

public ValidationMessage(O source,
                         S severity,
                         java.lang.String description)
Constructor

Parameters:
source - is a validation object
severity - level
description - is a text message
Method Detail

getDescription

public java.lang.String getDescription()
Provides a text message

Returns:
text message

getSeverity

public S getSeverity()
Provides severity level

Returns:
severity level

getSource

public O getSource()
Provides a validation object

Returns:
a validation object

changeSource

public <T> ValidationMessage<T,S> changeSource(T source)
Creates new ValidationMessage with the specified source element and same message and severity level.

Type Parameters:
T - source type
Parameters:
source - new source object
Returns:
new ValidationMessage with the specified source element and same message and severity level