public class LdaptiveSessionImpl extends Object implements LdapSession
Modifier and Type | Field and Description |
---|---|
static String[] |
ENCRYPTABLE_LDAPTIVE_PROPERTIES
What ldaptive properties will be decrypted if their values are Morph files?
(We don't decrypt all properties because that would prevent the use of slashes in the property values)
|
Constructor and Description |
---|
LdaptiveSessionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
assignDebug(boolean isDebug)
if we should capture debug info
|
void |
assignDebug(boolean isDebug,
StringBuilder theDebugLog)
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
|
public static final String[] ENCRYPTABLE_LDAPTIVE_PROPERTIES
public StringBuilder getDebugLog()
getDebugLog
in interface LdapSession
public boolean isDebug()
isDebug
in interface LdapSession
public void assignDebug(boolean isDebug, StringBuilder theDebugLog)
isDebug
- public void assignDebug(boolean isDebug)
assignDebug
in interface LdapSession
isDebug
- public <R> List<R> list(Class<R> returnType, String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String attributeName)
LdapSession
list
in interface LdapSession
returnType
- note, only String.class is currently supportedLdapSession.list(java.lang.Class, java.lang.String, java.lang.String, edu.internet2.middleware.grouper.ldap.LdapSearchScope, java.lang.String, java.lang.String)
public <R> Map<String,List<R>> listInObjects(Class<R> returnType, String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String attributeName)
LdapSession
listInObjects
in interface LdapSession
returnType
- note, only String.class is currently supportedLdapSession.listInObjects(java.lang.Class, java.lang.String, java.lang.String, edu.internet2.middleware.grouper.ldap.LdapSearchScope, java.lang.String, java.lang.String)
public List<LdapEntry> list(String ldapServerId, String searchDn, LdapSearchScope ldapSearchScope, String filter, String[] attributeNames, Long sizeLimit)
LdapSession
list
in interface LdapSession
LdapSession.list(java.lang.String, java.lang.String, edu.internet2.middleware.grouper.ldap.LdapSearchScope, java.lang.String, java.lang.String[], java.lang.Long)
public List<LdapEntry> read(String ldapServerId, String searchDn, List<String> dnList, String[] attributeNames)
LdapSession
read
in interface LdapSession
public void authenticate(String ldapServerId, String userDn, String password)
LdapSession
authenticate
in interface LdapSession
LdapSession.authenticate(java.lang.String, java.lang.String, java.lang.String)
public void delete(String ldapServerId, String dn)
LdapSession
delete
in interface LdapSession
public boolean create(String ldapServerId, LdapEntry ldapEntry)
LdapSession
create
in interface LdapSession
public boolean move(String ldapServerId, String oldDn, String newDn)
LdapSession
move
in interface LdapSession
public void internal_modifyHelper(String ldapServerId, String dn, List<LdapModificationItem> ldapModificationItems)
LdapSession
internal_modifyHelper
in interface LdapSession
public boolean testConnection(String ldapServerId)
LdapSession
testConnection
in interface LdapSession
public void refreshConnectionsIfNeeded(String ldapServerId)
LdapSession
refreshConnectionsIfNeeded
in interface LdapSession
Copyright © 2016 Internet2. All rights reserved.