Class UserInWebGroupFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class UserInWebGroupFilter
    extends java.lang.Object
    implements javax.servlet.Filter
    A filter which will allow through requests only if the user is a member of a particular Webgroup - otherwise it will redirect to the login screen.

    Usage: In the filter definition in web.xml, use an init-param called "group" whose value is the name of the Webgroup you want to use.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      void doFilter​(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)  
      java.lang.String getGroup()  
      uk.ac.warwick.userlookup.GroupService getGroupService()  
      void init​(javax.servlet.FilterConfig config)  
      void setGroup​(java.lang.String group)  
      void setGroupService​(uk.ac.warwick.userlookup.GroupService groupService)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserInWebGroupFilter

        public UserInWebGroupFilter()
    • Method Detail

      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter
      • doFilter

        public final void doFilter​(javax.servlet.ServletRequest req,
                                   javax.servlet.ServletResponse res,
                                   javax.servlet.FilterChain chain)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • init

        public final void init​(javax.servlet.FilterConfig config)
                        throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • getGroupService

        public final uk.ac.warwick.userlookup.GroupService getGroupService()
      • setGroupService

        public final void setGroupService​(uk.ac.warwick.userlookup.GroupService groupService)
      • getGroup

        public final java.lang.String getGroup()
      • setGroup

        public final void setGroup​(java.lang.String group)