Class AclUtil

java.lang.Object
io.deephaven.acl.tools.AclUtil

@InternalUseOnly public class AclUtil extends Object
Common code used across multiple internal ACL modules.
  • Method Details

    • urlEncode

      public static String urlEncode(String text)
      Applies URL encoding with a null check.
      Parameters:
      text - text to URL encode
      Returns:
      URL encoded text
    • urlDecode

      public static String urlDecode(String text)
      Java 8 requires specifying an encoding string and related exception handling. Consider removing once we stop supporting Java 8.
      Parameters:
      text - text to URL decode
      Returns:
      URL decoded text
    • columnsStringIsNormalized

      public static boolean columnsStringIsNormalized(@NotNull String columnsString)
      Checks whether an ACL columns string is normalized, meaning lexicographically sorted and removed of duplicates.

      Assumes column names and delimitation are already validated for correctness.

      Parameters:
      columnsString - the ACL columns string
      Returns:
      whether columnsString is normalized
    • normalizeColumnsString

      @NotNull public static String normalizeColumnsString(@NotNull String columnsString)
      Normalizes an ACL columns string if needed. See columnsStringIsNormalized(String) for a definition of normalization.
      Parameters:
      columnsString - the ACL columns string to normalize if needed
      Returns:
      the normalized ACL columns string if needed; otherwise, the original ACL columns string