| .. | .. |
|---|
| 33 | 33 | public class LicenseServices { |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | // private LicenseHelper licenseHelper = InjectorFactory.getInjector().getInstance(LicenseHelper.class); |
|---|
| 36 | | - private static final Logger log = LogManager.getLogger(LicenseServices.class); |
|---|
| 36 | + private static final Logger LOG = LogManager.getLogger(LicenseServices.class); |
|---|
| 37 | 37 | |
|---|
| 38 | 38 | private static final int DEFAULT_LICENSE_EXPIRATION = 365; |
|---|
| 39 | 39 | private static final String LICENSE_STRING = "CurisIntegrity Config Server v{0}.{1}"; |
|---|
| .. | .. |
|---|
| 58 | 58 | String index = IOUtils.toString(this.getClass().getResourceAsStream("/static/index.html")); |
|---|
| 59 | 59 | return Response.ok().entity(index).build(); |
|---|
| 60 | 60 | } catch (IOException e) { |
|---|
| 61 | | - // TODO Auto-generated catch block |
|---|
| 62 | | - e.printStackTrace(); |
|---|
| 61 | + LOG.error("Error getting index.html", e); |
|---|
| 63 | 62 | } |
|---|
| 64 | 63 | return Response.ok().entity(MessageFormat.format(LICENSE_STRING, 0, 1)).build(); |
|---|
| 65 | 64 | } |
|---|
| .. | .. |
|---|
| 69 | 68 | @Produces( |
|---|
| 70 | 69 | { MediaType.TEXT_PLAIN }) |
|---|
| 71 | 70 | public Response dummy(@Context HttpServletRequest request) { |
|---|
| 72 | | - log.info("Request: " + request.getPathInfo()); |
|---|
| 71 | + LOG.info("Request: " + request.getPathInfo()); |
|---|
| 73 | 72 | return Response.ok().entity((uri == null)).build(); |
|---|
| 74 | 73 | } |
|---|
| 75 | 74 | |
|---|
| .. | .. |
|---|
| 82 | 81 | @Produces( |
|---|
| 83 | 82 | { MediaType.APPLICATION_JSON }) |
|---|
| 84 | 83 | public Response testFile1(@MultipartForm FileUploadForm mfdi) { |
|---|
| 85 | | - log.info("FORM: texto: {}, file: {}", mfdi.getTexto(), new String(mfdi.getFile())); |
|---|
| 84 | + LOG.info("FORM: texto: {}, file: {}", mfdi.getTexto(), new String(mfdi.getFile())); |
|---|
| 86 | 85 | return Response.ok("OK").build(); |
|---|
| 87 | 86 | } |
|---|
| 88 | 87 | |
|---|
| .. | .. |
|---|
| 92 | 91 | { MediaType.APPLICATION_JSON }) |
|---|
| 93 | 92 | public ServiceResponse<ServerConfigVersions> testFile(@PathParam("license") String license, @DefaultValue("-1") @QueryParam("minorVersion") int minorVersion, @DefaultValue("-1") @QueryParam("majorVersion") int majorVersion) { |
|---|
| 94 | 93 | |
|---|
| 95 | | - log.info("Called 'current' service with license: {}", license); |
|---|
| 94 | + LOG.info("Called 'current' service with license: {}", license); |
|---|
| 96 | 95 | ServiceResponse<ServerConfigVersions> response = new ServiceResponse<ServerConfigVersions>(); |
|---|
| 97 | 96 | |
|---|
| 98 | 97 | return response; |
|---|