Spring Web Flow

org.springframework.binding.mapping.results
Class RequiredError

java.lang.Object
  extended by org.springframework.binding.mapping.results.AbstractMappingResult
      extended by org.springframework.binding.mapping.results.RequiredError
All Implemented Interfaces:
MappingResult

public class RequiredError
extends AbstractMappingResult

The "required" error result--indicates a required mapping could not be performed because the source value to map was empty.

Author:
Keith Donald

Constructor Summary
RequiredError(Mapping mapping, java.lang.Object originalValue)
          Creates a new required error result
 
Method Summary
 java.lang.String getCode()
          The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
 java.lang.Throwable getErrorCause()
          Get the cause of the error result
 java.lang.Object getMappedValue()
          The actual value that was mapped to the target object.
 java.lang.Object getOriginalValue()
          The original value of the source object that was to be mapped.
 boolean isError()
          Indicates if this result is an error result.
 
Methods inherited from class org.springframework.binding.mapping.results.AbstractMappingResult
getMapping, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequiredError

public RequiredError(Mapping mapping,
                     java.lang.Object originalValue)
Creates a new required error result

Parameters:
originalValue - the original source value (empty)
Method Detail

getCode

public java.lang.String getCode()
Description copied from interface: MappingResult
The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".

Specified by:
getCode in interface MappingResult
Specified by:
getCode in class AbstractMappingResult

isError

public boolean isError()
Description copied from interface: MappingResult
Indicates if this result is an error result.

Specified by:
isError in interface MappingResult
Specified by:
isError in class AbstractMappingResult

getErrorCause

public java.lang.Throwable getErrorCause()
Description copied from interface: MappingResult
Get the cause of the error result

Specified by:
getErrorCause in interface MappingResult
Specified by:
getErrorCause in class AbstractMappingResult
Returns:
the underyling cause, or null if this is not an error or there was no root cause.

getOriginalValue

public java.lang.Object getOriginalValue()
Description copied from interface: MappingResult
The original value of the source object that was to be mapped. May be null if this result is an error on the source object.

Specified by:
getOriginalValue in interface MappingResult
Specified by:
getOriginalValue in class AbstractMappingResult

getMappedValue

public java.lang.Object getMappedValue()
Description copied from interface: MappingResult
The actual value that was mapped to the target object. Null if this result is an error.

Specified by:
getMappedValue in interface MappingResult
Specified by:
getMappedValue in class AbstractMappingResult

Spring Web Flow