Class ProcessEnginesFilter
- java.lang.Object
-
- org.camunda.bpm.webapp.impl.filter.AbstractTemplateFilter
-
- org.camunda.bpm.webapp.impl.engine.ProcessEnginesFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class ProcessEnginesFilter extends AbstractTemplateFilter
- Author:
- nico.rehwaldt, Daniel Meyer, Roman Smirnov, Sebastian Stamm
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringADMIN_APP_NAMEprotected AdminRuntimeDelegateadminRuntimeDelegatestatic PatternAPP_PREFIX_PATTERNstatic StringAPP_ROOT_PLACEHOLDERstatic StringBASE_PLACEHOLDERprotected static StringCOCKPIT_APP_NAMEprotected CockpitRuntimeDelegatecockpitRuntimeDelegatestatic StringCSP_NONCE_PLACEHOLDERprotected static StringDEFAULT_APPprotected static StringINDEX_PAGEstatic StringPLUGIN_DEPENDENCIES_PLACEHOLDERstatic StringPLUGIN_PACKAGES_PLACEHOLDERprotected StringpluginDependencyFormatprotected StringpluginPackageFormatprotected static StringSETUP_PAGEprotected static StringTASKLIST_APP_NAMEprotected TasklistRuntimeDelegatetasklistRuntimeDelegateprotected static StringWELCOME_APP_NAMEprotected WelcomeRuntimeDelegatewelcomeRuntimeDelegate
-
Constructor Summary
Constructors Constructor Description ProcessEnginesFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)Apply the filter to the given request/response.protected <T extends AppPlugin>
CharSequencecreatePluginDependenciesStr(String appName)protected <T extends AppPlugin>
CharSequencecreatePluginPackagesStr(String appName, String applicationPath, String contextPath)protected StringgetDefaultEngineName()protected <T extends AppPlugin>
List<T>getPlugins(String appName)protected booleanneedsInitialUser(String engineName)protected StringreplacePlaceholder(String data, String appName, String engineName, String applicationPath, String contextPath, String cspNonce)protected voidserveIndexPage(String appName, String engineName, String pageUri, String applicationPath, String contextPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidserveIndexPage(String appName, String engineName, String applicationPath, String contextPath, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)protected voidserveTemplate(String requestUri, String appName, String pageUri, String applicationPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)protected voidsetWebappInTelemetry(String engineName, String appName, javax.servlet.ServletContext servletContext)-
Methods inherited from class org.camunda.bpm.webapp.impl.filter.AbstractTemplateFilter
destroy, doFilter, getWebResourceContents, hasWebResource, init
-
-
-
-
Field Detail
-
COCKPIT_APP_NAME
protected static final String COCKPIT_APP_NAME
- See Also:
- Constant Field Values
-
ADMIN_APP_NAME
protected static final String ADMIN_APP_NAME
- See Also:
- Constant Field Values
-
TASKLIST_APP_NAME
protected static final String TASKLIST_APP_NAME
- See Also:
- Constant Field Values
-
WELCOME_APP_NAME
protected static final String WELCOME_APP_NAME
- See Also:
- Constant Field Values
-
DEFAULT_APP
protected static final String DEFAULT_APP
- See Also:
- Constant Field Values
-
INDEX_PAGE
protected static final String INDEX_PAGE
- See Also:
- Constant Field Values
-
SETUP_PAGE
protected static final String SETUP_PAGE
- See Also:
- Constant Field Values
-
APP_ROOT_PLACEHOLDER
public static final String APP_ROOT_PLACEHOLDER
- See Also:
- Constant Field Values
-
BASE_PLACEHOLDER
public static final String BASE_PLACEHOLDER
- See Also:
- Constant Field Values
-
PLUGIN_DEPENDENCIES_PLACEHOLDER
public static final String PLUGIN_DEPENDENCIES_PLACEHOLDER
- See Also:
- Constant Field Values
-
PLUGIN_PACKAGES_PLACEHOLDER
public static final String PLUGIN_PACKAGES_PLACEHOLDER
- See Also:
- Constant Field Values
-
CSP_NONCE_PLACEHOLDER
public static final String CSP_NONCE_PLACEHOLDER
- See Also:
- Constant Field Values
-
APP_PREFIX_PATTERN
public static Pattern APP_PREFIX_PATTERN
-
cockpitRuntimeDelegate
protected final CockpitRuntimeDelegate cockpitRuntimeDelegate
-
adminRuntimeDelegate
protected final AdminRuntimeDelegate adminRuntimeDelegate
-
tasklistRuntimeDelegate
protected final TasklistRuntimeDelegate tasklistRuntimeDelegate
-
welcomeRuntimeDelegate
protected final WelcomeRuntimeDelegate welcomeRuntimeDelegate
-
pluginPackageFormat
protected final String pluginPackageFormat
-
pluginDependencyFormat
protected final String pluginDependencyFormat
-
-
Method Detail
-
applyFilter
protected void applyFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletExceptionDescription copied from class:AbstractTemplateFilterApply the filter to the given request/response. This method must be provided by subclasses to perform actual work.- Specified by:
applyFilterin classAbstractTemplateFilter- Throws:
IOExceptionjavax.servlet.ServletException
-
serveIndexPage
protected void serveIndexPage(String appName, String engineName, String pageUri, String applicationPath, String contextPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Throws:
IOExceptionjavax.servlet.ServletException
-
getDefaultEngineName
protected String getDefaultEngineName()
-
serveTemplate
protected void serveTemplate(String requestUri, String appName, String pageUri, String applicationPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
- Throws:
IOExceptionjavax.servlet.ServletException
-
needsInitialUser
protected boolean needsInitialUser(String engineName) throws IOException, javax.servlet.ServletException
- Throws:
IOExceptionjavax.servlet.ServletException
-
serveIndexPage
protected void serveIndexPage(String appName, String engineName, String applicationPath, String contextPath, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext) throws IOException
- Throws:
IOException
-
setWebappInTelemetry
protected void setWebappInTelemetry(String engineName, String appName, javax.servlet.ServletContext servletContext)
-
replacePlaceholder
protected String replacePlaceholder(String data, String appName, String engineName, String applicationPath, String contextPath, String cspNonce)
-
createPluginPackagesStr
protected <T extends AppPlugin> CharSequence createPluginPackagesStr(String appName, String applicationPath, String contextPath)
-
createPluginDependenciesStr
protected <T extends AppPlugin> CharSequence createPluginDependenciesStr(String appName)
-
-