All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.cnr.contab.doccont00.consultazioni.action.ConsStatoInvioAction Maven / Gradle / Ivy

/*
 * Copyright (C) 2019  Consiglio Nazionale delle Ricerche
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Affero General Public License as
 *     published by the Free Software Foundation, either version 3 of the
 *     License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Affero General Public License for more details.
 *
 *     You should have received a copy of the GNU Affero General Public License
 *     along with this program.  If not, see .
 */

package it.cnr.contab.doccont00.consultazioni.action;

import it.cnr.contab.doccont00.consultazioni.bp.ConsStatoInvioBP;
import it.cnr.jada.action.ActionContext;
import it.cnr.jada.action.BusinessProcess;
import it.cnr.jada.action.BusinessProcessException;
import it.cnr.jada.action.Forward;
import it.cnr.jada.util.action.SelezionatoreListaAction;

public class ConsStatoInvioAction extends SelezionatoreListaAction {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    public ConsStatoInvioAction() {
        super();
    }

    @Override
    protected Forward perform(ActionContext actioncontext, String s) {
        Forward forward = super.perform(actioncontext, s);
        BusinessProcess bp = actioncontext.getBusinessProcess();
        try {
            if (bp.getName().equals("ConsStatoInvioMandatiBP") || bp.getName().equals("ConsStatoInvioReversaliBP"))
                ((ConsStatoInvioBP) bp).setContabiliEnabled(actioncontext);
        } catch (Throwable e) {
            return handleException(actioncontext, e);
        }
        return forward;
    }

    @Override
    public Forward basicDoBringBack(ActionContext actioncontext) throws BusinessProcessException {
        return actioncontext.findDefaultForward();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy