Package org.fenixedu.academic.domain.organizationalStructure

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


        return Lists.newArrayList();
    }

    public static class CreateOrganizationalStructure {
        public void doIt(PortalSection portalSection, SchoolSetupSection schoolSetupSection) {
            final CountryUnit countryUnit = getCountryUnit(Country.readDefault().getName());
            final UniversityUnit universityUnit =
                    createUniversityUnit(countryUnit, schoolSetupSection.getUniversityName(),
                            schoolSetupSection.getUniversityAcronym());
            final SchoolUnit institutionUnit =
                    createSchoolUnit(universityUnit, portalSection.getOrganizationName(), schoolSetupSection.getSchoolAcronym());
View Full Code Here


        }

        private CountryUnit getCountryUnit(final String countryUnitName) {
            for (final Party party : Bennu.getInstance().getPartysSet()) {
                if (party.isCountryUnit()) {
                    final CountryUnit countryUnit = (CountryUnit) party;
                    if (countryUnit.getName().equalsIgnoreCase(countryUnitName)) {
                        return countryUnit;
                    }
                }
            }
            return null;
View Full Code Here

        @Override
        public Object provide(Object source, Object currentValue) {
            ErasmusVacancyBean bean = (ErasmusVacancyBean) source;

            CountryUnit selectedCountryUnit = CountryUnit.getCountryUnitByCountry(bean.getCountry());

            if (selectedCountryUnit == null) {
                return new ArrayList<Unit>();
            }

            java.util.ArrayList<Unit> associatedUniversityUnits =
                    new java.util.ArrayList<Unit>(selectedCountryUnit.getSubUnits(PartyTypeEnum.UNIVERSITY));

            Collections.sort(associatedUniversityUnits, new BeanComparator("nameI18n"));

            return associatedUniversityUnits;
        }
View Full Code Here

TOP

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

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.