|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.Database
A façade class for executing operations (questions and actions) in the database, hiding the gory details of transaction management behind a simple interface. Also provides a database-independent schema description.
org.glite.security.voms.operation
Method Summary | |
void |
addGlobalAdmin(java.lang.String dn,
java.lang.String ca)
Add a Global ACL entry to allow all VO operations to the given client. |
static java.lang.Object |
ask(Question question)
Ask the given question by calling its Question.ask() method in the
appropriate environment.
|
void |
create()
Drop and recreate all tables, unless they are already there. |
void |
drop()
Drop all tables, i.e. delete the entire database. |
static java.lang.Object |
execute(DirectManipulation op)
Execute the SQL commands in the given DirectManipulation by
calling its DirectManipulation.execute(org.glite.security.voms.database.connection.DirectUpdate) method in the appropriate
environment. |
static DBFlavour |
getDBFlavour()
Return the current database flavour. |
static void |
main(java.lang.String[] args)
|
static java.lang.Object |
perform(Action action)
Perform the given action by calling its Action.performWithResult() method in the
appropriate environment.
|
static java.lang.Object |
performDirectly(Action action)
Perform a given action without regard for security. |
static Database |
theDatabase()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Database theDatabase()
public static DBFlavour getDBFlavour()
public static java.lang.Object perform(Action action) throws VOMSException
Action.performWithResult()
method in the
appropriate environment.
This method takes care of
Action.checkPermission()
),If the transaction failed with a database error, the action is automatically retried with a new connection. Any other exception is passed up to the caller.
null
if the action is valueless.
VOMSException
public static java.lang.Object performDirectly(Action action) throws VOMSException
perform(org.glite.security.voms.operation.Action)
, but does not do any permission checks.
VOMSException
public static java.lang.Object ask(Question question) throws VOMSException
Question.ask()
method in the
appropriate environment.
This method takes care of
Question.checkPermission()
),If the transaction failed with a database error, the question is automatically retried with a new connection. Any other exception is passed up to the caller.
VOMSException
public static java.lang.Object execute(DirectManipulation op) throws VOMSException
DirectManipulation
by
calling its DirectManipulation.execute(org.glite.security.voms.database.connection.DirectUpdate)
method in the appropriate
environment. This is used for manipulation of the SEQUENCE and REALTIME
tables.
VOMSException
public void create() throws java.sql.SQLException, VOMSException
java.sql.SQLException
VOMSException
public void drop() throws java.sql.SQLException, VOMSException
java.sql.SQLException
VOMSException
public void addGlobalAdmin(java.lang.String dn, java.lang.String ca) throws VOMSException
VOMSException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |