Class GrantRoleConstantAction
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.DDLConstantAction
-
- org.apache.derby.impl.sql.execute.GrantRoleConstantAction
-
- All Implemented Interfaces:
ConstantAction
class GrantRoleConstantAction extends DDLConstantAction
This class performs actions that are ALWAYS performed for a GRANT role statement at execution time. Descriptors corresponding to the grants are stored in the SYS.SYSROLES table, along with the role definitions, cf CreateRoleConstantAction.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List
grantees
private java.util.List
roleNames
private boolean
withAdminOption
-
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
-
-
Constructor Summary
Constructors Constructor Description GrantRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a CREATE ROLE statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkCircularity(java.lang.String role, java.lang.String grantee, java.lang.String grantor, TransactionController tc, DataDictionary dd)
Check that allowing this grant to go ahead does nto create a circularity in the GRANT role relation graph, cf.void
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for GRANT role.java.lang.String
toString()
-
Methods inherited from class org.apache.derby.impl.sql.execute.DDLConstantAction
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
-
-
-
-
Field Detail
-
roleNames
private java.util.List roleNames
-
grantees
private java.util.List grantees
-
withAdminOption
private final boolean withAdminOption
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GrantRoleConstantAction
public GrantRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a CREATE ROLE statement. When executed, will create a role by the given name.- Parameters:
roleNames
- List of the names of the roles being grantedgrantees
- List of the authorization ids granted to role
-
-
Method Detail
-
executeConstantAction
public void executeConstantAction(Activation activation) throws StandardException
This is the guts of the Execution-time logic for GRANT role.- Parameters:
activation
- The execution environment for this constant action.- Throws:
StandardException
- Thrown on failure- See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
-
checkCircularity
private void checkCircularity(java.lang.String role, java.lang.String grantee, java.lang.String grantor, TransactionController tc, DataDictionary dd) throws StandardException
Check that allowing this grant to go ahead does nto create a circularity in the GRANT role relation graph, cf. Section 12.5, Syntax rule 1 of ISO/IEC 9075-2 2003.- Parameters:
role
- The role about to be grantedgrantee
- The role to whichrole
is to be grantedgrantor
- Who does the granting- Throws:
StandardException
- normal error policy. Throws AUTH_ROLE_GRANT_CIRCULARITY if a circularity is detected.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-