com.metamatrix.server.admin.api
Interface RuntimeMetadataAdminAPI

All Superinterfaces:
SubSystemAdminAPI
All Known Implementing Classes:
RuntimeMetadataAdminAPIImpl

public interface RuntimeMetadataAdminAPI
extends SubSystemAdminAPI


Method Summary
 java.util.Set getAllDataNodeNames(java.lang.String vdbName, java.lang.String vdbVersion)
          Get all data element paths for a VDB version.
 PermissionDataNode getDataNodes(java.lang.String vDBName, java.lang.String vDBVersion)
          Get the tree of data nodes that make op a VDB.
 PermissionDataNode getEntitlementTree(java.lang.String vDBName, java.lang.String vDBVersion, AuthorizationPolicyID policyID)
          Returns the entitlement tree for a given VDB version.
 VirtualDatabase getLatestVirtualDatabase(java.lang.String vdbName)
          Returns the latestVirtualDatabase for the specified vdbName.
 MaterializationLoadScripts getMaterializationScripts(ConnectorBinding materializationConnector, VDBDefn vdb, java.lang.String mmHost, java.lang.String mmPort, java.lang.String materializationUserName, java.lang.String materializationUserPwd, java.lang.String metamatrixUserName, java.lang.String metamatrixUserPwd)
          Get the MaterializationLoadScripts for all materialized views in the materialization model in this VDB.
 byte[] getVDB(VirtualDatabaseID vdbID)
          Call to obtain the VDB Definition that can be used for importing or exporting.
 java.util.Collection getVDBModels(VirtualDatabaseID vdbID)
          Returns a sorted Collection of type Model that represents all the models that where deployed in the specified virtual database.
 java.util.Collection getVDBsForConnectorBinding(java.lang.String routingID)
          Given a routing ID, find all VDBs whose models use the connector binding.
 VirtualDatabase getVirtualDatabase(VirtualDatabaseID vdbID)
          Returns the VirtualDatabase specified by the VirtualDatabaseID.
 java.util.Collection getVirtualDatabases()
          Returns a Collection of all the VirtualDatabases in the system.
 VirtualDatabase importVDB(byte[] vdbStream)
          Call to import a VDB
 void markVDBForDelete(VirtualDatabaseID vdbID)
          Mark a VirtualDataBase (VDB) for deletion.
 java.util.Map migrateConnectorBindingNames(VirtualDatabase sourceVDB, VDBDefn vdb)
          Migrate connector binding names from models in a virtual database, filling in connector binding names possible for the models in the DTCInfo.
 EntitlementMigrationReport migrateEntitlements(VirtualDatabase targetVDB, char[] dataRoleContents, boolean overwriteExisting)
          Migrate as many existing entitlements as possible from a supplied roles file to a newly deployed VDB.
 EntitlementMigrationReport migrateEntitlements(VirtualDatabase sourceVDB, VirtualDatabase targetVDB)
          Migrate as many existing entitlements as possible to a newly deployed VDB.
 void setConnectorBindingNames(VirtualDatabaseID vdbID, java.util.Map modelnamesAndConnectorBindingNames)
          Set connector binding names for models in a virtual database.
 void setVDBState(VirtualDatabaseID vdbID, short state)
          Updates the VirtualDatabase state.
 void updateVirtualDatabase(VirtualDatabase vdb)
          Update a modified VirtualDataBase.
 boolean validateConnectorBindingForMaterialization(ConnectorBinding materializationConnector)
          Validate the given connector binding is capable for connectivity to a Materialization.
 

Method Detail

updateVirtualDatabase

void updateVirtualDatabase(VirtualDatabase vdb)
                           throws AuthorizationException,
                                  InvalidSessionException,
                                  VirtualDatabaseException,
                                  MetaMatrixComponentException
Update a modified VirtualDataBase.

Parameters:
vdb - the modified VirtualDatabase.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while updating vdb.
MetaMatrixComponentException - if an error occurs in communicating with a component.

markVDBForDelete

void markVDBForDelete(VirtualDatabaseID vdbID)
                      throws AuthorizationException,
                             InvalidSessionException,
                             VirtualDatabaseException,
                             MetaMatrixComponentException
Mark a VirtualDataBase (VDB) for deletion.

The VDB will not actually be deleted until there are no more users using it.

Parameters:
vdbID - the ID of the VirtualDatabase that is to be deleted.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while updating vdb.
MetaMatrixComponentException - if an error occurs in communicating with a component.

migrateConnectorBindingNames

java.util.Map migrateConnectorBindingNames(VirtualDatabase sourceVDB,
                                           VDBDefn vdb)
                                           throws AuthorizationException,
                                                  InvalidSessionException,
                                                  VirtualDatabaseException,
                                                  MetaMatrixComponentException
