com.atlassian.confluence.macro.params
Class ParameterException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.atlassian.renderer.v2.macro.MacroException
              extended by com.atlassian.confluence.macro.params.ParameterException
All Implemented Interfaces:
java.io.Serializable

public class ParameterException
extends com.atlassian.renderer.v2.macro.MacroException

Thrown when there is a problem while processing a parameter.

Since:
2.9
See Also:
Serialized Form

Constructor Summary
ParameterException(java.lang.String message)
           
ParameterException(java.lang.String message, java.lang.Throwable cause)
           
ParameterException(java.lang.Throwable cause, java.lang.String name, java.lang.String value, java.util.Set<java.lang.String> acceptableValues)
          Constructor that captures failure information so more useful feedback can be provided to the user.
 
Method Summary
 java.util.Set<java.lang.String> getAcceptableValues()
          Returns acceptable values of this parameter.
 java.lang.String getName()
          Returns the name of the parameter that caused the problem.
 java.lang.String getValue()
          Returns the (invalid) value of the parameter that caused the problem.
 void setAcceptableValues(java.util.Set<java.lang.String> acceptableValues)
          Sets acceptable values of this parameter.
 void setName(java.lang.String name)
          Sets the name of the parameter that caused the problem.
 void setValue(java.lang.String value)
          Sets the (invalid) value of the parameter that caused the problem.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterException

public ParameterException(java.lang.String message)

ParameterException

public ParameterException(java.lang.String message,
                          java.lang.Throwable cause)

ParameterException

public ParameterException(java.lang.Throwable cause,
                          java.lang.String name,
                          java.lang.String value,
                          java.util.Set<java.lang.String> acceptableValues)
Constructor that captures failure information so more useful feedback can be provided to the user.

Parameters:
cause - the underlying cause, if any
name - the name of the parameter with the error
value - the (invalid) value that caused the problem
acceptableValues - acceptable values for the parameter
Since:
2.10
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the parameter that caused the problem.

Parameters:
name - the name of the parameter that caused the problem
Since:
2.10

setValue

public void setValue(java.lang.String value)
Sets the (invalid) value of the parameter that caused the problem.

Parameters:
value - the (invalid) value of the parameter that caused the problem
Since:
2.10

setAcceptableValues

public void setAcceptableValues(java.util.Set<java.lang.String> acceptableValues)
Sets acceptable values of this parameter.

Parameters:
acceptableValues - acceptable values of this parameter
Since:
2.10

getName

public java.lang.String getName()
Returns the name of the parameter that caused the problem.

Returns:
the name of the parameter that caused the problem
Since:
2.10

getValue

public java.lang.String getValue()
Returns the (invalid) value of the parameter that caused the problem.

Returns:
value the (invalid) value of the parameter that caused the problem
Since:
2.10

getAcceptableValues

public java.util.Set<java.lang.String> getAcceptableValues()
Returns acceptable values of this parameter.

Returns:
acceptableValues acceptable values of this parameter
Since:
2.10


Copyright © 2003-2014 Atlassian. All Rights Reserved.