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:
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(String message)
           
ParameterException(String message, Throwable cause)
           
ParameterException(Throwable cause, String name, String value, Set<String> acceptableValues)
          Constructor that captures failure information so more useful feedback can be provided to the user.
 
Method Summary
 Set<String> getAcceptableValues()
          Returns acceptable values of this parameter.
 String getName()
          Returns the name of the parameter that caused the problem.
 String getValue()
          Returns the (invalid) value of the parameter that caused the problem.
 void setAcceptableValues(Set<String> acceptableValues)
          Sets acceptable values of this parameter.
 void setName(String name)
          Sets the name of the parameter that caused the problem.
 void setValue(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(String message)

ParameterException

public ParameterException(String message,
                          Throwable cause)

ParameterException

public ParameterException(Throwable cause,
                          String name,
                          String value,
                          Set<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(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(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(Set<String> acceptableValues)
Sets acceptable values of this parameter.

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

getName

public 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 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 Set<String> getAcceptableValues()
Returns acceptable values of this parameter.

Returns:
acceptableValues acceptable values of this parameter
Since:
2.10


Copyright © 2003–2015 Atlassian. All rights reserved.