Migrate connector binding names from models in a virtual database, filling in connector binding names possible for the models in the DTCInfo.

Parameters:
sourceVDB - The source VirtualDatabase from which to search for models and thus, connector binding names.
vdb - represents a specific VDB Version
Returns:
A Map of ModelNames to RoutingIDs.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

setConnectorBindingNames

void setConnectorBindingNames(VirtualDatabaseID vdbID,
                              java.util.Map modelnamesAndConnectorBindingNames)
                              throws AuthorizationException,
                                     InvalidSessionException,
                                     VirtualDatabaseException,
                                     MetaMatrixComponentException
Set connector binding names for models in a virtual database.

Parameters:
vdbID - ID of the VirtualDatabase.
modelnamesAndConnectorBindingNames - Map of ModelIDs to String Connector Binding names.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

getVDBsForConnectorBinding

java.util.Collection getVDBsForConnectorBinding(java.lang.String routingID)
                                                throws AuthorizationException,
                                                       InvalidSessionException,
                                                       VirtualDatabaseException,
                                                       MetaMatrixComponentException
Given a routing ID, find all VDBs whose models use the connector binding.

Parameters:
routingID - ID of the connector binding.
Returns:
Collection of VDBs where at least one Model is using given connector binding.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

getVirtualDatabase

VirtualDatabase getVirtualDatabase(VirtualDatabaseID vdbID)
                                   throws AuthorizationException,
                                          InvalidSessionException,
                                          VirtualDatabaseException,
                                          MetaMatrixComponentException
Returns the VirtualDatabase specified by the VirtualDatabaseID.

Parameters:
vdbID - ID of the VirtualDatabase.
Returns:
VirtualDatabase
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

getLatestVirtualDatabase

VirtualDatabase getLatestVirtualDatabase(java.lang.String vdbName)
                                         throws AuthorizationException,
                                                InvalidSessionException,
                                                VirtualDatabaseException,
                                                MetaMatrixComponentException
Returns the latestVirtualDatabase for the specified vdbName.

Parameters:
callerSessionID - ID of the caller's current session.
vdbName - is the name of the VirtualDatabase.
Returns:
VirtualDatabase
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

getVirtualDatabases

java.util.Collection getVirtualDatabases()
                                         throws AuthorizationException,
                                                InvalidSessionException,
                                                VirtualDatabaseException,
                                                MetaMatrixComponentException
Returns a Collection of all the VirtualDatabases in the system. This would include all virtual databases flagged as incomplete, active, inactive or deleted.

Returns:
a Collection of all Virtualdatabases in the system.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

getVDBModels

java.util.Collection getVDBModels(VirtualDatabaseID vdbID)
                                  throws AuthorizationException,
                                         InvalidSessionException,
                                         VirtualDatabaseException,
                                         MetaMatrixComponentException
Returns a sorted Collection of type Model that represents all the models that where deployed in the specified virtual database.

Parameters:
vdbID - ID of the VirtualDatabase.
Returns:
a Collection of all Models deployed in the VirtualDatabase.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

setVDBState

void setVDBState(VirtualDatabaseID vdbID,
                 short state)
                 throws AuthorizationException,
                        InvalidSessionException,
                        VirtualDatabaseException,
                        MetaMatrixComponentException
Updates the VirtualDatabase state. The following four states are valid.

Incomplete = 1: The virtula database is not fully created yet. Set by runtime metadata during the creation of a new virtual database.

Inactive = 2: Not ready for use.

Active = 3: Ready for use.

Deleted =4: Ready for deletion.

Parameters:
vdbID - ID of the VirtualDatabase.
state - the state the VirtualDatabase should be set to.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

migrateEntitlements

EntitlementMigrationReport migrateEntitlements(VirtualDatabase sourceVDB,
                                               VirtualDatabase targetVDB)
                                               throws AuthorizationException,
                                                      InvalidSessionException,
                                                      MetaMatrixComponentException
Migrate as many existing entitlements as possible to a newly deployed VDB.

Parameters:
sourceVDB - The existing VDB from which to copy entitlements.
targetVDB - The new VDB to which to copy entitlements.
Returns:
The report that contains a result for each attempted copy.
Throws:
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.

migrateEntitlements

EntitlementMigrationReport migrateEntitlements(VirtualDatabase targetVDB,
                                               char[] dataRoleContents,
                                               boolean overwriteExisting)
                                               throws AuthorizationException,
                                                      InvalidSessionException,
                                                      MetaMatrixComponentException
Migrate as many existing entitlements as possible from a supplied roles file to a newly deployed VDB.

