Package org.fenixedu.bennu.core.domain

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


    }

    public ActionForward removeShift(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        User userView = Authenticate.getUser();

        InfoClass infoClass = (InfoClass) request.getAttribute(PresentationConstants.CLASS_VIEW);

        String shiftOID = request.getParameter(PresentationConstants.SHIFT_OID);
View Full Code Here


        return result;
    }

    private void validateSocialSecurityNumber(List<LabelFormatter> result) {
        final Party party = PartySocialSecurityNumber.readPartyBySocialSecurityNumber(socialSecurityNumber);
        final User user = User.findByUsername(username);
        if (party != null && party != user.getPerson()) {
            result.add(new LabelFormatter().appendLabel(
                    "error.candidacy.workflow.PersonalInformationForm.socialSecurityNumber.already.exists", "application"));
        }
    }
View Full Code Here

public class ExternalSupervisorViewDegreeDA extends FenixDispatchAction {

    @EntryPoint
    public ActionForward beginTaskFlow(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final User userView = Authenticate.getUser();
        final Person supervisor = userView.getPerson();

        RegistrationProtocol protocol = supervisor.getOnlyRegistrationProtocol();
        ExternalSupervisorViewsBean bean;

        if (protocol == null) {
View Full Code Here

public class ExternalSupervisorViewYearDA extends FenixDispatchAction {

    @EntryPoint
    public ActionForward beginTaskFlow(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final User userView = Authenticate.getUser();
        final Person supervisor = userView.getPerson();

        RegistrationProtocol protocol = supervisor.getOnlyRegistrationProtocol();
        ExternalSupervisorViewsBean bean;

        if (protocol == null) {
View Full Code Here

        final String senderParam = request.getParameter("senderId");
        if (senderParam != null && !senderParam.isEmpty()) {
            return viewSentEmails(mapping, request, senderParam);
        }

        final User userView = Authenticate.getUser();
        final Set<Sender> sendersGroups = new TreeSet<Sender>(Sender.COMPARATOR_BY_FROM_NAME);
        final TreeSet<ExecutionCourseSender> sendersGroupsCourses =
                new TreeSet<ExecutionCourseSender>(ExecutionCourseSender.COMPARATOR_BY_EXECUTION_COURSE_SENDER);
        for (final Sender sender : Bennu.getInstance().getUtilEmailSendersSet()) {
            boolean allow = sender.getMembers().isMember(userView);
View Full Code Here

public class EditStudentGroupShiftDispatchAction extends FenixDispatchAction {

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

        User userView = getUserView(request);

        String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");
        String studentGroupCodeString = request.getParameter("studentGroupCode");
        String studentGroupCode = studentGroupCodeString;
        String groupPropertiesCode = groupPropertiesCodeString;

        try {
            VerifyStudentGroupAtributes.run(groupPropertiesCode, null, studentGroupCode, userView.getUsername(), new Integer(4));

        } catch (NotAuthorizedException e) {
            ActionErrors actionErrors2 = new ActionErrors();
            ActionError error2 = null;
            error2 = new ActionError("errors.noStudentInAttendsSet");
View Full Code Here

    public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
            throws FenixActionException {
        DynaActionForm editStudentGroupForm = (DynaActionForm) form;

        User userView = getUserView(request);

        String studentGroupCodeString = request.getParameter("studentGroupCode");
        String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");
        String groupPropertiesCode = groupPropertiesCodeString;
        String studentGroupCode = studentGroupCodeString;
        String newShiftString = (String) editStudentGroupForm.get("shift");

        if (newShiftString.equals("")) {
            ActionErrors actionErrors = new ActionErrors();
            ActionError error = null;
            error = new ActionError("errors.invalid.shift.groupEnrolment");
            actionErrors.add("errors.invalid.shift.groupEnrolment", error);
            saveErrors(request, actionErrors);
            return prepareEdit(mapping, form, request, response);

        }
        String newShiftCode = newShiftString;

        try {
            EditGroupShift.run(studentGroupCode, groupPropertiesCode, newShiftCode, userView.getUsername());
        } catch (NotAuthorizedException e) {
            ActionErrors actionErrors2 = new ActionErrors();
            ActionError error2 = null;
            error2 = new ActionError("errors.noStudentInAttendsSet");
            actionErrors2.add("errors.noStudentInAttendsSet", error2);
View Full Code Here

public class UnEnrollStudentGroupShiftDispatchAction extends FenixDispatchAction {

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

        User userView = getUserView(request);
        String studentGroupCodeString = request.getParameter("studentGroupCode");

        try {
            UnEnrollGroupShift.run(studentGroupCodeString, studentGroupCodeString, userView.getUsername());
        } catch (NotAuthorizedException e) {
            ActionErrors actionErrors2 = new ActionErrors();
            ActionError error2 = null;
            error2 = new ActionError("errors.noStudentInAttendsSet");
            actionErrors2.add("errors.noStudentInAttendsSet", error2);
View Full Code Here

        }

        @Atomic
        TeacherAuthorization create() throws FenixActionException {

            User user = User.findByUsername(getUsername());
            if (user == null) {
                throw new FenixActionException("label.invalid.username");
            }
            final Person person = user.getPerson();

            if (person.getTeacher() == null) {
                new Teacher(person);
            }
            return TeacherAuthorization.createOrUpdate(person.getTeacher(), getDepartment(), getExecutionSemester(),
View Full Code Here

    }

    @Atomic
    public void addManagerUser() {
        if (genericApplicationPeriod.isCurrentUserAllowedToMange()) {
            final User user = User.findByUsername(username);
            if (user != null) {
                genericApplicationPeriod.addManager(user);
            }
        }
    }
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.