Package org.joget.directory.model

Examples of org.joget.directory.model.User


        jsonObject.accumulate("description", assignment.getDescription());
        jsonObject.accumulate("participant", assignment.getParticipant());
        jsonObject.accumulate("assigneeId", assignment.getAssigneeId());
        jsonObject.accumulate("assigneeName", assignment.getAssigneeName());

        User user = directoryManager.getUserByUsername(workflowUserManager.getCurrentUsername());
        String gmt = "";
        if (user != null) {
            gmt = user.getTimeZone();
        }
        String format = AppUtil.getAppDateFormat();
        jsonObject.accumulate("dateCreated", TimeZoneUtil.convertToTimeZone(assignment.getDateCreated(), gmt, format));
        if (assignment.getDueDate() != null) {
            jsonObject.accumulate("dueDate", TimeZoneUtil.convertToTimeZone(assignment.getDueDate(), gmt, format));
View Full Code Here


        jsonObject.accumulate("description", assignment.getDescription());
        jsonObject.accumulate("participant", assignment.getParticipant());
        jsonObject.accumulate("assigneeId", assignment.getAssigneeId());
        jsonObject.accumulate("assigneeName", assignment.getAssigneeName());

        User user = directoryManager.getUserByUsername(workflowUserManager.getCurrentUsername());
        String gmt = "";
        if (user != null) {
            gmt = user.getTimeZone();
        }
        String format = AppUtil.getAppDateFormat();
        jsonObject.accumulate("dateCreated", TimeZoneUtil.convertToTimeZone(assignment.getDateCreated(), gmt, format));
        if (assignment.getDueDate() != null) {
            jsonObject.accumulate("dueDate", TimeZoneUtil.convertToTimeZone(assignment.getDueDate(), gmt, format));
View Full Code Here

    public String[] getObjects(WMSessionHandle sessionHandle, String expression) throws Exception {
        return null;
    }

    public String getUserEMailAddress(WMSessionHandle shandle, String username) throws Exception {
        User user = getUserByUsername(username);
        return user.getEmail();
    }
View Full Code Here

        User user = getUserByUsername(username);
        return user.getEmail();
    }

    public String getUserFirstName(WMSessionHandle shandle, String username) throws Exception {
        User user = getUserByUsername(username);
        return user.getFirstName();
    }
View Full Code Here

        User user = getUserByUsername(username);
        return user.getFirstName();
    }

    public String getUserLastName(WMSessionHandle shandle, String username) throws Exception {
        User user = getUserByUsername(username);
        return user.getLastName();
    }
View Full Code Here

        User user = getUserByUsername(username);
        return user.getLastName();
    }

    public String getUserPassword(WMSessionHandle shandle, String username) throws Exception {
        User user = getUserByUsername(username);
        return user.getPassword();
    }
View Full Code Here

        User user = getUserByUsername(username);
        return user.getPassword();
    }

    public String getUserRealName(WMSessionHandle shandle, String username) throws Exception {
        User user = getUserByUsername(username);
        return user.getFirstName();
    }
View Full Code Here

    @RequestMapping("/console/directory/dept/view/(*:id)")
    public String consoleDeptView(ModelMap model, @RequestParam("id") String id) {
        Department department = directoryManager.getDepartmentById(id);
        model.addAttribute("department", department);

        User hod = directoryManager.getDepartmentHod(id);
        model.addAttribute("hod", hod);

        if (department != null && department.getOrganization() != null) {
            Collection<Grade> grades = directoryManager.getGradesByOrganizationId(null, department.getOrganization().getId(), "name", false, null, null);
            model.addAttribute("grades", grades);
View Full Code Here

            model.addAttribute("userFormFooter", us.getUserCreationFormFooter());
        } else {
            model.addAttribute("userFormFooter", "");
        }

        User user = new User();
        user.setActive(1);
        Set roles = new HashSet();
        roles.add(roleDao.getRole("ROLE_USER"));
        user.setRoles(roles);
        user.setTimeZone(TimeZoneUtil.getServerTimeZone());
        model.addAttribute("user", user);
        model.addAttribute("employeeDepartmentHod", "no");
        return "console/directory/userCreate";
    }
View Full Code Here

        return "console/directory/userCreate";
    }

    @RequestMapping("/console/directory/user/view/(*:id)")
    public String consoleUserView(ModelMap model, @RequestParam("id") String id) {
        User user = directoryManager.getUserById(id);

        model.addAttribute("user", user);

        if (user != null) {
            //get only 1st employment
            if (user.getEmployments() != null && user.getEmployments().size() > 0) {
                Employment employment = (Employment) user.getEmployments().iterator().next();
                model.addAttribute("employment", directoryManager.getEmployment(employment.getId()));
            }

            //get roles
            String roles = "";
            if (user.getRoles() != null && user.getRoles().size() > 0) {
                for (Role role : (Set<Role>) user.getRoles()) {
                    roles += role.getName() + ", ";
                }

                //remove trailing comma
                roles = roles.substring(0, roles.length() - 2);
View Full Code Here

TOP

Related Classes of org.joget.directory.model.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.