Parameters:
targetVDB - The new VDB to which to copy entitlements.
dataRoleContents - Data Roles xml file contents.
overwriteExisting - flag to determine if any existing roles should be overwritten.
Returns:
The report that contains a result for each attempted copy.
Throws:
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.

getEntitlementTree

PermissionDataNode getEntitlementTree(java.lang.String vDBName,
                                      java.lang.String vDBVersion,
                                      AuthorizationPolicyID policyID)
                                      throws AuthorizationException,
                                             InvalidSessionException,
                                             MetaMatrixComponentException
Returns the entitlement tree for a given VDB version.

Parameters:
vDBName - The name of a VDB for which to get its model info.
vDBVersion - The name of a VDB version for which to get its model info.
policyID - The policy (entitlement) for which to constrain the search for permissions.
Returns:
The root of the entitlement tree for the given VEB version.
Throws:
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.

getDataNodes

PermissionDataNode getDataNodes(java.lang.String vDBName,
                                java.lang.String vDBVersion)
                                throws AuthorizationException,
                                       InvalidSessionException,
                                       MetaMatrixComponentException
Get the tree of data nodes that make op a VDB. This tree represents just the data node hierarchy and does not contain authorization information.

Parameters:
vdbName - The name of the VDB for which data nodes are sought.
vdbVersion - The version of the VDB for which data nodes are sought.
Returns:
The root of the tree for the VDB and version.
Throws:
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.

getAllDataNodeNames

java.util.Set getAllDataNodeNames(java.lang.String vdbName,
                                  java.lang.String vdbVersion)
                                  throws InvalidSessionException,
                                         MetaMatrixComponentException
Get all data element paths for a VDB version.

Parameters:
vdbName - The VDB name.
vdbVersion - The version for the VDB.
Returns:
All element paths in the given VDB version.
Throws:
InvalidSessionException
MetaMatrixComponentException

getVDB

byte[] getVDB(VirtualDatabaseID vdbID)
              throws AuthorizationException,
                     InvalidSessionException,
                     VirtualDatabaseException,
                     MetaMatrixComponentException
Call to obtain the VDB Definition that can be used for importing or exporting.

Parameters:
vdbID - ID of the VirtualDatabase.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

importVDB

VirtualDatabase importVDB(byte[] vdbStream)
                          throws AuthorizationException,
                                 InvalidSessionException,
                                 VirtualDatabaseException,
                                 MetaMatrixComponentException
Call to import a VDB

Parameters:
vdbDefn - is the VDB to be imported, this includes any new connector or connector bindings.
Throws:
AuthorizationException - if caller is not authorized to perform this method.
InvalidSessionException - if the callerSessionID is not valid or is expired.
VirtualDatabaseException - if an error occurs while setting the state.
MetaMatrixComponentException - if an error occurs in communicating with a component.

validateConnectorBindingForMaterialization

boolean validateConnectorBindingForMaterialization(ConnectorBinding materializationConnector)
                                                   throws AuthorizationException,
                                                          InvalidSessionException,
                                                          VirtualDatabaseException,
                                                          MetaMatrixComponentException
Validate the given connector binding is capable for connectivity to a Materialization.

Parameters:
materializationConnector - The connector that will be validated.
Returns:
true iff the given connector binding passes validation.
Throws:
AuthorizationException
InvalidSessionException
VirtualDatabaseException
MetaMatrixComponentException
Since:
4.2

getMaterializationScripts

MaterializationLoadScripts getMaterializationScripts(ConnectorBinding materializationConnector,
                                                     VDBDefn vdb,
                                                     java.lang.String mmHost,
                                                     java.lang.String mmPort,
                                                     java.lang.String materializationUserName,
                                                     java.lang.String materializationUserPwd,
                                                     java.lang.String metamatrixUserName,
                                                     java.lang.String metamatrixUserPwd)
                                                     throws AuthorizationException,
                                                            InvalidSessionException,
                                                            VirtualDatabaseException,
                                                            MetaMatrixComponentException
Get the MaterializationLoadScripts for all materialized views in the materialization model in this VDB.

Parameters:
materializationConnector - the connector that will be used to connect to the Materialization.
vdb - the VDB to which the Materialization belongs.
mmHost - The host that the MetaMatrix server is running on.
mmPort - The MetaMatrix server port.
materializationUserName - The name of the user that will be logging in to the database that holds this particular materialization and the user that the load/refresh scripts will run under.
materializationUserPwd - The password of the materialization user.
metamatrixUserName - User that will log into the MetaMatrix server to perform the refresh.
metamatrixUserPwd - Password of the MetaMatrix user.
Returns:
The object that represents all information nessecary to save the materialization load scripts.
Throws:
AuthorizationException
InvalidSessionException
VirtualDatabaseException
MetaMatrixComponentException
Since:
4.2


Copyright © 2009. All Rights Reserved.