Roberto Sánchez
2014-09-19 071a008cf28e733ca3aaafa57e675fd54a5ea33b
securis/src/main/java/net/curisit/securis/services/LicenseServices.java
....@@ -23,10 +23,10 @@
2323 import net.curisit.integrity.beans.ServiceResponse;
2424
2525 import org.apache.commons.io.IOUtils;
26
+import org.apache.logging.log4j.LogManager;
27
+import org.apache.logging.log4j.Logger;
2628 import org.jboss.resteasy.annotations.providers.multipart.MultipartForm;
2729 import org.jboss.resteasy.annotations.providers.multipart.PartType;
28
-import org.apache.logging.log4j.Logger;
29
-import org.apache.logging.log4j.LogManager;
3030
3131 // The Java class will be hosted at the URI path "/myresource"
3232 @Path("/test")
....@@ -50,7 +50,9 @@
5050 * @return the server version in format majorVersion.minorVersion
5151 */
5252 @GET
53
- @Produces({ MediaType.TEXT_HTML })
53
+ @Produces({
54
+ MediaType.TEXT_HTML
55
+ })
5456 public Response index() {
5557 try {
5658 String index = IOUtils.toString(this.getClass().getResourceAsStream("/static/index.html"));
....@@ -63,7 +65,9 @@
6365
6466 @GET
6567 @Path("/dummy")
66
- @Produces({ MediaType.TEXT_PLAIN })
68
+ @Produces({
69
+ MediaType.TEXT_PLAIN
70
+ })
6771 public Response dummy(@Context HttpServletRequest request) {
6872 LOG.info("Request: " + request.getPathInfo());
6973 return Response.ok().entity((uri == null)).build();
....@@ -76,7 +80,9 @@
7680 @POST
7781 @Path("/upload1")
7882 @Consumes(MediaType.MULTIPART_FORM_DATA)
79
- @Produces({ MediaType.APPLICATION_JSON })
83
+ @Produces({
84
+ MediaType.APPLICATION_JSON
85
+ })
8086 public Response testFile1(@MultipartForm FileUploadForm mfdi) {
8187 LOG.info("FORM: texto: {}, file: {}", mfdi.getTexto(), new String(mfdi.getFile()));
8288 return Response.ok("OK").build();
....@@ -84,7 +90,9 @@
8490
8591 @GET
8692 @Path("/current/{license}")
87
- @Produces({ MediaType.APPLICATION_JSON })
93
+ @Produces({
94
+ MediaType.APPLICATION_JSON
95
+ })
8896 public ServiceResponse<ServerConfigVersions> testFile(@PathParam("license") String license,
8997 @DefaultValue("-1") @QueryParam("minorVersion") int minorVersion, @DefaultValue("-1") @QueryParam("majorVersion") int majorVersion) {
9098
....@@ -104,7 +112,8 @@
104112 @PartType("text/plain")
105113 private String texto;
106114
107
- public FileUploadForm() {}
115
+ public FileUploadForm() {
116
+ }
108117
109118 public byte[] getFile() {
110119 return file;