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, 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, setSubjectIdentifierAttributes
public static final String ID
public static final String NAME
public InternalSourceAdapter()
InternalSourceAdapter msa = new InternalSourceAdapter();
public void loggingStart()
Source
public String loggingStop()
Source
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 boolean rootSubject(Subject subject)
subject
- public String getRootName()
public void checkConfig()
Source
Source.checkConfig()
public String printConfig()
Source
Source.printConfig()
Copyright © 2016 Internet2. All rights reserved.