Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoCurricularYear


    public ActionForward listClasses(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        AcademicInterval academicInterval =
                AcademicInterval.getAcademicIntervalFromResumedString((String) request
                        .getAttribute(PresentationConstants.ACADEMIC_INTERVAL));
        InfoCurricularYear infoCurricularYear = (InfoCurricularYear) request.getAttribute(PresentationConstants.CURRICULAR_YEAR);
        InfoExecutionDegree infoExecutionDegree =
                (InfoExecutionDegree) request.getAttribute(PresentationConstants.EXECUTION_DEGREE);

        final ExecutionDegree executionDegree = FenixFramework.getDomainObject(infoExecutionDegree.getExternalId());

        final Set<SchoolClass> classes;
        Integer curricularYear = infoCurricularYear.getYear();
        if (curricularYear != null) {
            classes = executionDegree.findSchoolClassesByAcademicIntervalAndCurricularYear(academicInterval, curricularYear);
        } else {
            classes = executionDegree.findSchoolClassesByAcademicInterval(academicInterval);
        }
View Full Code Here


            throws Exception {

        DynaValidatorForm classForm = (DynaValidatorForm) form;
        String className = (String) classForm.get("className");

        InfoCurricularYear infoCurricularYear = (InfoCurricularYear) request.getAttribute(PresentationConstants.CURRICULAR_YEAR);
        InfoExecutionDegree infoExecutionDegree =
                (InfoExecutionDegree) request.getAttribute(PresentationConstants.EXECUTION_DEGREE);
        AcademicInterval academicInterval =
                AcademicInterval.getAcademicIntervalFromResumedString((String) request
                        .getAttribute(PresentationConstants.ACADEMIC_INTERVAL));

        Integer curricularYear = infoCurricularYear.getYear();

        try {
            CriarTurma.run(className, curricularYear, infoExecutionDegree, academicInterval);

        } catch (DomainException e) {
View Full Code Here

    private void readAndSetInfoToManageShifts(HttpServletRequest request) throws FenixServiceException, Exception {
        ContextSelectionBean context = (ContextSelectionBean) request.getAttribute(PresentationConstants.CONTEXT_SELECTION_BEAN);
        List<InfoShift> infoShifts =
                ReadShiftsByExecutionPeriodAndExecutionDegreeAndCurricularYear.run(context.getAcademicInterval(),
                        new InfoExecutionDegree(context.getExecutionDegree()),
                        new InfoCurricularYear(context.getCurricularYear()));

        Collections.sort(infoShifts, InfoShift.SHIFT_COMPARATOR_BY_TYPE_AND_ORDERED_LESSONS);

        if (infoShifts != null && !infoShifts.isEmpty()) {
            request.setAttribute(PresentationConstants.SHIFTS, infoShifts);
View Full Code Here

    static List getExecutionCourses(HttpServletRequest request) throws Exception {

        List infoCourseList = new ArrayList();

        // Ler Disciplinas em Execucao
        InfoCurricularYear infoCurricularYear = (InfoCurricularYear) request.getAttribute(PresentationConstants.CURRICULAR_YEAR);
        InfoExecutionDegree infoExecutionDegree =
                (InfoExecutionDegree) request.getAttribute(PresentationConstants.EXECUTION_DEGREE);
        AcademicInterval academicInterval =
                AcademicInterval.getAcademicIntervalFromResumedString((String) request
                        .getAttribute(PresentationConstants.ACADEMIC_INTERVAL));

        infoCourseList =
                LerDisciplinasExecucaoDeLicenciaturaExecucaoEAnoCurricular.run(infoExecutionDegree, academicInterval,
                        infoCurricularYear.getYear());

        request.setAttribute(PresentationConstants.EXECUTION_COURSE_LIST_KEY, infoCourseList);

        return infoCourseList;
View Full Code Here

        String curricularYearOID = null;
        if (curricularYearOIDString != null && !curricularYearOIDString.equals("null")) {
            curricularYearOID = curricularYearOIDString;
        }

        InfoCurricularYear infoCurricularYear = null;

        if (curricularYearOID != null) {
            // Read from database
            try {

                infoCurricularYear = ReadCurricularYearByOID.run(curricularYearOID);
            } catch (FenixServiceException e) {
                logger.error(e.getMessage(), e);
            }

            if (infoCurricularYear != null) {
                // Place it in request
                request.setAttribute(PresentationConstants.CURRICULAR_YEAR, infoCurricularYear);
                request.setAttribute(PresentationConstants.CURRICULAR_YEAR_OID, infoCurricularYear.getExternalId().toString());
            }

        }
    }
View Full Code Here

        if (context.getExecutionDegree() != null) {
            request.setAttribute(PresentationConstants.EXECUTION_DEGREE, new InfoExecutionDegree(context.getExecutionDegree()));
        }

        request.setAttribute(PresentationConstants.CURRICULAR_YEAR, new InfoCurricularYear(context.getCurricularYear()));
    }
View Full Code Here

*/
public class ReadCurricularYearByOID {

    @Atomic
    public static InfoCurricularYear run(String oid) throws FenixServiceException {
        InfoCurricularYear result = null;

        CurricularYear curricularYear = FenixFramework.getDomainObject(oid);
        if (curricularYear != null) {
            result = InfoCurricularYear.newInfoFromDomain(curricularYear);
        } else {
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoCurricularYear

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.