Package org.fenixedu.academic.domain.organizationalStructure

Examples of org.fenixedu.academic.domain.organizationalStructure.Unit


        setConclusionGrade(degreeInfo.getConclusionGrade());
        setConclusionYear(degreeInfo.getConclusionYear());
        setCountryWhereFinishedPreviousCompleteDegree(degreeInfo.getCountry());
        setCountryWhereFinishedHighSchoolLevel(degreeInfo.getCountryHighSchool());

        Unit institution = degreeInfo.getInstitution();
        if (!isUnitFromRaidesListMandatory() || (institution != null && !StringUtils.isEmpty(institution.getCode()))) {
            setInstitution(institution);
            setDegreeDesignation(degreeInfo.getDegreeDesignation());
        }

        setPrecedentDegreeDesignation(degreeInfo.getPrecedentDegreeDesignation());
View Full Code Here


                .getUnitType());
    }

    public ActionForward viewUnit(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        final Unit unit = getUnit(request);
        return viewUnit(mapping, request, unit);
    }
View Full Code Here

            HttpServletResponse response) throws FenixServiceException {

        final CreateExternalUnitBean externalUnitBean = getRenderedObject();

        try {
            final Unit unit = CreateExternalUnit.run(externalUnitBean);
            final String oid =
                    (!externalUnitBean.getParentUnit().isPlanetUnit()) ? externalUnitBean.getParentUnit().getExternalId() : unit
                            .getExternalId();
            request.setAttribute("oid", oid);
            return viewUnit(mapping, actionForm, request, response);

        } catch (final NotAuthorizedException e) {
View Full Code Here

    }

    public ActionForward deleteExternalUnit(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        final Unit unit = getUnit(request);
        final Unit parent = getAnyParentUnit(unit);

        try {
            DeleteExternalUnit.run(unit);
        } catch (final DomainException e) {
            addActionMessage("error", request, e.getMessage());
View Full Code Here

    public ActionForward deleteExternalCurricularCourse(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        final ExternalCurricularCourse externalCurricularCourse = getExternalCurricularCourse(request);
        final Unit parent = externalCurricularCourse.getUnit();

        try {
            DeleteExternalCurricularCourse.run(externalCurricularCourse);
        } catch (final DomainException e) {
            addActionMessage("error", request, e.getMessage());
View Full Code Here

        setRegistration(registration);
    }

    public void edit(ExternalRegistrationDataBean externalRegistrationDataBean) {

        Unit institution = externalRegistrationDataBean.getInstitution();
        if (institution == null && !StringUtils.isEmpty(externalRegistrationDataBean.getInstitutionName())) {
            institution = UnitUtils.readExternalInstitutionUnitByName(externalRegistrationDataBean.getInstitutionName());
            if (institution == null) {
                institution = Unit.createNewNoOfficialExternalInstitution(externalRegistrationDataBean.getInstitutionName());
            }
View Full Code Here

    private static Unit getOrCreateInstitution(final String institutionName) {
        if (institutionName == null || institutionName.isEmpty()) {
            throw new DomainException("error.ExternalPrecedentDegreeCandidacy.invalid.institution.name");
        }

        final Unit unit = Unit.findFirstExternalUnitByName(institutionName);
        return (unit != null) ? unit : Unit.createNewNoOfficialExternalInstitution(institutionName);
    }
View Full Code Here

            throw new NullPointerException("error.email.cannot.be.null");
        }
        setEmail(email);
        sendEmailForApplication();
        setIdDocumentType(IDDocumentType.IDENTITY_CARD);
        final Unit institutionUnit = Bennu.getInstance().getInstitutionUnit();
        if (institutionUnit != null) {
            setNationality(institutionUnit.getCountry());
        }
    }
View Full Code Here

        precedentDegreeInformation.setSchoolLevel(getOriginInformationForm().getSchoolLevel());
        if (getOriginInformationForm().getSchoolLevel() == SchoolLevelType.OTHER) {
            precedentDegreeInformation.setOtherSchoolLevel(getOriginInformationForm().getOtherSchoolLevel());
        }

        Unit institution = getOriginInformationForm().getInstitution();
        if (institution == null) {
            institution = UnitUtils.readExternalInstitutionUnitByName(getOriginInformationForm().getInstitutionName());
            if (institution == null) {
                institution = Unit.createNewNoOfficialExternalInstitution(getOriginInformationForm().getInstitutionName());
            }
View Full Code Here

        if (bean.getInstitutionName() == null || bean.getInstitutionName().isEmpty()) {
            throw new DomainException("error.ExternalPrecedentDegreeCandidacy.invalid.institution.name");
        }

        final Unit unit = Unit.findFirstExternalUnitByName(bean.getInstitutionName());
        return (unit != null) ? unit : Unit.createNewNoOfficialExternalInstitution(bean.getInstitutionName());
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.organizationalStructure.Unit

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.