Changeset fc4d3bb in murachi
- Timestamp:
- Sep 16, 2015, 2:27:47 PM (9 years ago)
- Branches:
- master
- Children:
- 6c39b8a
- Parents:
- 5dcf8b7
- Location:
- murachi
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
murachi/.classpath
r99d1e61 rfc4d3bb 62 62 <classpathentry kind="lib" path="/home/aaraujo/desarrollo/2015/servicioVerificacion/src/murachi/murachi/WebContent/WEB-INF/lib/xalan.jar"/> 63 63 <classpathentry kind="lib" path="/home/aaraujo/desarrollo/2015/servicioVerificacion/src/murachi/murachi/WebContent/WEB-INF/lib/xmlsec.jar"/> 64 <classpathentry kind="lib" path="/home/aaraujo/desarrollo/2015/servicioVerificacion/src/murachi/murachi/WebContent/WEB-INF/lib/postgresql-9.4-1202.jdbc4.jar"/> 64 65 <classpathentry kind="output" path="target/classes"/> 65 66 </classpath> -
murachi/src/main/java/ve/gob/cenditel/murachi/MurachiRESTWS.java
r5dcf8b7 rfc4d3bb 45 45 import javax.ws.rs.FormParam; 46 46 import javax.ws.rs.GET; 47 import javax.ws.rs.NameBinding;48 47 import javax.ws.rs.POST; 49 48 import javax.ws.rs.Path; … … 119 118 import org.apache.tika.Tika; 120 119 120 121 121 @Path("/archivos") 122 122 public class MurachiRESTWS { … … 129 129 //private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/tmp/murachi/"; 130 130 private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/var/lib/tomcat7/murachiWorkingDirectory/"; 131 132 131 133 132 private static final String SHA256_MESSAGE_DIGEST = "SHA256"; 134 133 … … 139 138 private final String DIGIDOC4J_TSL_LOCATION = "file://" + getAbsolutePathOfResource("venezuela-tsl.xml"); 140 139 141 140 private final String databaseHost = "localhost"; 141 142 private final String databasePort = "5432"; 143 144 private final String databaseName = "databasemurachi"; 145 146 private final String databaseLogin = "aaraujo"; 147 148 private final String databasePassword = "aaraujo"; 149 142 150 143 151 // para reportes de advertencias de BDOC … … 4974 4982 } 4975 4983 4984 4985 /** 4986 * Retorna un JSON con estadisticas de uso del servicio. 4987 * 4988 * @return JSON con estadisticas de uso del servicio. 4989 */ 4990 @GET 4991 @Path("/estadisticas") 4992 @Produces(MediaType.APPLICATION_JSON) 4993 public Response getStatisctics() { 4994 4995 logger.info("/estadisticas "); 4996 String result = ""; 4997 4998 MURACHIStatistic statistic = new MURACHIStatistic(databaseHost, databasePort, databaseName, databaseLogin, databasePassword); 4999 5000 /* 5001 try { 5002 statistic.createDatabaseTables(); 5003 } catch (InstantiationException | IllegalAccessException e) { 5004 logger.error("error al crear la base de datos de estadisticas: " + e.getMessage()); 5005 result = "\"error\":\"no se pudo crear la base de datos de estadisticas del servicio.\""; 5006 return Response.status(500).entity(result).build(); 5007 } 5008 */ 5009 5010 5011 //statistic.incrementSignatures(0); 5012 5013 int countSignatures = statistic.countOfSigantures(); 5014 logger.debug("fimas realizadas correctamente: "+ Integer.toString(countSignatures)); 5015 5016 JSONObject jsonObject = new JSONObject(); 5017 jsonObject.put("numeroDeFirmasEjecutadas", Integer.toString(countSignatures)); 5018 5019 int countSignaturesError = statistic.countOfSiganturesFailed(); 5020 jsonObject.put("numeroDeFimasIncompletas", Integer.toString(countSignaturesError)); 5021 5022 int countVerifications = statistic.countOfVerifications(); 5023 jsonObject.put("numeroDeVerificaciones", Integer.toString(countVerifications)); 5024 5025 result = jsonObject.toString(); 5026 5027 return Response.status(200).entity(result).build(); 5028 } 5029 5030 5031 4976 5032 4977 5033 // ************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.