Subject: Grouper Users - Open Discussion List
- From: Chris Hyzer <>
- To: "" <>, Grouper Users Mailing List <>
- Subject: RE: [grouper-users] Hooks: Switching on and off?
- Date: Thu, 26 Feb 2009 11:11:59 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
You maintenance idea is a good one of disabling a certain hook, importing,
enabling the hook again.
Globally turning off all hooks or for certain stems is a little chaotic,
since how do you know you want ALL hooks off, and not just some. So we don’t
have that feature in Grouper.
Some other suggestions:
1. Your hook can decide if it needs to act... it could see if the gid
attribute is there, and if so, don’t reset it. Or is there a reason this
2. Your hook could easily read a custom Boolean property in the
grouper.properties which would tell it whether or not to act
3. Your hook could easily read a string property in the grouper.properties
which tells it if certain stems prefixes are excluded
4. If you are doing the import via Java, you could set a threadlocal in your
hook which tells it not to act, then unset when done
Let me know if you want to do any of those, I could send you some code
snippets to make it easy
> -----Original Message-----
> From: Dr. Loris Bennett
> Sent: Thursday, February 26, 2009 4:29 AM
> To: Grouper Users Mailing List
> Subject: [grouper-users] Hooks: Switching on and off?
> I want to add a unix-like group ID to each group when it is save. With
> Chris' help I have implemented a hook to add custom a custom type with
> an attribute 'GID' which is filled with a value from a database
> I now have the problem that, as an initial step, I want import a set of
> existing groups which already have GIDs. At the moment I can just
> configure out the hook, import the groups and then activate the hook
> However, for the general case I wondered whether there is or should be
> mechanism for switching of hooks, say for a given subtree or for groups
> with a given value of an attribute.
> But then again perhaps operations which require hooks to be switched
> should just be done within a maintenance window.
> Dr. Loris Bennett (Mr.)
> Freie Universität Berlin
> ZEDAT - Zentraleinrichtung für Datenverarbeitung / Computer Center
> Compute & Media Service
> Fabeckstr. 32, Room 221
> D-14195 Berlin
> Tel ++49 30 838 51024
> Fax ++49 30 838 56721
> Web www.zedat.fu-berlin.de
- Hooks: Switching on and off?, Dr. Loris Bennett, 02/26/2009
- RE: [grouper-users] Hooks: Switching on and off?, Chris Hyzer, 02/26/2009
Archive powered by MHonArc 2.6.16.