public static MessageResponse createCreatedResponse(String location, EventBuilder eventBuilder) { return new MessageResponse.Builder() .successful() .setStatusCreated() .setHeader(HttpConstants.HEADER_LOCATION, location) .setEventData(eventBuilder.build()) .build(); }
public static MessageResponse createNoContentResponse(String message, EventBuilder eventBuilder) { return new MessageResponse.Builder() .successful() .setStatusNoOutput() .setResponseBody(new JsonObject().put(MessageConstants.MSG_MESSAGE, message)) .setEventData(eventBuilder.build()) .build(); }