Class AbstractRestService

java.lang.Object
org.eclipse.dirigible.commons.api.service.AbstractRestService
All Implemented Interfaces:
IRestService

public abstract class AbstractRestService
extends Object
implements IRestService
The AbstractRestService is the parent of all the RESTful services in Dirigible.
  • Field Details

  • Constructor Details

  • Method Details

    • getLogger

      protected abstract org.slf4j.Logger getLogger()
      Gets the logger.
      Returns:
      the logger
    • createErrorResponse

      protected javax.ws.rs.core.Response createErrorResponse​(javax.ws.rs.core.Response.Status status, String message)
      Create general error response for given status.
      Parameters:
      status - the status
      message - the message
      Returns:
      the error response
    • createErrorResponseNotFound

      protected javax.ws.rs.core.Response createErrorResponseNotFound​(String message)
      Create error response not found.
      Parameters:
      message - the message
      Returns:
      the error response
    • createErrorResponseForbidden

      protected javax.ws.rs.core.Response createErrorResponseForbidden​(String message)
      Create error response forbidden.
      Parameters:
      message - the message
      Returns:
      the error response
    • createErrorResponseBadRequest

      protected javax.ws.rs.core.Response createErrorResponseBadRequest​(String message)
      Create error response bad request.
      Parameters:
      message - the message
      Returns:
      the error response
    • createErrorResponseUnauthorized

      protected javax.ws.rs.core.Response createErrorResponseUnauthorized​(String message)
      Create error response unathorized.
      Parameters:
      message - the message
      Returns:
      the error response
    • createErrorResponseInternalServerError

      protected javax.ws.rs.core.Response createErrorResponseInternalServerError​(String message)
      Create error response internal server error.
      Parameters:
      message - the message
      Returns:
      the error response