grouper-users - Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data
Subject: Grouper Users - Open Discussion List
List archive
- From: John Gasper <>
- To: "Hyzer, Chris" <>, "" <>
- Subject: Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data
- Date: Sun, 24 Jul 2016 21:26:40 -0700
We’ve got membership attributes that reference a group (as an attribute value). If that group name changes, then the attribute values referencing that group need to be updated as well. (Using the Group DB ID is a possible solution, but it isn’t a very friendly value. Using a preCommit value theoretically works unless a (future) subsequent hook vetos this action then the attribute value has been changed but the group did not. If the API provided before and after for post events that would be great. We can look into a Thread local option. (I’ll chat with the client.) I guess we just need to make sure we clear it out if a subsequent veto is invoked. -- John Gasper From: <> on behalf of "Hyzer, Chris" <> OK, sorry, this compares state to whats in the DB, so it only applies to preCommit… Can you use pre commit? Or if you need post can store whatever state in a very short lived threadlocal or something? J What are you trying to do? Need help? Should we try to add something to the API to make it easier? J Thanks, Chris From: [mailto:] On Behalf Of John Gasper We need to wrap that sentence in a blink tag. J Unfortunately, I’m still getting the updated object, dbVersionDifferentFields() is empty. Would the post (after) hook still have remnants of the old since the db commit has occurred? Thanks, John -- John Gasper From: "Hyzer, Chris" <> On this wiki: https://spaces.internet2.edu/display/Grouper/Hooks Is this line: To find out how the data has changed (in an update or delete), you can use the dbVersion API. Which links here: https://bugs.internet2.edu/jira/browse/GRP-137 Does that work for you? J Thanks Chris From: [] On Behalf Of John Gasper Hello, I’m working on a groupPostUpdate hook and am struggling with the best way to access info about the group from before the update as postUpdateBean only has a reference to the updated Group. I know I can get the before and after in the ChangeLog or with a pre hook, but those aren’t ideal... and the PIT tables update after the fact. Thoughts are welcome. Thanks, John -- John Gasper |
- Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data, John Gasper, 07/25/2016
- RE: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data, Hyzer, Chris, 07/25/2016
Archive powered by MHonArc 2.6.19.