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      public boolean canExecuteRequest(final HttpServletRequest request) {
15          return true; // Code protected by WebSudo should still be executed if the host application doesn't support WebSudo
16      }
17  
18      public void enforceWebSudoProtection(final HttpServletRequest request, final HttpServletResponse response) {
19          // NO OP
20      }
21  
22      public void willExecuteWebSudoRequest(HttpServletRequest request) throws WebSudoSessionException {
23          // NO OP
24      }
25  }