| | |
| | | /** The set of the LDAP URLs that define the membership criteria. */ |
| | | private LinkedHashSet<LDAPURL> memberURLs; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new, uninitialized dynamic group instance. This is intended for |
| | | * internal use only. |
| | | */ |
| | | /** Creates a new, uninitialized dynamic group instance. This is intended for internal use only. */ |
| | | public DynamicGroup() |
| | | { |
| | | super(); |
| | |
| | | // No initialization is required here. |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new dynamic group instance with the provided information. |
| | | * |
| | |
| | | this.memberURLs = memberURLs; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeGroupImplementation( |
| | | DynamicGroupImplementationCfg configuration) |
| | |
| | | // No additional initialization is required. |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DynamicGroup newInstance(ServerContext serverContext, Entry groupEntry) |
| | | throws DirectoryException |
| | | { |
| | | ifNull(groupEntry); |
| | | |
| | | |
| | | // Get the memberURL attribute from the entry, if there is one, and parse |
| | | // out the LDAP URLs that it contains. |
| | | LinkedHashSet<LDAPURL> memberURLs = new LinkedHashSet<>(); |
| | |
| | | return new DynamicGroup(groupEntry.getName(), memberURLs); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public SearchFilter getGroupDefinitionFilter() |
| | | throws DirectoryException |
| | |
| | | OC_GROUP_OF_URLS + ")"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isGroupDefinition(Entry entry) |
| | | { |
| | |
| | | return entry.hasObjectClass(groupOfURLsClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DN getGroupDN() |
| | | { |
| | | return groupEntryDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void setGroupDN(DN groupDN) |
| | | { |
| | | groupEntryDN = groupDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of member URLs for this dynamic group. The returned set |
| | | * must not be altered by the caller. |
| | |
| | | return memberURLs; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean supportsNestedGroups() |
| | | { |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public List<DN> getNestedGroupDNs() |
| | | { |
| | |
| | | return Collections.<DN>emptyList(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void addNestedGroup(DN nestedGroupDN) |
| | | throws UnsupportedOperationException, DirectoryException |
| | |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void removeNestedGroup(DN nestedGroupDN) |
| | | throws UnsupportedOperationException, DirectoryException |
| | |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isMember(DN userDN, Set<DN> examinedGroups) |
| | | throws DirectoryException |
| | |
| | | return entry != null && isMember(entry); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isMember(Entry userEntry, Set<DN> examinedGroups) |
| | | throws DirectoryException |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MemberList getMembers() |
| | | throws DirectoryException |
| | |
| | | return new DynamicGroupMemberList(groupEntryDN, memberURLs); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public MemberList getMembers(DN baseDN, SearchScope scope, |
| | | SearchFilter filter) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean mayAlterMemberList() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void updateMembers(List<Modification> modifications) |
| | | throws UnsupportedOperationException, DirectoryException |
| | |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void addMember(Entry userEntry) |
| | | throws UnsupportedOperationException, DirectoryException |
| | |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void removeMember(DN userDN) |
| | | throws UnsupportedOperationException, DirectoryException |
| | |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | |
| | | buffer.append("})"); |
| | | } |
| | | } |
| | | |