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);
}
}
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);
}
}
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();
}
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);
}
}
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();
}
Aggregations