grouper-users - RE: [grouper-users] Hooks: Determining context type
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: "" <>, Grouper Users Mailing List <>
- Subject: RE: [grouper-users] Hooks: Determining context type
- Date: Mon, 9 Mar 2009 13:18:11 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
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).
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
>
> Web www.zedat.fu-berlin.de
- Hooks: Determining context type, Dr. Loris Bennett, 03/09/2009
- RE: [grouper-users] Hooks: Determining context type, Chris Hyzer, 03/09/2009
- RE: [grouper-users] Hooks: Determining context type, Dr. Loris Bennett, 03/10/2009
- RE: [grouper-users] Hooks: Determining context type, Chris Hyzer, 03/09/2009
Archive powered by MHonArc 2.6.16.