org.apache.derby.impl.sql.execute
Class PrivilegeInfo

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.PrivilegeInfo
Direct Known Subclasses:
GenericPrivilegeInfo, RoutinePrivilegeInfo, TablePrivilegeInfo

public abstract class PrivilegeInfo
extends java.lang.Object


Constructor Summary
PrivilegeInfo()
           
 
Method Summary
protected  void addWarningIfPrivilegeNotRevoked(Activation activation, boolean grant, boolean privileges_revoked, java.lang.String grantee)
          This method adds a warning if a revoke statement has not revoked any privileges from a grantee.
protected  void checkOwnership(java.lang.String user, TupleDescriptor objectDescriptor, SchemaDescriptor sd, DataDictionary dd)
          Determines whether a user is the owner of an object (table, function, or procedure).
abstract  void executeGrantRevoke(Activation activation, boolean grant, java.util.List grantees)
          This is the guts of the Execution-time logic for GRANT/REVOKE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivilegeInfo

public PrivilegeInfo()
Method Detail

executeGrantRevoke

public abstract void executeGrantRevoke(Activation activation,
                                        boolean grant,
                                        java.util.List grantees)
                                 throws StandardException
This is the guts of the Execution-time logic for GRANT/REVOKE

Parameters:
activation -
grant - true if grant, false if revoke
grantees - a list of authorization ids (strings)
Throws:
StandardException - Thrown on failure

checkOwnership

protected void checkOwnership(java.lang.String user,
                              TupleDescriptor objectDescriptor,
                              SchemaDescriptor sd,
                              DataDictionary dd)
                       throws StandardException
Determines whether a user is the owner of an object (table, function, or procedure). Note that Database Owner can access database objects without needing to be their owner

Parameters:
user - authorizationId of current user
objectDescriptor - object being checked against
sd - SchemaDescriptor
dd - DataDictionary
Throws:
StandardException - if user does not own the object

addWarningIfPrivilegeNotRevoked

protected void addWarningIfPrivilegeNotRevoked(Activation activation,
                                               boolean grant,
                                               boolean privileges_revoked,
                                               java.lang.String grantee)
This method adds a warning if a revoke statement has not revoked any privileges from a grantee.

Parameters:
activation -
grant - true if grant, false if revoke
privileges_revoked - true, if at least one privilege has been revoked from a grantee, false otherwise
grantee - authorization id of the user

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.