public class InternalSourceAdapter extends BaseSourceAdapter
InternalSubjects.
This subject adapter resolves two subjects:
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
NAME |
attributes, descriptionAttributeName, id, internalAttributes, name, nameAttributeName, params, searchAttributes, searches, sortAttributes, subjectIdentifierAttributes, subjectIdentifierAttributesAll, type, types| Constructor and Description |
|---|
InternalSourceAdapter()
Allocates new InternalSourceAdapter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkConfig()
make sure the config is ok, and log descriptive errors if not
|
String |
getRootName() |
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
|
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
|
boolean |
rootSubject(Subject subject)
if root subject
|
Set |
search(String searchValue)
Unstructured search for Subjects.
|
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, hashCode, initParams, isEditable, isEnabled, loadSearch, removeInitParam, resultSetLimit, retrieveAllSubjectIds, search, searchPage, searchPage, setConfigId, setId, setName, setSearchAttributes, setSearches, setSortAttributes, setSubjectIdentifierAttributespublic static final String ID
public static final String NAME
public InternalSourceAdapter()
InternalSourceAdapter msa = new InternalSourceAdapter();
public void loggingStart()
Sourcepublic String loggingStop()
Sourcepublic 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 SourcegetSubject in class BaseSourceAdapterid - Subject id to return.SubjectNotFoundExceptionSource.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 SourcegetSubject in class BaseSourceAdapterid - Subject id to return.exceptionIfNull - SubjectNotFoundExceptionSource.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 SourcegetSubjectByIdentifier in class BaseSourceAdapterid - Identity of subject to return.SubjectNotFoundExceptionSource.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 SourcegetSubjectByIdentifier in class BaseSourceAdapterid - Identity of subject to return.exceptionIfNull - SubjectNotFoundException exception if null resultSubjectNotFoundExceptionSource.getSubjectByIdentifier(java.lang.String, boolean)public Set getSubjectTypes()
SourceAdapter sa = new InternalSourceAdapter(); Set types = sa.getSubjectTypes();
getSubjectTypes in interface SourcegetSubjectTypes in class BaseSourceAdapterpublic void init()
// Initialize this source adapter. SourceAdapter sa = new InternalSourceAdapter(); sa.init();
init in interface Sourceinit in class BaseSourceAdapterpublic Set search(String searchValue)
// Search for subjects with the query string test.
SourceAdapter sa = new InternalSourceAdapter();
Set subjects = sa.searchValue("test");
search in interface Sourcesearch in class BaseSourceAdaptersearchValue - Query string for finding subjects.public boolean rootSubject(Subject subject)
subject - public String getRootName()
public void checkConfig()
SourceSource.checkConfig()public String printConfig()
SourceSource.printConfig()Copyright © 2016 Internet2. All rights reserved.