Skip to content

Commit

Permalink
Merge pull request #271 from Pandrex247/issue-269
Browse files Browse the repository at this point in the history
Fixes #269
  • Loading branch information
Pandrex247 committed Apr 29, 2015
2 parents 66e9718 + 6f8b06c commit c4fed6b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Response processDeleteLegacyFormat(ParameterMap data) {
}

@DELETE
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public CommandResult processDelete(ParameterMap data) {
if (data == null) {
data = new ParameterMap();
Expand All @@ -111,7 +111,7 @@ public CommandResult processDelete(ParameterMap data) {
MediaType.APPLICATION_JSON,
MediaType.APPLICATION_XML,
MediaType.APPLICATION_FORM_URLENCODED})
@Produces(SseFeature.SERVER_SENT_EVENTS+";qs=0.5")
@Produces(SseFeature.SERVER_SENT_EVENTS)
public Response processDeleteSse(ParameterMap data) {
if (data == null) {
data = new ParameterMap();
Expand Down Expand Up @@ -169,7 +169,7 @@ public ActionReportResult getLegacyFormat() {
}

@GET
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public String get() throws JSONException {
return options();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ public Response processGetLegacyFormat() {
}

@GET
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public CommandResult processGet() {
return executeCommand(prepareParameters());
}

@GET
@Produces(SseFeature.SERVER_SENT_EVENTS+";qs=0.5")
@Produces(SseFeature.SERVER_SENT_EVENTS)
public Response processSseGet() {
return executeCommandAsSse(prepareParameters());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Response processPostLegacyFormat(ParameterMap data) {

@POST
@Consumes(Constants.MEDIA_TYPE_JSON)
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public CommandResult processPost(ParameterMap data) {
if (data == null) {
data = new ParameterMap();
Expand Down Expand Up @@ -136,7 +136,7 @@ public Response processPost() {

@POST
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.APPLICATION_FORM_URLENCODED})
@Produces(SseFeature.SERVER_SENT_EVENTS+";qs=0.5")
@Produces(SseFeature.SERVER_SENT_EVENTS)
public Response processSsePost(ParameterMap data) {
if (data == null) {
data = new ParameterMap();
Expand All @@ -150,13 +150,13 @@ public Response processSsePost(ParameterMap data) {

@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(SseFeature.SERVER_SENT_EVENTS+";qs=0.5")
@Produces(SseFeature.SERVER_SENT_EVENTS)
public Response ssePost(FormDataMultiPart formData) {
return processSsePost(createDataBasedOnForm(formData));
}

@POST
@Produces(SseFeature.SERVER_SENT_EVENTS+";qs=0.5")
@Produces(SseFeature.SERVER_SENT_EVENTS)
public Response processSsePost() {
try {
return processSsePost(new ParameterMap());
Expand All @@ -173,7 +173,7 @@ public ActionReportResult getLegacyFormat() {
}

@GET
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public String get() {
try {
return options();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public ActionReportResult optionsLegacyFormat() {
}

@OPTIONS
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public String options() throws JSONException {
try {
return new RestResourceMetadata(this).toJson().toString(Util.getFormattingIndentLevel());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public Response post(FormDataMultiPart formData) {
}

@OPTIONS
@Produces({MediaType.APPLICATION_JSON+";qs=0.5", MediaType.TEXT_HTML+";qs=0.5", MediaType.APPLICATION_XML+";qs=0.5"})
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_HTML, MediaType.APPLICATION_XML})
public Response options() {
return Response.ok().entity(buildActionReportResult()).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public ActionReportResult getEntityLegacyFormat(@QueryParam("expandLevel") @Defa
}

@GET
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public Map<String,String> getEntity(@QueryParam("expandLevel") @DefaultValue("1") int expandLevel) {
if (childModel == null) {//wrong entity name at this point
throw new WebApplicationException(Response.Status.NOT_FOUND);
Expand All @@ -153,7 +153,7 @@ public Response createOrUpdateEntityLegacyFormat(HashMap<String, String> data) {
}

@POST
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public Response createOrUpdateEntity(HashMap<String, String> data) {
doCreateOrUpdate(data);
return Response.status(Status.CREATED).build();
Expand All @@ -175,7 +175,7 @@ public Object postLegacyFormat(FormDataMultiPart formData) {

@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public Object post(FormDataMultiPart formData) {
return createOrUpdateEntity(createDataBasedOnForm(formData)); //execute the deploy command with a copy of the file locally
}
Expand All @@ -196,7 +196,7 @@ public ActionReportResult optionsLegacyFormat() {
}

@OPTIONS
@Produces(Constants.MEDIA_TYPE_JSON+";qs=0.5")
@Produces(Constants.MEDIA_TYPE_JSON)
public RestResourceMetadata options() {
return new RestResourceMetadata(this);
}
Expand Down

0 comments on commit c4fed6b

Please sign in to comment.