public class ActiveDirectorySynchronizer extends AbstractLdapSynchronizer
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
currentDNSHostName
The DNS host name value read before performing the
synchronization task.
|
protected java.lang.String |
currentHighestCommittedUSN
The highest committed USN value read before performing the
synchronization task.
|
protected java.lang.String |
currentInvocationId
The invocation id value read before performing the
synchronization task.
|
static java.lang.String |
DNSHOSTNAME
DNS host name that identifies the host name of the machine where
Active Directory is present.
|
static java.lang.String |
DSSERVICENAME
A Service name maintained by Active Directory.
|
static java.lang.String |
HIGHESTCOMMITTEDUSN
Highest Committed USN, is an integer managed by Active Directory
which is used to indicate the changes performed in the entire
directory domain.
|
static java.lang.String |
INVOCATIONID
An invocation identifier maintained by Active Directory that
indicates unique directory.
|
connection, contextSettings, errorCount, fullSyncNeeded, GROUP_SEARCH_PAGE_SIZE, groupSettings, ldapSyncListener, logger, maxErrors, noGroupsSynchronized, noUsersSynchronized, sqlLogger, synchronizerSettings, syncNeeded, syncParameters, USER_SEARCH_PAGE_SIZE, userSettings
Constructor and Description |
---|
ActiveDirectorySynchronizer() |
Modifier and Type | Method and Description |
---|---|
protected void |
determineSynchronizationNeed()
Determines whether synchronization is needed or not based on
some parameters obtained from the Active Directory.
|
protected java.lang.String[] |
getGroupAttributes()
Returns list of attributes for which values need to be obtained
from the directory server when performing group search.
|
protected java.lang.String |
getGroupDNAttributeName()
Returns the attribute used for identifying the distinguished
name of a group object.
|
protected java.lang.String |
getGroupObjectClass()
Returns the object class used to indentify group objects
in Active Directory.
|
protected java.lang.String |
getGroupSearchFilter()
Determines the search filter to be used for full and incremental
synchronization.
|
protected java.lang.String |
getInvocationId()
Returns the invocation id maintained by Active Directory
in a string format.
|
protected java.lang.String |
getMemberUserAccountName(java.lang.String memberDN,
javax.naming.ldap.LdapContext memberLdapContext)
Returns the user or group member account name, for the given
distinguished name of the user or group.
|
protected java.lang.String |
getRootDSEAttributeValue(java.lang.String attributeName)
Returns the root DSE attribute value for the given attribute name.
|
protected java.util.Hashtable |
getSearchLdapContextEnvironment()
Returns the search context environment to be used for performing
the directory searches.
|
protected java.lang.String |
getUserDNAttributeName()
Returns the attribute used for identifying the distinguished
name of a user object.
|
protected java.lang.String |
getUserObjectClass()
Returns the object class used to indentify user objects
in Active Directory.
|
protected java.lang.String |
getUserSearchFilter()
Determines the search filter to be used for full and incremental
synchronization.
|
protected void |
initSync()
Initializes the synchronization task with the necessary information
needed for performing the synchronization work.
|
protected java.util.Set |
retrieveAllGroupMembers(java.lang.String groupDN)
Retrieves all the group members of the given group distinguished
name.
|
protected void |
retrieveGroupMembers(java.lang.String groupDN,
java.util.Set memberUsers,
java.util.Set memberGroups)
Retrieves group members and fills the users and groups that are
members of the given group into the passed in sets.
|
protected void |
updateSyncParameters()
Called by the controller when the synchronization task is
completed successfully, so that the new parameters are used
for the next synchronization task.
|
buildURL, closeContext, commitGroupChanges, commitGroupChanges, commitUserChanges, commitUserChanges, createDefaultLdapContext, createSearchLdapContext, getDefaultLdapContextEnvironment, getGroupMemberAsGroupAttribute, getGroupMemberAsUserAttribute, getGroupMembersAttribute, getGroupSearchBase, getGroupSearchControls, getGroupSearchPageSize, getGroupSearchScope, getLDAPSyncListener, getSynchronizerSettings, getSyncParameters, getUserAttributes, getUserSearchBase, getUserSearchControls, getUserSearchPageSize, getUserSearchScope, init, isFullSyncNeeded, isSyncNeeded, performSync, setFullSyncNeeded, setLDAPSyncListener, setOwner, setSyncNeeded, syncGroupMembers, syncGroups, syncUsers
public static final java.lang.String HIGHESTCOMMITTEDUSN
public static final java.lang.String DNSHOSTNAME
public static final java.lang.String INVOCATIONID
public static final java.lang.String DSSERVICENAME
protected java.lang.String currentHighestCommittedUSN
protected java.lang.String currentDNSHostName
protected java.lang.String currentInvocationId
protected void initSync() throws LdapSyncException
initSync
in class AbstractLdapSynchronizer
LdapSyncException
- if fails to initializeAbstractLdapSynchronizer.initSync()
protected void updateSyncParameters()
updateSyncParameters
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.updateSyncParameters()
protected java.lang.String getUserSearchFilter()
getUserSearchFilter
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getUserSearchFilter()
protected java.lang.String getGroupSearchFilter()
getGroupSearchFilter
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getGroupSearchFilter()
protected java.util.Hashtable getSearchLdapContextEnvironment()
getSearchLdapContextEnvironment
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getSearchLdapContextEnvironment()
protected java.lang.String getUserObjectClass()
getUserObjectClass
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getUserObjectClass()
protected java.lang.String getGroupObjectClass()
getGroupObjectClass
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getGroupObjectClass()
protected java.lang.String getUserDNAttributeName()
getUserDNAttributeName
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getUserDNAttributeName()
protected java.lang.String getGroupDNAttributeName()
getGroupDNAttributeName
in class AbstractLdapSynchronizer
AbstractLdapSynchronizer.getGroupDNAttributeName()
protected java.util.Set retrieveAllGroupMembers(java.lang.String groupDN) throws LdapSyncException
retrieveAllGroupMembers
in class AbstractLdapSynchronizer
groupDN
- group distinguished name for which users
need to be retrieved.LdapSyncException
- if fails to retrieve members.AbstractLdapSynchronizer.retrieveAllGroupMembers(java.lang.String)
protected void retrieveGroupMembers(java.lang.String groupDN, java.util.Set memberUsers, java.util.Set memberGroups) throws LdapSyncException
groupDN
- distinguished name of the group for which members
need to be retrieved.memberUsers
- returns the set of member users of the group.memberGroups
- returns the set of member groups of the group.LdapSyncException
- if fails to retrieve members of the group.protected java.lang.String getMemberUserAccountName(java.lang.String memberDN, javax.naming.ldap.LdapContext memberLdapContext) throws LdapSyncException
memberDN
- user or group distinguished nameLdapSyncException
- if fails to retrieve the account name.protected void determineSynchronizationNeed() throws LdapSyncException
determineSynchronizationNeed
in class AbstractLdapSynchronizer
LdapSyncException
- if fails to determine the needprotected java.lang.String getRootDSEAttributeValue(java.lang.String attributeName) throws LdapSyncException
attributeName
- attribute for which a root DSE value is needed.LdapSyncException
- if fails to get the value.protected java.lang.String getInvocationId() throws LdapSyncException
LdapSyncException
- if fails to get the invocation id.protected java.lang.String[] getGroupAttributes()
AbstractLdapSynchronizer
getGroupAttributes
in class AbstractLdapSynchronizer