grouper-dev - RE: [grouper-dev] Getting the set of all groups in 2.2+
Subject: Grouper Developers Forum
List archive
- From: "Hyzer, Chris" <>
- To: "" <>, "" <>
- Subject: RE: [grouper-dev] Getting the set of all groups in 2.2+
- Date: Thu, 21 Jan 2016 03:35:07 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) ;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
You can find all groups by name I believe. Are you using the API or web
services? In web services you do this:
java -jar grouperClient.jar --operation=findGroupsWs
--queryFilterType=FIND_BY_STEM_NAME --stemName=:
--stemNameScope=ALL_IN_SUBTREE --debug=true
POST /grouper-ws_v2_2/servicesRest/v2_2_002/groups HTTP/1.1
Connection: close
Authorization: Basic xxxxxxxxxxxxxxxx
User-Agent: Jakarta Commons-HttpClient/3.1
Host: grouperdemo.internet2.edu:-1
Content-Length: 201
Content-Type: text/xml; charset=UTF-8
<WsRestFindGroupsRequest>
<wsQueryFilter>
<queryFilterType>FIND_BY_STEM_NAME</queryFilterType>
<stemName>:</stemName>
<stemNameScope>ALL_IN_SUBTREE</stemNameScope>
</wsQueryFilter>
</WsRestFindGroupsRequest>
Or API:
GrouperSession grouperSession = GrouperSession.startRootSession();
Stem rootStem = StemFinder.findRootStem(grouperSession);
Set<Group> allGroups = new
GroupFinder().assignParentStemId(rootStem.getId()).assignStemScope(Scope.SUB).findGroups();
Thanks,
Chris
-----Original Message-----
From:
[mailto:]
On Behalf Of
Sent: Wednesday, January 20, 2016 12:34 PM
To:
Subject: [grouper-dev] Getting the set of all groups in 2.2+
Hello,
I'm new to developing against grouper and have a question regarding getting a
set of all groups. From what I understand, previous versions of Grouper had a
"base" GrouperType associated with each group, and could use
GroupFinder.findAllByType, passing the base group. In 2.2+ that is now
deprecated. Is there a simple alternative way to get a set of all groups in
the system that I can iterate over, perhaps by stem? Thank you in advance for
any assistance.
Jason Vinnedge
- [grouper-dev] Getting the set of all groups in 2.2+, jdv13, 01/20/2016
- RE: [grouper-dev] Getting the set of all groups in 2.2+, Hyzer, Chris, 01/21/2016
- <Possible follow-up(s)>
- Re: RE: [grouper-dev] Getting the set of all groups in 2.2+, jdv13, 01/25/2016
Archive powered by MHonArc 2.6.16.