Package br.gov.serpro.ouvidoria.controller.andamento

Examples of br.gov.serpro.ouvidoria.controller.andamento.SolucaoCtrl


        DynaActionForm _form = (DynaActionForm) form;

        String id = _form.getString("idSolucao");

        try {
            SolucaoCtrl ctrlSolucao = new SolucaoCtrl(getDaoFactory());

            // Verifica se foi passado o id do script
            if (id != null) {
                Solucao solucao = ctrlSolucao.get(new Long(id));

                // Se não encontrou o script, reporta o erro
                if (solucao == null) {
                    errorMsgs.add(ActionMessages.GLOBAL_MESSAGE,
                            new ActionMessage("error.script.notFound"));
                    saveMessages(request, errorMsgs);
                } else {
                    // Aprova o script
                  solucao.setEstado(EstadoSolucao.APROVADO);

                    // Salva o script
                    ctrlSolucao.save(solucao);
                }
            }

        } catch (DaoException e) {
            errorMsgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
View Full Code Here


        String id = _form.getString("idSolucao");
        String obs = _form.getString("txtObs");

        try {
            SolucaoCtrl ctrlSolucao = new SolucaoCtrl(getDaoFactory());

            // Verifica se foi passado o id do Solucao
            if (id != null) {
                Solucao solucao = ctrlSolucao.get(new Long(id));

                // Se não encontrou o Solucao, reporta o erro
                if (solucao == null) {
                    errorMsgs.add(ActionMessages.GLOBAL_MESSAGE,
                            new ActionMessage("error.solucao.notFound"));
                    saveMessages(request, errorMsgs);
                } else {
                    // Reprova o solucao
                    solucao.setEstado(EstadoSolucao.REPROVADO);
                    solucao.setObservacao(obs);

                    // Salva o solucao
                    ctrlSolucao.save(solucao);
                }
            }

        } catch (DaoException e) {
            errorMsgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
View Full Code Here

TOP

Related Classes of br.gov.serpro.ouvidoria.controller.andamento.SolucaoCtrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.