org.camunda.bpm.cycle.web.service
Class AbstractRestService

java.lang.Object
  extended by org.camunda.bpm.cycle.web.service.AbstractRestService
Direct Known Subclasses:
BpmnDiagramService, ConnectorConfigurationService, ConnectorCredentialsService, ConnectorService, DefaultService, ErrorViewService, InitialConfigurationService, LoginService, RoundtripService, TestRunnerService, UserService, ViewService

public class AbstractRestService
extends Object

This is the base class used by all rest controllers and encapsulates shared behavior.

Author:
nico.rehwaldt

Constructor Summary
AbstractRestService()
           
 
Method Summary
protected  javax.ws.rs.WebApplicationException badRequest(String message)
          Issue a bad request exception with the given reason
protected  javax.ws.rs.WebApplicationException internalServerError(String message)
          Issue a internal server error response with the given reason
protected  javax.ws.rs.WebApplicationException notAllowed(String message)
          Issue a not found response with the given reason
protected  javax.ws.rs.WebApplicationException notFound(String message)
          Issue a not found response with the given reason
protected  javax.ws.rs.core.Response redirectTo(String uri)
          Redirect to the specific url (relative to the base url)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRestService

public AbstractRestService()
Method Detail

redirectTo

protected javax.ws.rs.core.Response redirectTo(String uri)
Redirect to the specific url (relative to the base url)

Parameters:
uri -
Returns:

notFound

protected javax.ws.rs.WebApplicationException notFound(String message)
Issue a not found response with the given reason

Parameters:
message -
Returns:

badRequest

protected javax.ws.rs.WebApplicationException badRequest(String message)
Issue a bad request exception with the given reason

Parameters:
message -
Returns:

notAllowed

protected javax.ws.rs.WebApplicationException notAllowed(String message)
Issue a not found response with the given reason

Parameters:
message -
Returns:

internalServerError

protected javax.ws.rs.WebApplicationException internalServerError(String message)
Issue a internal server error response with the given reason

Parameters:
message -
Returns:


Copyright © 2014 camunda services GmbH. All rights reserved.