Package javax.ws.rs.core.Response

Examples of javax.ws.rs.core.Response.ResponseBuilder.status()


                        ResponseBuilder responseBuilder =
                            RuntimeDelegate.getInstance().createResponseBuilder();
                        // send back a media type that has q=0 -- this should be
                        // detected somewhere
                        responseBuilder.type(new MediaType("image", "jpeg"));
                        return responseBuilder.status(Response.Status.OK).entity("unknown string")
                            .build();
                    }
                }
            }
            return RuntimeDelegate.getInstance().createResponseBuilder().status(Response.Status.OK)
View Full Code Here


  protected final Response execute(Action action, final Object... params) {

    BasicResponse response = (BasicResponse) action.doAction(params);
    ResponseBuilder builder = Response.ok(response);
    if(response.getError() != null){
      builder.status(new Integer(response.getError().getErrorCode()));
    }

    return builder.build();
  }
View Full Code Here

                        ResponseBuilder responseBuilder =
                            RuntimeDelegate.getInstance().createResponseBuilder();
                        // send back a media type that has q=0 -- this should be
                        // detected somewhere
                        responseBuilder.type(new MediaType("image", "jpeg"));
                        return responseBuilder.status(Response.Status.OK).entity("unknown string")
                            .build();
                    }
                }
            }
            return RuntimeDelegate.getInstance().createResponseBuilder().status(Response.Status.OK)
View Full Code Here

      StringBuffer sb = payload2XML.convert(instanceId, javaPayload);
      return Response.ok(sb.toString()).build();
  } catch (Exception e) {
    log.error("Error when getting instance data", e)
    ResponseBuilder builder = Response.fromResponse(Response.ok(e.getMessage()).build());
    builder.status(Status.INTERNAL_SERVER_ERROR);
   
    return builder.build();
  }
   
  }
View Full Code Here

    getProcessManagement().setProcessState(executionId, state);
    return Response.ok().type("application/json").build();
    } catch (Exception e) {
    log.error("Error when getting changing state of process instance", e)
    ResponseBuilder builder = Response.fromResponse(Response.ok(e.getMessage()).build());
    builder.status(Status.INTERNAL_SERVER_ERROR);
   
    return builder.build();
  }
  }
View Full Code Here

    getProcessManagement().endInstance(executionId, result);
    return Response.ok().type("application/json").build();
    } catch (Exception e) {
    log.error("Error when getting ending of process instance", e)
    ResponseBuilder builder = Response.fromResponse(Response.ok(e.getMessage()).build());
    builder.status(Status.INTERNAL_SERVER_ERROR);
   
    return builder.build();
  }
  }
View Full Code Here

      getProcessManagement().deleteInstance(executionId);
      return Response.ok().type("application/json").build();
    } catch (Exception e) {
    log.error("Error when getting ending of process instance", e)
    ResponseBuilder builder = Response.fromResponse(Response.ok(e.getMessage()).build());
    builder.status(Status.INTERNAL_SERVER_ERROR);
   
    return builder.build();
  }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.