Package org.fenixedu.academic.domain.phd.migration

Examples of org.fenixedu.academic.domain.phd.migration.SearchPhdMigrationProcessBean


    // Start of Migration Processes Visualization

    public ActionForward viewMigratedProcesses(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        SearchPhdMigrationProcessBean searchBean =
                (SearchPhdMigrationProcessBean) getObjectFromViewState("searchMigrationProcessBean");

        if (searchBean == null) {
            searchBean = initializeMigrationSearchBean(request);
        }

        AndPredicate<PhdMigrationIndividualProcessData> predicate = searchBean.getPredicates();

        predicate.add(new Predicate<PhdMigrationIndividualProcessData>() {
            @Override
            public boolean eval(PhdMigrationIndividualProcessData process) {
                return AcademicAccessRule
                        .getPhdProgramsAccessibleToFunction(AcademicOperationType.MANAGE_PHD_PROCESSES, Authenticate.getUser())
                        .collect(Collectors.toSet()).contains(process.getProcessBean().getPhdProgram());
            }
        });

        request.setAttribute("searchMigrationProcessBean", searchBean);
        request.setAttribute("migrationProcesses",
                PhdIndividualProgramProcess.searchMigrationProcesses(searchBean.getExecutionYear(), predicate));

        return mapping.findForward("viewAllMigratedProcesses");
    }
View Full Code Here


        return mapping.findForward("viewAllMigratedProcesses");
    }

    protected SearchPhdMigrationProcessBean initializeMigrationSearchBean(HttpServletRequest request) {
        final SearchPhdMigrationProcessBean searchBean = new SearchPhdMigrationProcessBean();
        searchBean.setFilterPhdPrograms(false);
        searchBean.setFilterPhdProcesses(false);

        searchBean.setProcessState(PhdMigrationProcessStateType.CONCLUDED);

        return searchBean;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.phd.migration.SearchPhdMigrationProcessBean

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.