Class Status
- java.lang.Object
-
- org.springframework.extensions.webscripts.Status
-
- Direct Known Subclasses:
ResponseStatus
public class Status extends java.lang.ObjectWeb Script Status Records the outcome of a Web Script.- Author:
- davidc
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Status()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()java.lang.StringgetCodeDescription()Gets the description of the status codejava.lang.StringgetCodeName()Gets the short name of the status codejava.lang.ThrowablegetException()java.lang.StringgetLocation()java.lang.StringgetMessage()booleangetRedirect()voidsetCode(int code)voidsetCode(int code, java.lang.String message)Helper method to set the code and message.voidsetException(java.lang.Throwable exception)voidsetLocation(java.lang.String location)voidsetMessage(java.lang.String message)voidsetRedirect(boolean redirect)java.lang.StringtoString()
-
-
-
Field Detail
-
STATUS_CONTINUE
public static final int STATUS_CONTINUE
Status code constants- See Also:
- Constant Field Values
-
STATUS_SWITCHING_PROTOCOLS
public static final int STATUS_SWITCHING_PROTOCOLS
- See Also:
- Constant Field Values
-
STATUS_OK
public static final int STATUS_OK
- See Also:
- Constant Field Values
-
STATUS_CREATED
public static final int STATUS_CREATED
- See Also:
- Constant Field Values
-
STATUS_ACCEPTED
public static final int STATUS_ACCEPTED
- See Also:
- Constant Field Values
-
STATUS_NON_AUTHORITATIVE_INFORMATION
public static final int STATUS_NON_AUTHORITATIVE_INFORMATION
- See Also:
- Constant Field Values
-
STATUS_NO_CONTENT
public static final int STATUS_NO_CONTENT
- See Also:
- Constant Field Values
-
STATUS_RESET_CONTENT
public static final int STATUS_RESET_CONTENT
- See Also:
- Constant Field Values
-
STATUS_PARTIAL_CONTENT
public static final int STATUS_PARTIAL_CONTENT
- See Also:
- Constant Field Values
-
STATUS_MULTIPLE_CHOICES
public static final int STATUS_MULTIPLE_CHOICES
- See Also:
- Constant Field Values
-
STATUS_MOVED_PERMANENTLY
public static final int STATUS_MOVED_PERMANENTLY
- See Also:
- Constant Field Values
-
STATUS_MOVED_TEMPORARILY
public static final int STATUS_MOVED_TEMPORARILY
- See Also:
- Constant Field Values
-
STATUS_FOUND
public static final int STATUS_FOUND
- See Also:
- Constant Field Values
-
STATUS_SEE_OTHER
public static final int STATUS_SEE_OTHER
- See Also:
- Constant Field Values
-
STATUS_NOT_MODIFIED
public static final int STATUS_NOT_MODIFIED
- See Also:
- Constant Field Values
-
STATUS_USE_PROXY
public static final int STATUS_USE_PROXY
- See Also:
- Constant Field Values
-
STATUS_TEMPORARY_REDIRECT
public static final int STATUS_TEMPORARY_REDIRECT
- See Also:
- Constant Field Values
-
STATUS_BAD_REQUEST
public static final int STATUS_BAD_REQUEST
- See Also:
- Constant Field Values
-
STATUS_UNAUTHORIZED
public static final int STATUS_UNAUTHORIZED
- See Also:
- Constant Field Values
-
STATUS_PAYMENT_REQUIRED
public static final int STATUS_PAYMENT_REQUIRED
- See Also:
- Constant Field Values
-
STATUS_FORBIDDEN
public static final int STATUS_FORBIDDEN
- See Also:
- Constant Field Values
-
STATUS_NOT_FOUND
public static final int STATUS_NOT_FOUND
- See Also:
- Constant Field Values
-
STATUS_METHOD_NOT_ALLOWED
public static final int STATUS_METHOD_NOT_ALLOWED
- See Also:
- Constant Field Values
-
STATUS_NOT_ACCEPTABLE
public static final int STATUS_NOT_ACCEPTABLE
- See Also:
- Constant Field Values
-
STATUS_PROXY_AUTHENTICATION_REQUIRED
public static final int STATUS_PROXY_AUTHENTICATION_REQUIRED
- See Also:
- Constant Field Values
-
STATUS_REQUEST_TIMEOUT
public static final int STATUS_REQUEST_TIMEOUT
- See Also:
- Constant Field Values
-
STATUS_CONFLICT
public static final int STATUS_CONFLICT
- See Also:
- Constant Field Values
-
STATUS_GONE
public static final int STATUS_GONE
- See Also:
- Constant Field Values
-
STATUS_LENGTH_REQUIRED
public static final int STATUS_LENGTH_REQUIRED
- See Also:
- Constant Field Values
-
STATUS_PRECONDITION_FAILED
public static final int STATUS_PRECONDITION_FAILED
- See Also:
- Constant Field Values
-
STATUS_REQUEST_ENTITY_TOO_LARGE
public static final int STATUS_REQUEST_ENTITY_TOO_LARGE
- See Also:
- Constant Field Values
-
STATUS_REQUEST_URI_TOO_LONG
public static final int STATUS_REQUEST_URI_TOO_LONG
- See Also:
- Constant Field Values
-
STATUS_UNSUPPORTED_MEDIA_TYPE
public static final int STATUS_UNSUPPORTED_MEDIA_TYPE
- See Also:
- Constant Field Values
-
STATUS_REQUESTED_RANGE_NOT_SATISFIABLE
public static final int STATUS_REQUESTED_RANGE_NOT_SATISFIABLE
- See Also:
- Constant Field Values
-
STATUS_EXPECTATION_FAILED
public static final int STATUS_EXPECTATION_FAILED
- See Also:
- Constant Field Values
-
STATUS_INTERNAL_SERVER_ERROR
public static final int STATUS_INTERNAL_SERVER_ERROR
- See Also:
- Constant Field Values
-
STATUS_NOT_IMPLEMENTED
public static final int STATUS_NOT_IMPLEMENTED
- See Also:
- Constant Field Values
-
STATUS_BAD_GATEWAY
public static final int STATUS_BAD_GATEWAY
- See Also:
- Constant Field Values
-
STATUS_SERVICE_UNAVAILABLE
public static final int STATUS_SERVICE_UNAVAILABLE
- See Also:
- Constant Field Values
-
STATUS_GATEWAY_TIMEOUT
public static final int STATUS_GATEWAY_TIMEOUT
- See Also:
- Constant Field Values
-
STATUS_HTTP_VERSION_NOT_SUPPORTED
public static final int STATUS_HTTP_VERSION_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
setCode
public void setCode(int code, java.lang.String message)Helper method to set the code and message.Redirect is set to true.
- Parameters:
code- codemessage- message
-
setException
public void setException(java.lang.Throwable exception)
- Parameters:
exception- Throwable
-
getException
public java.lang.Throwable getException()
- Returns:
- exception
-
setMessage
public void setMessage(java.lang.String message)
- Parameters:
message- String
-
getMessage
public java.lang.String getMessage()
- Returns:
- message
-
setRedirect
public void setRedirect(boolean redirect)
- Parameters:
redirect- redirect to status code response
-
getRedirect
public boolean getRedirect()
- Returns:
- redirect to status code response
-
setCode
public void setCode(int code)
- Parameters:
code- status code- See Also:
HttpServletResponse
-
getCode
public int getCode()
- Returns:
- status code
-
getCodeName
public java.lang.String getCodeName()
Gets the short name of the status code- Returns:
- status code name
-
setLocation
public void setLocation(java.lang.String location)
- Parameters:
location- location response-header- See Also:
HttpServletResponse
-
getLocation
public java.lang.String getLocation()
- Returns:
- location
-
getCodeDescription
public java.lang.String getCodeDescription()
Gets the description of the status code- Returns:
- status code description
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-