Class BaseFilterProperties

java.lang.Object
icu.easyj.web.filter.BaseFilterProperties
All Implemented Interfaces:
IFilterProperties
Direct Known Subclasses:
DefaultParamCryptoFilterPropertiesImpl

public class BaseFilterProperties extends Object implements IFilterProperties
过滤器配置基类
Author:
wangliang181230
  • Field Details

    • enabled

      protected boolean enabled
      过滤器启用状态,默认:生效
    • disabled

      protected volatile boolean disabled
      过滤器使用状态,默认:启用
      volatile关键字是必须的
    • order

      protected Integer order
      过滤器执行顺序
    • urlPatterns

      protected List<String> urlPatterns
      过滤器需要过滤的请求,默认:全部都过滤
    • exclusions

      protected List<String> exclusions
      过滤器不想过滤的请求,默认:无排除项
  • Constructor Details

    • BaseFilterProperties

      public BaseFilterProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Description copied from interface: IFilterProperties
      过滤器启用状态
      用于判断该过滤器是否启用,该状态一旦服务启动,就无法动态变更。
      Specified by:
      isEnabled in interface IFilterProperties
      Returns:
      过滤器启用状态
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from interface: IFilterProperties
      设置过滤器启用状态
      Specified by:
      setEnabled in interface IFilterProperties
      Parameters:
      enabled - 启用状态
    • isDisabled

      public boolean isDisabled()
      Description copied from interface: IFilterProperties
      过滤器使用状态
      用于判断该过滤器是否禁用,该状态在服务运行期间,可动态变更
      Specified by:
      isDisabled in interface IFilterProperties
      Returns:
      过滤器使用状态,true=禁用|false=启用(默认)
    • setDisabled

      public void setDisabled(boolean disabled)
      Description copied from interface: IFilterProperties
      设置过滤器使用状态
      Specified by:
      setDisabled in interface IFilterProperties
      Parameters:
      disabled - 使用状态
    • getOrder

      public Integer getOrder()
      Description copied from interface: IFilterProperties
      获取过滤器执行顺序
      Specified by:
      getOrder in interface IFilterProperties
      Returns:
      过滤器执行顺序
    • setOrder

      public void setOrder(int order)
      Description copied from interface: IFilterProperties
      设置执行顺序
      Specified by:
      setOrder in interface IFilterProperties
      Parameters:
      order - 执行顺序
    • getUrlPatterns

      public List<String> getUrlPatterns()
      Description copied from interface: IFilterProperties
      获取需拦截的Url地址匹配列表
      Specified by:
      getUrlPatterns in interface IFilterProperties
      Returns:
      需拦截的Url地址匹配列表
    • setUrlPatterns

      public void setUrlPatterns(List<String> urlPatterns)
      Description copied from interface: IFilterProperties
      设置需拦截的Url地址匹配列表
      Specified by:
      setUrlPatterns in interface IFilterProperties
      Parameters:
      urlPatterns - 需拦截的Url地址匹配列表
    • getExclusions

      public List<String> getExclusions()
      Description copied from interface: IFilterProperties
      获取无需拦截的Url地址匹配列表
      Specified by:
      getExclusions in interface IFilterProperties
      Returns:
      无需拦截的Url地址匹配列表
    • setExclusions

      public void setExclusions(List<String> exclusions)
      Description copied from interface: IFilterProperties
      设置无需拦截的Url地址匹配列表
      Specified by:
      setExclusions in interface IFilterProperties
      Parameters:
      exclusions - 无需拦截的Url地址匹配列表