public class LdapSourceAdapter extends BaseSourceAdapter
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
subjectIDAttributeName  | 
protected boolean | 
subjectIDFormatToLowerCase  | 
attributes, descriptionAttributeName, id, internalAttributes, name, nameAttributeName, params, searchAttributes, searches, sortAttributes, subjectIdentifierAttributes, subjectIdentifierAttributesAll, type, types| Constructor and Description | 
|---|
LdapSourceAdapter()  | 
LdapSourceAdapter(String id,
                 String name)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
checkConfig()
make sure the config is ok, and log descriptive errors if not 
 | 
Subject | 
createSubject(LdapEntry entry)  | 
protected String | 
escapeSearchFilter(String filter)
Escape a search filter to prevent LDAP injection. 
 | 
protected Map<String,Set<String>> | 
getAllAttributes(SubjectImpl subject)
Try to get more attributes for the subject. 
 | 
protected Iterator<LdapEntry> | 
getLdapResults(Search search,
              String searchValue,
              String[] attributeNames)  | 
protected LdapEntry | 
getLdapUnique(Search search,
             String searchValue,
             String[] attributeNames)  | 
Integer | 
getMaxPage()
max Page size 
 | 
protected String | 
getNeededProperty(Properties props,
                 String prop)  | 
Subject | 
getSubject(String id)
Deprecated.   
 | 
Subject | 
getSubject(String id,
          boolean exceptionIfNull)
Gets a Subject by its ID. 
 | 
Subject | 
getSubjectByIdentifier(String id)
Deprecated.   
 | 
Subject | 
getSubjectByIdentifier(String id,
                      boolean exceptionIfNull)
note, you should implement this method since this implementation will become abstract at some point 
 | 
void | 
init()
Called by SourceManager when it loads this source. 
 | 
void | 
loggingStart()
start logging the source low level actions 
 | 
String | 
loggingStop()
stop logging and get the output 
 | 
String | 
printConfig()
in the startup on this i2mi app, print helpful and brief info about this source 
 | 
Set<Subject> | 
search(String searchValue)
Unstructured search for Subjects. 
 | 
SearchPageResult | 
searchPage(String searchValue)
Unstructured search for Subjects. 
 | 
void | 
setMultipleResults(boolean multipleResults)
Set whether or not multiple results are allowed. 
 | 
static <T> T[] | 
toArray(Collection collection,
       Class<T> theClass)
convert a list into an array of type of theClass 
 | 
addAttribute, addInitParam, addInternalAttribute, addSubjectType, convertSourceAttributeToSubjectAttribute, convertSubjectAttributeToSourceAttribute, createSubject, equals, getAttributes, getConfigId, getId, getInitParam, getInternalAttributes, getName, getSearch, getSearchAttributes, getSearches, getSortAttributes, getSourceAttributesToLowerCase, getSubject, getSubjectByIdentifier, getSubjectByIdOrIdentifier, getSubjectByIdOrIdentifier, getSubjectIdentifierAttributes, getSubjectIdentifierAttributesAll, getSubjectsByIdentifiers, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectsByIdsOrIdentifiers, getSubjectStatusConfig, getSubjectType, getSubjectTypes, hashCode, initParams, isEditable, isEnabled, loadSearch, removeInitParam, resultSetLimit, retrieveAllSubjectIds, search, searchPage, setConfigId, setId, setName, setSearchAttributes, setSearches, setSortAttributes, setSubjectIdentifierAttributesprotected String subjectIDAttributeName
protected boolean subjectIDFormatToLowerCase
public void loggingStart()
Sourcepublic String loggingStop()
Sourcepublic void init()
init in interface Sourceinit in class BaseSourceAdapterpublic static <T> T[] toArray(Collection collection, Class<T> theClass)
T - is the type of the arraycollection - list to converttheClass - type of array to returnpublic Subject getSubject(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubject in interface SourcegetSubject in class BaseSourceAdapterexceptionIfNull - if SubjectNotFoundException should be 
 throws if the subject is null, or if null should be returnedSubjectNotFoundExceptionSubjectNotUniqueExceptionSource.getSubject(java.lang.String, boolean)@Deprecated public Subject getSubject(String id) throws SubjectNotFoundException, SubjectNotUniqueException
getSubject in interface SourcegetSubject in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionSource.getSubject(java.lang.String)public Subject getSubjectByIdentifier(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdentifier in interface SourcegetSubjectByIdentifier in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionSource.getSubjectByIdentifier(java.lang.String, boolean)@Deprecated public Subject getSubjectByIdentifier(String id) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdentifier in interface SourcegetSubjectByIdentifier in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionSource.getSubjectByIdentifier(java.lang.String)public SearchPageResult searchPage(String searchValue)
SourcesearchPage in interface SourcesearchPage in class BaseSourceAdapterBaseSourceAdapter.searchPage(java.lang.String)public Set<Subject> search(String searchValue)
search in interface Sourcesearch in class BaseSourceAdapterprotected String getNeededProperty(Properties props, String prop)
protected Map<String,Set<String>> getAllAttributes(SubjectImpl subject)
subject - protected Iterator<LdapEntry> getLdapResults(Search search, String searchValue, String[] attributeNames)
protected LdapEntry getLdapUnique(Search search, String searchValue, String[] attributeNames) throws SubjectNotFoundException, SubjectNotUniqueException, SourceUnavailableException
protected String escapeSearchFilter(String filter)
filter - public void checkConfig()
SourceSource.checkConfig()public String printConfig()
SourceSource.printConfig()public void setMultipleResults(boolean multipleResults)
multipleResults - public Integer getMaxPage()
Copyright © 2016 Internet2. All rights reserved.