Interface WebSudoManager
-
- All Known Implementing Classes:
DefaultWebSudoManager
public interface WebSudoManagerManages the WebSudo related access to Request, Response and Session objects and provides a method to determine if an XWork action should be treated as a WebSudo resource (matches(String, Class, java.lang.reflect.Method).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasValidSession(@Nullable javax.servlet.http.HttpSession session)Check if this is a valid WebSudo session.voidinvalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Invalidate the current WebSudo session.booleanisEnabled()booleanisWebSudoRequest(@Nullable javax.servlet.http.HttpServletRequest request)Checks if therequestis a WebSudo request.voidmarkWebSudoRequest(@Nullable javax.servlet.http.HttpServletRequest request)Marks therequestas a request for a WebSudo resource.booleanmatches(String requestURI, Class<?> actionClass, Method method)Check if the action method should be WebSudo protected for the given requestURI.voidstartSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Start a new WebSudo session.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
- Returns:
- true if WebSudo is enabled, false otherwise.
-
matches
boolean matches(String requestURI, Class<?> actionClass, Method method)
Check if the action method should be WebSudo protected for the given requestURI.- Parameters:
requestURI- - the requestURI for this action methodactionClass- - the current action classmethod- - the action method that is executed- Returns:
- true if the action method should be WebSudo protected, false otherwise.
-
hasValidSession
boolean hasValidSession(@Nullable javax.servlet.http.HttpSession session)
Check if this is a valid WebSudo session.- Parameters:
session- the currentHttpSession. Can be null- Returns:
- true if the
HttpSessionis a WebSudo session.
-
isWebSudoRequest
boolean isWebSudoRequest(@Nullable javax.servlet.http.HttpServletRequest request)
Checks if therequestis a WebSudo request.- Parameters:
request- the currentHttpServletRequest- Returns:
- true if the current request is requesting a WebSudo protected web resource, false otherwise.
- Since:
- 3.4
-
startSession
void startSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Start a new WebSudo session. Creates a newHttpSessionif necessary.- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse- Since:
- 3.4
-
markWebSudoRequest
void markWebSudoRequest(@Nullable javax.servlet.http.HttpServletRequest request)
Marks therequestas a request for a WebSudo resource.- Parameters:
request- the currentHttpServletRequest- Since:
- 3.4
-
invalidateSession
void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Invalidate the current WebSudo session. This does NOT invalidate theHttpSession.- Parameters:
request- the currentHttpServletRequestresponse- the currentHttpServletResponse- Since:
- 3.4
-
-