org.springframework.validation
Class ObjectError

java.lang.Object
  extended byorg.springframework.context.support.DefaultMessageSourceResolvable
      extended byorg.springframework.validation.ObjectError
All Implemented Interfaces:
MessageSourceResolvable, Serializable
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) 2003-2004 The Spring Framework Project.