org.springframework.validation
Class ObjectError

java.lang.Object
  extended by org.springframework.context.support.DefaultMessageSourceResolvable
      extended by org.springframework.validation.ObjectError
All Implemented Interfaces:
Serializable, MessageSourceResolvable
Direct Known Subclasses:
FieldError

public class ObjectError
extends DefaultMessageSourceResolvable

Class that encapsulates an object error, i.e. a global reason for rejecting an object.

See DefaultMessageCodesResolver javadoc for details on how a message code list is built for an ObjectError.

Since:
10.03.2003
Author:
Juergen Hoeller
See Also:
FieldError, DefaultMessageCodesResolver, Serialized Form

Constructor Summary
ObjectError(String objectName, String[] codes, Object[] arguments, String defaultMessage)
          Create a new ObjectError instance.
 
Method Summary
 String getObjectName()
          Return the name of the affected object.
 String toString()
           
 
Methods inherited from class org.springframework.context.support.DefaultMessageSourceResolvable
getArguments, getCode, getCodes, getDefaultMessage, resolvableToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectError

public ObjectError(String objectName,
                   String[] codes,
                   Object[] arguments,
                   String defaultMessage)
Create a new ObjectError instance.

Parameters:
objectName - the name of the affected object
codes - the codes to be used to resolve this message
arguments - the array of arguments to be used to resolve this message
defaultMessage - the default message to be used to resolve this message
Method Detail

getObjectName

public String getObjectName()
Return the name of the affected object.


toString

public String toString()
Overrides:
toString in class DefaultMessageSourceResolvable


Copyright (c) 2002-2007 The Spring Framework Project.