Package org.fenixedu.academic.domain.organizationalStructure

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


    @Override
    protected Collection<Unit> search(final String value, final int size) {
        final Collection<UnitName> unitNames = UnitName.find(value, size);
        final List<Unit> resultUnits = new ArrayList<Unit>();
        for (final UnitName name : unitNames) {
            final Unit unit = name.getUnit();
            resultUnits.add(unit);
        }
        return resultUnits;
    }
View Full Code Here


        units.addAll(UnitUtils.readAllActiveUnitsByType(PartyTypeEnum.SCIENTIFIC_AREA));
        // units.addAll(UnitUtils.readAllActiveUnitsByClassification(UnitClassification.ASSOCIATED_LABORATORY));
        // units.addAll(UnitUtils.readAllActiveUnitsByClassification(UnitClassification.SCIENCE_INFRASTRUCTURE));
        // units.addAll(UnitUtils.readAllActiveUnitsByClassification(UnitClassification.RESEARCH_UNIT));
        for (Iterator<Unit> iterator = units.iterator(); iterator.hasNext();) {
            Unit unit = iterator.next();
            if (unit.getUnitName().getIsExternalUnit()) {
                iterator.remove();
            }
        }

        return super.process(units, value, maxCount, argsMap);
View Full Code Here

    @Override
    protected Collection<Unit> search(String value, int size) {
        Collection<UnitName> unitNames = UnitName.find(value, size);
        List<Unit> resultUnits = new ArrayList<Unit>();
        for (UnitName name : unitNames) {
            Unit unit = name.getUnit();
            if (unit.isDepartmentUnit() || unit.isScientificAreaUnit()) {
                resultUnits.add(unit);
            }
        }
        return resultUnits;
    }
View Full Code Here

    }

    public Department getDepartment() {
        String selectedDepartmentUnitID = getAndHoldStringParameter("selectedDepartmentUnitID");
        if (selectedDepartmentUnitID != null) {
            Unit departmentUnit = (Unit) FenixFramework.getDomainObject(selectedDepartmentUnitID);
            return departmentUnit.getDepartment();
        } else {
            return null;
        }
    }
View Full Code Here

            if (department.getAcronym().equals(departmentCode)) {
                return department;
            }
        }
        if (StringUtils.isNumeric(departmentCode)) {
            final Unit unit = Unit.readByCostCenterCode(new Integer(departmentCode));
            if (unit != null) {
                final org.fenixedu.academic.domain.organizationalStructure.DepartmentUnit departmentUnit =
                        unit.getDepartmentUnit();
                return departmentUnit == null ? null : departmentUnit.getDepartment();
            }
        }
        return null;
    }
View Full Code Here

        }
        return false;
    }

    private boolean hasPersistentGroup(final String toName) {
        final Unit unit = getUnit();
        for (final PersistentGroupMembers persistentGroupMembers : unit.getPersistentGroupsSet()) {
            if (persistentGroupMembers.getName().equals(toName)) {
                return true;
            }
        }
        return false;
View Full Code Here

        return false;
    }

    @Atomic
    private void updateRecipients() {
        final Unit unit = getUnit();
        if (unit != null) {

            for (final Group group : unit.getGroups()) {
                if (!hasRecipientWithToName(group.getPresentationName())) {
                    createRecipient(group);
                }
            }

            for (final PersistentGroupMembers persistentGroupMembers : unit.getPersistentGroupsSet()) {
                if (!hasRecipientWithToName(persistentGroupMembers.getName())) {
                    createRecipient(persistentGroupMembers);
                }
            }
            for (final Recipient recipient : super.getRecipientsSet()) {
View Full Code Here

    public void edit(PersonalIngressionData personalIngressionData, Registration registration,
            PrecedentDegreeInformationBean precedentDegreeInformationBean, StudentCandidacy studentCandidacy) {
        setPersonalIngressionData(personalIngressionData);
        setRegistration(registration);
        setStudentCandidacy(studentCandidacy);
        Unit institution = precedentDegreeInformationBean.getInstitution();
        if (institution == null && !StringUtils.isEmpty(precedentDegreeInformationBean.getInstitutionName())) {
            institution = UnitUtils.readExternalInstitutionUnitByName(precedentDegreeInformationBean.getInstitutionName());
            if (institution == null) {
                institution = Unit.createNewNoOfficialExternalInstitution(precedentDegreeInformationBean.getInstitutionName());
            }
View Full Code Here

        setLastModifiedDate(new DateTime());
    }

    public void edit(PrecedentDegreeInformationBean precedentDegreeInformationBean) {

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

    public void edit(final PersonalInformationBean bean, boolean isStudentEditing) {
        setConclusionGrade(bean.getConclusionGrade());
        setConclusionYear(bean.getConclusionYear());
        setCountry(bean.getCountryWhereFinishedPreviousCompleteDegree());
        setCountryHighSchool(bean.getCountryWhereFinishedHighSchoolLevel());
        Unit institution = bean.getInstitution();
        if (institution == null && !StringUtils.isEmpty(bean.getInstitutionName())) {
            institution = UnitUtils.readExternalInstitutionUnitByName(bean.getInstitutionName());
            if (institution == null) {
                institution = 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.