Examples of Bennu


Examples of org.fenixedu.bennu.core.domain.Bennu

                    accountabilityTypeEnum.getName()));
        }
    }

    private static void createOrganizationalStructure() {
        final Bennu rootDomainObject = Bennu.getInstance();
        final PlanetUnit planetUnit =
                PlanetUnit.createNewPlanetUnit(new MultiLanguageString(Locale.getDefault(), "Earth"), null, null, "E",
                        new YearMonthDay(), null, null, null, null, false, null);
        rootDomainObject.setEarthUnit(planetUnit);

        createCountryUnits(rootDomainObject, planetUnit);
    }
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        throw new UnsupportedOperationException("Unknown AcademicPeriod " + academicPeriod);
    }

    @Deprecated
    public static List<AcademicInterval> readAcademicIntervals(AcademicPeriod academicPeriod) {
        Bennu rootDomainObject = Bennu.getInstance();

        if (academicPeriod.equals(AcademicPeriod.SEMESTER)) {
            List<AcademicInterval> result = new ArrayList<AcademicInterval>();
            for (ExecutionSemester semester : rootDomainObject.getExecutionPeriodsSet()) {
                result.add(semester.getAcademicInterval());
            }

            return result;
        } else if (academicPeriod.equals(AcademicPeriod.YEAR)) {
            List<AcademicInterval> result = new ArrayList<AcademicInterval>();
            for (ExecutionYear executionYear : rootDomainObject.getExecutionYearsSet()) {
                result.add(executionYear.getAcademicInterval());
            }

            return result;
        }
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

public class IrsDeclarationLink extends IrsDeclarationLink_Base {

    public IrsDeclarationLink() {
        super();
        final Bennu rootDomainObject = Bennu.getInstance();
        if (rootDomainObject.getIrsDeclarationLink() == null) {
            setRootDomainObject(rootDomainObject);
        } else {
            throw new Error("there.can.only.be.one!");
        }
        setAvailable(Boolean.FALSE);
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        setIrsLink("");
    }

    @Atomic
    public static IrsDeclarationLink getInstance() {
        final Bennu rootDomainObject = Bennu.getInstance();
        final IrsDeclarationLink irsDeclarationLink = rootDomainObject.getIrsDeclarationLink();
        return irsDeclarationLink == null ? new IrsDeclarationLink() : irsDeclarationLink;
    }
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        return irsDeclarationLink == null ? new IrsDeclarationLink() : irsDeclarationLink;
    }

    @Atomic
    public static void set(MultiLanguageString title, Boolean available, String irsLink) {
        final Bennu rootDomainObject = Bennu.getInstance();
        final IrsDeclarationLink irsDeclarationLink = rootDomainObject.getIrsDeclarationLink();
        irsDeclarationLink.setTitle(title);
        irsDeclarationLink.setAvailable(available);
        irsDeclarationLink.setIrsLink(irsLink);
    }
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        return enrole(groupingID, shiftID, groupNumber, studentUsernames, studentUsername);
    }

    public static Boolean enrole(String groupingID, String shiftID, Integer groupNumber, List<String> studentUsernames,
            String studentUsername) throws FenixServiceException {
        final Bennu rootDomainObject = Bennu.getInstance();
        final Grouping grouping = FenixFramework.getDomainObject(groupingID);
        if (grouping == null) {
            throw new NonExistingServiceException();
        }
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

    }

    public Message(final Sender sender, final Collection<? extends ReplyTo> replyTos, final Collection<Recipient> recipients,
            final String subject, final String body, final String bccs) {
        super();
        final Bennu rootDomainObject = Bennu.getInstance();
        setRootDomainObject(rootDomainObject);
        setRootDomainObjectFromPendingRelation(rootDomainObject);
        setSender(sender);
        if (replyTos != null) {
            for (final ReplyTo replyTo : replyTos) {
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

    }

    public Message(final Sender sender, final Collection<? extends ReplyTo> replyTos, final Collection<Recipient> recipients,
            final String subject, final String body, final String bccs, final String htmlBody) {
        super();
        final Bennu rootDomainObject = Bennu.getInstance();
        setRootDomainObject(rootDomainObject);
        setRootDomainObjectFromPendingRelation(rootDomainObject);
        setSender(sender);
        if (replyTos != null) {
            for (final ReplyTo replyTo : replyTos) {
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        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()) {
View Full Code Here

Examples of org.fenixedu.bennu.core.domain.Bennu

        return result;
    }

    static public String getInstitutionAcronym() {
        final Bennu root = Bennu.getInstance();
        String result = StringUtils.EMPTY;
        if (root != null) {
            final Unit institutionUnit = root.getInstitutionUnit();
            if (root != null) {
                result = institutionUnit.getAcronym();
            }
        }
        if (result.isEmpty()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.