Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] RE: Grouper 1.4.0: Using hooks

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] RE: Grouper 1.4.0: Using hooks


Chronological Thread 
  • From: "Dr. Loris Bennett" <>
  • To: Chris Hyzer <>
  • Cc: Grouper Users Mailing List <>
  • Subject: Re: [grouper-users] RE: Grouper 1.4.0: Using hooks
  • Date: Thu, 29 Jan 2009 08:59:33 +0100
  • Organization: Freie Universität Berlin

On Wed, 2009-01-28 at 10:20 -0500, Chris Hyzer wrote:
> If the group is school:whatever:group1
> Is the group id you refer to "group1"
> Or is it the uuid?
>
> If it’s the uuid, then grouper generates that for you.
>
> If it is "group1", then you cant have a blank name, so if you set to
> "hooksWillChangeThis" or something, then the hook can look
> for that name.

The group would be, say, berlin:compsci:ai, and the group ID would be a
custom attribute. This should not be something like the uuid, but more
like a unix group ID, e.g. a 4-digit number.

> You should only need a pre-insert, which can generate the ID, and assign to
> the group. I don’t think you need a post insert...
> (you wouldn’t want it anyway, you don’t want to rename the group after
> inserted, you want it properly named before the insert)

So the pre-insert would also set the custom attribute, right?

> > 1. Extend the GrouperHooks class
>
> You mean GroupHooks class I assume

Yes.

>
> Yes on #3, you don’t need #4 to rebuild the grouper.jar...
>
> Chris

OK, thanks very much

Loris

>
>
> > -----Original Message-----
> > From: Dr. Loris Bennett
> > [mailto:]
> > Sent: Wednesday, January 28, 2009 9:43 AM
> > To: Chris Hyzer
> > Subject: Grouper 1.4.0: Using hooks
> >
> > Hi Chris,
> >
> > Could you give me a little advice on using the hooks mechanism?
> >
> > I have a Unix /etc/groups file for which I have written a program to
> > import it into grouper. I need to create a unique group ID when a group
> > is created in Grouper. I envisage using the hooks mechanism for this.
> > My
> > understanding is that I would have to do the following:
> >
> > 1. Add a pre-insert hook for groups which generates the ID.
> > 2. Add a post-insert hook to add the ID as an attribute to the newly
> > created group.
> >
> > In practice I would
> >
> > 1. Extend the GrouperHooks class
> > 2. Configure the hooks in grouper.properties
> > 3. Create a myhooks.jar and add to grouper API custom libs (?)
> > 4. Rebuild grouper.jar (?)
> >
> > Would I be on the right track with this, in particular, with the last
> > two points?
> >
> > Thanks in advance
> >
> > Loris
> >
> >
> >
> > --
> > 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
> > Email
> >
> > Web www.zedat.fu-berlin.de
>
--
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
Email

Web www.zedat.fu-berlin.de




Archive powered by MHonArc 2.6.16.

Top of Page