Class ParameterHelper


  • public class ParameterHelper
    extends Object
    Extract parameters from a HttpServletRequest
    • Constructor Detail

      • ParameterHelper

        public ParameterHelper()
    • Method Detail

      • extractPairOfStringsFromUri

        public static org.apache.commons.lang3.tuple.Pair<String,​String> extractPairOfStringsFromUri​(String requestUri,
                                                                                                           String leadingPathRegex)
        Extract a pair of strings from the path of an HttpRequest, separated by a (the first) colon.

        The HttpRequest can be either plaintext (should not contain slashes) or BASE64 encoded.

        If the request string ends with .json, that string is cut off.

        Parameters:
        requestUri - the URI whose path is evaluated
        leadingPathRegex - the regex, at whose end the evaulation will start
        Returns:
        a pair of strings, separated by the first colon. The second string can contain multiple colons
      • extractPairOfStrings

        public static org.apache.commons.lang3.tuple.Pair<String,​String> extractPairOfStrings​(String string)
        Extract a pair of strings from a string, separated by a (the first) colon
        Parameters:
        string - the string
        Returns:
        a pair of strings, separated by the first colon. The second string can contain multiple * colons