org.apache.james.user.ldap

Class ReadOnlyLDAPGroupRestriction

    • Constructor Detail

      • ReadOnlyLDAPGroupRestriction

        public ReadOnlyLDAPGroupRestriction(org.apache.commons.configuration.HierarchicalConfiguration configuration)
        Initialises an instance from the contents of a <restriction> configuration XML element.
        Parameters:
        configuration - The avalon configuration instance that encapsulates the contents of the <restriction> XML element.
        Throws:
        ConfigurationException - If an error occurs extracting values from the configuration element.
    • Method Detail

      • isActivated

        protected boolean isActivated()
        Indicates if group/role-based restriction is enabled for the the user-store, based on the information encapsulated in the instance.
        Returns:
        True If there list of group/role distinguished names is not empty, and false otherwise.
      • toString

        public String toString()
        Converts an instance of this type to a string.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the instance.
      • getGroupMembershipLists

        protected Map<String,Collection<String>> getGroupMembershipLists(LdapContext ldapContext)
                                                                  throws NamingException
        Returns the distinguished-names (DNs) of all the members of the groups specified in the restriction list. The information is organised as a list of "<groupDN>=< [userDN1,userDN2,...,userDNn]>". Put differently, each groupDN is associated to a list of userDNs.
        Parameters:
        connection - The connection to the LDAP directory server.
        Returns:
        Returns a map of groupDNs to userDN lists.
        Throws:
        NamingException - Propagated from underlying LDAP communication layer.

Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.