public class RESTService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CHUNKSIZE
size of a multi-part byte range output buffer
|
static java.lang.String |
HEADER_ACCEPT_LANGUAGE |
static java.lang.String |
HEADER_ACCEPT_RANGES |
static java.lang.String |
HEADER_CACHE_CONTROL |
static java.lang.String |
HEADER_CONTENT_DISPOSITION |
static java.lang.String |
HEADER_CONTENT_LANGUAGE |
static java.lang.String |
HEADER_CONTENT_LENGTH |
static java.lang.String |
HEADER_CONTENT_RANGE |
static java.lang.String |
HEADER_CONTENT_TYPE |
static java.lang.String |
HEADER_ETAG |
static java.lang.String |
HEADER_IF_MODIFIED_SINCE |
static java.lang.String |
HEADER_LAST_MODIFIED |
static java.lang.String |
HEADER_LOCATION |
static java.lang.String |
HEADER_RANGE |
static java.lang.String |
HEADER_USER_AGENT |
static java.lang.String |
MULTIPART_BYTERANGES_BOUNDRY |
static java.lang.String |
MULTIPART_BYTERANGES_BOUNDRY_END |
static java.lang.String |
MULTIPART_BYTERANGES_BOUNDRY_SEP |
static java.lang.String |
MULTIPART_BYTERANGES_HEADER |
Constructor and Description |
---|
RESTService() |
Modifier and Type | Method and Description |
---|---|
OCErrorResponse |
contentNotProcessed(OCContentCannotBeProcessedException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
contentNotReady(OCContentNotReadyException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
genericException(java.lang.Throwable e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
notAuth(OCAuthenticationException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
notFoundException(OCObjectNotFoundException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
notSupported(OCNotSupportedException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
objectLocked(OCObjectLockedException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
ocConflict(OCConflictException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
ocConflict(OCContentFormatException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
ocForbidden(OCForbiddenRuntimeException e,
javax.servlet.http.HttpServletResponse response) |
OCErrorResponse |
ocRuntimeException(OCRuntimeException e,
javax.servlet.http.HttpServletResponse response) |
protected java.lang.String |
resolveTicket(java.lang.String cookieTicket,
java.lang.String paramTicket)
Resolves the ticket from the cookie or param.
|
public static final java.lang.String HEADER_LOCATION
public static final java.lang.String HEADER_IF_MODIFIED_SINCE
public static final java.lang.String HEADER_CONTENT_TYPE
public static final java.lang.String HEADER_CONTENT_RANGE
public static final java.lang.String HEADER_CONTENT_LANGUAGE
public static final java.lang.String HEADER_CONTENT_LENGTH
public static final java.lang.String HEADER_ACCEPT_RANGES
public static final java.lang.String HEADER_ACCEPT_LANGUAGE
public static final java.lang.String HEADER_RANGE
public static final java.lang.String HEADER_ETAG
public static final java.lang.String HEADER_CACHE_CONTROL
public static final java.lang.String HEADER_LAST_MODIFIED
public static final java.lang.String HEADER_USER_AGENT
public static final java.lang.String HEADER_CONTENT_DISPOSITION
public static final java.lang.String MULTIPART_BYTERANGES_BOUNDRY
public static final java.lang.String MULTIPART_BYTERANGES_HEADER
public static final java.lang.String MULTIPART_BYTERANGES_BOUNDRY_SEP
public static final java.lang.String MULTIPART_BYTERANGES_BOUNDRY_END
public static final int CHUNKSIZE
protected java.lang.String resolveTicket(java.lang.String cookieTicket, java.lang.String paramTicket)
cookieTicket
- paramTicket
- @ExceptionHandler(value=java.lang.Throwable.class) @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ResponseBody public OCErrorResponse genericException(java.lang.Throwable e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCObjectNotFoundException.class) @ResponseStatus(value=NOT_FOUND) @ResponseBody public OCErrorResponse notFoundException(OCObjectNotFoundException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCRuntimeException.class) @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ResponseBody public OCErrorResponse ocRuntimeException(OCRuntimeException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCForbiddenRuntimeException.class) @ResponseStatus(value=FORBIDDEN) @ResponseBody public OCErrorResponse ocForbidden(OCForbiddenRuntimeException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCAuthenticationException.class) @ResponseStatus(value=UNAUTHORIZED) @ResponseBody public OCErrorResponse notAuth(OCAuthenticationException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCObjectLockedException.class) @ResponseStatus(value=LOCKED) @ResponseBody public OCErrorResponse objectLocked(OCObjectLockedException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCConflictException.class) @ResponseStatus(value=CONFLICT) @ResponseBody public OCErrorResponse ocConflict(OCConflictException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCContentFormatException.class) @ResponseStatus(value=UNSUPPORTED_MEDIA_TYPE) @ResponseBody public OCErrorResponse ocConflict(OCContentFormatException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCContentNotReadyException.class) @ResponseStatus(value=PRECONDITION_FAILED) @ResponseBody public OCErrorResponse contentNotReady(OCContentNotReadyException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCNotSupportedException.class) @ResponseStatus(value=NOT_IMPLEMENTED) @ResponseBody public OCErrorResponse notSupported(OCNotSupportedException e, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=OCContentCannotBeProcessedException.class) @ResponseStatus(value=UNPROCESSABLE_ENTITY) @ResponseBody public OCErrorResponse contentNotProcessed(OCContentCannotBeProcessedException e, javax.servlet.http.HttpServletResponse response)