Package org.fenixedu.bennu.core.groups

Examples of org.fenixedu.bennu.core.groups.Group


        final Person person = getPhdProgramProcess().getPerson();
        if (person != null && person.getUser() != null) {
            groups.add(UserGroup.of(person.getUser()));
        }

        final Group group = UnionGroup.of(groups);
        super.init(filename, filename, content, group);
    }
View Full Code Here


        }

    }

    public String getTargetGroupInText() {
        Group targetGroup = getTargetAccessGroup();

        Set<User> elements = targetGroup.getMembers();

        StringBuilder builder = new StringBuilder();

        for (User user : elements) {
            builder.append(user.getPerson().getName()).append(" (").append(user.getPerson().getEmailForSendingEmails())
View Full Code Here

        super.setDocumentType(documentType);
        super.setRemarks(remarks);
        super.setUploader(uploader);
        super.setDocumentAccepted(true);

        final Group roleGroup = AcademicAuthorizationGroup.get(AcademicOperationType.MANAGE_PHD_PROCESSES);

        final PhdIndividualProgramProcess individualProgramProcess =
                meeting.getMeetingProcess().getThesisProcess().getIndividualProgramProcess();
        final PhdProgram phdProgram = individualProgramProcess.getPhdProgram();
        final Group coordinatorGroup = CoordinatorGroup.get(phdProgram.getDegree());

        final Group group = roleGroup.or(coordinatorGroup);
        super.init(filename, filename, content, group);
    }
View Full Code Here

        return true;
    }

    @Override
    protected void generateMessage() {
        final Group group =
                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

        return GOP_SENDER;
    }

    private static Sender initGOPSender() {
        for (Sender sender : Sender.getAvailableSenders()) {
            final Group members = sender.getMembers();
            if (members.equals(RoleType.RESOURCE_ALLOCATION_MANAGER.actualGroup())) {
                return sender;
            }
        }
        return null;
    }
View Full Code Here

        if (bytes == null || fileName == null) {
            return null;
        }

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        Group commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group thesisGroup = ThesisReadersGroup.get(thesis);
        final Group permittedGroup = scientificCouncil.or(commissionMembers).or(thesisGroup);

        ThesisFile file = new ThesisFile(fileName, fileName, bytes, permittedGroup);

        updateThesis(thesis, file, title, subTitle, language, fileName, bytes);
View Full Code Here

public class SaveCandidacyDocumentFiles {

    @Atomic
    public static void run(List<CandidacyDocumentUploadBean> candidacyDocuments) {

        Group masterDegreeAdministrativeOfficeGroup = RoleType.MASTER_DEGREE_ADMINISTRATIVE_OFFICE.actualGroup();
        Group coordinatorsGroup = RoleType.COORDINATOR.actualGroup();
        Group permittedGroup = masterDegreeAdministrativeOfficeGroup.or(coordinatorsGroup);

        for (CandidacyDocumentUploadBean candidacyDocumentUploadBean : candidacyDocuments) {
            if (candidacyDocumentUploadBean.getTemporaryFile() != null) {

                String filename = candidacyDocumentUploadBean.getFilename();
                CandidacyDocument candidacyDocument = candidacyDocumentUploadBean.getCandidacyDocument();
                Candidacy candidacy = candidacyDocument.getCandidacy();
                Person person = candidacy.getPerson();

                final byte[] content = read(candidacyDocumentUploadBean.getTemporaryFile());

                if (candidacyDocument.getFile() != null) {
                    candidacyDocument.getFile().delete();
                }

                final CandidacyDocumentFile candidacyDocumentFile =
                        new CandidacyDocumentFile(filename, filename, content, permittedGroup.or(UserGroup.of(person.getUser())));
                candidacyDocument.setFile(candidacyDocumentFile);
            }
        }

    }
View Full Code Here

    @Atomic
    public static void run(byte[] bytes, String filename, Attends attends, Project project, StudentGroup studentGroup,
            Person person) throws FenixServiceException, IOException {
        check(RolePredicates.STUDENT_PREDICATE);

        final Group permittedGroup = createPermittedGroup(attends, studentGroup, project);
        createProjectSubmission(bytes, filename, attends, project, studentGroup, permittedGroup);
    }
View Full Code Here

    @Atomic
    public static void run(Thesis thesis) {
        final ThesisFile thesisFile = thesis.getDissertation();

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        ScientificCommissionGroup commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group student = thesis.getStudent().getPerson().getPersonGroup();

        thesisFile.setPermittedGroup(scientificCouncil.or(commissionMembers).or(student));
    }
View Full Code Here

    @Atomic
    public static void run(Thesis thesis) {
        final ThesisFile thesisFile = thesis.getDissertation();

        Group scientificCouncil = RoleType.SCIENTIFIC_COUNCIL.actualGroup();
        Group commissionMembers = ScientificCommissionGroup.get(thesis.getDegree());
        Group student = thesis.getStudent().getPerson().getPersonGroup();
        Group thesisGroup = ThesisReadersGroup.get(thesis);

        thesisFile.setPermittedGroup(scientificCouncil.or(commissionMembers).or(student).or(thesisGroup));
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.bennu.core.groups.Group

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.