org.ldaptive.ad.handler
Class PrimaryGroupIdHandler

java.lang.Object
  extended by org.ldaptive.handler.AbstractSearchEntryHandler
      extended by org.ldaptive.ad.handler.PrimaryGroupIdHandler
All Implemented Interfaces:
Handler<SearchRequest,SearchEntry>, SearchEntryHandler

public class PrimaryGroupIdHandler
extends AbstractSearchEntryHandler

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

Version:
$Revision: 3092 $ $Date: 2015-02-16 16:31:47 -0500 (Mon, 16 Feb 2015) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.handler.AbstractSearchEntryHandler
logger
 
Constructor Summary
PrimaryGroupIdHandler()
           
 
Method Summary
 String getBaseDn()
          Returns the base DN to search for the primary group.
 String getGroupFilter()
          Returns the search filter used to find the primary group.
protected  void handleAttributes(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the attributes of a search entry.
 int hashCode()
          
 void setBaseDn(String dn)
          Sets the base DN to search for the primary group.
 void setGroupFilter(String filter)
          Sets the search filter used to find the primary group.
 
Methods inherited from class org.ldaptive.handler.AbstractSearchEntryHandler
equals, handle, handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, initializeRequest
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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

handleAttributes

protected void handleAttributes(Connection conn,
                                SearchRequest request,
                                SearchEntry entry)
                         throws LdapException
Handle the attributes of a search entry.

Overrides:
handleAttributes in class AbstractSearchEntryHandler
Parameters:
conn - the search was performed on
request - used to find the search entry
entry - search entry to extract the attributes from
Throws:
LdapException - if the LDAP returns an error

hashCode

public int hashCode()

Specified by:
hashCode in class AbstractSearchEntryHandler


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.