Package org.fenixedu.bennu.core.domain

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


        this.end = end;
    }

    @Atomic
    public void createNewPeriod() {
        final User userView = Authenticate.getUser();
        if (userView != null && userView.getPerson().hasRole(RoleType.MANAGER)) {
            if (title != null && title.hasContent() && start != null && end != null) {
                new GenericApplicationPeriod(title, description, start, end);
            }
        }
    }
View Full Code Here


        setMaritalStatus(MaritalStatus.UNKNOWN);
    }

    public void createUser() {
        if (getUser() == null) {
            setUser(new User(getProfile()));
        } else {
            throw new DomainException("error.person.already.has.user");
        }
    }
View Full Code Here

            setCountry(country);
        }
    }

    public String getUsername() {
        User user = getUser();
        return user == null ? null : user.getUsername();
    }
View Full Code Here

    // -------------------------------------------------------------
    // static methods
    // -------------------------------------------------------------

    public static Person readPersonByUsername(final String username) {
        final User user = User.findByUsername(username);
        return user == null ? null : user.getPerson();
    }
View Full Code Here

        return fullName.equals(composedName);
    }

    public static Person findByUsername(final String username) {
        final User user = User.findByUsername(username);
        return user == null ? null : user.getPerson();
    }
View Full Code Here

        for (final Party party : Bennu.getInstance().getPartysSet()) {
            if (party.isPerson()) {
                final Person person = (Person) party;
                final String email = person.getEmailForSendingEmails();
                if (email != null) {
                    final User user = person.getUser();
                    if (user != null) {
                        final String username = user.getUsername();
                        builder.append(username);
                        builder.append("\t");
                        builder.append(email);
                        builder.append("\n");
                    }
View Full Code Here

    }

    public ActionForward gradeSubmissionStepTwo(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        User userView = getUserView(request);
        MarkSheetTeacherGradeSubmissionBean submissionBean =
                (MarkSheetTeacherGradeSubmissionBean) RenderUtils.getViewState("submissionBean-invisible").getMetaObject()
                        .getObject();
        submissionBean.setResponsibleTeacher(userView.getPerson().getTeacher());

        ActionMessages actionMessages = new ActionMessages();
        request.setAttribute("executionCourse", submissionBean.getExecutionCourse());
        try {
            List<EnrolmentEvaluation> marksSubmited = CreateMarkSheetByTeacher.run(submissionBean);
View Full Code Here

    }

    private void checkRulesToDelete() {
        if (isFirstCycle()) {
            if (getRegistration().getIngression() == Ingression.DA1C || getRegistration().getIngression() == Ingression.CIA2C) {
                final User userView = Authenticate.getUser();
                if (AcademicAccessRule.isProgramAccessibleToFunction(AcademicOperationType.STUDENT_ENROLMENTS, getRegistration()
                        .getDegree(), userView.getPerson().getUser())
                        || userView.getPerson().hasRole(RoleType.MANAGER)) {
                    return;
                }
            }
        }
        if (!getCurriculumGroup().getDegreeType().canRemoveEnrolmentIn(getCycleType())) {
View Full Code Here

    }

    public ActionForward viewTeam(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
            throws FenixActionException, FenixServiceException {

        User userView = getUserView(request);

        String degreeCurricularPlanID = null;
        if (request.getParameter("degreeCurricularPlanID") != null) {
            degreeCurricularPlanID = request.getParameter("degreeCurricularPlanID");
            request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);
View Full Code Here

        return mapping.findForward("coordinationTeam");
    }

    public ActionForward prepareAddCoordinator(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException {
        User userView = getUserView(request);

        String degreeCurricularPlanID = request.getParameter("degreeCurricularPlanID");
        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);

        String infoExecutionDegreeIdString = request.getParameter("infoExecutionDegreeId");
View Full Code Here

TOP

Related Classes of org.fenixedu.bennu.core.domain.User

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.