Package pt.utl.ist.fenix.tools.util.i18n

Examples of pt.utl.ist.fenix.tools.util.i18n.MultiLanguageString


    private static void copyForuns(final ExecutionCourse executionCourseFrom, final ExecutionCourse executionCourseTo)
            throws FenixServiceException {

        while (!executionCourseFrom.getForuns().isEmpty()) {
            ExecutionCourseForum sourceForum = executionCourseFrom.getForuns().iterator().next();
            MultiLanguageString forumName = sourceForum.getName();

            ExecutionCourseForum targetForum = executionCourseTo.getForumByName(forumName);
            if (targetForum == null) {
                sourceForum.setExecutionCourse(executionCourseTo);
            } else {
View Full Code Here


                && (formation.getInstitutionType().equals(AcademicalInstitutionType.FOREIGN_INSTITUTION) || formation
                        .getInstitutionType().equals(AcademicalInstitutionType.OTHER_INSTITUTION))) {

            if (!StringUtils.isEmpty(formation.getForeignUnit())) {
                institutionUnit =
                        UniversityUnit.createNewUniversityUnit(new MultiLanguageString(formation.getForeignUnit()), null, null,
                                null, new YearMonthDay(), null, getParentUnit(formation), null, null, false, null);
                institutionUnit.setInstitutionType(formation.getInstitutionType());
            }
        }
        return institutionUnit;
View Full Code Here

        return occupation.getIntervals();
    }

    @Override
    public MultiLanguageString getGanttDiagramEventName() {
        return new MultiLanguageString(occupation.getSubject());
    }
View Full Code Here

     *
     * @return a MultiLanguageString with the portuguese and english versions of
     *         the department's name
     */
    public MultiLanguageString getNameI18n() {
        return new MultiLanguageString().with(MultiLanguageString.pt, getRealName())
                .with(MultiLanguageString.en, getRealNameEn());
    }
View Full Code Here

        if (name == null || StringUtils.isEmpty(name.trim())) {
            throw new DomainException("error.person.empty.name");
        }

        MultiLanguageString partyName = getPartyName();

        partyName =
                partyName == null ? new MultiLanguageString(Locale.getDefault(), name) : partyName
                        .with(Locale.getDefault(), name);

        super.setPartyName(partyName);

        UnitName unitName = getUnitName();
View Full Code Here

    }

    public static Unit createNewNoOfficialExternalInstitution(String unitName, Country country) {
        Unit externalInstitutionUnit = UnitUtils.readExternalInstitutionUnit();
        Unit noOfficialExternalInstitutionUnit = new Unit();
        noOfficialExternalInstitutionUnit.init(new MultiLanguageString(Locale.getDefault(), unitName), null, null, null,
                new YearMonthDay(), null, null, null, null, null, null);
        noOfficialExternalInstitutionUnit.addParentUnit(externalInstitutionUnit,
                AccountabilityType.readByType(AccountabilityTypeEnum.ORGANIZATIONAL_STRUCTURE));
        noOfficialExternalInstitutionUnit.setCountry(country);
        return noOfficialExternalInstitutionUnit;
View Full Code Here

        return functions;
    }

    static public MultiLanguageString getInstitutionName() {
        final Bennu root = Bennu.getInstance();
        MultiLanguageString result = new MultiLanguageString();
        if (root != null) {
            final Unit institutionUnit = root.getInstitutionUnit();
            if (root != null) {
                result = institutionUnit.getNameI18n();
            }
        }
        if (result.isEmpty()) {
            result = result.with(Locale.getDefault(), BundleUtil.getString(Bundle.GLOBAL, "institution.name"));
        }

        return result;
    }
View Full Code Here

        return null;
    }

    @Override
    public MultiLanguageString getName() {
        return new MultiLanguageString();
    }
View Full Code Here

        return getName().getContent(MultiLanguageString.pt);
    }

    public void setNamePt(String name) {
        if (getName() == null) {
            setName(new MultiLanguageString(MultiLanguageString.pt, name));
        } else {
            setName(getName().with(MultiLanguageString.pt, name));
        }
    }
View Full Code Here

        return getName().getContent(MultiLanguageString.en);
    }

    public void setNameEn(String name) {
        if (getName() == null) {
            setName(new MultiLanguageString(MultiLanguageString.en, name));
        } else {
            setName(getName().with(MultiLanguageString.en, name));
        }
    }
View Full Code Here

TOP

Related Classes of pt.utl.ist.fenix.tools.util.i18n.MultiLanguageString

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.