Package com.mapr.baseutils.utils
Class AceHelper
java.lang.Object
com.mapr.baseutils.utils.AceHelper
Parses permissions into postfix/infix notation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression>static ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression>static ArrayList<com.mapr.fs.proto.Dbserver.AccessControlExpression>getColumnPermission(org.json.JSONObject json) static ArrayList<com.mapr.fs.proto.Common.FileACE>static ArrayList<com.mapr.fs.proto.Common.FileACE>getFilePermissionWithShort(String fsperm) static StringHelper method used by HBase shell to print all applicable permissions.static com.mapr.fs.proto.Dbserver.TableAcesstatic StringConverts 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)"static StringMethod 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 & |"
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
ANSI_RESET
- See Also:
-
ANSI_RED
- See Also:
-
FILEREAD
- See Also:
-
FILEWRITE
- See Also:
-
FILEEXECUTE
- See Also:
-
READDIR
- See Also:
-
ADDCHILD
- See Also:
-
DELETECHILD
- See Also:
-
LOOKUPDIR
- See Also:
-
FILEREAD_SHORT
- See Also:
-
FILEWRITE_SHORT
- See Also:
-
FILEEXECUTE_SHORT
- See Also:
-
READDIR_SHORT
- See Also:
-
ADDCHILD_SHORT
- See Also:
-
DELETECHILD_SHORT
- See Also:
-
LOOKUPDIR_SHORT
- See Also:
-
FS_PERM_SHORT_MAP
-
FS_ACE_PERM_SHORT_MAP
-
fsPermissionMap
-
tblPermissionMap
-
tblAccessTypeMap
-
cfDefPermissionMap
-
cfPermissionMap
-
cfAccessTypeMap
-
colPermissionMap
-
colAccessTypeMap
-
TABLE_PERMISSIONS
-
FAMILY_PERMISSIONS
-
COLUMN_PERMISSIONS
-
-
Constructor Details
-
AceHelper
public AceHelper()
-
-
Method Details
-
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
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
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:
IOExceptionorg.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
-