Examples of UserGroup


Examples of org.hoteia.qalingo.core.domain.UserGroup

        Criteria criteria = createDefaultCriteria(UserGroup.class);
       
        FetchPlan fetchPlan = handleSpecificUserGroupFetchMode(criteria, params);
       
        criteria.add(Restrictions.eq("code", handleCodeValue(code)));
        UserGroup userGroup = (UserGroup) criteria.uniqueResult();
        if(userGroup != null){
            userGroup.setFetchPlan(fetchPlan);
        }
        return userGroup;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.UserGroup

        userGroup.setDateUpdate(new Date());
        if (userGroup.getId() != null) {
            if(em.contains(userGroup)){
                em.refresh(userGroup);
            }
            UserGroup mergedUserGroup = em.merge(userGroup);
            em.flush();
            return mergedUserGroup;
        } else {
            em.persist(userGroup);
            return userGroup;
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.UserGroup

            userViewBean.setDateUpdate(Constants.NOT_AVAILABLE);
        }

        final Set<UserGroup> groups = user.getGroups();
        for (Iterator<UserGroup> iteratorGroup = groups.iterator(); iteratorGroup.hasNext();) {
            UserGroup group = (UserGroup) iteratorGroup.next();
            String keyUserGroup = group.getCode();
            String valueUserGroup = group.getName();
            userViewBean.getGroups().put(keyUserGroup, valueUserGroup);

            final Set<UserRole> roles = group.getRoles();
            for (Iterator<UserRole> iteratorRole = roles.iterator(); iteratorRole.hasNext();) {
                UserRole role = (UserRole) iteratorRole.next();
                String keyUserRole = role.getCode();
                String valueUserRole = role.getName();
                userViewBean.getRoles().put(keyUserRole, valueUserRole);
View Full Code Here

Examples of org.jitterbit.integration.server.implementation.webservice.useradmin.client.UserGroup

            String sGroupId = groupUsers.groupId.toString();
            String[] rawUserIds = new String[groupUsers.userIds.size()];
            for (int j = 0; j < groupUsers.userIds.size(); ++j) {
                rawUserIds[j] = groupUsers.userIds.get(j).toString();
            }
            rawUserGroups[i] = new UserGroup(sGroupId, rawUserIds);
        }
        return new UsersAndGroups(rawUsers, rawGroups, rawUserGroups);
    }
View Full Code Here

Examples of org.openqreg.bean.Usergroup

    if (null != ucrUC) {
      return ucrUC.getGroupid();
    }

    // user does not have a ucrBean, get group
    Usergroup ug = (Usergroup) UsergroupFinderBase.findByPrimaryKey(con,
        new UsergroupKey(user.getGroupid()));

    /**
     * if ug is null (half created ucrUser) return null<br/>
     * or if ug is a ucrGroup, we would have found a ucr for this user on
     * this centre in the code above, as we didn't the user does not have
     * access to this centre, return null<br/>
     * (getUseucr != 0 handles errors in group table, where status only
     * should be 0 or 1, but might be null)
     */
    if (null == ug || !Integer.valueOf(0).equals(ug.getUseucr())) {
      return null;
    }

    /**
     * there is a ug, but it has use ucr = 1, this should already have been
     * returned something is wrong return null
     */
    if (Integer.valueOf(1).equals(ug.getUseucr())) {
      return null;
    }
    /**
     * nonUcrUser<br/>
     * must be on the same centre as the one we are looking at<br/>
View Full Code Here

Examples of org.openqreg.bean.Usergroup

    // get ucrBean for the user on this centreId
    UsercentrerelBean ucrUC = (UsercentrerelBean) UsercentrerelFinderBase
        .findByPrimaryKey(con, new UsercentrerelKey(user.getId(),
            centreId));

    Usergroup userGroup = (Usergroup) UsergroupFinderBase
        .findByPrimaryKey(new UsergroupKey(Dispatcher.getInstance()
            .getUser(user.getId()).getGroupid()));
    // ucrBean exists for this user on the centreId, user is ucrUser
    if (null != ucrUC) {
      return Integer.valueOf(1).equals(ucrUC.getStatus());
    } else if (userGroup.getUseucr().intValue() == 1) {
      // UsercentrerelBean does not exist,
      // The user has access to a subset of all centres, but not the
      // current centreId
      return false;
    }
View Full Code Here

Examples of org.openqreg.bean.Usergroup

    if (null != ucrUC) {
      return true;
    }

    // user does not have a ucrBean, get group
    Usergroup ug = (Usergroup) UsergroupFinderBase.findByPrimaryKey(con,
        new UsergroupKey(user.getGroupid()));

    /**
     * if ug is null (half created ucrUser) return null<br/>
     * or if ug is a ucrGroup, we would have found a ucr for this user on
     * this centre in the code above, as we didn't the user does not have
     * access to this centre, return null<br/>
     * (getUseucr != 0 handles errors in group table, where status only
     * should be 0 or 1, but might be null)
     */
    if (null == ug || !Integer.valueOf(0).equals(ug.getUseucr())) {
      return false;
    }

    /**
     * there is a ug, but it has use ucr = 1, this should already have been
     * returned something is wrong return null
     */
    if (Integer.valueOf(1).equals(ug.getUseucr())) {
      return false;
    }
    /**
     * nonUcrUser<br/>
     * must be on the same centre as the one we are looking at<br/>
View Full Code Here

Examples of org.openqreg.bean.Usergroup

    try {
      con = DbHandler.getConnection();
      Iterator<? extends Usergroup> groupsIterator = UsergroupFinderBase
          .findAll(con).iterator();
      Iterator<? extends Systemmessage> messageIterator;
      Usergroup usergroup;
      Systemmessage systemmessage;
      Set<Systemmessage> group;
      while (groupsIterator.hasNext()) {
        usergroup = groupsIterator.next();
        group = new HashSet<Systemmessage>();
        messageIterator = SystemmessageFinder.findByGroupid(con,
            usergroup.getId()).iterator();
        while (messageIterator.hasNext()) {
          systemmessage = messageIterator.next();
          group.add(systemmessage);
        }
        tmpSystemMessageTable.put(usergroup.getId(), group);
      }
      systemMessageTable = tmpSystemMessageTable;
    } catch (SQLException sqle) {
      logger.log(Level.FATAL, "Unable to populate system messages", sqle);
    } finally {
View Full Code Here

Examples of org.opentides.bean.user.UserGroup

  @Override
  protected ModelAndView handleRequestInternal(HttpServletRequest request,
      HttpServletResponse response) throws Exception {   
    Map<String, Object> model = new HashMap<String, Object>();
    Map<String, String> roles = userGroupService.getRoles();
    List<UserGroup> userGroups = userGroupService.findByExample(new UserGroup())
    model.put("roles", roles);
    for (UserGroup userGroup:userGroups)
      userGroup.mapRoleMatrix(roles);
    model.put("userGroups", userGroups);
        return new ModelAndView(viewName, model);
View Full Code Here

Examples of org.opentides.bean.user.UserGroup

   */
  @Override
  protected ModelAndView handleRequestInternal(HttpServletRequest req,
      HttpServletResponse res) throws Exception {
    String userGroupId = req.getParameter("userGroupId");
    UserGroup userGroup = userGroupService.load(userGroupId);
    List<String> roleNames = userGroup.getRoleNames();
    return new ModelAndView(roleListView, "roleNames", roleNames);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.