public class InternalSourceAdapter extends BaseSourceAdapter
InternalSubject
s.
This subject adapter resolves two subjects:
Modifier and Type | Field and Description |
---|---|
static String |
ID |
static String |
NAME |
attributes, id, internalAttributes, name, params, searchAttributes, searches, sortAttributes, type, types
Modifier and Type | Method and Description |
---|---|
void |
checkConfig()
make sure the config is ok, and log descriptive errors if not
|
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)
Gets a Subject by other well-known identifiers, aside from the
subject ID.
|
Set |
getSubjectTypes()
Gets the SubjectTypes supported by this source.
|
void |
init()
Called by SourceManager when it loads this source.
|
static InternalSourceAdapter |
instance()
singleton
|
String |
printConfig()
in the startup on this i2mi app, print helpful and brief info about this source
|
Set |
search(String searchValue)
Unstructured search for Subjects.
|
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, hashCode, initParams, loadSearch, removeInitParam, resultSetLimit, search, searchPage, searchPage, setId, setName, setSearchAttributes, setSearches, setSortAttributes
public static final String ID
public static final String NAME
public static InternalSourceAdapter instance()
@Deprecated public Subject getSubject(String id) throws SubjectNotFoundException
// Return a subject with the id john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubject("john");
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
id
- Subject id to return.SubjectNotFoundException
Source.getSubject(java.lang.String)
public Subject getSubject(String id, boolean exceptionIfNull) throws SubjectNotFoundException
// Return a subject with the id john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubject("john");
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
id
- Subject id to return.exceptionIfNull
- SubjectNotFoundException
Source.getSubject(java.lang.String, boolean)
@Deprecated public Subject getSubjectByIdentifier(String id) throws SubjectNotFoundException
// Return a subject with the identity john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubjectByIdentifier("john");
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
id
- Identity of subject to return.SubjectNotFoundException
Source.getSubjectByIdentifier(java.lang.String)
public Subject getSubjectByIdentifier(String id, boolean exceptionIfNull) throws SubjectNotFoundException
// Return a subject with the identity john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubjectByIdentifier("john");
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
id
- Identity of subject to return.exceptionIfNull
- SubjectNotFoundException exception if null resultSubjectNotFoundException
Source.getSubjectByIdentifier(java.lang.String, boolean)
public Set getSubjectTypes()
SourceAdapter sa = new InternalSourceAdapter(); Set types = sa.getSubjectTypes();
getSubjectTypes
in interface Source
getSubjectTypes
in class BaseSourceAdapter
public void init()
// Initialize this source adapter. SourceAdapter sa = new InternalSourceAdapter(); sa.init();
init
in interface Source
init
in class BaseSourceAdapter
public Set search(String searchValue)
// Search for subjects with the query string test. SourceAdapter sa = new InternalSourceAdapter(); Set subjects = sa.searchValue("test");
search
in interface Source
search
in class BaseSourceAdapter
searchValue
- Query string for finding subjects.public void checkConfig()
Source
Source.checkConfig()
public String printConfig()
Source
Source.printConfig()
Copyright © 2016 Internet2. All rights reserved.