com.opensymphony.xwork2.security

## Class DefaultAcceptedPatternsChecker

- java.lang.Object
- - com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker

- All Implemented Interfaces:
    AcceptedPatternsChecker

      public class DefaultAcceptedPatternsChecker
      extends Object
      implements AcceptedPatternsChecker

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.opensymphony.xwork2.security.AcceptedPatternsChecker

      `AcceptedPatternsChecker.IsAccepted`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String[]` | `ACCEPTED_PATTERNS`
    `protected Set<Pattern>` | `acceptedPatterns`
    `static String[]` | `DMI_AWARE_ACCEPTED_PATTERNS`
    `static Set<Character>` | `NESTING_CHARS` Must match `ACCEPTED_PATTERNS` RegEx.
    `static String` | `NESTING_CHARS_STR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAcceptedPatternsChecker()`
    `DefaultAcceptedPatternsChecker(String dmiValue)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<Pattern>` | `getAcceptedPatterns()` Allow access list of all defined excluded patterns
    `AcceptedPatternsChecker.IsAccepted` | `isAccepted(String value)` Checks if value matches any of patterns on exclude list
    `protected void` | `logPatternChange(Set<String> newPatterns)`
    `void` | `setAcceptedPatterns(Set<String> patterns)` Sets excluded patterns during runtime
    `void` | `setAcceptedPatterns(String commaDelimitedPatterns)` Sets excluded patterns during runtime
    `void` | `setAcceptedPatterns(String[] additionalPatterns)` Set excluded patterns during runtime
    `protected void` | `setAdditionalAcceptedPatterns(String acceptablePatterns)`
    `protected void` | `setOverrideAcceptedPatterns(String acceptablePatterns)`

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

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

- - ### Field Detail

    - #### ACCEPTED_PATTERNS

          public static final String[] ACCEPTED_PATTERNS

    - #### NESTING_CHARS

          public static final Set<Character> NESTING_CHARS

      Must match `ACCEPTED_PATTERNS` RegEx. Signifies characters which result in a nested lookup via OGNL.

    - #### NESTING_CHARS_STR

          public static final String NESTING_CHARS_STR

    - #### DMI_AWARE_ACCEPTED_PATTERNS

          public static final String[] DMI_AWARE_ACCEPTED_PATTERNS

    - #### acceptedPatterns

          protected Set<Pattern> acceptedPatterns

  - ### Constructor Detail

    - #### DefaultAcceptedPatternsChecker

          public DefaultAcceptedPatternsChecker()

    - #### DefaultAcceptedPatternsChecker

          public DefaultAcceptedPatternsChecker(String dmiValue)

  - ### Method Detail

    - #### setOverrideAcceptedPatterns

          protected void setOverrideAcceptedPatterns(String acceptablePatterns)

    - #### setAdditionalAcceptedPatterns

          protected void setAdditionalAcceptedPatterns(String acceptablePatterns)

    - #### setAcceptedPatterns

          public void setAcceptedPatterns(String commaDelimitedPatterns)

      Description copied from interface: `AcceptedPatternsChecker`
      Sets excluded patterns during runtime
      Specified by:
        `setAcceptedPatterns` in interface `AcceptedPatternsChecker`
      Parameters:
        `commaDelimitedPatterns` - comma delimited string with patterns

    - #### setAcceptedPatterns

          public void setAcceptedPatterns(String[] additionalPatterns)

      Description copied from interface: `AcceptedPatternsChecker`
      Set excluded patterns during runtime
      Specified by:
        `setAcceptedPatterns` in interface `AcceptedPatternsChecker`
      Parameters:
        `additionalPatterns` - array of additional excluded patterns

    - #### setAcceptedPatterns

          public void setAcceptedPatterns(Set<String> patterns)

      Description copied from interface: `AcceptedPatternsChecker`
      Sets excluded patterns during runtime
      Specified by:
        `setAcceptedPatterns` in interface `AcceptedPatternsChecker`
      Parameters:
        `patterns` - set of additional patterns

    - #### logPatternChange

          protected void logPatternChange(Set<String> newPatterns)

    - #### isAccepted

          public AcceptedPatternsChecker.IsAccepted isAccepted(String value)

      Description copied from interface: `AcceptedPatternsChecker`
      Checks if value matches any of patterns on exclude list
      Specified by:
        `isAccepted` in interface `AcceptedPatternsChecker`
      Parameters:
        `value` - to check
      Returns:
        object containing result of matched pattern and pattern itself

    - #### getAcceptedPatterns

          public Set<Pattern> getAcceptedPatterns()

      Description copied from interface: `AcceptedPatternsChecker`
      Allow access list of all defined excluded patterns
      Specified by:
        `getAcceptedPatterns` in interface `AcceptedPatternsChecker`
      Returns:
        set of excluded patterns

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