public class JNDISourceAdapterLegacy extends BaseSourceAdapter
| Modifier and Type | Field and Description |
|---|---|
static boolean |
failOnSearchForTesting
for testing if we should fail on testing
|
protected Integer |
maxResults
if there is a limit to the number of results
|
protected static HashMap<String,Integer> |
scopeStrings
Return scope for searching as a int - associate the string with the int
|
attributes, id, internalAttributes, name, params, searchAttributes, searches, sortAttributes, subjectIdentifierAttributes, subjectIdentifierAttributesAll, type, types| Constructor and Description |
|---|
JNDISourceAdapterLegacy()
Allocates new JNDISourceAdapter;
|
JNDISourceAdapterLegacy(String id1,
String name1)
Allocates new JNDISourceAdapter;
|
| 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 NamingEnumeration |
getLdapResults(Search search,
String searchValue,
String[] attributeNames) |
protected NamingEnumeration |
getLdapResults(Search search,
String searchValue,
String[] attributeNames,
boolean firstPageOnly) |
protected Attributes |
getLdapUnique(Search search,
String searchValue,
String[] attributeNames) |
Integer |
getMaxPage()
max Page size
|
protected static int |
getScope(String scope) |
Subject |
getSubject(String id1)
Deprecated.
|
Subject |
getSubject(String id1,
boolean exceptionIfNull)
Gets a Subject by its ID.
|
Subject |
getSubjectByIdentifier(String id1)
Deprecated.
|
Subject |
getSubjectByIdentifier(String id1,
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.
|
protected Map |
loadAttributes(SubjectImpl subject)
Loads attributes for the argument subject.
|
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.
|
protected void |
setupEnvironment(Properties props)
Setup environment.
|
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 Integer maxResults
protected static HashMap<String,Integer> scopeStrings
public static boolean failOnSearchForTesting
public JNDISourceAdapterLegacy()
public void loggingStart()
Sourcepublic String loggingStop()
Sourceprotected static int getScope(String scope)
scope - public Subject getSubject(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
SourcegetSubject in interface SourcegetSubject in class BaseSourceAdapterexceptionIfNull - if SubjectNotFoundException should be
throws if the subject is null, or if null should be returnedSubjectNotFoundExceptionSubjectNotUniqueExceptionBaseSourceAdapter.getSubject(java.lang.String, boolean)public Subject getSubjectByIdentifier(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
BaseSourceAdaptergetSubjectByIdentifier in interface SourcegetSubjectByIdentifier in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionBaseSourceAdapter.getSubjectByIdentifier(java.lang.String, boolean)public Set<Subject> search(String searchValue)
search in interface Sourcesearch in class BaseSourceAdapterpublic SearchPageResult searchPage(String searchValue)
SourcesearchPage in interface SourcesearchPage in class BaseSourceAdapterBaseSourceAdapter.searchPage(java.lang.String)public void init()
throws SourceUnavailableException
BaseSourceAdapterinit in interface Sourceinit in class BaseSourceAdapterSourceUnavailableExceptionBaseSourceAdapter.init()protected void setupEnvironment(Properties props) throws SourceUnavailableException
props - SourceUnavailableExceptionprotected Map loadAttributes(SubjectImpl subject)
subject - protected NamingEnumeration getLdapResults(Search search, String searchValue, String[] attributeNames)
search - searchValue - attributeNames - protected NamingEnumeration getLdapResults(Search search, String searchValue, String[] attributeNames, boolean firstPageOnly)
search - searchValue - attributeNames - protected Attributes getLdapUnique(Search search, String searchValue, String[] attributeNames) throws SubjectNotFoundException, SubjectNotUniqueException
search - searchValue - attributeNames - SubjectNotFoundExceptionSubjectNotUniqueExceptionprotected String escapeSearchFilter(String filter)
filter - public void checkConfig()
SourceSource.checkConfig()public String printConfig()
SourceSource.printConfig()@Deprecated public Subject getSubject(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
SourcegetSubject in interface SourcegetSubject in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionBaseSourceAdapter.getSubject(java.lang.String)@Deprecated public Subject getSubjectByIdentifier(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
SourcegetSubjectByIdentifier in interface SourcegetSubjectByIdentifier in class BaseSourceAdapterSubjectNotFoundExceptionSubjectNotUniqueExceptionBaseSourceAdapter.getSubjectByIdentifier(java.lang.String)public Integer getMaxPage()
Copyright © 2016 Internet2. All rights reserved.