Exemple #1
0
 private String getPeriod() {
   String period = null;
   try {
     ISPACConfiguration config = ISPACConfiguration.getInstance();
     period = config.get(ISPACConfiguration.KEEP_ALIVE);
     Integer.parseInt(period);
   } catch (NumberFormatException e) {
     period = DEFAULT_PERIOD;
   } catch (ISPACException e) {
     period = DEFAULT_PERIOD;
   }
   return period;
 }
Exemple #2
0
 /**
  * Obtiene la lista de expedientes enviados a la papelera
  *
  * @fechaInicio Fecha de creación del expediente
  * @fechaEliminacion Fecha de eliminación del expediente
  * @procedimiento Procedimiento al que pertenece el expediente
  * @return
  * @throws ISPACException
  */
 public IItemCollection getExpedientsSentToTrash(
     String fechaInicio, String fechaEliminacion, int procedimiento) throws ISPACException {
   DbCnt cnt = mcontext.getConnection();
   try {
     String sMaxResultados =
         ISPACConfiguration.getInstance().get(ISPACConfiguration.MAX_EXPS_SHOW_TRASH);
     int max = 0;
     if (StringUtils.isNotBlank(sMaxResultados)) {
       max = TypeConverter.parseInt(sMaxResultados.trim(), 0);
     }
     return TXProcesoDAO.getExpedients(
         cnt,
         "PROCESOS.TIPO="
             + IProcess.PROCESS_TYPE
             + " AND PROCESOS.ESTADO="
             + TXConstants.STATUS_DELETED,
         max,
         fechaInicio,
         fechaEliminacion,
         procedimiento);
   } catch (ISPACException ie) {
     throw new ISPACException("Error en invesflowAPI:getExpedientsSentToTrash()", ie);
   } finally {
     mcontext.releaseConnection(cnt);
   }
 }
 /**
  * Constructor.
  *
  * @throws ISPACException si ocurre algún error.
  */
 private ProcessSignConnectorFactory() throws ISPACException {
   className =
       ISPACConfiguration.getInstance().get(ISPACConfiguration.PROCESS_SIGN_CONNECTOR_CLASS);
   if (className == null) {
     className = defaultImplClass;
   }
 }