Package org.beangle.ems.security.model

Examples of org.beangle.ems.security.model.GroupMemberBean


          user.getGroups().remove(myMember);
          removedMembers.add(myMember);
        }
      } else {
        if (null == myMember) {
          myMember = new GroupMemberBean(member.getGroup(), user, null);
        }
        myMember.setUpdatedAt(new Date());
        myMember.setMember(isMember);
        myMember.setGranter(isGranter);
        myMember.setManager(isManager);
View Full Code Here


  public List<GroupMember> getGroupMembers(User user, GroupMember.Ship ship) {
    if (isAdmin(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) {
      List<GroupMember> members = CollectUtils.newArrayList();
      List<Group> groups = entityDao.getAll(Group.class);
      for (Group group : groups) {
        GroupMemberBean gmb = new GroupMemberBean(group, user, GroupMember.Ship.MEMBER);
        gmb.setGranter(true);
        gmb.setManager(true);
        members.add(gmb);
      }
      return members;
    }
    OqlBuilder<GroupMember> builder = OqlBuilder.from(GroupMember.class, "gm");
View Full Code Here

  public void createGroup(User owner, Group group) {
    group.setUpdatedAt(new Date(System.currentTimeMillis()));
    group.setCreatedAt(new Date(System.currentTimeMillis()));
    group.setOwner(owner);
    group.getMembers().add(new GroupMemberBean(group, owner, GroupMember.Ship.MANAGER));
    entityDao.saveOrUpdate(group);
    publish(new GroupCreationEvent(group));
  }
View Full Code Here

  public List<GroupMember> getGroupMembers(User user, GroupMember.Ship ship) {
    if (isAdmin(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) {
      List<GroupMember> members = CollectUtils.newArrayList();
      List<Group> groups = entityDao.getAll(Group.class);
      for (Group group : groups) {
        GroupMemberBean gmb = new GroupMemberBean(group, user, GroupMember.Ship.MEMBER);
        gmb.setGranter(true);
        gmb.setManager(true);
        members.add(gmb);
      }
      return members;
    }
    OqlBuilder<GroupMember> builder = OqlBuilder.from(GroupMember.class, "gm");
View Full Code Here

  public void createGroup(User owner, Group group) {
    group.setUpdatedAt(new Date(System.currentTimeMillis()));
    group.setCreatedAt(new Date(System.currentTimeMillis()));
    group.setOwner(owner);
    group.getMembers().add(new GroupMemberBean(group, owner, GroupMember.Ship.MANAGER));
    entityDao.saveOrUpdate(group);
    publish(new GroupCreationEvent(group));
  }
View Full Code Here

  public List<GroupMember> getGroupMembers(User user, GroupMember.Ship ship) {
    if (isAdmin(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) {
      List<GroupMember> members = CollectUtils.newArrayList();
      List<Group> groups = entityDao.getAll(Group.class);
      for (Group group : groups) {
        GroupMemberBean gmb = new GroupMemberBean(group, user, GroupMember.Ship.MEMBER);
        gmb.setGranter(true);
        gmb.setManager(true);
        members.add(gmb);
      }
      return members;
    }
    OqlBuilder<GroupMember> builder = OqlBuilder.from(GroupMember.class, "gm");
View Full Code Here

  public void createGroup(User owner, Group group) {
    group.setUpdatedAt(new Date(System.currentTimeMillis()));
    group.setCreatedAt(new Date(System.currentTimeMillis()));
    group.setOwner(owner);
    group.getMembers().add(new GroupMemberBean(group, owner, GroupMember.Ship.MANAGER));
    entityDao.saveOrUpdate(group);
  }
View Full Code Here

  public void createGroup(User owner, Group group) {
    group.setUpdatedAt(new Date(System.currentTimeMillis()));
    group.setCreatedAt(new Date(System.currentTimeMillis()));
    group.setOwner(owner);
    group.getMembers().add(new GroupMemberBean(group, owner, GroupMember.Ship.MANAGER));
    entityDao.saveOrUpdate(group);
    publish(new GroupCreationEvent(group));
  }
View Full Code Here

      List<GroupMember> members = CollectUtils.newArrayList();
      OqlBuilder<Group> builder = OqlBuilder.from(Group.class, "g");
      builder.where("g.id not in(:groupIds)", new Long[] { Group.ANONYMOUS_ID, Group.ANYONE_ID });
      List<Group> groups = entityDao.search(builder);
      for (Group group : groups) {
        GroupMemberBean gmb = new GroupMemberBean(group, user, GroupMember.Ship.MEMBER);
        gmb.setGranter(true);
        gmb.setManager(true);
        members.add(gmb);
      }
      return members;
    }
    OqlBuilder<GroupMember> builder = OqlBuilder.from(GroupMember.class, "gm");
View Full Code Here

          user.getMembers().remove(myMember);
          removedMembers.add(myMember);
        }
      } else {
        if (null == myMember) {
          myMember = new GroupMemberBean(member.getGroup(), user, null);
        }
        myMember.setUpdatedAt(new Date());
        myMember.setMember(isMember);
        myMember.setGranter(isGranter);
        myMember.setManager(isManager);
View Full Code Here

TOP

Related Classes of org.beangle.ems.security.model.GroupMemberBean

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.