Class AbstractRequestWrapperFactory

    • Method Detail

      • isEnabled

        public final boolean isEnabled()
        Returns:
        true if filter is enabled
      • setEnabled

        public final void setEnabled​(boolean enabled)
        Enable or disable the filter
        Parameters:
        enabled -
      • getWrapper

        public javax.servlet.http.HttpServletRequest getWrapper​(javax.servlet.http.HttpServletRequest request)
        Wrap the given request.
        Parameters:
        request - request to wrap
        Returns:
        Either return the request itself, or if needed a wrapper for the request
      • needsWrapper

        protected abstract boolean needsWrapper​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
        True, if a wrapper is needed
      • newRequestWrapper

        public abstract javax.servlet.http.HttpServletRequest newRequestWrapper​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
        Create a wrapper for the request
      • commaDelimitedListToPatternArray

        public static Pattern[] commaDelimitedListToPatternArray​(String commaDelimitedPatterns)
        Convert a given comma delimited list of regular expressions into an array of compiled Pattern
        Parameters:
        commaDelimitedPatterns -
        Returns:
        array of patterns (not null)
      • commaDelimitedListToStringArray

        public static String[] commaDelimitedListToStringArray​(String commaDelimitedStrings)
        Convert a given comma delimited list of regular expressions into an array of String
        Parameters:
        commaDelimitedStrings -
        Returns:
        array of patterns (non null)
      • matchesOne

        public static boolean matchesOne​(String str,
                                         Pattern... patterns)
        Parameters:
        str -
        patterns -
        Returns:
        Return true if the given str matches at least one of the given patterns.