/** {@inheritDoc} */
  @Override
  public Group deassign(Group group, String member) throws SecurityException {
    String methodName = "deassign";
    assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
    checkAccess(CLS_NM, methodName);
    ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
    User user = reviewMgr.readUser(new User(member));

    return GROUP_P.deassign(group, user.getDn());
  }
  private void loadUserDns(Group group) throws SecurityException {
    if (CollectionUtils.isNotEmpty(group.getMembers())) {
      ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
      List<String> userDns = new ArrayList<String>();

      for (String member : group.getMembers()) {
        User user = reviewMgr.readUser(new User(member));
        userDns.add(user.getDn());
      }

      group.setMembers(userDns);
    }
  }
  private void loadRoleDns(Group group) throws SecurityException {
    if (CollectionUtils.isNotEmpty(group.getMembers())) {
      ReviewMgr reviewMgr = ReviewMgrFactory.createInstance(this.contextId);
      List<String> roleDns = new ArrayList<String>();

      for (String member : group.getMembers()) {
        Role role = reviewMgr.readRole(new Role(member));
        roleDns.add(role.getDn());
      }

      group.setMembers(roleDns);
    }
  }
  /** {@inheritDoc} */
  @Override
  public Group deassign(Group group, String member) throws SecurityException {
    String methodName = "deassign";
    assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
    checkAccess(CLS_NM, methodName);
    ReviewMgr reviewMgr = ReviewMgrFactory.createInstance(this.contextId);
    String dn;
    if (group.getType() == Group.Type.ROLE) {
      Role role = reviewMgr.readRole(new Role(member));
      dn = role.getDn();
    } else {
      User user = reviewMgr.readUser(new User(member));
      dn = user.getDn();
    }

    return GROUP_P.deassign(group, dn);
  }
  /** {@inheritDoc} */
  @Override
  public Group assign(Group group, String member) throws SecurityException {
    String methodName = "assign";
    assertContext(CLS_NM, methodName, group, GlobalErrIds.GROUP_NULL);
    checkAccess(CLS_NM, methodName);
    ReviewMgr reviewMgr = ReviewMgrFactory.createInstance(this.contextId);
    String dn;
    if (group.getType() == Group.Type.ROLE) {
      Role inRole = new Role(member);
      inRole.setContextId(group.getContextId());
      Role role = reviewMgr.readRole(inRole);
      dn = role.getDn();
      // Validate SSD constraints
      SDUtil.getInstance().validateSSD(group, role);
    } else {
      User inUser = new User(member);
      inUser.setContextId(group.getContextId());
      User user = reviewMgr.readUser(inUser);
      dn = user.getDn();
    }

    return GROUP_P.assign(group, dn);
  }
 private void loadUserDn(User inUser) throws SecurityException {
   ReviewMgr reviewMgr = ReviewMgrFactory.createInstance();
   User outUser = reviewMgr.readUser(inUser);
   inUser.setDn(outUser.getDn());
 }
 private void loadRoleDn(Role inRole) throws SecurityException {
   ReviewMgr reviewMgr = ReviewMgrFactory.createInstance(this.contextId);
   Role outRole = reviewMgr.readRole(inRole);
   inRole.setDn(outRole.getDn());
 }