Roberto Sánchez
2014-09-19 071a008cf28e733ca3aaafa57e675fd54a5ea33b
securis/src/main/java/net/curisit/securis/services/LicenseTypeResource.java
....@@ -29,8 +29,8 @@
2929 import net.curisit.securis.db.LicenseType;
3030 import net.curisit.securis.utils.TokenHelper;
3131
32
-import org.apache.logging.log4j.Logger;
3332 import org.apache.logging.log4j.LogManager;
33
+import org.apache.logging.log4j.Logger;
3434
3535 import com.google.inject.persist.Transactional;
3636
....@@ -51,7 +51,8 @@
5151 @Inject
5252 Provider<EntityManager> emProvider;
5353
54
- public LicenseTypeResource() {}
54
+ public LicenseTypeResource() {
55
+ }
5556
5657 /**
5758 *
....@@ -59,7 +60,9 @@
5960 */
6061 @GET
6162 @Path("/")
62
- @Produces({ MediaType.APPLICATION_JSON })
63
+ @Produces({
64
+ MediaType.APPLICATION_JSON
65
+ })
6366 public Response index() {
6467 LOG.info("Getting license types list ");
6568
....@@ -76,7 +79,9 @@
7679 */
7780 @GET
7881 @Path("/{ltid}")
79
- @Produces({ MediaType.APPLICATION_JSON })
82
+ @Produces({
83
+ MediaType.APPLICATION_JSON
84
+ })
8085 public Response get(@PathParam("ltid") String ltid, @HeaderParam(TokenHelper.TOKEN_HEADER_PÀRAM) String token) {
8186 LOG.info("Getting license type data for id: {}: ", ltid);
8287 if (ltid == null || "".equals(ltid)) {
....@@ -96,7 +101,9 @@
96101 @POST
97102 @Path("/")
98103 @Consumes(MediaType.APPLICATION_JSON)
99
- @Produces({ MediaType.APPLICATION_JSON })
104
+ @Produces({
105
+ MediaType.APPLICATION_JSON
106
+ })
100107 @Transactional
101108 public Response create(LicenseType lt, @HeaderParam(TokenHelper.TOKEN_HEADER_PÀRAM) String token) {
102109 LOG.info("Creating new license type");
....@@ -125,7 +132,9 @@
125132 @Path("/{ltid}")
126133 @Transactional
127134 @Consumes(MediaType.APPLICATION_JSON)
128
- @Produces({ MediaType.APPLICATION_JSON })
135
+ @Produces({
136
+ MediaType.APPLICATION_JSON
137
+ })
129138 public Response modify(LicenseType lt, @PathParam("ltid") String ltid, @HeaderParam(TokenHelper.TOKEN_HEADER_PÀRAM) String token) {
130139 LOG.info("Modifying license type with id: {}", ltid);
131140 EntityManager em = emProvider.get();
....@@ -166,7 +175,9 @@
166175 @DELETE
167176 @Path("/{ltid}")
168177 @Transactional
169
- @Produces({ MediaType.APPLICATION_JSON })
178
+ @Produces({
179
+ MediaType.APPLICATION_JSON
180
+ })
170181 public Response delete(@PathParam("ltid") String ltid, @Context HttpServletRequest request) {
171182 LOG.info("Deleting app with id: {}", ltid);
172183 EntityManager em = emProvider.get();