com.atlassian.studio.jira.servlet.filter
Class AlacarteLicenseJiraEnforcer

java.lang.Object
  extended by com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
      extended by com.atlassian.studio.jira.servlet.filter.AlacarteLicenseJiraEnforcer
All Implemented Interfaces:
javax.servlet.Filter

public class AlacarteLicenseJiraEnforcer
extends com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer


Field Summary
 
Fields inherited from class com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
INACCESSIBLE_APP_PARAM_NAME
 
Constructor Summary
AlacarteLicenseJiraEnforcer(com.atlassian.sal.api.user.UserManager userManager, com.atlassian.applinks.core.AppLinksManager appLinksManager, com.atlassian.studio.core.haup.StudioUserApplicationAccessService userApplicationAccessService, com.atlassian.studio.common.util.application.ApplicationHelper applicationHelper, com.atlassian.studio.common.appstatus.AppStatusService appStatusService, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
protected  boolean blockAccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String username)
           
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
          Calls the super class to do the filtering, and restores authentication context, if changed, in the finally block as this class overrides blockAccess(HttpServletRequest, HttpServletResponse, String) to set the authentication context to anonymous user (null).
protected  boolean shouldEnforceLicensingOnRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
destroy, getAppLinksManager, getLoggedInUsername, init, isUserGrantedAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlacarteLicenseJiraEnforcer

public AlacarteLicenseJiraEnforcer(com.atlassian.sal.api.user.UserManager userManager,
                                   com.atlassian.applinks.core.AppLinksManager appLinksManager,
                                   com.atlassian.studio.core.haup.StudioUserApplicationAccessService userApplicationAccessService,
                                   com.atlassian.studio.common.util.application.ApplicationHelper applicationHelper,
                                   com.atlassian.studio.common.appstatus.AppStatusService appStatusService,
                                   JiraAuthenticationContext authenticationContext)
Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest servletRequest,
                     javax.servlet.ServletResponse servletResponse,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException
Calls the super class to do the filtering, and restores authentication context, if changed, in the finally block as this class overrides blockAccess(HttpServletRequest, HttpServletResponse, String) to set the authentication context to anonymous user (null).

Specified by:
doFilter in interface javax.servlet.Filter
Overrides:
doFilter in class com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
Throws:
IOException
javax.servlet.ServletException

shouldEnforceLicensingOnRequest

protected boolean shouldEnforceLicensingOnRequest(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws IOException,
                                                  javax.servlet.ServletException
Overrides:
shouldEnforceLicensingOnRequest in class com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
Throws:
IOException
javax.servlet.ServletException

blockAccess

protected boolean blockAccess(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              String username)
                       throws IOException
Overrides:
blockAccess in class com.atlassian.studio.core.servlet.filter.AlacarteLicenseEnforcer
Throws:
IOException


Copyright © 2002-2012 Atlassian. All Rights Reserved.