Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Setting group descriptions via GSH?

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Setting group descriptions via GSH?


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Peter St. Onge" <>, "" <>
  • Subject: RE: [grouper-users] Setting group descriptions via GSH?
  • Date: Tue, 27 Jan 2015 18:38:43 +0000
  • Accept-language: en-US

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




Archive powered by MHonArc 2.6.16.

Top of Page