com.atlassian.confluence.security.websudo
Class DefaultWebSudoManager

java.lang.Object
  extended by com.atlassian.confluence.security.websudo.DefaultWebSudoManager
All Implemented Interfaces:
WebSudoManager

public class DefaultWebSudoManager
extends java.lang.Object
implements WebSudoManager

See WebSudoManager for further documentation.


Constructor Summary
DefaultWebSudoManager(SettingsManager settingsManager)
           
 
Method Summary
 boolean hasValidSession(javax.servlet.http.HttpSession session)
          Check if this is a valid WebSudo session.
 void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invalidate the current WebSudo session.
 boolean isEnabled()
           
 boolean isWebSudoRequest(javax.servlet.http.HttpServletRequest request)
          Checks if the request is a WebSudo request.
 void markWebSudoRequest(javax.servlet.http.HttpServletRequest request)
          Marks the request as a request for a WebSudo resource.
 boolean matches(java.lang.String requestURI, java.lang.Class<? extends com.opensymphony.xwork.Action> actionClass, java.lang.reflect.Method method)
          Check if the action method should be WebSudo protected for the given requestURI.
 void startSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Start a new WebSudo session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWebSudoManager

public DefaultWebSudoManager(SettingsManager settingsManager)
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface WebSudoManager
Returns:
true if WebSudo is enabled, false otherwise.

matches

public boolean matches(java.lang.String requestURI,
                       java.lang.Class<? extends com.opensymphony.xwork.Action> actionClass,
                       java.lang.reflect.Method method)
Description copied from interface: WebSudoManager
Check if the action method should be WebSudo protected for the given requestURI.

Specified by:
matches in interface WebSudoManager
Parameters:
requestURI - - the requestURI for this action method
actionClass - - the current action class
method - - the action method that is executed
Returns:
true if the action method should be WebSudo protected, false otherwise.

hasValidSession

public boolean hasValidSession(javax.servlet.http.HttpSession session)
Description copied from interface: WebSudoManager
Check if this is a valid WebSudo session.

Specified by:
hasValidSession in interface WebSudoManager
Parameters:
session - the current HttpSession. Can be null
Returns:
true if the HttpSession is a WebSudo session.

startSession

public void startSession(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
Description copied from interface: WebSudoManager
Start a new WebSudo session. Creates a new HttpSession if necessary.

Specified by:
startSession in interface WebSudoManager
Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse

markWebSudoRequest

public void markWebSudoRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface: WebSudoManager
Marks the request as a request for a WebSudo resource.

Specified by:
markWebSudoRequest in interface WebSudoManager
Parameters:
request - the current HttpServletRequest

isWebSudoRequest

public boolean isWebSudoRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface: WebSudoManager
Checks if the request is a WebSudo request.

Specified by:
isWebSudoRequest in interface WebSudoManager
Parameters:
request - the current HttpServletRequest
Returns:
true if the current request is requesting a WebSudo protected web resource, false otherwise.

invalidateSession

public void invalidateSession(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
Description copied from interface: WebSudoManager
Invalidate the current WebSudo session. This does NOT invalidate the HttpSession.

Specified by:
invalidateSession in interface WebSudoManager
Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse


Copyright © 2003-2014 Atlassian. All Rights Reserved.