Package br.gov.serpro.ouvidoria.controller.acionamento

Examples of br.gov.serpro.ouvidoria.controller.acionamento.ConsultarScriptCtrl


            throws Exception {

        ActionErrors errors = new ActionErrors();
        try {

            ConsultarScriptCtrl consultarScriptCtrl = new ConsultarScriptCtrl(
                    getDaoFactory());

            Long id = new Long(request.getParameter("id"));

            Script script = consultarScriptCtrl.get(id);

            if (script == null) {
                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "error.script.notFound"));
            }
View Full Code Here


                    || (_form.get("idScript") == "")) {
                throw new NullPointerException(
                        "ID do script não pode ser nulo.");
            }

            ConsultarScriptCtrl consultarScriptCtrl = new ConsultarScriptCtrl(
                    getDaoFactory());

            Long idScript = new Long(_form.get("idScript").toString());

            // Recupera o script
            Script script = consultarScriptCtrl.get(idScript);

            // Recupera o Funcionário logado
            Long funcionarioId = (Long) request.getSession().getAttribute(Constants.PA_FUNCIONARIO);
           
          FuncionarioCtrl funcionarioCtrl = new FuncionarioCtrl(getDaoFactory());
         
          Funcionario func = (Funcionario) funcionarioCtrl.get(funcionarioId)

            // salva o atendimento
            consultarScriptCtrl.salvarAtendimento(script, func);

            //Gerar histórico
            this.geraHistorico(request, null);

        } catch (DaoException e) {
View Full Code Here

        List historicoTextos;
        List scripts = null;
        ActionErrors errors = new ActionErrors();

        try {
            ConsultarScriptCtrl consultarScriptCtrl = new ConsultarScriptCtrl(
                    getDaoFactory());

            DynaActionForm _form = (DynaActionForm) form;

            String lsTexto = _form.getString("txtBusca");
            String lsAssunto = _form.getString("txtAssunto");
            String lsBuscarNovamente = _form.getString("chkBuscarNovamente");

            // recuperar historico dos textos de busca usados pelo usuario
            // logado
            historicoTextos = (List) request.getSession().getAttribute(
                    "historicoTextos");

            if (historicoTextos == null)
                historicoTextos = new ArrayList();

            // se não é busca nos resultados, limpar histórico
            if ((lsBuscarNovamente != null)
                    && (!lsBuscarNovamente.equalsIgnoreCase("S"))) {
                historicoTextos.clear();
            }

            // Recupera o Funcionário logado
            Long funcionarioId = (Long) request.getSession().getAttribute(Constants.PA_FUNCIONARIO);
           
          FuncionarioCtrl funcionarioCtrl = new FuncionarioCtrl(getDaoFactory());
         
          Funcionario func = (Funcionario) funcionarioCtrl.get(funcionarioId)

            // recupera os scripts
            scripts = consultarScriptCtrl.ListarScript(lsTexto, lsAssunto,
                    func, lsBuscarNovamente, historicoTextos);

            if (scripts == null) {
                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "error.script.notFound"));
View Full Code Here

TOP

Related Classes of br.gov.serpro.ouvidoria.controller.acionamento.ConsultarScriptCtrl

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.