Juan Hernandez has posted comments on this change.

Change subject: restApi : RestApi to export volume profile to pdf
......................................................................


Patch Set 17:

(1 comment)

http://gerrit.ovirt.org/#/c/28340/17/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/gluster/GlusterVolumeResource.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/gluster/GlusterVolumeResource.java:

Line 106:     public GlusterBricksResource getGlusterBrickSubResource();
Line 107: 
Line 108:     @GET
Line 109:     @Produces("application/pdf")
Line 110:     @Path("profilestatsaspdf")
> This method can ONLY return the result as pdf.It actually queries for the s
That is perfectly ok. What I'm saying is that it should use the same @Path than 
the method that returns that same data as XML or JSON. If the user wants the 
output in XML he does the following:

  GET .../profilestatistics HTTP/1.1
  Host: whatever
  Accept: application/xml

If the user wants the output in PDF then he does the following:

  GET ../profilestatistics HTTP/1.1
  Host: whatever
  Accept: application/pdf

The JAX-RS framework (RESTEasy) will decide which method to call according to 
the @Produces annotation.
Line 111:     public Response getGlusterVolumeProfileAsPdf();


-- 
To view, visit http://gerrit.ovirt.org/28340
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3ff28f5cf18bd7a2bcb53a169873fe6ae3541ed
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Ramesh N <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to