Search in sources :

Example 26 with BusinessProcessException

use of it.cnr.jada.action.BusinessProcessException in project sigla-main by consiglionazionaledellericerche.

the class ConsGAEComResSintBP method openIterator.

public void openIterator(it.cnr.jada.action.ActionContext context) throws it.cnr.jada.action.BusinessProcessException {
    try {
        if (getPathConsultazione() != null && getPathConsultazione().compareTo(DETT) == 0)
            setIterator(context, createConsGAEComResSintComponentSession().findConsultazione(context.getUserContext(), getBaseclause(), null));
        else {
            it.cnr.jada.util.RemoteIterator ri = ((StampaSituazioneSinteticaGAEComponentSession) EJBCommonServices.createEJB("CNRPDG00_EJB_StampaSituazioneSinteticaGAEComponentSession", StampaSituazioneSinteticaGAEComponentSession.class)).selezionaGae(context.getUserContext(), getBaseclause());
            this.setIterator(context, ri);
        }
    } catch (Throwable e) {
        throw new BusinessProcessException(e);
    }
}
Also used : StampaSituazioneSinteticaGAEComponentSession(it.cnr.contab.pdg00.ejb.StampaSituazioneSinteticaGAEComponentSession) RemoteIterator(it.cnr.jada.util.RemoteIterator) BusinessProcessException(it.cnr.jada.action.BusinessProcessException)

Example 27 with BusinessProcessException

use of it.cnr.jada.action.BusinessProcessException in project sigla-main by consiglionazionaledellericerche.

the class ConsGAEComResSintBP method initVariabili.

public void initVariabili(it.cnr.jada.action.ActionContext context, String livello_destinazione) throws it.cnr.jada.action.BusinessProcessException {
    try {
        this.setPathConsultazione(livello_destinazione);
        if (livello_destinazione != null) {
            setBulkInfo(it.cnr.jada.bulk.BulkInfo.getBulkInfo(V_cons_gae_comp_res_sintesiBulk.class));
            setBulkClass(V_cons_gae_comp_res_sintesiBulk.class);
            getBulkInfo().setShortDescription("Consultazione Situazione Sintetica Rendicontazione GAE");
            getBulkInfo().setLongDescription("Situaz.Sin.Rendicontazione GAE");
        }
    } catch (Throwable e) {
        throw new BusinessProcessException(e);
    }
}
Also used : V_cons_gae_comp_res_sintesiBulk(it.cnr.contab.doccont00.consultazioni.bulk.V_cons_gae_comp_res_sintesiBulk) BusinessProcessException(it.cnr.jada.action.BusinessProcessException)

Example 28 with BusinessProcessException

use of it.cnr.jada.action.BusinessProcessException in project sigla-main by consiglionazionaledellericerche.

the class CRUDRichiestaUopAction method doBringBackSearchFindUnitaOperativaOrd.

public Forward doBringBackSearchFindUnitaOperativaOrd(ActionContext context, RichiestaUopBulk richiesta, UnitaOperativaOrdBulk uop) throws java.rmi.RemoteException {
    richiesta.setUnitaOperativaOrd(uop);
    richiesta.getNumerazioneOrd().setUnitaOperativaOrd(uop);
    ((CRUDBP) context.getBusinessProcess()).setDirty(true);
    if (uop != null) {
        CRUDRichiestaUopBP bp = (CRUDRichiestaUopBP) context.getBusinessProcess();
        try {
            RichiestaUopComponentSession h = (RichiestaUopComponentSession) bp.createComponentSession();
            RichiestaUopBulk richiestaCompleta = h.completaRichiesta(context.getUserContext(), richiesta);
            try {
                bp.setModel(context, richiestaCompleta);
            } catch (BusinessProcessException e) {
            }
        } catch (BusinessProcessException e) {
            return handleException(context, e);
        } catch (java.rmi.RemoteException e) {
            return handleException(context, e);
        } catch (PersistenceException e) {
            return handleException(context, e);
        } catch (PersistencyException e) {
            return handleException(context, e);
        } catch (ComponentException e) {
            return handleException(context, e);
        }
    }
    // }
    return context.findDefaultForward();
}
Also used : CRUDBP(it.cnr.jada.util.action.CRUDBP) RichiestaUopBulk(it.cnr.contab.ordmag.richieste.bulk.RichiestaUopBulk) PersistenceException(javax.persistence.PersistenceException) ComponentException(it.cnr.jada.comp.ComponentException) CRUDRichiestaUopBP(it.cnr.contab.ordmag.richieste.bp.CRUDRichiestaUopBP) PersistencyException(it.cnr.jada.persistency.PersistencyException) RichiestaUopComponentSession(it.cnr.contab.ordmag.richieste.ejb.RichiestaUopComponentSession) BusinessProcessException(it.cnr.jada.action.BusinessProcessException) RemoteException(java.rmi.RemoteException)

