com.arsdigita.util.parameter
Class ParameterError

java.lang.Object
  extended bycom.arsdigita.util.parameter.ParameterError

public final class ParameterError
extends Object

Subject to change. Information about an error for a parameter. Parameter implementors will add ParameterErrors to the passed in ErrorList when their parameters encounter error conditions.

Version:
$Id: //core-platform/dev/src/com/arsdigita/util/parameter/ParameterError.java#5 $
Author:
Justin Ross <jross@redhat.com>
See Also:
ErrorList, Parameter

Field Summary
static String versionId
           
 
Constructor Summary
ParameterError(Parameter param, String message)
          Constructs a parameter error for param.
ParameterError(Parameter param, Throwable throwable)
          Constructs a parameter error for param, drawing its error message from throwable.
 
Method Summary
 String getMessage()
          Gets the message associated with this error.
 Parameter getParameter()
          Gets the parameter associated with this error.
 Throwable getThrowable()
          Gets the throwable, if present, that corresponds to the error.
 String toString()
          Returns a string representation of the error suitable for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

ParameterError

public ParameterError(Parameter param,
                      String message)
Constructs a parameter error for param.

Parameters:
param - The Parameter whose value is in error; it cannot be null
message - A String description of the error

ParameterError

public ParameterError(Parameter param,
                      Throwable throwable)
Constructs a parameter error for param, drawing its error message from throwable.

Parameters:
param - The Parameter whose value is in error; it cannot be null
throwable - The Throwable for the error; it cannot be null
Method Detail

getParameter

public final Parameter getParameter()
Gets the parameter associated with this error.

Returns:
The Parameter in error; it cannot be null

getMessage

public final String getMessage()
Gets the message associated with this error.

Returns:
The String message for the error; it cannot be null

getThrowable

public final Throwable getThrowable()
Gets the throwable, if present, that corresponds to the error.

Returns:
The Throwable of this error; it may be null

toString

public String toString()
Returns a string representation of the error suitable for debugging.

Returns:
super.toString() + "," + param.getName()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC