Class GrantRoleConstantAction
java.lang.Object
org.apache.derby.impl.sql.execute.DDLConstantAction
org.apache.derby.impl.sql.execute.GrantRoleConstantAction
- All Implemented Interfaces:
ConstantAction
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
FieldsFields inherited from interface ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT -
Constructor Summary
ConstructorsConstructorDescriptionGrantRoleConstantAction(List roleNames, List grantees) Make the ConstantAction for a CREATE ROLE statement. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckCircularity(String role, String grantee, 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.voidexecuteConstantAction(Activation activation) This is the guts of the Execution-time logic for GRANT role.toString()
-
Field Details
-
roleNames
-
grantees
-
withAdminOption
private final boolean withAdminOption- See Also:
-
-
Constructor Details
-
GrantRoleConstantAction
-
-
Method Details
-
executeConstantAction
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:
-
checkCircularity
private void checkCircularity(String role, String grantee, 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 whichroleis to be grantedgrantor- Who does the granting- Throws:
StandardException- normal error policy. Throws AUTH_ROLE_GRANT_CIRCULARITY if a circularity is detected.
-
toString
-