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); } } }
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); }
public boolean isMember(LDAPEntry member) { Attribute memberAttribute = getLDAPAttributes().get(MEMBER); return memberAttribute != null && memberAttribute.contains(member.getDN()); }