org.glite.rgma
Interface Schema

All Superinterfaces:
Service

public interface Schema
extends Service

Admin API for the Schema.


Method Summary
 void createIndex(java.lang.String vdbName, java.lang.String createIndexStatement)
          Creates an index in the Schema instance for the given VDB.
 void createSchema(java.lang.String vdbName, java.lang.String schemaService)
          Creates a Schema instance for the given VDB on the specified service.
 void createTable(java.lang.String vdbName, java.lang.String createTableStatement, TableAuthorization tableAuthz)
          Creates a table in the Schema instance for the given VDB.
 void createView(java.lang.String vdbName, java.lang.String createViewStatement, TableAuthorization viewAuthz)
          Creates a view in the Schema instance for the given VDB.
 void destroySchema(java.lang.String vdbName, java.lang.String schemaService)
          Removes the schema instance for the given VDB from the specified service.
 void dropIndex(java.lang.String vdbName, java.lang.String indexName)
          Drops an index from the Schema instance for the given VDB.
 void dropTable(java.lang.String vdbName, java.lang.String tableName)
          Drops a table from the Schema instance for the given VDB.
 void dropView(java.lang.String vdbName, java.lang.String viewName)
          Drops a view from the Schema instance for the given VDB.
 StringList getAllTables(java.lang.String vdbName)
          Gets a list of all tables in the schema for the given VDB.
 TableAuthorization getAuthorizationRules(java.lang.String vdbName, java.lang.String tableName)
          Gets the authorization rules for the given table.
 TableDefinition getTableDefinition(java.lang.String vdbName, java.lang.String tableName)
          Gets the definition for table tableName in the given VDB.
 IndexList getTableIndexes(java.lang.String vdbName, java.lang.String tableName)
          Gets the list of indexes defined on the given table in the given VDB.
 void setAuthorizationRules(java.lang.String vdbName, java.lang.String tableName, TableAuthorization tableAuthz)
          Sets the authorization rules for the given table.
 
Methods inherited from interface org.glite.rgma.Service
getProperty, getVersion, setProperty
 

Method Detail

createSchema

void createSchema(java.lang.String vdbName,
                  java.lang.String schemaService)
                  throws RGMAException,
                         RemoteException
Creates a Schema instance for the given VDB on the specified service.

Parameters:
vdbName - The VDB that owns the Schema instance.
schemaService - Schema service URL.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the Schema cannot be created.

destroySchema

void destroySchema(java.lang.String vdbName,
                   java.lang.String schemaService)
                   throws RGMAException,
                          RemoteException
Removes the schema instance for the given VDB from the specified service.

Parameters:
vdbName - The VDB that owns the Schema instance.
schemaService - Schema service URL.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the Schema instance cannot be removed or does not exist.

createTable

void createTable(java.lang.String vdbName,
                 java.lang.String createTableStatement,
                 TableAuthorization tableAuthz)
                 throws RGMAException,
                        RemoteException
Creates a table in the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
createTableStatement - SQL CREATE TABLE statement.
tableAuthz - Table authorization details (for no authorization, use null)
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the table already exists and the Schema definition given by createTableStatement does not match with the stored R-GMA Schema description.

dropTable

void dropTable(java.lang.String vdbName,
               java.lang.String tableName)
               throws RGMAException,
                      RemoteException
Drops a table from the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
tableName - Table to drop.
Throws:
RemoteException - If the service can not be contacted.
RGMAException - If the table does not exist.

createIndex

void createIndex(java.lang.String vdbName,
                 java.lang.String createIndexStatement)
                 throws RGMAException,
                        RemoteException
Creates an index in the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
createIndexStatement - SQL CREATE INDEX statement.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the index already exists or the CREATE INDEX statement is invalid.

dropIndex

void dropIndex(java.lang.String vdbName,
               java.lang.String indexName)
               throws RGMAException,
                      RemoteException
Drops an index from the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
indexName - Index to drop.
Throws:
RemoteException - If the service can not be contacted.
RGMAException - If the index does not exist.

createView

void createView(java.lang.String vdbName,
                java.lang.String createViewStatement,
                TableAuthorization viewAuthz)
                throws RGMAException,
                       RemoteException
Creates a view in the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
createViewStatement - SQL CREATE VIEW statement.
viewAuthz - View authorization details (for no authorization, set as null)
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the view already exists or the CREATE VIEW statement is invalid.

dropView

void dropView(java.lang.String vdbName,
              java.lang.String viewName)
              throws RGMAException,
                     RemoteException
Drops a view from the Schema instance for the given VDB.

Parameters:
vdbName - Name of VDB.
viewName - View to drop.
Throws:
RemoteException - If the service can not be contacted.
RGMAException - If the view does not exist.

getAllTables

StringList getAllTables(java.lang.String vdbName)
                        throws RemoteException
Gets a list of all tables in the schema for the given VDB.

Parameters:
vdbName - Name of VDB.
Returns:
A StringList of table names.
Throws:
RemoteException - If the service could not be contacted.

getTableDefinition

TableDefinition getTableDefinition(java.lang.String vdbName,
                                   java.lang.String tableName)
                                   throws RGMAException,
                                          RemoteException
Gets the definition for table tableName in the given VDB.

Parameters:
vdbName - Name of VDB.
tableName - Name of table.
Returns:
Table definition.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the table could not be found

getTableIndexes

IndexList getTableIndexes(java.lang.String vdbName,
                          java.lang.String tableName)
                          throws RGMAException,
                                 RemoteException
Gets the list of indexes defined on the given table in the given VDB.

Parameters:
vdbName - Name of VDB.
tableName - Name of table.
Returns:
List of Index objects.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the table could not be found

setAuthorizationRules

void setAuthorizationRules(java.lang.String vdbName,
                           java.lang.String tableName,
                           TableAuthorization tableAuthz)
                           throws RGMAException,
                                  RemoteException
Sets the authorization rules for the given table.

Parameters:
vdbName - Name of VDB.
tableName - Table name.
tableAuthz - Table authorization details (for no authorization, set as null).
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the table does not exist or the rules are invalid.

getAuthorizationRules

TableAuthorization getAuthorizationRules(java.lang.String vdbName,
                                         java.lang.String tableName)
                                         throws RGMAException,
                                                RemoteException
Gets the authorization rules for the given table.

Parameters:
vdbName - Name of VDB.
tableName - Table name.
Returns:
Table authorization details.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the table does not exist.