Package com.adobe.forms.foundation.utils
Class UriUtils
- java.lang.Object
-
- com.adobe.forms.foundation.utils.UriUtils
-
public class UriUtils extends java.lang.Object
Uri related util functions
-
-
Constructor Summary
Constructors Constructor Description UriUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isUriAllowed(java.lang.String uri, java.util.List<java.util.regex.Pattern> allowUriListPatterns, boolean allowWhenListAbsent, boolean allowWhenListEmpty)
Validate uris against a allowUriListPatterns, list of patterns If empty list of patterns, default behaviour is deny.
-
-
-
Method Detail
-
isUriAllowed
public static boolean isUriAllowed(java.lang.String uri, java.util.List<java.util.regex.Pattern> allowUriListPatterns, boolean allowWhenListAbsent, boolean allowWhenListEmpty)
Validate uris against a allowUriListPatterns, list of patterns If empty list of patterns, default behaviour is deny. Please refer to @{CommonUtils
.regexListToPatterns} to generate the list of patterns from list of strings, and cache them, to avoid recompilation every time.- Parameters:
uri
- uri to be validatedallowUriListPatterns
- preprocessed pattens inputallowWhenListAbsent
- default behaviour expected when a null allowList has been passed in as an inputallowWhenListEmpty
- default behaviour expected when an empty allowList has been passed in as an input- Returns:
-
-