public class LdapSystem extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
_ldaptiveProperties |
static String[] |
ENCRYPTABLE_LDAPTIVE_PROPERTIES |
String |
ldapSystemName |
protected boolean |
searchResultPagingEnabled_defaultValue |
protected int |
searchResultPagingSize_default_value |
| Constructor and Description |
|---|
LdapSystem(String ldapSystemName,
boolean isActiveDirectory) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
attributeHasNoValues(org.ldaptive.LdapAttribute attribute) |
protected org.ldaptive.Connection |
getLdapConnection() |
org.ldaptive.pool.BlockingConnectionPool |
getLdapPool() |
Properties |
getLdaptiveProperties() |
org.ldaptive.SearchExecutor |
getSearchExecutor()
Returns ldaptive search executor configured according to properties
|
int |
getSearchResultPagingSize() |
boolean |
isActiveDirectory() |
boolean |
isSearchResultPagingEnabled() |
void |
log(org.ldaptive.LdapEntry ldapEntry,
String ldapEntryDescriptionFormat,
Object... ldapEntryDescriptionArgs) |
void |
log(org.ldaptive.ModifyRequest modifyRequest,
String descriptionFormat,
Object... descriptionArgs) |
static void |
main(String[] args) |
protected boolean |
makeLdapDataCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry,
boolean valuesAreCaseSensitive) |
protected boolean |
makeLdapDnCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry)
Moves the ldap object if necessary.
|
boolean |
makeLdapObjectCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry,
boolean valuesAreCaseSensitive) |
protected void |
performLdapAdd(org.ldaptive.LdapEntry entryToAdd) |
protected void |
performLdapDelete(String dnToDelete) |
void |
performLdapModify(org.ldaptive.ModifyRequest mod,
boolean valuesAreCaseSensitive) |
void |
performLdapModify(org.ldaptive.ModifyRequest mod,
boolean valuesAreCaseSensitive,
boolean retryIfFails)
This performs a modification and optionally retries it by comparing attributeValues
being added/removed to those already on the ldap server
|
protected LdapObject |
performLdapRead(com.unboundid.ldap.sdk.DN dn,
String... attributes) |
protected LdapObject |
performLdapRead(String dn,
Collection<String> attributes) |
protected LdapObject |
performLdapRead(String dn,
String... attributes) |
Set<String> |
performLdapSearchRequest_returningValuesOfAnAttribute(int approximateNumResultsExpected,
String searchBaseDn,
org.ldaptive.SearchScope scope,
String attributeToReturn,
String filterTemplate,
Object... filterParams) |
protected void |
performLdapSearchRequest(int approximateNumResultsExpected,
org.ldaptive.SearchRequest request,
org.ldaptive.handler.SearchEntryHandler callback) |
List<LdapObject> |
performLdapSearchRequest(int approximateNumResultsExpected,
String searchBaseDn,
org.ldaptive.SearchScope scope,
Collection<String> attributesToReturn,
org.ldaptive.SearchFilter filter) |
List<LdapObject> |
performLdapSearchRequest(int approximateNumResultsExpected,
String searchBaseDn,
org.ldaptive.SearchScope scope,
Collection<String> attributesToReturn,
String filterTemplate,
Object... filterParams) |
protected void |
performTestLdapRead(org.ldaptive.Connection conn) |
org.ldaptive.LdapEntry |
rereadEntry(org.ldaptive.LdapEntry ldapEntry)
Read a fresh copy of an ldapEntry, using the dn and attribute list from the provided
entry.
|
boolean |
test() |
public static final String[] ENCRYPTABLE_LDAPTIVE_PROPERTIES
public final String ldapSystemName
protected Properties _ldaptiveProperties
protected boolean searchResultPagingEnabled_defaultValue
protected int searchResultPagingSize_default_value
public LdapSystem(String ldapSystemName, boolean isActiveDirectory)
public static boolean attributeHasNoValues(org.ldaptive.LdapAttribute attribute)
public void log(org.ldaptive.LdapEntry ldapEntry,
String ldapEntryDescriptionFormat,
Object... ldapEntryDescriptionArgs)
public void log(org.ldaptive.ModifyRequest modifyRequest,
String descriptionFormat,
Object... descriptionArgs)
protected void performTestLdapRead(org.ldaptive.Connection conn)
throws PspException
PspExceptionpublic org.ldaptive.pool.BlockingConnectionPool getLdapPool()
throws PspException
PspExceptionpublic boolean isActiveDirectory()
public Properties getLdaptiveProperties()
public int getSearchResultPagingSize()
public boolean isSearchResultPagingEnabled()
protected org.ldaptive.Connection getLdapConnection()
throws PspException
PspExceptionpublic org.ldaptive.SearchExecutor getSearchExecutor()
protected void performLdapAdd(org.ldaptive.LdapEntry entryToAdd)
throws PspException
PspExceptionprotected void performLdapDelete(String dnToDelete) throws PspException
PspExceptionpublic void performLdapModify(org.ldaptive.ModifyRequest mod,
boolean valuesAreCaseSensitive)
throws PspException
PspExceptionpublic void performLdapModify(org.ldaptive.ModifyRequest mod,
boolean valuesAreCaseSensitive,
boolean retryIfFails)
throws PspException
mod - retryIfFails - Should the Modify be retried if something goes wrong. This retry
will do attributeValue-by-attributeValue comparison to
make the retry as safe as possiblePspExceptionprotected LdapObject performLdapRead(com.unboundid.ldap.sdk.DN dn, String... attributes) throws PspException
PspExceptionprotected LdapObject performLdapRead(String dn, Collection<String> attributes) throws PspException
PspExceptionprotected LdapObject performLdapRead(String dn, String... attributes) throws PspException
PspExceptionprotected void performLdapSearchRequest(int approximateNumResultsExpected,
org.ldaptive.SearchRequest request,
org.ldaptive.handler.SearchEntryHandler callback)
throws PspException
request - org.ldaptive.LdapExceptionPspExceptionpublic List<LdapObject> performLdapSearchRequest(int approximateNumResultsExpected, String searchBaseDn, org.ldaptive.SearchScope scope, Collection<String> attributesToReturn, String filterTemplate, Object... filterParams) throws PspException
PspExceptionpublic List<LdapObject> performLdapSearchRequest(int approximateNumResultsExpected, String searchBaseDn, org.ldaptive.SearchScope scope, Collection<String> attributesToReturn, org.ldaptive.SearchFilter filter) throws PspException
PspExceptionpublic Set<String> performLdapSearchRequest_returningValuesOfAnAttribute(int approximateNumResultsExpected, String searchBaseDn, org.ldaptive.SearchScope scope, String attributeToReturn, String filterTemplate, Object... filterParams) throws PspException
PspExceptionpublic boolean makeLdapObjectCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry,
boolean valuesAreCaseSensitive)
throws PspException
PspExceptionpublic org.ldaptive.LdapEntry rereadEntry(org.ldaptive.LdapEntry ldapEntry)
throws PspException
ldapEntry - Source of DN and attributes that should be read.PspExceptionprotected boolean makeLdapDataCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry,
boolean valuesAreCaseSensitive)
throws PspException
PspExceptionprotected boolean makeLdapDnCorrect(org.ldaptive.LdapEntry correctEntry,
org.ldaptive.LdapEntry existingEntry)
throws PspException
correctEntry - existingEntry - PspExceptionpublic boolean test()
public static void main(String[] args)
Copyright © 2022 Internet2. All rights reserved.