Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.conn
Class GenericAuthorizer  view GenericAuthorizer download GenericAuthorizer.java

java.lang.Object
  extended byorg.apache.derby.impl.sql.conn.GenericAuthorizer
All Implemented Interfaces:
org.apache.derby.iapi.sql.conn.Authorizer

class GenericAuthorizer
extends java.lang.Object
implements org.apache.derby.iapi.sql.conn.Authorizer


Field Summary
private  java.lang.String authorizationId
           
private static int FULL_ACCESS
           
private  org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc
           
private static int NO_ACCESS
           
private static int READ_ACCESS
           
(package private)  boolean readOnlyConnection
           
private  int userAccessLevel
           
 
Fields inherited from interface org.apache.derby.iapi.sql.conn.Authorizer
JAR_WRITE_OP, PROPERTY_WRITE_OP, SQL_ARBITARY_OP, SQL_CALL_OP, SQL_DDL_OP, SQL_SELECT_OP, SQL_WRITE_OP
 
Constructor Summary
(package private) GenericAuthorizer(java.lang.String authorizationId, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc, boolean sqlConnection)
           
 
Method Summary
 void authorize(int operation)
          Verify the connected user is authorized to perform the requested operation.
private  boolean connectionMustRemainReadOnly()
           
private static org.apache.derby.iapi.error.StandardException externalRoutineException(int operation, int sqlAllowed)
           
 java.lang.String getAuthorizationId()
          Get the Authorization ID for this Authorizer.
private  int getDefaultAccessLevel()
           
private  void getUserAccessLevel()
           
 boolean isReadOnlyConnection()
          Get the readOnly status for this authorizer's connection.
 void refresh()
          Refresh this authorizer to reflect a change in the database permissions.
 void setReadOnlyConnection(boolean on, boolean authorize)
          Set the readOnly status for this authorizer's connection.
private  boolean userOnAccessList(java.lang.String listName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_ACCESS

private static final int NO_ACCESS
See Also:
Constant Field Values

READ_ACCESS

private static final int READ_ACCESS
See Also:
Constant Field Values

FULL_ACCESS

private static final int FULL_ACCESS
See Also:
Constant Field Values

userAccessLevel

private int userAccessLevel

readOnlyConnection

boolean readOnlyConnection

lcc

private final org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc

authorizationId

private final java.lang.String authorizationId
Constructor Detail

GenericAuthorizer

GenericAuthorizer(java.lang.String authorizationId,
                  org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc,
                  boolean sqlConnection)
            throws org.apache.derby.iapi.error.StandardException
Method Detail

connectionMustRemainReadOnly

private boolean connectionMustRemainReadOnly()

authorize

public void authorize(int operation)
               throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.conn.Authorizer
Verify the connected user is authorized to perform the requested operation.

Specified by:
authorize in interface org.apache.derby.iapi.sql.conn.Authorizer

externalRoutineException

private static org.apache.derby.iapi.error.StandardException externalRoutineException(int operation,
                                                                                      int sqlAllowed)

getAuthorizationId

public java.lang.String getAuthorizationId()
Description copied from interface: org.apache.derby.iapi.sql.conn.Authorizer
Get the Authorization ID for this Authorizer.

Specified by:
getAuthorizationId in interface org.apache.derby.iapi.sql.conn.Authorizer

getUserAccessLevel

private void getUserAccessLevel()
                         throws org.apache.derby.iapi.error.StandardException

getDefaultAccessLevel

private int getDefaultAccessLevel()
                           throws org.apache.derby.iapi.error.StandardException

userOnAccessList

private boolean userOnAccessList(java.lang.String listName)
                          throws org.apache.derby.iapi.error.StandardException

isReadOnlyConnection

public boolean isReadOnlyConnection()
Description copied from interface: org.apache.derby.iapi.sql.conn.Authorizer
Get the readOnly status for this authorizer's connection.

Specified by:
isReadOnlyConnection in interface org.apache.derby.iapi.sql.conn.Authorizer

setReadOnlyConnection

public void setReadOnlyConnection(boolean on,
                                  boolean authorize)
                           throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.conn.Authorizer
Set the readOnly status for this authorizer's connection.

Specified by:
setReadOnlyConnection in interface org.apache.derby.iapi.sql.conn.Authorizer

refresh

public void refresh()
             throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.conn.Authorizer
Refresh this authorizer to reflect a change in the database permissions.

Specified by:
refresh in interface org.apache.derby.iapi.sql.conn.Authorizer