authorization
Class ProcedureHandler
java.lang.Object
com.wrq.vhi.script.api.ProcedureEventHandler
authorization.ProcedureHandler
- All Implemented Interfaces:
- com.wrq.vhi.script.api.EventHandler
public class ProcedureHandler
- extends com.wrq.vhi.script.api.ProcedureEventHandler
Guard access to a table procedure.
This ProcedureEventHandler
is attached to any table procedure
which needs to have access restricted to particular clients (users).
In this example, this event handler is attached to all table procedures.
Before access is granted to the procedure, the client user name is used as
a key to look up the capabilities for that user. Access is granted to the
table procedure only if the client has been granted that capability.
Fields inherited from interface com.wrq.vhi.script.api.EventHandler |
DEFAULT_TIMEOUT |
Method Summary |
com.wrq.vhi.script.api.ProcedureRecordSet |
executeProcedure(com.wrq.vhi.script.api.ExecuteProcedureEvent event)
Execute a procedure only if the client is authorized to do so. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
description
public static final java.lang.String description
- See Also:
- Constant Field Values
ProcedureHandler
public ProcedureHandler()
executeProcedure
public com.wrq.vhi.script.api.ProcedureRecordSet executeProcedure(com.wrq.vhi.script.api.ExecuteProcedureEvent event)
throws com.wrq.apptrieve.agent.ApptrieveException
- Execute a procedure only if the client is authorized to do so.
This event handler retrieves the user name and the procedure name
and permits access to the procedure only if the procedure name
appears in the user's "capability" list.
- Overrides:
executeProcedure
in class com.wrq.vhi.script.api.ProcedureEventHandler
- Parameters:
event
- the event instance
- Returns:
- the procedure result
- Throws:
com.wrq.apptrieve.agent.ApptrieveException