Package org.fenixedu.academic.domain.util.email

Examples of org.fenixedu.academic.domain.util.email.Recipient


                new PhdAlertMessage(getProcess(), person, getFormattedSubject(), getFormattedBody());
            }
        }

        if (isToSendMail()) {
            final Recipient recipient = new Recipient(getTargetAccessGroup());
            new Message(getSender(), recipient, buildMailSubject(), buildMailBody());

        }

    }
View Full Code Here


    }

    private void generateMessage(Group group) {
        Set<Person> members = FluentIterable.from(group.getMembers()).transform(Person.userToPerson).toSet();
        new PhdAlertMessage(getProcess(), members, getFormattedSubject(), getFormattedBody());
        new Message(getSender(), new Recipient("", group), buildMailSubject(), buildMailBody());
    }
View Full Code Here

        // initialize subject and body again with correct values
        super.init(buildSubject(getProcess()), buildBody(getProcess()));

        // TODO: add missing elements (Coordinator, AcademicOffice?)
        new PhdAlertMessage(getProcess(), getProcess().getPerson(), getFormattedSubject(), getFormattedBody());
        new Message(getSender(), new Recipient(Collections.singletonList(getProcess().getPerson())), buildMailSubject(),
                buildMailBody());
    }
View Full Code Here

                AcademicAuthorizationGroup.get(AcademicOperationType.MANAGE_PHD_PROCESSES, this.getProcess().getPhdProgram());

        Set<Person> members = FluentIterable.from(group.getMembers()).transform(Person.userToPerson).toSet();
        new PhdAlertMessage(getProcess(), members, getFormattedSubject(), getFormattedBody());

        new Message(getSender(), new Recipient(group), buildMailSubject(), buildMailBody());

    }
View Full Code Here

        PhdParticipant participant = getPhdParticipant();
        if (participant.isInternal()) {
            InternalPhdParticipant internalParticipant = (InternalPhdParticipant) participant;
            new PhdAlertMessage(getProcess(), internalParticipant.getPerson(), getFormattedSubject(), buildBody(getProcess(),
                    participant));
            new Message(getSender(), new Recipient(Collections.singleton(internalParticipant.getPerson())), buildMailSubject(),
                    buildMailBody());
        } else {
            new Message(getSender(), Collections.<ReplyTo> emptyList(), Collections.<Recipient> emptyList(), buildMailSubject(),
                    buildMailBody(), Collections.singleton(participant.getEmail()));
        }
View Full Code Here

    }

    private void sendEmailToPersons(Set<Person> persons, String personsName, String subject, String body) {
        if (!persons.isEmpty()) {
            final Recipient recipient = new Recipient(getString("label.teachers"), UserGroup.of(Person.convertToUsers(persons)));
            SystemSender systemSender = Bennu.getInstance().getSystemSender();
            new Message(systemSender, systemSender.getConcreteReplyTos(), recipient.asCollection(), subject, body, "");
        }
    }
View Full Code Here

                newShift == null ? getString("changeStudentsShift.email.body.notNewShift") : getString(
                        "changeStudentsShift.email.body.newShift", oldShift.getNome());

        final String message = messagePrefix + messagePosfix;

        Recipient recipient = new Recipient(groupName, UserGroup.of(Person.convertToUsers(recievers)));
        Sender sender = Bennu.getInstance().getSystemSender();
        String gopEmailAddress = Installation.getInstance().getInstituitionalEmailAddress("gop");
        new Message(sender, new ConcreteReplyTo(gopEmailAddress).asCollection(), recipient.asCollection(), subject, message, "");
    }
View Full Code Here

        final String message =
                messages.getMessage("message.body.grouping.change.shift", registration.getNumber().toString(), studentGroup
                        .getGroupNumber().toString(), executionCourseNames.toString());
        final String groupName = messages.getMessage("message.group.name", studentGroup.getGroupNumber());
        final Collection<Recipient> recipients =
                Collections.singletonList(new Recipient(groupName, UserGroup.of(Person.convertToUsers(recievers))));

        SystemSender systemSender = Bennu.getInstance().getSystemSender();
        new Message(systemSender, systemSender.getConcreteReplyTos(), recipients,
                messages.getMessage("message.subject.grouping.change"), message, "");
    }
View Full Code Here

        for (final Attends attends : studentGroup.getAttendsSet()) {
            final Person person = attends.getRegistration().getPerson();
            people.add(person);
        }
        final Group fixedSetGroup = UserGroup.of(Person.convertToUsers(people));
        final Recipient recipient = new Recipient("", fixedSetGroup);
        final Collection<Recipient> recipients = new ArrayList<Recipient>();
        recipients.add(recipient);

        Registration registration = Registration.readByUsername(userName);
View Full Code Here

    public void deleteWithNotification() {
        final SystemSender sender = getRootDomainObject().getSystemSender();
        if (sender != null) {
            final Registration registration = getOutboundMobilityCandidacySubmission().getRegistration();
            final Recipient recipient = new Recipient(UserGroup.of(registration.getPerson().getUser()));
            new Message(sender, recipient, BundleUtil.getString(Bundle.STUDENT, "label.email.deleted.contest.subject"),
                    BundleUtil.getString(Bundle.STUDENT, "label.email.deleted.contest.body",
                            getOutboundMobilityCandidacyContest().getMobilityAgreement().getUniversityUnit()
                                    .getPresentationName()));
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.util.email.Recipient

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.