public class LdapSourceAdapter extends BaseSourceAdapter
attributes, id, internalAttributes, name, params, searchAttributes, searches, sortAttributes, 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
|
protected String |
escapeSearchFilter(String filter)
Escape a search filter to prevent LDAP injection.
|
protected Map<String,Set<String>> |
getAllAttributes(LdapSubject subject)
Try to get more attributes for the subject.
|
edu.vt.middleware.ldap.pool.LdapPool<edu.vt.middleware.ldap.Ldap> |
getLdapPool()
Return the underlying
LdapPool . |
protected Iterator<SearchResult> |
getLdapResults(Search search,
String searchValue,
String[] attributeNames) |
protected Attributes |
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.
|
static void |
main(String[] args) |
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.
|
addAttribute, addInitParam, addInternalAttribute, addSubjectType, equals, getAttributes, getId, getInitParam, getInternalAttributes, getName, getSearch, getSearchAttributes, getSearches, getSortAttributes, getSubject, getSubjectByIdentifier, getSubjectByIdOrIdentifier, getSubjectByIdOrIdentifier, getSubjectsByIdentifiers, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectsByIdsOrIdentifiers, getSubjectStatusConfig, getSubjectType, getSubjectTypes, hashCode, initParams, loadSearch, removeInitParam, resultSetLimit, search, searchPage, setId, setName, setSearchAttributes, setSearches, setSortAttributes
public static void main(String[] args)
public void init()
init
in interface Source
init
in class BaseSourceAdapter
public Subject getSubject(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
exceptionIfNull
- if SubjectNotFoundException should be
throws if the subject is null, or if null should be returnedSubjectNotFoundException
SubjectNotUniqueException
Source.getSubject(java.lang.String, boolean)
@Deprecated public Subject getSubject(String id) throws SubjectNotFoundException, SubjectNotUniqueException
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubject(java.lang.String)
public Subject getSubjectByIdentifier(String id, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubjectByIdentifier(java.lang.String, boolean)
@Deprecated public Subject getSubjectByIdentifier(String id) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubjectByIdentifier(java.lang.String)
public SearchPageResult searchPage(String searchValue)
Source
searchPage
in interface Source
searchPage
in class BaseSourceAdapter
BaseSourceAdapter.searchPage(java.lang.String)
public Set<Subject> search(String searchValue)
search
in interface Source
search
in class BaseSourceAdapter
protected String getNeededProperty(Properties props, String prop)
protected Map<String,Set<String>> getAllAttributes(LdapSubject subject)
subject
- protected Iterator<SearchResult> getLdapResults(Search search, String searchValue, String[] attributeNames)
protected Attributes getLdapUnique(Search search, String searchValue, String[] attributeNames) throws SubjectNotFoundException, SubjectNotUniqueException, SourceUnavailableException
protected String escapeSearchFilter(String filter)
filter
- public void checkConfig()
Source
Source.checkConfig()
public String printConfig()
Source
Source.printConfig()
public edu.vt.middleware.ldap.pool.LdapPool<edu.vt.middleware.ldap.Ldap> getLdapPool()
LdapPool
.public void setMultipleResults(boolean multipleResults)
multipleResults
- public Integer getMaxPage()
Copyright © 2016 Internet2. All rights reserved.