<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2012-2021 Red Hat, Inc.
    This program and the accompanying materials are made
    available under the terms of the Eclipse Public License 2.0
    which is available at https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
      Red Hat, Inc. - initial API and implementation

-->
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                  https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
         version="5.0">

    <listener>
        <listener-class>org.eclipse.che.inject.CheBootstrap</listener-class>
    </listener>

    <filter>
        <filter-name>cacheDisablingFilter</filter-name>
        <filter-class>org.eclipse.che.filter.CheCacheDisablingFilter</filter-class>
        <init-param>
            <param-name>pattern_filename</param-name>
            <param-value>^.*\.nocache\..*$</param-value>
        </init-param>
        <init-param>
            <param-name>pattern_appname</param-name>
            <param-value>^.*/_app/.*$</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>cacheForcingFilter</filter-name>
        <filter-class>org.eclipse.che.filter.CheCacheForcingFilter</filter-class>
        <init-param>
            <param-name>pattern_filename</param-name>
            <param-value>^.*\.cache\..*$</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>guiceFilter</filter-name>
        <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>guiceFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheDisablingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>cacheForcingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    <security-role>
        <description>the user role</description>
        <role-name>developer</role-name>
    </security-role>

</web-app>
