Package org.fenixedu.academic.domain.organizationalStructure

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


    @Override
    public Collection<Unit> getSearchResults(Map<String, String> argsMap, String value, int maxCount) {
        final List<Unit> result = new ArrayList<Unit>();
        for (final UnitName unitName : UnitName.findExternalUnit(value, maxCount)) {
            final Unit unit = unitName.getUnit();
            result.add(unit);
        }
        return result;
    }
View Full Code Here


    }

    @Override
    public Object provide(Object source, Object currentValue) {

        Unit unit = null;
        try {
            unit = (Unit) MethodUtils.invokeMethod(source, "getUnit", null);
            if (unit == null) {
                return Collections.EMPTY_LIST;
            } else {
View Full Code Here

        final Set<Person> toNotify = new HashSet<Person>();
        for (final PhdParticipant participant : participants) {
            if (participant.isInternal()) {
                toNotify.add(((InternalPhdParticipant) participant).getPerson());
            } else {
                Unit unit = process.getAdministrativeOffice().getUnit();
                UnitBasedSender sender = unit.getUnitBasedSenderSet().iterator().next();
                new Message(sender, Collections.<ReplyTo> emptyList(), Collections.<Recipient> emptyList(), getSubjectPrefixed(
                        process, subject), getBodyText(process, body), Collections.singleton(participant.getEmail()));
            }
        }
View Full Code Here

public class EditExternalUnit {

    @Atomic
    public static void run(final EditExternalUnitBean externalUnitBean) {
        final Unit externalUnit = externalUnitBean.getExternalUnit();
        externalUnit.edit(new MultiLanguageString(Locale.getDefault(), externalUnitBean.getUnitName()),
                externalUnitBean.getUnitCode());
    }
View Full Code Here

    @Override
    public Collection<DegreeDesignation> getSearchResults(Map<String, String> argsMap, String value, int maxCount) {

        int maxLimit = getSize(argsMap);

        Unit unit = getFilterUnit(argsMap);
        SchoolLevelType schoolLevel = getFilterSchoolLevel(argsMap);

        value = StringNormalizer.normalize(value);
        List<DegreeDesignation> result = new ArrayList<DegreeDesignation>();
        Collection<DegreeDesignation> possibleDesignations = null;
        if (unit == null) {
            possibleDesignations = Bennu.getInstance().getDegreeDesignationsSet();
        } else {
            possibleDesignations = unit.getDegreeDesignationSet();
        }

        if (schoolLevel != null) {
            possibleDesignations = filterDesignationsBySchoolLevel(possibleDesignations, schoolLevel);
        }
View Full Code Here

        List<Unit> result = new ArrayList<Unit>();
        YearMonthDay now = new YearMonthDay();

        for (UnitName unitName : units) {
            Unit unit = unitName.getUnit();
            if (unit.isActive(now)) {
                result.add(unit);
            }
        }

        return result;
View Full Code Here

        return formation;
    }

    private static void setInstitution(AlumniFormation bean, Formation dbFormation) {

        Unit institution = dbFormation.getInstitution();
        if (institution instanceof AcademicalInstitutionUnit) {

            AcademicalInstitutionType academicalInstitutionType = dbFormation.getInstitutionType();

            switch (academicalInstitutionType) {

            case NATIONAL_PUBLIC_INSTITUTION:
            case NATIONAL_PRIVATE_INSTITUTION:
                if (AcademicalInstitutionUnit.readOfficialParentUnitsByType(academicalInstitutionType).contains(institution)) {
                    bean.setParentInstitution((AcademicalInstitutionUnit) institution);
                    bean.setInstitutionSchema("alumni.formation.national.institution.parent");

                } else {
                    bean.setChildInstitution((AcademicalInstitutionUnit) institution);
                    bean.setInstitutionSchema("alumni.formation.national.institution.both");
                }
                break;
            case FOREIGN_INSTITUTION:
                setNonNationalInstitution(bean, institution, "alumni.formation.foreign.institution", dbFormation.getCountryUnit());
                break;
            case OTHER_INSTITUTION:
                setNonNationalInstitution(bean, institution, "alumni.formation.other.institution", dbFormation.getCountryUnit());
                break;
            }

        } else {
            if (institution != null) {
                bean.setForeignUnit(institution.getName());
                if (institution.hasParentUnit(CountryUnit.getDefault())) {
                    bean.setInstitutionSchema("alumni.formation.other.institution");
                } else {
                    bean.setInstitutionSchema("alumni.formation.foreign.institution");
                }
            } else {
View Full Code Here

        final YearMonthDay today = new YearMonthDay();
        final Predicate predicate = new Predicate() {
            @Override
            public boolean evaluate(Object arg0) {
                final UnitName unitName = (UnitName) arg0;
                final Unit unit = unitName.getUnit();
                return unit instanceof UniversityUnit && unit.isActive(today);
            }
        };
        for (final UnitName unitName : UnitName.findExternalUnit(value, maxCount, predicate)) {
            final Unit unit = unitName.getUnit();
            result.add(unit);
        }
        return result;
    }
View Full Code Here

                return UniversityUnit.createNewUniversityUnit(unitName, unitNameCard, costCenterCode, acronym, begin, end,
                        parentUnit, webAddress, classification, canBeResponsibleOfSpaces, campus);

            case ADMINISTRATIVE_OFFICE_UNIT:
                AdministrativeOffice office = FenixFramework.getDomainObject(administrativeOfficeID);
                Unit unit =
                        Unit.createNewUnit(unitName, unitNameCard, costCenterCode, acronym, begin, end, parentUnit,
                                accountabilityType, webAddress, classification, office, canBeResponsibleOfSpaces, campus);
                unit.setType(type);
                return unit;
            case AGGREGATE_UNIT:
                return AggregateUnit.createNewAggregateUnit(unitName, unitNameCard, costCenterCode, acronym, begin, end,
                        parentUnit, accountabilityType, webAddress, classification, canBeResponsibleOfSpaces, campus);
View Full Code Here

            for (final Party party : Bennu.getInstance().getExternalInstitutionUnit().getSubUnits()) {
                if (result.size() >= maxCount) {
                    break;
                }
                if (!party.isPerson()) {
                    final Unit unit = (Unit) party;
                    if (areNamesPresent(unit.getName(), nameValues)) {
                        result.add(unit);
                    }
                }
            }
            Collections.sort(result, Unit.COMPARATOR_BY_NAME_AND_ID);
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.