Example 29 with BusinessProcessException

use of it.cnr.jada.action.BusinessProcessException in project sigla-main by consiglionazionaledellericerche.

the class CRUDRichiestaUopBP method archiviaFileCMIS.

private void archiviaFileCMIS(UserContext userContext, RichiestaUopBulk richiesta, File file) throws BusinessProcessException {
    try {
        String path = richiesteCMISService.getStorePath(richiesta);
        AllegatoRichiestaBulk allegato = new AllegatoRichiestaBulk();
        allegato.setFile(file);
        allegato.setTitolo("Stampa Richiesta");
        allegato.setNome("Stampa Richiesta");
        allegato.setDescrizione("Stampa Richiesta");
        allegato.setContentType(MimeTypes.PDF.mimetype());
        allegato.setAspectName(RichiesteCMISService.ASPECT_STAMPA_RICHIESTA_ORDINI);
        FileInputStream is = new FileInputStream(allegato.getFile());
        richiesteCMISService.restoreSimpleDocument(allegato, new FileInputStream(allegato.getFile()), allegato.getContentType(), allegato.getNome(), path, false);
    } catch (Exception e) {
        throw handleException(e);
    }
}
Also used : AllegatoRichiestaBulk(it.cnr.contab.ordmag.richieste.bulk.AllegatoRichiestaBulk) ServletException(javax.servlet.ServletException) StorageException(it.cnr.si.spring.storage.StorageException) ValidationException(it.cnr.jada.bulk.ValidationException) ApplicationException(it.cnr.jada.comp.ApplicationException) InvocationTargetException(java.lang.reflect.InvocationTargetException) BusinessProcessException(it.cnr.jada.action.BusinessProcessException) ComponentException(it.cnr.jada.comp.ComponentException)

Example 30 with BusinessProcessException

use of it.cnr.jada.action.BusinessProcessException in project sigla-main by consiglionazionaledellericerche.

the class ConsCdSDaCompletareAction method doEMail.

public Forward doEMail(ActionContext actioncontext) throws RemoteException {
    ConsCdSDaCompletareBP bp = (ConsCdSDaCompletareBP) actioncontext.getBusinessProcess();
    try {
        if (bp.getSelection() != null) {
            bp.setSelection(actioncontext);
            List cds = bp.getSelectedElements(actioncontext);
            if (cds == null)
                return (Forward) actioncontext.findDefaultForward();
            if (cds.isEmpty()) {
                bp.setMessage("Non รจ stata selezionata nessuna riga.");
                return actioncontext.findDefaultForward();
            }
            bp.inviaEMail(actioncontext, cds);
            bp.setMessage("Invio E-Mail effettuato con successo.");
            bp.clearSelection(actioncontext);
        }
    } catch (BusinessProcessException e) {
        handleException(actioncontext, e);
    }
    return actioncontext.findDefaultForward();
}
Also used : ConsCdSDaCompletareBP(it.cnr.contab.incarichi00.bp.ConsCdSDaCompletareBP) List(java.util.List) BusinessProcessException(it.cnr.jada.action.BusinessProcessException)

Aggregations

BusinessProcessException (it.cnr.jada.action.BusinessProcessException)461 ComponentException (it.cnr.jada.comp.ComponentException)155 RemoteException (java.rmi.RemoteException)155 CompoundFindClause (it.cnr.jada.persistency.sql.CompoundFindClause)88 ValidationException (it.cnr.jada.bulk.ValidationException)87 ApplicationException (it.cnr.jada.comp.ApplicationException)69 Iterator (java.util.Iterator)64 RemoteIterator (it.cnr.jada.util.RemoteIterator)63 OggettoBulk (it.cnr.jada.bulk.OggettoBulk)48 DetailedRuntimeException (it.cnr.jada.DetailedRuntimeException)41 ActionContext (it.cnr.jada.action.ActionContext)34 ServletException (javax.servlet.ServletException)34 BigDecimal (java.math.BigDecimal)32 Parametri_cnrBulk (it.cnr.contab.config00.bulk.Parametri_cnrBulk)31 EJBException (javax.ejb.EJBException)29 FillException (it.cnr.jada.bulk.FillException)28 PersistencyException (it.cnr.jada.persistency.PersistencyException)26 Unita_organizzativaBulk (it.cnr.contab.config00.sto.bulk.Unita_organizzativaBulk)24 BulkList (it.cnr.jada.bulk.BulkList)23 IOException (java.io.IOException)23