Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Hooks: Determining context type

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Hooks: Determining context type


Chronological Thread 
  • From: "Dr. Loris Bennett" <>
  • To: Chris Hyzer <>
  • Cc: Grouper Users Mailing List <>
  • Subject: RE: [grouper-users] Hooks: Determining context type
  • Date: Tue, 10 Mar 2009 09:01:04 +0100
  • Organization: Freie Universität Berlin

On Mon, 2009-03-09 at 13:18 -0400, Chris Hyzer wrote:
> I did code this, but didn’t quite get the configuration committed...
> luckily it is a quick change in the config file and it should work
> (works for me).

Thanks, Chris, works for me too.

> I believe the way to do this (Gary correct me if wrong) is in the
> web.core.xml add a filter with the other filters:
>
> <filter>
> <filter-name>GrouperUi</filter-name>
>
> <filter-class>edu.internet2.middleware.grouper.ui.GrouperUiFilter</filter-class>
> </filter>
>
> Then at the top of the filter mappings add a couple of mappings (the
> jsp one probably isn’t necessary, but it wont hurt):
>
> <filter-mapping>
> <filter-name>GrouperUi</filter-name>
> <url-pattern>*.do</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>GrouperUi</filter-name>
> <url-pattern>*.jsp</url-pattern>
> </filter-mapping>
>
>
> Then do a build, and you should see these settings in your web.xml. Then
> run the hook, and the hook type will be GROUPER_UI enum...
>
> I just committed this web.core.xml to 1.4 branch so once it propagates (a
> couple of hours), everyone can benefit.
>
> Regards,
> Chris
>
> > -----Original Message-----
> > From: Dr. Loris Bennett
> > [mailto:]
> > Sent: Monday, March 09, 2009 10:42 AM
> > To: Grouper Users Mailing List
> > Subject: [grouper-users] Hooks: Determining context type
> >
> > Hi,
> >
> > I want to determine the context type within a hook so that I can run
> > the
> > logic in the hook only if the UI is being used. However,
> >
> > hooksContext.getGrouperContextType().name()
> >
> > returns
> >
> > UNKNOWN
> >
> > when the UI is used. How do I determine whether the hook has been
> > triggered by the UI?
> >
> > Cheers
> >
> > 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