Class InternalSourceAdapter
java.lang.Object
edu.internet2.middleware.subject.provider.BaseSourceAdapter
edu.internet2.middleware.grouper.subj.InternalSourceAdapter
- All Implemented Interfaces:
Source
Internal SourceAdapter for retrieving
InternalSubject
s.
This subject adapter resolves two subjects:
- GrouperAll
- GrouperSystem
- Version:
- $Id: InternalSourceAdapter.java,v 1.6 2009-09-02 05:57:26 mchyzer Exp $
-
Field Summary
Fields inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter
attributes, descriptionAttributeName, id, internalAttributes, name, nameAttributeName, params, searchAttributes, searches, sortAttributes, subjectIdentifierAttributes, subjectIdentifierAttributesAll, type, types
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
make sure the config is ok, and log descriptive errors if notgetSubject
(String id) Deprecated.getSubject
(String id, boolean exceptionIfNull) Gets a Subject by its ID.Deprecated.getSubjectByIdentifier
(String id, boolean exceptionIfNull) Gets a Subject by other well-known identifiers, aside from the subject ID.Gets the SubjectTypes supported by this source.void
init()
Called by SourceManager when it loads this source.static InternalSourceAdapter
instance()
singletonvoid
start logging the source low level actionsstop logging and get the outputin the startup on this i2mi app, print helpful and brief info about this sourceboolean
rootSubject
(Subject subject) if root subjectUnstructured search for Subjects.Methods inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter
addAttribute, addInitParam, addInternalAttribute, addSubjectType, attributeNameToViewerGroupName, convertSourceAttributeToSubjectAttribute, convertSubjectAttributeToSourceAttribute, createSubject, equals, exportLabelToAttributeName, 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, setSubjectIdentifierAttributesAll, virtualAttributesForSource, virtualAttributesForSourceLegacy, virtualAttributeVariablesForSourceLegacy
-
Field Details
-
ID
- See Also:
-
NAME
- See Also:
-
-
Constructor Details
-
InternalSourceAdapter
public InternalSourceAdapter()Allocates new InternalSourceAdapter.InternalSourceAdapter msa = new InternalSourceAdapter();
-
-
Method Details
-
loggingStart
public void loggingStart()Description copied from interface:Source
start logging the source low level actions -
loggingStop
Description copied from interface:Source
stop logging and get the output -
instance
singleton- Returns:
- the singleton
-
getSubject
Deprecated.Gets a Subject by its ID.// Return a subject with the id john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubject("john");
- Specified by:
getSubject
in interfaceSource
- Specified by:
getSubject
in classBaseSourceAdapter
- Parameters:
id
- Subject id to return.- Returns:
- An internal subject.
- Throws:
SubjectNotFoundException
- See Also:
-
getSubject
Gets a Subject by its ID.// Return a subject with the id john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubject("john");
- Specified by:
getSubject
in interfaceSource
- Overrides:
getSubject
in classBaseSourceAdapter
- Parameters:
id
- Subject id to return.exceptionIfNull
-- Returns:
- An internal subject.
- Throws:
SubjectNotFoundException
- See Also:
-
getSubjectByIdentifier
Deprecated.Gets a Subject by other well-known identifiers, aside from the subject ID.// Return a subject with the identity john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubjectByIdentifier("john");
- Specified by:
getSubjectByIdentifier
in interfaceSource
- Specified by:
getSubjectByIdentifier
in classBaseSourceAdapter
- Parameters:
id
- Identity of subject to return.- Returns:
- An internal subject.
- Throws:
SubjectNotFoundException
- See Also:
-
getSubjectByIdentifier
public Subject getSubjectByIdentifier(String id, boolean exceptionIfNull) throws SubjectNotFoundException Gets a Subject by other well-known identifiers, aside from the subject ID.// Return a subject with the identity john. SourceAdapter sa = new InternalSourceAdapter(); Subject subj = sa.getSubjectByIdentifier("john");
- Specified by:
getSubjectByIdentifier
in interfaceSource
- Overrides:
getSubjectByIdentifier
in classBaseSourceAdapter
- Parameters:
id
- Identity of subject to return.exceptionIfNull
- SubjectNotFoundException exception if null result- Returns:
- An internal subject.
- Throws:
SubjectNotFoundException
- See Also:
-
getSubjectTypes
Gets the SubjectTypes supported by this source.SourceAdapter sa = new InternalSourceAdapter(); Set types = sa.getSubjectTypes();
- Specified by:
getSubjectTypes
in interfaceSource
- Overrides:
getSubjectTypes
in classBaseSourceAdapter
- Returns:
- Subject type supported by this source.
-
init
public void init()Called by SourceManager when it loads this source.// Initialize this source adapter. SourceAdapter sa = new InternalSourceAdapter(); sa.init();
- Specified by:
init
in interfaceSource
- Specified by:
init
in classBaseSourceAdapter
-
search
Unstructured search for Subjects.// Search for subjects with the query string test. SourceAdapter sa = new InternalSourceAdapter(); Set subjects = sa.searchValue("test");
- Specified by:
search
in interfaceSource
- Specified by:
search
in classBaseSourceAdapter
- Parameters:
searchValue
- Query string for finding subjects.- Returns:
- Subjects matching search value.
-
rootSubject
if root subject- Parameters:
subject
-- Returns:
- if root
-
getRootName
-
checkConfig
public void checkConfig()Description copied from interface:Source
make sure the config is ok, and log descriptive errors if not- See Also:
-
printConfig
Description copied from interface:Source
in the startup on this i2mi app, print helpful and brief info about this source- Returns:
- the info
- See Also:
-