public class TablePrivilegeInfo extends PrivilegeInfo
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTION_COUNT |
private boolean[] |
actionAllowed |
private static java.lang.String[][] |
actionString |
private FormatableBitSet[] |
columnBitSets |
static int |
DELETE_ACTION |
private java.util.List |
descriptorList |
static int |
INSERT_ACTION |
private static java.lang.String |
NO |
static int |
REFERENCES_ACTION |
static int |
SELECT_ACTION |
private TableDescriptor |
td |
static int |
TRIGGER_ACTION |
static int |
UPDATE_ACTION |
private static java.lang.String |
YES_WITH_GRANT_OPTION |
private static java.lang.String |
YES_WITHOUT_GRANT_OPTION |
| Constructor and Description |
|---|
TablePrivilegeInfo(TableDescriptor td,
boolean[] actionAllowed,
FormatableBitSet[] columnBitSets,
java.util.List descriptorList) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOwnership(java.lang.String user,
TableDescriptor td,
SchemaDescriptor sd,
DataDictionary dd,
LanguageConnectionContext lcc,
boolean grant)
Determines whether a user is the owner of an object
(table, function, or procedure).
|
private void |
checkPrivileges(java.lang.String user,
TableDescriptor td,
SchemaDescriptor sd,
DataDictionary dd,
LanguageConnectionContext lcc)
Determines if the privilege is grantable by this grantor
for the given view.
|
void |
executeGrantRevoke(Activation activation,
boolean grant,
java.util.List grantees)
This is the guts of the Execution-time logic for GRANT/REVOKE of a table privilege
|
private java.lang.String |
getActionString(int action,
boolean forGrantOption) |
private java.lang.String |
getPermString(int action,
boolean forGrantOption) |
private boolean |
hasColumnPermissions(int action) |
addWarningIfPrivilegeNotRevoked, checkOwnershippublic static final int SELECT_ACTION
public static final int DELETE_ACTION
public static final int INSERT_ACTION
public static final int UPDATE_ACTION
public static final int REFERENCES_ACTION
public static final int TRIGGER_ACTION
public static final int ACTION_COUNT
private static final java.lang.String YES_WITH_GRANT_OPTION
private static final java.lang.String YES_WITHOUT_GRANT_OPTION
private static final java.lang.String NO
private static final java.lang.String[][] actionString
private TableDescriptor td
private boolean[] actionAllowed
private FormatableBitSet[] columnBitSets
private java.util.List descriptorList
public TablePrivilegeInfo(TableDescriptor td, boolean[] actionAllowed, FormatableBitSet[] columnBitSets, java.util.List descriptorList)
actionAllowed - actionAllowed[action] is true if action is in the privilege set.protected void checkOwnership(java.lang.String user,
TableDescriptor td,
SchemaDescriptor sd,
DataDictionary dd,
LanguageConnectionContext lcc,
boolean grant)
throws StandardException
user - authorizationId of current usertd - table descriptor being checked againstsd - SchemaDescriptordd - DataDictionarylcc - LanguageConnectionContextgrant - grant if true; revoke if falseStandardException - if user does not own the objectprivate void checkPrivileges(java.lang.String user,
TableDescriptor td,
SchemaDescriptor sd,
DataDictionary dd,
LanguageConnectionContext lcc)
throws StandardException
user - authorizationId of current usertd - TableDescriptor to be checked againstsd - SchemaDescriptordd - DataDictionarylcc - LanguageConnectionContextStandardException - if user does not have permission to grantpublic void executeGrantRevoke(Activation activation, boolean grant, java.util.List grantees) throws StandardException
executeGrantRevoke in class PrivilegeInfoactivation - grant - true if grant, false if revokegrantees - a list of authorization ids (strings)StandardException - Thrown on failureprivate java.lang.String getPermString(int action,
boolean forGrantOption)
private java.lang.String getActionString(int action,
boolean forGrantOption)
private boolean hasColumnPermissions(int action)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.