Пример #1
0
  public void removeMember(LDAPEntry childEntry) {
    Attribute memberAttribute = getLDAPAttributes().get(MEMBER);

    if (memberAttribute != null) {
      memberAttribute.remove(childEntry.getDN());

      if (memberAttribute.size() == 0) {
        memberAttribute.add(SPACE_STRING);
      }
    }
  }
Пример #2
0
  public void addMember(LDAPEntry childEntry) {
    Attribute memberAttribute = getLDAPAttributes().get(MEMBER);
    if (memberAttribute != null) {
      if (memberAttribute.contains(SPACE_STRING)) {
        memberAttribute.remove(SPACE_STRING);
      }
    } else {
      memberAttribute = new BasicAttribute(MEMBER);
    }

    memberAttribute.add(childEntry.getDN());
    getLDAPAttributes().put(memberAttribute);
  }
Пример #3
0
  public boolean isMember(LDAPEntry member) {
    Attribute memberAttribute = getLDAPAttributes().get(MEMBER);

    return memberAttribute != null && memberAttribute.contains(member.getDN());
  }