View Javadoc

1   package com.atlassian.sal.core.websudo;
2   
3   import com.atlassian.sal.api.websudo.WebSudoManager;
4   import com.atlassian.sal.api.websudo.WebSudoSessionException;
5   
6   import javax.servlet.http.HttpServletRequest;
7   import javax.servlet.http.HttpServletResponse;
8   
9   /**
10   * NO OP implementation of the {@link com.atlassian.sal.api.websudo.WebSudoManager} that can be used
11   * if the host application does not support WebSudo.
12   */
13  public class NoopWebSudoManager implements WebSudoManager
14  {
15      public boolean canExecuteRequest(final HttpServletRequest request)
16      {
17          return true; // Code protected by WebSudo should still be executed if the host application doesn't support WebSudo
18      }
19  
20      public void enforceWebSudoProtection(final HttpServletRequest request, final HttpServletResponse response)
21      {
22          // NO OP
23      }
24  
25      public void willExecuteWebSudoRequest(HttpServletRequest request) throws WebSudoSessionException
26      {
27          // NO OP
28      }
29  }