Search in sources :

Example 1 with Incarichi_proceduraBulk

use of it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk in project sigla-main by consiglionazionaledellericerche.

the class IncarichiProceduraAction method doOnFlApplicazioneNormaChange.

public Forward doOnFlApplicazioneNormaChange(ActionContext context) {
    CRUDIncarichiProceduraBP bp = (CRUDIncarichiProceduraBP) getBusinessProcess(context);
    Incarichi_proceduraBulk procedura = (Incarichi_proceduraBulk) bp.getModel();
    try {
        fillModel(context);
        if (!procedura.isApplicazioneNormaAttiva()) {
            procedura.setTipo_norma_perla(null);
            procedura.setDs_libera_norma_perla(null);
        }
        return context.findDefaultForward();
    } catch (Throwable ex) {
        return handleException(context, ex);
    }
}
Also used : CRUDIncarichiProceduraBP(it.cnr.contab.incarichi00.bp.CRUDIncarichiProceduraBP) Incarichi_proceduraBulk(it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk)

Example 2 with Incarichi_proceduraBulk

use of it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk in project sigla-main by consiglionazionaledellericerche.

the class IncarichiProceduraAction method doMergeAllegatiWithCMIS.

public Forward doMergeAllegatiWithCMIS(ActionContext actioncontext) {
    try {
        String esercizio = ((HttpActionContext) actioncontext).getParameter("esercizio");
        String nr_procedura = ((HttpActionContext) actioncontext).getParameter("procedura");
        String password = ((HttpActionContext) actioncontext).getParameter("password");
        if (esercizio != null && password.equals("MERGE21012013")) {
            IncarichiProceduraComponentSession proceduraComponent = Utility.createIncarichiProceduraComponentSession();
            CNRUserContext userContext = new CNRUserContext("MERGE", "sessionId", 2013, "999.000", "999", "999.000.000");
            List l = proceduraComponent.getIncarichiForMergeWithCMIS(userContext, Integer.valueOf(esercizio), nr_procedura != null ? Long.valueOf(nr_procedura) : null);
            logger.debug("Esercizio: " + esercizio + " - Nr record: " + l.size());
            int i = 0;
            for (Object object : l) {
                i++;
                Incarichi_proceduraBulk procedura = (Incarichi_proceduraBulk) object;
                try {
                    List<String> listError = proceduraComponent.mergeAllegatiWithCMIS(userContext, (Incarichi_proceduraBulk) object);
                    for (String error : listError) logger.debug(error);
                    logger.debug("OK - Esercizio: " + esercizio + " - Rec " + i + " di " + l.size() + " - Procedura: " + procedura.getEsercizio() + "/" + procedura.getPg_procedura());
                } catch (Exception e) {
                    logger.error("ERRORE: Procedura: " + procedura.getEsercizio() + "/" + procedura.getPg_procedura(), e);
                }
            }
            logger.debug("PROCEDURA MIGRAZIONE TERMINATA - Esercizio: " + esercizio);
        }
    } catch (Exception e) {
        logger.error("Errore: ", e);
    }
    return actioncontext.findDefaultForward();
}
Also used : HttpActionContext(it.cnr.jada.action.HttpActionContext) Incarichi_proceduraBulk(it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk) IncarichiProceduraComponentSession(it.cnr.contab.incarichi00.ejb.IncarichiProceduraComponentSession) List(java.util.List) CNRUserContext(it.cnr.contab.utenze00.bp.CNRUserContext) ValidationException(it.cnr.jada.bulk.ValidationException) RemoteException(java.rmi.RemoteException) BusinessProcessException(it.cnr.jada.action.BusinessProcessException) FillException(it.cnr.jada.bulk.FillException)

Example 3 with Incarichi_proceduraBulk

use of it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk in project sigla-main by consiglionazionaledellericerche.

the class IncarichiProceduraAction method doBringBackSearchFind_tipo_incarico.

public Forward doBringBackSearchFind_tipo_incarico(ActionContext context, Incarichi_proceduraBulk procedura, Tipo_incaricoBulk tipo_incarico) {
    try {
        fillModel(context);
        CRUDIncarichiProceduraBP bp = (CRUDIncarichiProceduraBP) getBusinessProcess(context);
        bp.setModel(context, bp.initializeFind_tipo_incarico(context, procedura, tipo_incarico));
        return context.findDefaultForward();
    } catch (Throwable ex) {
        return handleException(context, ex);
    }
}
Also used : CRUDIncarichiProceduraBP(it.cnr.contab.incarichi00.bp.CRUDIncarichiProceduraBP)

Example 4 with Incarichi_proceduraBulk

use of it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk in project sigla-main by consiglionazionaledellericerche.

the class IncarichiProceduraAction method doOnNrContrattiChange.

