Skip to Content.
Sympa Menu

grouper-dev - RE: get subjects web service

Subject: Grouper Developers Forum

List archive

RE: get subjects web service

Chronological Thread 
  • From: Chris Hyzer <>
  • To: "" <>
  • Subject: RE: get subjects web service
  • Date: Wed, 30 Dec 2009 00:31:27 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US



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).


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 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
    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) {

    * 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:

Here is an example of lite:

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






From: Chris Hyzer
Sent: Wednesday, December 23, 2009 11:22 PM
To: ''
Subject: get subjects web service




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)


If you have feedback, let me know




  • get subjects web service, Chris Hyzer, 12/23/2009
    • <Possible follow-up(s)>
    • RE: get subjects web service, Chris Hyzer, 12/30/2009

Archive powered by MHonArc 2.6.16.

Top of Page