public interface LdapSession
Modifier and Type | Method and Description |
---|---|
void |
assignDebug(boolean isDebug)
if we should capture debug info
|
void |
authenticate(String ldapServerId,
String userDn,
String password)
Authenticate a user
|
boolean |
create(String ldapServerId,
LdapEntry ldapEntry)
Create entry.
|
void |
delete(String ldapServerId,
String dn)
Delete an entry if it exists.
|
StringBuilder |
getDebugLog()
debug log where lines are separated by newlines
|
void |
internal_modifyHelper(String ldapServerId,
String dn,
List<LdapModificationItem> ldapModificationItems)
modify attributes for an object.
|
boolean |
isDebug()
if we are debugging
|
<R> List<R> |
list(Class<R> returnType,
String ldapServerId,
String searchDn,
LdapSearchScope ldapSearchScope,
String filter,
String attributeName)
run a filter, for one attribute, and return a list of that attribute typecast as a certain type
note, if it is a multi-valued attributes, and there are multiple object results, it will be flattened into one list
|
List<LdapEntry> |
list(String ldapServerId,
String searchDn,
LdapSearchScope ldapSearchScope,
String filter,
String[] attributeNames,
Long sizeLimit)
Run a filter and return the results.
|
<R> Map<String,List<R>> |
listInObjects(Class<R> returnType,
String ldapServerId,
String searchDn,
LdapSearchScope ldapSearchScope,
String filter,
String attributeName)
run a filter, for one attribute, and return a map of the DN key to the value of list of that attribute typecast as a certain type
|
boolean |
move(String ldapServerId,
String oldDn,
String newDn)
Move an object to a new dn.
|
List<LdapEntry> |
read(String ldapServerId,
String searchDn,
List<String> dnList,
String[] attributeNames)
Get the following entries.
|
void |
refreshConnectionsIfNeeded(String ldapServerId)
Check if connections need to be refreshed due to config changes
|
boolean |
testConnection(String ldapServerId)
test a connection
|
boolean isDebug()
void assignDebug(boolean isDebug)
inDiagnostics
- StringBuilder getDebugLog()
<R> List<R> list(Class<R> returnType, String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String attributeName)
R
- returnType
- note, only String.class is currently supportedldapServerId
- searchDn
- ldapSearchScope
- filter
- attributeName
- <R> Map<String,List<R>> listInObjects(Class<R> returnType, String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String attributeName)
R
- returnType
- note, only String.class is currently supportedldapServerId
- searchDn
- ldapSearchScope
- filter
- attributeName
- List<LdapEntry> list(String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String[] attributeNames, Long sizeLimit)
ldapServerId
- searchDn
- ldapSearchScope
- filter
- attributeNames
- sizeLimit
- List<LdapEntry> read(String ldapServerId, String searchDn, List<String> dnList, String[] attributeNames)
ldapServerId
- searchDn
- dnList
- attributeNames
- void delete(String ldapServerId, String dn)
ldapServerId
- dn
- boolean create(String ldapServerId, LdapEntry ldapEntry)
ldapServerId
- ldapEntry
- boolean move(String ldapServerId, String oldDn, String newDn)
ldapServerId
- oldDn
- newDn
- boolean testConnection(String ldapServerId)
ldapServerId
- void internal_modifyHelper(String ldapServerId, String dn, List<LdapModificationItem> ldapModificationItems)
ldapServerId
- dn
- ldapModificationItems
- Exception
- if problemvoid authenticate(String ldapServerId, String userDn, String password)
ldapServerId
- userDn
- password
- void refreshConnectionsIfNeeded(String ldapServerId)
ldapServerId
- Copyright © 2016 Internet2. All rights reserved.