grouper-users - Re: [grouper-users] Setting group descriptions via GSH?
Subject: Grouper Users - Open Discussion List
List archive
- From: "Peter St. Onge" <>
- To: Chris Hyzer <>, "" <>
- Subject: Re: [grouper-users] Setting group descriptions via GSH?
- Date: Tue, 27 Jan 2015 14:34:08 -0500
Many thanks, Chris, exactly what was needed.
Is there any repository of scripts etc where examples can be placed to
show how it's used? I'm happy to contribute my own scripts.
Thanks and best, -- pete
On 2015-01-27 01:38 PM, Chris Hyzer wrote:
> something like this:
>
>
>
> gsh 0% grouperSession = GrouperSession.startRootSession()
>
> edu.internet2.middleware.grouper.GrouperSession:
> 86141d456910456b8f9b9919cd1b80c2,'GrouperSystem','application'
>
> gsh 1% group = GroupFinder.findByName(grouperSession, "test:testGroup");
>
> group: name='test:testGroup' displayName='test:testGroup'
> uuid='a0f7f6571aa7456bb9d7f75265ab3560'
>
> gsh 2% group.getDescription();
>
>
>
> gsh 3% group.setDescription("some description");
>
> gsh 4% group.store();
>
> gsh 5% group = GroupFinder.findByName(grouperSession, "test:testGroup");
>
> group: name='test:testGroup' displayName='test:testGroup'
> uuid='a0f7f6571aa7456bb9d7f75265ab3560'
>
> gsh 6% group.getDescription();
>
> some description
>
> gsh 7%
>
>
>
> Thanks,
>
> Chris
>
>
>
> -----Original Message-----
> From:
>
> [mailto:]
> On Behalf Of Peter St. Onge
> Sent: Tuesday, January 27, 2015 1:20 PM
> To:
>
> Subject: [grouper-users] Setting group descriptions via GSH?
>
>
>
> I am building out a fairly large structure in Grouper 2.2.1 / PostgreSQL
> via gsh; this is partially to make rebuilding and reuse easier across
> multiple instances of Grouper (dev, prod, etc).
>
>
>
> I am able to create stems and groups without issue; I can also set the
> descriptions for each of the stems quite simply via setStemAttr (eg.
>
> Department names, etc).
>
>
>
> When trying to set the description for the groups, however,
>
>
>
> gsh 5% setGroupAttr("acad:apsc:bme:apsc-bme-gsg", "description", "foo")
> // Error: Unable to find legacy attribute: description
>
>
>
> No doubt I'm missing something simple.
>
>
>
> I see the change in the attribute mechanism documented, though this
> seems to be aimed for custom, site-specific, attributes; the description
> field lives in the underlying database, however, and can be edited via
> the UI so I would wonder if there is a simpler way to tickle this.
>
>
>
> Thanks in advance for any pointers.
>
>
>
> Best, -- pete
>
>
>
> --
>
> Pete St. Onge
>
>
>
> <mailto:>
>
- [grouper-users] Setting group descriptions via GSH?, Peter St. Onge, 01/27/2015
- RE: [grouper-users] Setting group descriptions via GSH?, Chris Hyzer, 01/27/2015
- Re: [grouper-users] Setting group descriptions via GSH?, Peter St. Onge, 01/27/2015
- RE: [grouper-users] Setting group descriptions via GSH?, Chris Hyzer, 01/27/2015
- Re: [grouper-users] Setting group descriptions via GSH?, Peter St. Onge, 01/27/2015
- RE: [grouper-users] Setting group descriptions via GSH?, Chris Hyzer, 01/27/2015
Archive powered by MHonArc 2.6.16.