Package com.gpudb.protocol
Class HasPermissionRequest
java.lang.Object
com.gpudb.protocol.HasPermissionRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordA set of parameters for
GPUdb.hasPermission.
Checks if the specified user has the specified permission on the specified object.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theHasPermissionRequestparameterobjectType.static final classA set of string constants for theHasPermissionRequestparameteroptions.static final classA set of string constants for theHasPermissionRequestparameterpermission.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of object to check for the requested permission.The type of object being checked.Optional parameters.Permission to check for.Name of the user for which the permission is being checked.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.Name of object to check for the requested permission.setObjectType(String objectType) The type of object being checked.setOptions(Map<String, String> options) Optional parameters.setPermission(String permission) Permission to check for.setPrincipal(String principal) Name of the user for which the permission is being checked.toString()
Constructor Details
HasPermissionRequest
public HasPermissionRequest()Constructs a HasPermissionRequest object with default parameters.HasPermissionRequest
public HasPermissionRequest(String principal, String object, String objectType, String permission, Map<String, String> options) Constructs a HasPermissionRequest object with the specified parameters.Parameters:principal- Name of the user for which the permission is being checked. Must be an existing user. If blank, will use the current user. The default value is ”.object- Name of object to check for the requested permission. It is recommended to use a fully-qualified name when possible.objectType- The type of object being checked. Supported values:CATALOG: External CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KiFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
permission- Permission to check for. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
options- Optional parameters.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedobjectdoes not exist or is blank. IfTRUEthen it will returnFALSEforhasPermission. Supported values:The default value isFALSE.
Map.
Method Details
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.setPrincipal
Name of the user for which the permission is being checked. Must be an existing user. If blank, will use the current user. The default value is ”.Parameters:principal- The new value forprincipal.Returns:thisto mimic the builder pattern.setObject
Name of object to check for the requested permission. It is recommended to use a fully-qualified name when possible.Parameters:object- The new value forobject.Returns:thisto mimic the builder pattern.getObjectType
The type of object being checked. Supported values:CATALOG: External CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KiFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
Returns:The current value ofobjectType.setObjectType
The type of object being checked. Supported values:CATALOG: External CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KiFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
Parameters:objectType- The new value forobjectType.Returns:thisto mimic the builder pattern.getPermission
Permission to check for. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
Returns:The current value ofpermission.setPermission
Permission to check for. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
Parameters:permission- The new value forpermission.Returns:thisto mimic the builder pattern.getOptions
Optional parameters.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedobjectdoes not exist or is blank. IfTRUEthen it will returnFALSEforhasPermission. Supported values:The default value isFALSE.
Map.Returns:The current value ofoptions.setOptions
Optional parameters.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedobjectdoes not exist or is blank. IfTRUEthen it will returnFALSEforhasPermission. Supported values:The default value isFALSE.
Map.Parameters:options- The new value foroptions.Returns:thisto mimic the builder pattern.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: