Class FessApiFailureHook
- java.lang.Object
-
- org.codelibs.fess.mylasta.direction.sponsor.FessApiFailureHook
-
- All Implemented Interfaces:
org.lastaflute.web.api.ApiFailureHook
public class FessApiFailureHook extends Object implements org.lastaflute.web.api.ApiFailureHook
- Author:
- jflute
-
-
Field Summary
Fields Modifier and Type Field Description protected static intHTTP_BAD_REQUESTprotected static intHTTP_UNAUTHORIZED
-
Constructor Summary
Constructors Constructor Description FessApiFailureHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.lastaflute.web.response.JsonResponse<ApiResult>asJson(ApiResult bean)protected ApiResultcreateFailureBean(ApiResult.Status status, String message)protected StringcreateMessage(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)org.lastaflute.web.response.ApiResponsehandleApplicationException(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)org.dbflute.optional.OptionalThing<org.lastaflute.web.response.ApiResponse>handleClientException(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)org.dbflute.optional.OptionalThing<org.lastaflute.web.response.ApiResponse>handleServerException(org.lastaflute.web.api.ApiFailureResource resource, Throwable cause)org.lastaflute.web.response.ApiResponsehandleValidationError(org.lastaflute.web.api.ApiFailureResource resource)
-
-
-
Field Detail
-
HTTP_BAD_REQUEST
protected static final int HTTP_BAD_REQUEST
- See Also:
- Constant Field Values
-
HTTP_UNAUTHORIZED
protected static final int HTTP_UNAUTHORIZED
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleValidationError
public org.lastaflute.web.response.ApiResponse handleValidationError(org.lastaflute.web.api.ApiFailureResource resource)
- Specified by:
handleValidationErrorin interfaceorg.lastaflute.web.api.ApiFailureHook
-
handleApplicationException
public org.lastaflute.web.response.ApiResponse handleApplicationException(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)- Specified by:
handleApplicationExceptionin interfaceorg.lastaflute.web.api.ApiFailureHook
-
handleClientException
public org.dbflute.optional.OptionalThing<org.lastaflute.web.response.ApiResponse> handleClientException(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)- Specified by:
handleClientExceptionin interfaceorg.lastaflute.web.api.ApiFailureHook
-
handleServerException
public org.dbflute.optional.OptionalThing<org.lastaflute.web.response.ApiResponse> handleServerException(org.lastaflute.web.api.ApiFailureResource resource, Throwable cause)- Specified by:
handleServerExceptionin interfaceorg.lastaflute.web.api.ApiFailureHook
-
createFailureBean
protected ApiResult createFailureBean(ApiResult.Status status, String message)
-
createMessage
protected String createMessage(org.lastaflute.web.api.ApiFailureResource resource, RuntimeException cause)
-
-