Class StatementGenericPermission
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.StatementPermission
-
- org.apache.derby.iapi.sql.dictionary.StatementGenericPermission
-
public final class StatementGenericPermission extends StatementPermission
This class describes a generic permission (such as USAGE) required by a statement.
-
-
Field Summary
Fields Modifier and Type Field Description private UUID
_objectID
private java.lang.String
_objectType
private java.lang.String
_privilege
-
Constructor Summary
Constructors Constructor Description StatementGenericPermission(UUID objectID, java.lang.String objectType, java.lang.String privilege)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check(LanguageConnectionContext lcc, boolean forGrant, Activation activation)
UUID
getObjectID()
java.lang.String
getObjectType()
Get the type of the privileged object.PermissionsDescriptor
getPermissionDescriptor(java.lang.String authid, DataDictionary dd)
Get the PermissionsDescriptor for the passed authorization id for this object.java.lang.String
getPrivilege()
PrivilegedSQLObject
getPrivilegedObject(DataDictionary dd)
Get the privileged object associated with this permission.boolean
isCorrectPermission(PermissionsDescriptor raw)
Return true if the passed in permission matches the one required by this StatementPermission.java.lang.String
toString()
-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.StatementPermission
genericCheck
-
-
-
-
Field Detail
-
_objectID
private UUID _objectID
-
_objectType
private java.lang.String _objectType
-
_privilege
private java.lang.String _privilege
-
-
Constructor Detail
-
StatementGenericPermission
public StatementGenericPermission(UUID objectID, java.lang.String objectType, java.lang.String privilege)
-
-
Method Detail
-
getObjectID
public UUID getObjectID()
-
getPrivilege
public java.lang.String getPrivilege()
-
getObjectType
public java.lang.String getObjectType()
Description copied from class:StatementPermission
Get the type of the privileged object.- Overrides:
getObjectType
in classStatementPermission
- See Also:
StatementPermission.getObjectType()
-
check
public void check(LanguageConnectionContext lcc, boolean forGrant, Activation activation) throws StandardException
- Specified by:
check
in classStatementPermission
- Parameters:
lcc
- LanguageConnectionContextactivation
- activation for statement needing check- Throws:
StandardException
- if the permission has not been granted- See Also:
StatementPermission.check(org.apache.derby.iapi.sql.conn.LanguageConnectionContext, boolean, org.apache.derby.iapi.sql.Activation)
-
isCorrectPermission
public boolean isCorrectPermission(PermissionsDescriptor raw)
Description copied from class:StatementPermission
Return true if the passed in permission matches the one required by this StatementPermission.
-
getPrivilegedObject
public PrivilegedSQLObject getPrivilegedObject(DataDictionary dd) throws StandardException
Description copied from class:StatementPermission
Get the privileged object associated with this permission.- Overrides:
getPrivilegedObject
in classStatementPermission
- Throws:
StandardException
- See Also:
StatementPermission.getPrivilegedObject(org.apache.derby.iapi.sql.dictionary.DataDictionary)
-
getPermissionDescriptor
public PermissionsDescriptor getPermissionDescriptor(java.lang.String authid, DataDictionary dd) throws StandardException
Description copied from class:StatementPermission
Get the PermissionsDescriptor for the passed authorization id for this object. This method gets called during the execution phase of create view/constraint/trigger. The return value of this method is saved in dependency system to keep track of views/constraints/triggers dependencies on required permissions. This happens in execution phase after it has been established that passed authorization id has all the permissions it needs to create that view/constraint/trigger. Which means that we can only get to writing into dependency system once all the required privileges are confirmed.- Specified by:
getPermissionDescriptor
in classStatementPermission
- Parameters:
authid
- AuthorizationIddd
- DataDictionary- Returns:
- PermissionsDescriptor The PermissionsDescriptor for the passed authorization id on this object
- Throws:
StandardException
- See Also:
StatementPermission.getPermissionDescriptor(java.lang.String, org.apache.derby.iapi.sql.dictionary.DataDictionary)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-