public Forward doOnNrContrattiChange(ActionContext context) {
    CRUDIncarichiProceduraBP bp = (CRUDIncarichiProceduraBP) getBusinessProcess(context);
    Incarichi_proceduraBulk procedura = (Incarichi_proceduraBulk) (bp.getModel());
    Integer oldNrContratti = 1;
    if (procedura.getNr_contratti() != null)
        oldNrContratti = procedura.getNr_contratti();
    try {
        fillModel(context);
        if (procedura.getNr_contratti() != null) {
            if (procedura.getNr_contratti().compareTo(procedura.getIncarichi_repertorioColl().size()) == -1)
                throw new ValidationException("Non \350 possibile definire un numero di contratti inferiore a quelli gi\340 effettivamente inseriti.");
            if (procedura.getNr_contratti().compareTo(0) != 1)
                throw new ValidationException("Non \350 possibile definire un numero di contratti uguale o inferiore a 0.");
        }
        return doOnImportoLordoChange(context);
    } catch (Throwable ex) {
        // In caso di errore ripropongo la data precedente
        procedura.setNr_contratti(oldNrContratti);
        try {
            return handleException(context, ex);
        } catch (Throwable e) {
            return handleException(context, e);
        }
    }
}
Also used : CRUDIncarichiProceduraBP(it.cnr.contab.incarichi00.bp.CRUDIncarichiProceduraBP) ValidationException(it.cnr.jada.bulk.ValidationException) Incarichi_proceduraBulk(it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk)

Example 5 with Incarichi_proceduraBulk

use of it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk in project sigla-main by consiglionazionaledellericerche.

the class IncarichiProceduraAction method doMigraFromDBToCMIS.

public Forward doMigraFromDBToCMIS(ActionContext actioncontext) {
    try {
        String esercizio = ((HttpActionContext) actioncontext).getParameter("esercizio");
        String nr_procedura = ((HttpActionContext) actioncontext).getParameter("procedura");
        String password = ((HttpActionContext) actioncontext).getParameter("password");
        if (esercizio != null && password.equals("MIGRA21012013")) {
            IncarichiProceduraComponentSession proceduraComponent = Utility.createIncarichiProceduraComponentSession();
            CNRUserContext userContext = new CNRUserContext("MIGRA", "sessionId", 2013, "999.000", "999", "999.000.000");
            List l = proceduraComponent.getIncarichiForMigrateFromDBToCMIS(userContext, Integer.valueOf(esercizio), nr_procedura != null ? Long.valueOf(nr_procedura) : null);
            logger.debug("Esercizio: " + esercizio + " - Nr record: " + l.size());
            int i = 0;
            for (Object object : l) {
                i++;
                Incarichi_proceduraBulk procedura = (Incarichi_proceduraBulk) object;
                try {
                    proceduraComponent.migrateAllegatiFromDBToCMIS(userContext, (Incarichi_proceduraBulk) object);
                    logger.debug("OK - Esercizio: " + esercizio + " - Rec " + i + " di " + l.size() + " - Procedura: " + procedura.getEsercizio() + "/" + procedura.getPg_procedura());
                } catch (Exception e) {
                    logger.error("ERRORE: Procedura: " + procedura.getEsercizio() + "/" + procedura.getPg_procedura(), e);
                }
            }
            logger.debug("PROCEDURA MIGRAZIONE TERMINATA - Esercizio: " + esercizio);
        }
    } catch (Exception e) {
        logger.error("Errore: ", e);
    }
    return actioncontext.findDefaultForward();
}
Also used : HttpActionContext(it.cnr.jada.action.HttpActionContext) Incarichi_proceduraBulk(it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk) IncarichiProceduraComponentSession(it.cnr.contab.incarichi00.ejb.IncarichiProceduraComponentSession) List(java.util.List) CNRUserContext(it.cnr.contab.utenze00.bp.CNRUserContext) ValidationException(it.cnr.jada.bulk.ValidationException) RemoteException(java.rmi.RemoteException) BusinessProcessException(it.cnr.jada.action.BusinessProcessException) FillException(it.cnr.jada.bulk.FillException)

Aggregations

Incarichi_proceduraBulk (it.cnr.contab.incarichi00.bulk.Incarichi_proceduraBulk)38 RemoteException (java.rmi.RemoteException)22 ValidationException (it.cnr.jada.bulk.ValidationException)21 ApplicationException (it.cnr.jada.comp.ApplicationException)18 ComponentException (it.cnr.jada.comp.ComponentException)18 CRUDIncarichiProceduraBP (it.cnr.contab.incarichi00.bp.CRUDIncarichiProceduraBP)17 Incarichi_repertorioBulk (it.cnr.contab.incarichi00.bulk.Incarichi_repertorioBulk)16 BusinessProcessException (it.cnr.jada.action.BusinessProcessException)16 IOException (java.io.IOException)14 BulkList (it.cnr.jada.bulk.BulkList)10 ApplicationRuntimeException (it.cnr.jada.comp.ApplicationRuntimeException)10 ServletException (javax.servlet.ServletException)10 Iterator (java.util.Iterator)8 IncarichiProceduraComponentSession (it.cnr.contab.incarichi00.ejb.IncarichiProceduraComponentSession)7 IntrospectionException (it.cnr.jada.persistency.IntrospectionException)7 EJBException (javax.ejb.EJBException)7 RemoteIterator (it.cnr.jada.util.RemoteIterator)6 BigDecimal (java.math.BigDecimal)6 TerzoBulk (it.cnr.contab.anagraf00.core.bulk.TerzoBulk)5 Procedure_amministrativeBulk (it.cnr.contab.config00.contratto.bulk.Procedure_amministrativeBulk)5