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, 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.
|
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, 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
protected Integer maxResults
protected static HashMap<String,Integer> scopeStrings
public static boolean failOnSearchForTesting
public JNDISourceAdapterLegacy()
protected static int getScope(String scope)
scope
- public Subject getSubject(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
Source
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
BaseSourceAdapter.getSubject(java.lang.String, boolean)
public Subject getSubjectByIdentifier(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
BaseSourceAdapter
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
BaseSourceAdapter.getSubjectByIdentifier(java.lang.String, boolean)
public Set<Subject> search(String searchValue)
search
in interface Source
search
in class BaseSourceAdapter
public SearchPageResult searchPage(String searchValue)
Source
searchPage
in interface Source
searchPage
in class BaseSourceAdapter
BaseSourceAdapter.searchPage(java.lang.String)
public void init() throws SourceUnavailableException
BaseSourceAdapter
init
in interface Source
init
in class BaseSourceAdapter
SourceUnavailableException
BaseSourceAdapter.init()
protected void setupEnvironment(Properties props) throws SourceUnavailableException
props
- SourceUnavailableException
protected 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
- SubjectNotFoundException
SubjectNotUniqueException
protected String escapeSearchFilter(String filter)
filter
- public void checkConfig()
Source
Source.checkConfig()
public String printConfig()
Source
Source.printConfig()
@Deprecated public Subject getSubject(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
Source
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
BaseSourceAdapter.getSubject(java.lang.String)
@Deprecated public Subject getSubjectByIdentifier(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
Source
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
SubjectNotFoundException
SubjectNotUniqueException
BaseSourceAdapter.getSubjectByIdentifier(java.lang.String)
public Integer getMaxPage()
Copyright © 2016 Internet2. All rights reserved.