|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.prolifics.servlet.AuthorizationException
public class AuthorizationException
AuthorizationException is thrown by classes implementing the Authorization
and AuthorizationFactory interfaces in order to indicate a failure of some
sort. The failure may be a failure to interpret the Authorization header,
for example, or an explicit rejection to authorize an authentic user to be
given the requested access to a particular resource, or even a communications
failure in reaching the authorization provider. Whatever the reason, an
appropriate status code should be given to the AuthorizationException, as
this code will be set in the HTTP Status header of the response from
ProlificsHttpServlet. A String message and Throwable cause may be explicitly
provided, which may be logged by ProlificsHttpServlet. In the case where a
client may accept a text/html response, the message will be provided to the
client. A resource, method, and user may be set, or they may remain null,
as initialized by the constructors.
Constructor Summary | |
---|---|
AuthorizationException()
Constructs a new AuthorizationException with null as its detail message. |
|
AuthorizationException(int statusCode,
java.lang.String message)
Constructs a new AuthorizationException with the specified detail message and status code. |
|
AuthorizationException(int statusCode,
java.lang.String message,
java.lang.Throwable cause)
Constructs a new AuthorizationException with the specified status code, detail message, and cause. |
|
AuthorizationException(java.lang.String message)
Constructs a new AuthorizationException with the specified detail message. |
|
AuthorizationException(java.lang.Throwable cause)
Constructs a new AuthorizationException 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 | |
---|---|
java.lang.String |
getMethod()
Gets the method for this AuthorizationException. |
java.lang.String |
getResource()
Gets the resource for this AuthorizationException. |
int |
getStatusCode()
Returns the status code for this AuthorizationException. |
java.lang.String |
getUser()
Gets the user for this AuthorizationException. |
void |
setMethod(java.lang.String method)
Sets the method for this AuthorizationException. |
void |
setResource(java.lang.String resource)
Sets the resource for this AuthorizationException. |
void |
setStatusCode(int statusCode)
Sets the status code for this AuthorizationException. |
void |
setUser(java.lang.String user)
Sets the user for this AuthorizationException. |
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 |
---|
public AuthorizationException()
public AuthorizationException(java.lang.String message)
message
- the detail message. The detail message is saved
for later retrieval by the getMessage() method.public AuthorizationException(int statusCode, java.lang.String message)
statusCode
- an HTTP status codemessage
- the detail message. The detail message is saved
for later retrieval by the getMessage() method.public AuthorizationException(java.lang.Throwable cause)
cause
- the cause (which is saved for later retrieval by
the getCause() method). (A null value is permitted, and indicates
that the cause is nonexistent or unknown.)public AuthorizationException(int statusCode, java.lang.String message, java.lang.Throwable cause)
statusCode
- an HTTP status codemessage
- the detail message.cause
- the cause. (A null value is permitted, and indicates
that the cause is nonexistent or unknown.))Method Detail |
---|
public int getStatusCode()
public void setStatusCode(int statusCode)
statusCode
- an HTTP status codepublic java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- an HTTP method name (GET, PUT, POST, DELETE)public java.lang.String getResource()
public void setResource(java.lang.String resource)
resource
- a resourcepublic java.lang.String getUser()
public void setUser(java.lang.String user)
user
- a user
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |