Class AceHelper

java.lang.Object
com.mapr.baseutils.utils.AceHelper

public class AceHelper extends Object
Parses permissions into postfix/infix notation
  • Field Details

  • Constructor Details

    • AceHelper

      public AceHelper()
  • Method Details

    • getPermissionsListForShellHelp

      public static String getPermissionsListForShellHelp()
      Helper method used by HBase shell to print all applicable permissions. Since HBase releases are not tied to a particular MapR release, this will ensure that any supported version of HBase shell will display correct help message applicable for the deployed version of MapR release.
      Returns:
      Help text to be displayed by HBase shell permission commands.
    • toInfix

      public static String toInfix(String postfix) throws IOException
      Converts postfix string into infix string Examples: "u:1 g:1 |" => "u:1 | g:1" "u:1 g:123 g:3 r:12 | & p & |" => "u:1 | ((g:123 & (g:3 | r:12)) & p)"
      Parameters:
      postfix - The postfix string to convert
      Returns:
      Converted infix string
      Throws:
      IOException
    • toPostfix

      public static String toPostfix(String permission) throws IOException
      Method to convert infix statement to postfix Examples: "u:1 | g:1" => "u:1 g:1 |" "u:1 | ((g:123 & (g:3 | r:12)) & p)" => "u:1 g:123 g:3 r:12 | & p & |"
      Parameters:
      permission - The permission string in infix format to be converted
      Returns:
      The permission string converted to postfix notation
      Throws:
      IOException
    • getColumnPermission

      public static ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression> getColumnPermission(org.json.JSONObject json) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.json.JSONException
    • getTablePermission

      public static com.mapr.fs.proto.Dbserver.TableAces getTablePermission(AceHelper.DBPermission dbperm) throws IOException
      Throws:
      IOException
    • getColumnPermission

      public static ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression> getColumnPermission(AceHelper.DBPermission dbperm) throws IOException
      Throws:
      IOException
    • getCfPermission

      public static ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression> getCfPermission(AceHelper.DBPermission dbperm) throws IOException
      Throws:
      IOException
    • getFilePermission

      public static ArrayList<com.mapr.fs.proto.Common.FileACE> getFilePermission(AceHelper.FSPermission fsperm) throws IOException
      Throws:
      IOException
    • getFilePermissionWithShort

      public static ArrayList<com.mapr.fs.proto.Common.FileACE> getFilePermissionWithShort(String fsperm) throws IOException
      Throws:
      IOException