Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Degree$ComparatorByDegreeTypeAndNameAndId


    public ActionForward removeSelectedDegreesEntry(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        SecondCycleIndividualCandidacyProcessBean bean =
                (SecondCycleIndividualCandidacyProcessBean) getIndividualCandidacyProcessBean();

        Degree selectedDegree = getDomainObject(request, "removeIndex");
        bean.removeSelectedDegree(selectedDegree);

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        invalidateDocumentFileRelatedViewStates();
View Full Code Here


    private SheetData<IEctsConversionTable> exportEnrolmentByDegreeTemplate(EctsTableFilter filter) {
        SheetData<IEctsConversionTable> builder = new SheetData<IEctsConversionTable>(processEnrolmentByDegreeStatus(filter)) {
            @Override
            protected void makeLine(IEctsConversionTable table) {
                Degree degree = (Degree) table.getTargetEntity();
                addCell(BundleUtil.getString(Bundle.GEP, "label.externalId"), degree.getExternalId());
                addCell(BundleUtil.getString(Bundle.GEP, "label.degreeType"), degree.getDegreeType().getLocalizedName());
                addCell(BundleUtil.getString(Bundle.GEP, "label.name"), degree.getName());
                addCell(BundleUtil.getString(Bundle.GEP, "label.curricularYear"), table.getCurricularYear().getYear());
                EctsComparabilityTable ects = table.getEctsTable();
                for (int i = 10; i <= 20; i++) {
                    addCell(i + "", !ects.convert(i).equals(GradeScale.NA) ? ects.convert(i) : null);
                }
View Full Code Here

    @Atomic
    private void importEnrolmentByDegreeTables(AcademicInterval executionInterval, String file) {
        for (String line : file.split("\n")) {
            if (!line.startsWith(BundleUtil.getString(Bundle.GEP, "label.externalId"))) {
                String[] parts = fillArray(line.split(SEPARATOR), 15);
                Degree degree = FenixFramework.getDomainObject(parts[0]);
                if (!degree.getDegreeType().getLocalizedName().equals(parts[1])) {
                    throw new DomainException("error.ects.invalidLine.nonMatchingCourse", parts[0], parts[1], degree
                            .getDegreeType().getLocalizedName());
                }
                if (!degree.getName().equals(parts[2])) {
                    throw new DomainException("error.ects.invalidLine.nonMatchingCourse", parts[0], parts[2], degree.getName());
                }
                CurricularYear year = CurricularYear.readByYear(Integer.parseInt(parts[3]));
                EctsDegreeByCurricularYearConversionTable.createConversionTable(degree, executionInterval, year,
                        Arrays.copyOfRange(parts, 4, 15));
            }
View Full Code Here

    private SheetData<IEctsConversionTable> exportGraduationByDegreeTemplate(EctsTableFilter filter) {
        SheetData<IEctsConversionTable> builder = new SheetData<IEctsConversionTable>(processGraduationByDegreeStatus(filter)) {
            @Override
            protected void makeLine(IEctsConversionTable table) {
                Degree degree = (Degree) table.getTargetEntity();
                addCell(BundleUtil.getString(Bundle.GEP, "label.externalId"), degree.getExternalId());
                addCell(BundleUtil.getString(Bundle.GEP, "label.degreeType"), degree.getDegreeType().getLocalizedName());
                addCell(BundleUtil.getString(Bundle.GEP, "label.name"), degree.getName());
                addCell(BundleUtil.getString(Bundle.GEP, "label.cycle"),
                        table.getCycle() != null ? table.getCycle().ordinal() + 1 : null);
                EctsComparabilityTable ects = table.getEctsTable();
                for (int i = 10; i <= 20; i++) {
                    addCell(i + "", !ects.convert(i).equals(GradeScale.NA) ? ects.convert(i) : null);
View Full Code Here

    @Atomic
    private void importGraduationByDegreeTables(AcademicInterval executionInterval, String file) {
        for (String line : file.split("\n")) {
            if (!line.startsWith(BundleUtil.getString(Bundle.GEP, "label.externalId"))) {
                String[] parts = fillArray(line.split(SEPARATOR), 26);
                Degree degree = FenixFramework.getDomainObject(parts[0]);
                if (!degree.getDegreeType().getLocalizedName().equals(parts[1])) {
                    throw new DomainException("error.ects.invalidLine.nonMatchingCourse", parts[0], parts[1], degree
                            .getDegreeType().getLocalizedName());
                }
                if (!degree.getName().equals(parts[2])) {
                    throw new DomainException("error.ects.invalidLine.nonMatchingCourse", parts[0], parts[2], degree.getName());
                }
                CycleType cycle;
                try {
                    cycle = CycleType.getSortedValues().toArray(new CycleType[0])[Integer.parseInt(parts[3]) - 1];
                } catch (NumberFormatException e) {
View Full Code Here

            Registration registration = registrationWithStateForExecutionYearBean.getRegistration();
            spreadsheet.newRow();
            spreadsheet.addCell(registration.getNumber().toString());
            spreadsheet.addCell(registration.getPerson().getName());
            spreadsheet.addCell(registration.getRegistrationProtocol().getCode());
            Degree degree = registration.getDegree();
            spreadsheet.addCell(!(StringUtils.isEmpty(degree.getSigla())) ? degree.getSigla() : degree.getNameFor(executionYear)
                    .toString());
            spreadsheet.addCell(registrationWithStateForExecutionYearBean.getEnrollmentState().getDescription());
            spreadsheet.addCell(registrationWithStateForExecutionYearBean.getEnrolmentEvaluationType().getDescription());
            if (detailed) {
                spreadsheet.addCell(registration.getPerson().hasDefaultEmailAddress() ? registration.getPerson()
View Full Code Here

    }

    private void addStatisticsInformation(final Spreadsheet spreadsheet, final ExecutionYear executionYear,
            final Set<Degree> degreesToInclude) {
        for (final DegreeCurricularPlan degreeCurricularPlan : executionYear.getDegreeCurricularPlans()) {
            final Degree degree = degreeCurricularPlan.getDegree();
            if (degreesToInclude == null || degreesToInclude.contains(degree)) {
                for (final CurricularCourse curricularCourse : degreeCurricularPlan.getAllCurricularCourses()) {
                    if (curricularCourse.isActive(executionYear)) {
                        final int enrolmentCount = countEnrolments(curricularCourse, executionYear);
                        final Row row = spreadsheet.addRow();
                        row.setCell(degree.getSigla());
                        row.setCell(degree.getPresentationName(executionYear));
                        row.setCell(curricularCourse.getName());
                        row.setCell(Integer.toString(enrolmentCount));
                        row.setCell(Integer.toString(countEnrolments(curricularCourse, executionYear.getFirstExecutionPeriod())));
                        row.setCell(Integer.toString(countEnrolments(curricularCourse, executionYear.getLastExecutionPeriod())));
                    }
View Full Code Here

        AcademicProgram program = FenixFramework.getDomainObject(programOid);
        AdministrativeOffice office = FenixFramework.getDomainObject(officeOid);

        program.setAdministrativeOffice(office);
        if (program instanceof Degree) {
            Degree degree = (Degree) program;
            if (degree.getDegreeType() == DegreeType.BOLONHA_ADVANCED_SPECIALIZATION_DIPLOMA && degree.getPhdProgram() != null) {
                degree.getPhdProgram().setAdministrativeOffice(office);
            }
        }
    }
View Full Code Here

            final ExecutionSemester executionPeriod = enrolment.getExecutionPeriod();
            if (executionPeriod.getExecutionYear() == executionYear) {
                final ThesisPresentationState thesisPresentationState =
                        ThesisPresentationState.getThesisPresentationState(thesis);;

                final Degree degree = enrolment.getStudentCurricularPlan().getDegree();
                final DegreeType degreeType = degree.getDegreeType();

                final Row row = spreadsheet.addRow();
                row.setCell(thesis.getStudent().getNumber().toString());
                row.setCell(thesis.getStudent().getPerson().getName());
                row.setCell(degreeType.getLocalizedName());
                row.setCell(degree.getPresentationName());
                row.setCell(degree.getSigla());
                row.setCell(thesis.getTitle().getContent());
                row.setCell(thesisPresentationState.getName());

                addTeacherRows(thesis, row, ThesisParticipationType.ORIENTATOR);
                addTeacherRows(thesis, row, ThesisParticipationType.COORIENTATOR);
View Full Code Here

        if (getDocumentRequest().isRequestForRegistration()) {
            final StringBuilder res = new StringBuilder();
            RegistryDiplomaRequest request = (RegistryDiplomaRequest) getDocumentRequest();
            CycleType cycle = request.getRequestedCycle();
            Degree degree = request.getDegree();
            final DegreeType degreeType = request.getDegreeType();
            if (degreeType.hasAnyCycleTypes()) {
                res.append(cycle.getDescription(getLocale()));
                res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.of.both")).append(" ");
            }

            if (!degree.isEmpty()) {
                res.append(degreeType.getFilteredName(getLocale()));
                res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.in")).append(" ");
            }

            res.append(degree.getNameI18N(request.getConclusionYear()).getContent(getLanguage()));
            return res.toString();
        } else if (getDocumentRequest().isRequestForPhd()) {
            PhdRegistryDiplomaRequest request = (PhdRegistryDiplomaRequest) getDocumentRequest();
            final StringBuilder res = new StringBuilder();
            res.append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.phd.doctoral.program.designation"));
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.Degree$ComparatorByDegreeTypeAndNameAndId

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.