|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.conn.GenericAuthorizer
class GenericAuthorizer
| Field Summary | |
|---|---|
private java.lang.String |
authorizationId
|
private static int |
FULL_ACCESS
|
private 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 |
|---|
CREATE_ROLE_PRIV, CREATE_SCHEMA_PRIV, DELETE_PRIV, DROP_ROLE_PRIV, DROP_SCHEMA_PRIV, EXECUTE_PRIV, INSERT_PRIV, JAR_WRITE_OP, MIN_SELECT_PRIV, MODIFY_SCHEMA_PRIV, NULL_PRIV, PRIV_TYPE_COUNT, PROPERTY_WRITE_OP, PUBLIC_AUTHORIZATION_ID, REFERENCES_PRIV, SELECT_PRIV, SQL_ARBITARY_OP, SQL_CALL_OP, SQL_DDL_OP, SQL_SELECT_OP, SQL_WRITE_OP, SYSTEM_AUTHORIZATION_ID, TRIGGER_PRIV, UPDATE_PRIV, USAGE_PRIV |
| Constructor Summary | |
|---|---|
GenericAuthorizer(java.lang.String authorizationId,
LanguageConnectionContext lcc)
|
|
| Method Summary | |
|---|---|
void |
authorize(Activation activation,
int operation)
Verify the connected user is authorized to perform the requested operation. |
void |
authorize(int operation)
Used for operations that do not involve tables or routines. |
private boolean |
connectionMustRemainReadOnly()
|
private static 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 |
|---|
private static final int NO_ACCESS
private static final int READ_ACCESS
private static final int FULL_ACCESS
private int userAccessLevel
boolean readOnlyConnection
private final LanguageConnectionContext lcc
private final java.lang.String authorizationId
| Constructor Detail |
|---|
GenericAuthorizer(java.lang.String authorizationId,
LanguageConnectionContext lcc)
throws StandardException
StandardException| Method Detail |
|---|
private boolean connectionMustRemainReadOnly()
public void authorize(int operation)
throws StandardException
authorize in interface Authorizeroperation - the enumeration code for the requsted operation.
StandardException - Thrown if the operation is not allowedAuthorizer.authorize(int)
public void authorize(Activation activation,
int operation)
throws StandardException
Authorizer
authorize in interface Authorizeractivation - holds the list of tables, columns, and routines used.operation - the enumeration code for the requsted operation.
StandardException - Thrown if the operation is not allowedAuthorizer.authorize(int)
private static StandardException externalRoutineException(int operation,
int sqlAllowed)
public java.lang.String getAuthorizationId()
Authorizer
getAuthorizationId in interface AuthorizerAuthorizer.getAuthorizationId()
private void getUserAccessLevel()
throws StandardException
StandardException
private int getDefaultAccessLevel()
throws StandardException
StandardException
private boolean userOnAccessList(java.lang.String listName)
throws StandardException
StandardExceptionpublic boolean isReadOnlyConnection()
Authorizer
isReadOnlyConnection in interface AuthorizerAuthorizer.isReadOnlyConnection()
public void setReadOnlyConnection(boolean on,
boolean authorize)
throws StandardException
Authorizer
setReadOnlyConnection in interface Authorizeron - true means set the connection to read only mode,
false means set the connection to read wrte mode.authorize - true means to verify the caller has authority
to set the connection and false means do not check.
StandardException - Thrown if the operation is not allowedAuthorizer.isReadOnlyConnection()
public void refresh()
throws StandardException
Authorizer
refresh in interface AuthorizerStandardException - Thrown if the operation is not allowedAuthorizer.refresh()
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||