Hey,
This is done, there is now a
lite and batch subjects service for Grouper 1.6. If you are
interested in this service, please review it carefully and give me feedback
soon so we can work it in before the service is released (at which point it is
much harder to change).
https://bugs.internet2.edu/jira/browse/GRP-372
The getSubjects service is needed for UIs. It is done.
Here is the WS GrouperServiceLogic method:
/**
* get subjects from searching by id or identifier
or search string. Can filter by subjects which
* are members in a group.
*
* @param clientVersion is the version of the
client. Must be in GrouperWsVersion, e.g. v1_3_000
* @param wsSubjectLookups are subjects to look in
* @param searchString free form string query to
find a list of subjects (exact behavior depends on source)
* @param wsMemberFilter
* must be one of All, Effective, Immediate,
Composite, NonImmediate
* @param includeSubjectDetail
* T|F, for if the extended subject information
should be
* returned (anything more than just the id)
* @param actAsSubjectLookup
* @param fieldName is if the memberships should
be retrieved from a certain field membership
* of the group (certain list)
* @param subjectAttributeNames are the additional
subject attributes (data) to return.
* If blank, whatever is configured in the
grouper-ws.properties will be sent
* @param includeGroupDetail T or F as to if the
group detail should be returned
* @param params optional: reserved for future use
* @param sourceIds are sources to look in for
memberships, or null if all
* @param wsGroupLookup specify a group if the
subjects must be in the group (limit of number of subjects
* found in list is much lower e.g. 1000)
* @return the results
*/
@SuppressWarnings("unchecked")
public static WsGetSubjectsResults getSubjects(final
GrouperWsVersion clientVersion,
WsSubjectLookup[]
wsSubjectLookups, String searchString, boolean includeSubjectDetail,
String[] subjectAttributeNames,
WsSubjectLookup actAsSubjectLookup,
String[] sourceIds,
WsGroupLookup wsGroupLookup, WsMemberFilter wsMemberFilter,
Field fieldName, boolean
includeGroupDetail, final WsParam[] params) {
https://spaces.internet2.edu/display/GrouperWG/v1.6.0+Get+Subjects
* Can search by subject lookup(s): e.g. by subjectId,
by subjectIdentifier, by subjectId and source, by subjectIdentifier and source
* Can search by freeform search string: e.g. search for
"Chris Hyzer" and the jdbc2 source will find all subjects with chris
and hyzer in the description
* Can actAs another user
* Can filter by list of sources for freeform search
string
* Can filter for member of group, though this is not
exact, will get the list of subjects, then see which are in the group. If the
number of subjects found is more than a limit, it will not allow the search
Here is an example of batched:
http://anoncvs.internet2.edu/cgi-bin/viewvc.cgi/I2MI/grouper-ws/grouper-ws/doc/samples/getSubjects/WsSampleGetSubjectsRest_xml.txt?revision=1.1&view=co&pathrev=HEAD
Here is an example of lite:
http://anoncvs.internet2.edu/cgi-bin/viewvc.cgi/I2MI/grouper-ws/grouper-ws/doc/samples/getSubjects/WsSampleGetSubjectsRestLite_xml.txt?revision=1.1&view=co&pathrev=HEAD
Here is the grouper client documentation:
getSubjectsWs web service usage:
java -jar grouperClient.jar --operation=getSubjectsWs
[--searchString=someone] [--subjectIds=subjId0,subjId1]
[--subjectIdentifiers=subjIdent0,subjIdent1] [--subjectSources=source0,source1]
[--fieldName=fieldNameToAdd] [--memberFilter=All|Immediate|NonImmediate|Effective|Composite]
[--sourceIds=sourceId1,sourceId2] [--includeGroupDetail=true|false]
[--includeSubjectDetail=true|false] [--subjectAttributeNames=name0,name1]
[--actAsSubjectId=subjId] [--actAsSubjectIdentifier=subjIdent]
[--actAsSubjectSource=source] [--groupName=a:b:c] [--groupUuid=1234]
[--saveResultsToFile=fileName] [--outputTemplate=somePattern]
[--paramName0=name0] [--paramValue0=value1] [--paramNameX=xthParamName]
[--paramValueX=xthParamValue] [--debug=true] [--clientVersion=someVersion]
e.g.: java -jar grouperClient.jar --operation=getMembershipsWs
--groupNames=aStem:aGroup,aStem:aGroup2
output line: Index 0: success: T, code: SUCCESS, subject: 12345
Note: subjectSources are the sources for the subjects specified.
sourceIds are if you arent specifying subjectIds, and you want to filter the
searchString
Regards,
Chris
From: Chris Hyzer
Sent: Wednesday, December 23, 2009 11:22 PM
To: ''
Subject: get subjects web service
Hey,
I am going to start working on the get subjects web
service. Here is what the doc will look like (note, no links work yet)
https://spaces.internet2.edu/display/GrouperWG/v1.6.0+Get+Subjects
If you have feedback, let me know
Thanks,
Chris