com.opensymphony.xwork2.interceptor

## Class MethodFilterInterceptor

- java.lang.Object
- - org.apache.struts2.interceptor.AbstractInterceptor
  - - com.opensymphony.xwork2.interceptor.AbstractInterceptor
    - - com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

- All Implemented Interfaces:
    Serializable, ConditionalInterceptor, Interceptor
  Direct Known Subclasses:
    ConversionErrorInterceptor, DefaultWorkflowInterceptor, ExecuteAndWaitInterceptor, ParametersInterceptor, PrepareInterceptor, TokenInterceptor, ValidationInterceptor

  Deprecated.
  since 6.7.0, use `MethodFilterInterceptor` instead.

      @Deprecated
      public abstract class MethodFilterInterceptor
      extends AbstractInterceptor

  MethodFilterInterceptor is an abstract `Interceptor` used as a base class for interceptors that will filter execution based on method names according to specified included/excluded method lists.

  Settable parameters are as follows:
  - excludeMethods - method names to be excluded from interceptor processing
  - includeMethods - method names to be included in interceptor processing

  NOTE: If method name are available in both includeMethods and excludeMethods, it will be considered as an included method: includeMethods takes precedence over excludeMethods.

  Interceptors that extends this capability include:
  - TokenInterceptor
  - TokenSessionStoreInterceptor
  - DefaultWorkflowInterceptor
  - ValidationInterceptor
  Author:
    Alexandru Popescu, Rainer Hermanns
  See Also:
    `TokenInterceptor`, `TokenSessionStoreInterceptor`, `DefaultWorkflowInterceptor`, `ValidationInterceptor`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `ConditionalInterceptor.LegacyAdapter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `excludeMethods` Deprecated.
    `protected Set<String>` | `includeMethods` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodFilterInterceptor()` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `applyInterceptor(ActionInvocation invocation)` Deprecated.
    `protected abstract String` | `doIntercept(ActionInvocation invocation)` Deprecated. Subclasses must override to implement the interceptor logic.
    `Set<String>` | `getExcludeMethodsSet()` Deprecated.
    `Set<String>` | `getIncludeMethodsSet()` Deprecated.
    `String` | `intercept(ActionInvocation invocation)` Deprecated. Override to handle interception
    `void` | `setExcludeMethods(String excludeMethods)` Deprecated.
    `void` | `setIncludeMethods(String includeMethods)` Deprecated.

    - ### Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor

      `intercept, shouldIntercept, shouldIntercept`

    - ### Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor

      `destroy, init, setDisabled`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `adapt`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.Interceptor

      `adapt`

    - ### Methods inherited from interface org.apache.struts2.interceptor.Interceptor

      `destroy, init`

- - ### Field Detail

    - #### excludeMethods

          protected Set<String> excludeMethods

      Deprecated.

    - #### includeMethods

          protected Set<String> includeMethods

      Deprecated.

  - ### Constructor Detail

    - #### MethodFilterInterceptor

          public MethodFilterInterceptor()

      Deprecated.

  - ### Method Detail

    - #### setExcludeMethods

          public void setExcludeMethods(String excludeMethods)

      Deprecated.

    - #### getExcludeMethodsSet

          public Set<String> getExcludeMethodsSet()

      Deprecated.

    - #### setIncludeMethods

          public void setIncludeMethods(String includeMethods)

      Deprecated.

    - #### getIncludeMethodsSet

          public Set<String> getIncludeMethodsSet()

      Deprecated.

    - #### intercept

          public String intercept(ActionInvocation invocation)
                           throws Exception

      Deprecated.
      Description copied from class: `AbstractInterceptor`
      Override to handle interception
      Specified by:
        `intercept` in class `AbstractInterceptor`
      Throws:
        `Exception`

    - #### applyInterceptor

          protected boolean applyInterceptor(ActionInvocation invocation)

      Deprecated.

    - #### doIntercept

          protected abstract String doIntercept(ActionInvocation invocation)
                                         throws Exception

      Deprecated.
      Subclasses must override to implement the interceptor logic.
      Parameters:
        `invocation` - the action invocation
      Returns:
        the result of invocation
      Throws:
        `Exception` - in case of any errors

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.