@ControllerAdvice public class BaseControllerAdvice extends AbstractBaseController
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
REST_API_VERSION |
DEFAULT_ENCODING, NEW_META_DATA_PROPERTY, OLD_META_DATA_PROPERTY, securityService, TYPE_META_DATA_PROPERTY, UTF_8| Constructor and Description |
|---|
BaseControllerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getRestApiVersion() |
java.lang.String |
handle(java.lang.RuntimeException e)
Handles both ResourceNotFoundExceptions and specifically, RegionNotFoundExceptions, occurring when a resource
or a Region (a.k.a.
|
java.lang.String |
handleException(org.springframework.security.access.AccessDeniedException cause)
Handles an AccessDenied Exception thrown by a REST API web service endpoint, HTTP request handler method.
|
java.lang.String |
handleException(org.apache.shiro.authc.AuthenticationException cause)
Handles an AuthenticationException thrown by a REST API web service endpoint, HTTP request handler method.
|
java.lang.String |
handleException(org.apache.geode.security.AuthenticationFailedException cause)
Handles an AuthenticationFailedException thrown by a REST API web service endpoint, HTTP request handler method.
|
java.lang.String |
handleException(DataTypeNotSupportedException tns)
Handles any DataTypeNotSupportedException thrown by a REST API web service endpoint, HTTP request handler method.
|
java.lang.String |
handleException(GemfireRestException ge)
Handles any GemfireRestException thrown by a REST API web service endpoint, HTTP request handler method.
|
java.lang.String |
handleException(org.springframework.web.HttpRequestMethodNotSupportedException e)
Handles HttpRequestMethodNotSupportedException thrown by a REST API web service when request is
received with unsupported HTTP method.
|
java.lang.String |
handleException(org.apache.geode.security.NotAuthorizedException cause)
Handles an NotAuthorized Exception thrown by a GeodeSecurityUtil.
|
java.lang.String |
handleException(java.lang.RuntimeException e)
Handles MalformedJsonFoundException, occurring when REST service encounters incorrect or malformed JSON document
|
java.lang.String |
handleException(java.lang.Throwable cause)
Handles any Exception thrown by a REST API web service endpoint, HTTP request handler method.
|
casValue, casValue, checkForKeyExist, checkForMultipleKeysExist, checkForQueryIdExist, convert, convert, convert, convertErrorAsJson, convertErrorAsJson, convertJsonArrayIntoPdxCollection, convertJsonToMap, createNamedQuery, decode, decode, deleteNamedQuery, deleteQueryId, deleteValue, deleteValues, deleteValues, generateKey, generateKey, getActualTypeValue, getAllMembersInDS, getCache, getKeys, getMembers, getPdxValues, getQueryIdValue, getQueryService, getQueryStore, getRegion, getValue, getValues, getValues, introspectAndConvert, jsonToObject, jsonToObjectArray, postValue, processQueryResponse, putPdxValues, putValue, putValues, putValues, replaceValue, replaceValue, toUri, updateMultipleKeys, updateNamedQuery, updateSingleKey, validateJsonAndFindType, validateQueryprotected static final java.lang.String REST_API_VERSION
protected java.lang.String getRestApiVersion()
getRestApiVersion in class AbstractBaseController@ExceptionHandler(value={RegionNotFoundException.class,ResourceNotFoundException.class})
@ResponseBody
@ResponseStatus(value=NOT_FOUND)
public java.lang.String handle(java.lang.RuntimeException e)
e - the RuntimeException thrown when the accessed/requested resource does not exist in GemFire.@ExceptionHandler(value=MalformedJsonException.class) @ResponseBody @ResponseStatus(value=BAD_REQUEST) public java.lang.String handleException(java.lang.RuntimeException e)
e - the RuntimeException thrown when malformed JSON is encounterd.@ExceptionHandler(value=GemfireRestException.class) @ResponseBody @ResponseStatus(value=INTERNAL_SERVER_ERROR) public java.lang.String handleException(GemfireRestException ge)
ge - the GemfireRestException thrown when it found problem processing REST request.@ExceptionHandler(value=DataTypeNotSupportedException.class) @ResponseBody @ResponseStatus(value=NOT_ACCEPTABLE) public java.lang.String handleException(DataTypeNotSupportedException tns)
tns - the DataTypeNotSupportedException thrown if problem occurs in cache values to JSON conversion.@ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(value=METHOD_NOT_ALLOWED) public java.lang.String handleException(org.springframework.web.HttpRequestMethodNotSupportedException e)
e - the HttpRequestMethodNotSupportedException thrown when REST request is received with NOT support methods.@ExceptionHandler(value=org.apache.geode.security.AuthenticationFailedException.class) @ResponseBody @ResponseStatus(value=UNAUTHORIZED) public java.lang.String handleException(org.apache.geode.security.AuthenticationFailedException cause)
cause - the Exception causing the error.@ExceptionHandler(value=org.apache.shiro.authc.AuthenticationException.class) @ResponseBody @ResponseStatus(value=UNAUTHORIZED) public java.lang.String handleException(org.apache.shiro.authc.AuthenticationException cause)
cause - the Exception causing the error.@ExceptionHandler(value=org.springframework.security.access.AccessDeniedException.class) @ResponseBody @ResponseStatus(value=FORBIDDEN) public java.lang.String handleException(org.springframework.security.access.AccessDeniedException cause)
cause - the Exception causing the error.@ExceptionHandler(value=org.apache.geode.security.NotAuthorizedException.class) @ResponseBody @ResponseStatus(value=FORBIDDEN) public java.lang.String handleException(org.apache.geode.security.NotAuthorizedException cause)
cause - the Exception causing the error.@ExceptionHandler(value=java.lang.Throwable.class) @ResponseBody @ResponseStatus(value=INTERNAL_SERVER_ERROR) public java.lang.String handleException(java.lang.Throwable cause)
cause - the Exception causing the error.