|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.subject.provider.BaseSourceAdapter
edu.internet2.middleware.grouper.GrouperSourceAdapter
public class GrouperSourceAdapter
Source adapter for using Grouper groups as I2MI Subjects.
This is an adapter I2MI Subjects of type group. It allows groups within a Group Groups Registry to be referenced as I2MI Subjects.
To use, add the following to your sources.xml file:
<source adapterClass="edu.internet2.middleware.grouper.GrouperSourceAdapter"> <id>g:gsa</id> <name>Grouper: Grouper Source Adapter</name> <type>group</type> </source>
Constructor Summary | |
---|---|
GrouperSourceAdapter()
Allocates new GrouperSourceAdapter. |
|
GrouperSourceAdapter(String id,
String name)
Allocates new GrouperSourceAdapter. |
Method Summary | |
---|---|
void |
checkConfig()
make sure the config is ok, and log descriptive errors if not |
Subject |
getSubject(String id)
Deprecated. |
Subject |
getSubject(String id,
boolean exceptionIfNotFound)
Get a Group subject by UUID. |
Subject |
getSubjectByIdentifier(String name)
Deprecated. |
Subject |
getSubjectByIdentifier(String name,
boolean exceptionIfNull)
Gets a Group subject by its name. |
Set |
getSubjectTypes()
Gets the SubjectTypes supported by this source. |
void |
init()
Initializes the Grouper source adapter. |
String |
printConfig()
in the startup on this i2mi app, print helpful and brief info about this source |
Set<Subject> |
search(String searchValue)
Searches for Group subjects by naming attributes. |
Methods inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter |
---|
addAttribute, addInitParam, addSubjectType, equals, getId, getInitParam, getInitParams, getName, getSubjectByIdOrIdentifier, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectType, hashCode, loadSearch, setId, setName |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GrouperSourceAdapter()
public GrouperSourceAdapter(String id, String name)
Method Detail |
---|
@Deprecated public Subject getSubject(String id) throws SubjectNotFoundException
Group
subject by UUID.
// Use it within the Grouper API try { Subject subj = SubjectFinder.getSubject(uuid, "group"); } catch (SubjectNotFoundException e) { // Subject not found } // Use it directly try { Subject subj = source.getSubject(uuid, "group"); } catch (SubjectNotFoundException e) { // Subject not found }
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
id
- Group UUID
Subject
SubjectNotFoundException
Source.getSubject(java.lang.String)
public Subject getSubject(String id, boolean exceptionIfNotFound) throws SubjectNotFoundException
Group
subject by UUID.
// Use it within the Grouper API try { Subject subj = SubjectFinder.getSubject(uuid, "group"); } catch (SubjectNotFoundException e) { // Subject not found } // Use it directly try { Subject subj = source.getSubject(uuid, "group"); } catch (SubjectNotFoundException e) { // Subject not found }
getSubject
in interface Source
getSubject
in class BaseSourceAdapter
id
- Group UUIDexceptionIfNotFound
-
Subject
SubjectNotFoundException
Source.getSubject(java.lang.String, boolean)
@Deprecated public Subject getSubjectByIdentifier(String name) throws SubjectNotFoundException
Group
subject by its name.
// Use it within the Grouper API try { Subject subj = SubjectFinder.getSubjectByIdentifier(name, "group"); } catch (SubjectNotFoundException e) { // Subject not found } // Use it directly try { Subject subj = source.getSubjectByIdentifier(name, "group"); } catch (SubjectNotFoundException e) { // Subject not found }
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
name
- Group name
Subject
SubjectNotFoundException
Source.getSubjectByIdentifier(java.lang.String)
public Subject getSubjectByIdentifier(String name, boolean exceptionIfNull) throws SubjectNotFoundException
Group
subject by its name.
// Use it within the Grouper API try { Subject subj = SubjectFinder.getSubjectByIdentifier(name, "group"); } catch (SubjectNotFoundException e) { // Subject not found } // Use it directly try { Subject subj = source.getSubjectByIdentifier(name, "group"); } catch (SubjectNotFoundException e) { // Subject not found }
getSubjectByIdentifier
in interface Source
getSubjectByIdentifier
in class BaseSourceAdapter
name
- Group nameexceptionIfNull
-
Subject
SubjectNotFoundException
Source.getSubjectByIdentifier(java.lang.String, boolean)
public Set getSubjectTypes()
SourceAdapter sa = new GrouperSourceAdapter(); Set types = sa.getSubjectTypes();
getSubjectTypes
in interface Source
getSubjectTypes
in class BaseSourceAdapter
public void init() throws SourceUnavailableException
No initialization is currently performed by this adapter.
init
in interface Source
init
in class BaseSourceAdapter
SourceUnavailableException
public Set<Subject> search(String searchValue) throws IllegalArgumentException
Group
subjects by naming attributes.
This method performs a fuzzy search on the stem, extension, displayExtension, name and displayName group attributes.
// Use it within the Grouper API Set subjects = SubjectFactory.search("admins"); // Use it directly Set subjects = source.search("admins");
search
in interface Source
search
in class BaseSourceAdapter
IllegalArgumentException
- if searchValue is null.public void checkConfig()
Source
Source.checkConfig()
public String printConfig()
Source
Source.printConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |