com.sage.orion.sdata.servlet
Class ForbiddenException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sage.orion.sdata.servlet.ForbiddenException
All Implemented Interfaces:
java.io.Serializable

public class ForbiddenException
extends java.lang.RuntimeException

The ForbiddenException exception is to be thrown when the request has been provided valid authentication information but the caller is not permitted access to that resource for the operation in question.

This will normally result in the servlet returning an HTTP SC_FORBIDDEN (403) status code.

Do not confuse SC_FORBIDDEN (associated with ForbiddenException) with SC_UNAUTHORIZED (associated with UnauthorizedException). SC_UNAUTHORIZED represents 'I do not know if you are allowed to access this resource; I do not know who you are', whereas SC_FORBIDDEN represents 'Yes, I know who you are but you are not permitted access to that resource'.

See Also:
Serialized Form

Constructor Summary
ForbiddenException()
          Constructs a new ForbiddenException with null as its detail message and with no underlying cause specified.
ForbiddenException(java.lang.String message)
          Constructs a new ForbiddenException with the specified detail message.
ForbiddenException(java.lang.String message, java.lang.Throwable cause)
          Constructs a new ForbiddenException with the specified detail message and cause.
ForbiddenException(java.lang.Throwable cause)
          Constructs a new ForbiddenException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
 
Method Summary
 
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

ForbiddenException

public ForbiddenException()
Constructs a new ForbiddenException with null as its detail message and with no underlying cause specified.


ForbiddenException

public ForbiddenException(java.lang.String message)
Constructs a new ForbiddenException with the specified detail message.

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

ForbiddenException

public ForbiddenException(java.lang.Throwable cause)
Constructs a new ForbiddenException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

Parameters:
cause - The underlying Throwable that caused this exception.

ForbiddenException

public ForbiddenException(java.lang.String message,
                          java.lang.Throwable cause)
Constructs a new ForbiddenException with the specified detail message and cause.

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
cause - The underlying Throwable that caused this exception.


Copyright © 2011 Sage Software, Inc. All rights reserved.