Top Fields Constructors Methods
org.apache.derby.impl.sql.conn

pack-priv Class GenericAuthorizer

extends Object
implements Authorizer
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.conn.Authorizer
Imports
java.util.List, org.apache.derby.catalog.types.RoutineAliasInfo, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.Property, .SQLState, org.apache.derby.iapi.services.property.PersistentSet, .PropertyUtil, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.sql.conn.Authorizer, .LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.DataDictionary, .StatementPermission, org.apache.derby.iapi.util.IdUtil, .StringUtil

Field Summary

Modifier and TypeField and Description
private static final int
private final LanguageConnectionContext
private static final int
private static final int
pack-priv boolean
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
authorize(int
the enumeration code for the requsted operation.
operation
)

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Used for operations that do not involve tables or routines.

public void
authorize(Activation
holds the list of tables, columns, and routines used.
activation
,
int
the enumeration code for the requsted operation.
operation
)

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Verify the connected user is authorized to perform the requested operation.

public void
authorize(List<StatementPermission>
the required permissions
requiredPermissionsList
,
Activation
holds the execution logic
activation
)

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Verify the connected user possesses the indicated permissions

private boolean
private static StandardException
externalRoutineException(int operation, int sqlAllowed)

Throw an exception if the user does not have all of the required permissions.

private int
private void
public boolean
isReadOnlyConnection()

Implements org.apache.derby.iapi.sql.conn.Authorizer.isReadOnlyConnection.

Get the readOnly status for this authorizer's connection.

public final void
refresh()

Implements org.apache.derby.iapi.sql.conn.Authorizer.refresh.

Refresh this authorizer to reflect a change in the database permissions.

public void
setReadOnlyConnection(boolean
true means set the connection to read only mode, false means set the connection to read wrte mode.
on
,
boolean
true means to verify the caller has authority to set the connection and false means do not check.
authorize
)

Implements org.apache.derby.iapi.sql.conn.Authorizer.setReadOnlyConnection.

Set the readOnly status for this authorizer's connection.

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FULL_ACCESSback to summary
private static final int FULL_ACCESS
lccback to summary
private final LanguageConnectionContext lcc
NO_ACCESSback to summary
private static final int NO_ACCESS
READ_ACCESSback to summary
private static final int READ_ACCESS
readOnlyConnectionback to summary
pack-priv boolean readOnlyConnection
userAccessLevelback to summary
private int userAccessLevel

Constructor Detail

GenericAuthorizerback to summary
pack-priv GenericAuthorizer(LanguageConnectionContext lcc) throws StandardException

Method Detail

authorizeback to summary
public void authorize(int operation) throws StandardException

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Used for operations that do not involve tables or routines.

Parameters
operation:int

Doc from org.apache.derby.iapi.sql.conn.Authorizer.authorize.

the enumeration code for the requsted operation.

Exceptions
StandardException:
Thrown if the operation is not allowed
See Also
Authorizer#authorize
authorizeback to summary
public void authorize(Activation activation, int operation) throws StandardException

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Doc from org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Verify the connected user is authorized to perform the requested operation.

Parameters
activation:Activation

holds the list of tables, columns, and routines used.

operation:int

the enumeration code for the requsted operation.

Exceptions
StandardException:
Thrown if the operation is not allowed
See Also
Authorizer#authorize
authorizeback to summary
public void authorize(List<StatementPermission> requiredPermissionsList, Activation activation) throws StandardException

Implements org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Doc from org.apache.derby.iapi.sql.conn.Authorizer.authorize.

Verify the connected user possesses the indicated permissions

Parameters
requiredPermissionsList:List<StatementPermission>

the required permissions

activation:Activation

holds the execution logic

Exceptions
StandardException:
Thrown if the operation is not allowed
connectionMustRemainReadOnlyback to summary
private boolean connectionMustRemainReadOnly()
externalRoutineExceptionback to summary
private static StandardException externalRoutineException(int operation, int sqlAllowed)

Throw an exception if the user does not have all of the required permissions.

getDefaultAccessLevelback to summary
private int getDefaultAccessLevel() throws StandardException
getUserAccessLevelback to summary
private void getUserAccessLevel() throws StandardException
isReadOnlyConnectionback to summary
public boolean isReadOnlyConnection()

Implements org.apache.derby.iapi.sql.conn.Authorizer.isReadOnlyConnection.

Doc from org.apache.derby.iapi.sql.conn.Authorizer.isReadOnlyConnection.

Get the readOnly status for this authorizer's connection.

See Also
Authorizer#isReadOnlyConnection
refreshback to summary
public final void refresh() throws StandardException

Implements org.apache.derby.iapi.sql.conn.Authorizer.refresh.

Doc from org.apache.derby.iapi.sql.conn.Authorizer.refresh.

Refresh this authorizer to reflect a change in the database permissions.

Exceptions
StandardException:
Thrown if the operation is not allowed
See Also
Authorizer#refresh
setReadOnlyConnectionback to summary
public void setReadOnlyConnection(boolean on, boolean authorize) throws StandardException

Implements org.apache.derby.iapi.sql.conn.Authorizer.setReadOnlyConnection.

Doc from org.apache.derby.iapi.sql.conn.Authorizer.setReadOnlyConnection.

Set the readOnly status for this authorizer's connection.

Parameters
on:boolean

true means set the connection to read only mode, false means set the connection to read wrte mode.

authorize:boolean

true means to verify the caller has authority to set the connection and false means do not check.

Exceptions
StandardException:
Thrown if the operation is not allowed
See Also
Authorizer#isReadOnlyConnection
userOnAccessListback to summary
private boolean userOnAccessList(String listName) throws StandardException