Class PrimaryGroupIdHandler

  • All Implemented Interfaces:
    Function<SearchResponse,​SearchResponse>, SearchResultHandler

    public class PrimaryGroupIdHandler
    extends AbstractEntryHandler<SearchResponse>
    implements SearchResultHandler
    Constructs the primary group SID and then searches for that group and puts it's DN in the 'memberOf' attribute of the original search entry. This handler requires that entries contain both the 'objectSid' and 'primaryGroupID' attributes. If those attributes are not found this handler is a no-op. This handler should be used in conjunction with the ObjectSidHandler to ensure the 'objectSid' attribute is in the proper form. See http://support2.microsoft.com/kb/297951 This handler should only be used with the SearchOperation.execute() method since it leverages the connection to make further searches.
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • groupFilter

        private String groupFilter
        search filter used to find the primary group.
      • baseDn

        private String baseDn
        base DN used for searching for the primary group.
    • Constructor Detail

      • PrimaryGroupIdHandler

        public PrimaryGroupIdHandler()
    • Method Detail

      • getGroupFilter

        public String getGroupFilter()
        Returns the search filter used to find the primary group.
        Returns:
        group search filter
      • setGroupFilter

        public void setGroupFilter​(String filter)
        Sets the search filter used to find the primary group.
        Parameters:
        filter - search filter
      • getBaseDn

        public String getBaseDn()
        Returns the base DN to search for the primary group. If this is not set the base DN from the original search is used.
        Returns:
        base DN to search for the primary group
      • setBaseDn

        public void setBaseDn​(String dn)
        Sets the base DN to search for the primary group. If this is not set the base DN from the original search is used.
        Parameters:
        dn - base DN