edu.internet2.middleware.grouper.webservices
Class GrouperServiceJ2ee

java.lang.Object
  extended by edu.internet2.middleware.grouper.webservices.GrouperServiceJ2ee
All Implemented Interfaces:
Filter

public class GrouperServiceJ2ee
extends Object
implements Filter

Extend the servlet to get user info

Author:
mchyzer

Constructor Summary
GrouperServiceJ2ee()
           
 
Method Summary
 void destroy()
          filter method
 void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
           
 void init(FilterConfig arg0)
          filter method
static HttpServletRequest retrieveHttpServletRequest()
          public method to get the http servlet request
static HttpServletResponse retrieveHttpServletResponse()
          public method to get the http servlet request
static edu.internet2.middleware.subject.Subject retrieveSubjectActAs(WsSubjectLookup actAsLookup)
          retrieve the subject to act as
static edu.internet2.middleware.subject.Subject retrieveSubjectLoggedIn()
          retrieve the subject logged in to web service
static String retrieveUserPrincipalNameFromRequest()
          retrieve the user principal (who is authenticated) from the (threadlocal) request object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrouperServiceJ2ee

public GrouperServiceJ2ee()
Method Detail

retrieveUserPrincipalNameFromRequest

public static String retrieveUserPrincipalNameFromRequest()
retrieve the user principal (who is authenticated) from the (threadlocal) request object

Returns:
the user principal name

retrieveSubjectLoggedIn

public static edu.internet2.middleware.subject.Subject retrieveSubjectLoggedIn()
retrieve the subject logged in to web service

Returns:
the subject

retrieveSubjectActAs

public static edu.internet2.middleware.subject.Subject retrieveSubjectActAs(WsSubjectLookup actAsLookup)
retrieve the subject to act as

Parameters:
actAsLookup -
Returns:
the subject

retrieveHttpServletRequest

public static HttpServletRequest retrieveHttpServletRequest()
public method to get the http servlet request

Returns:
the http servlet request

retrieveHttpServletResponse

public static HttpServletResponse retrieveHttpServletResponse()
public method to get the http servlet request

Returns:
the http servlet request

destroy

public void destroy()
filter method

Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain filterChain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

init

public void init(FilterConfig arg0)
          throws ServletException
filter method

Specified by:
init in interface Filter
Throws:
ServletException