com.metamatrix.server.dqp.service
Class PlatformVDBService

java.lang.Object
  extended by com.metamatrix.server.dqp.service.PlatformVDBService
All Implemented Interfaces:
ApplicationService, VDBService, RuntimeMetadataListener

public class PlatformVDBService
extends java.lang.Object
implements VDBService, RuntimeMetadataListener

Implementation of VDBService used in a "normal" server environment.


Constructor Summary
PlatformVDBService()
           
 
Method Summary
 void changeVDBStatus(java.lang.String vdbName, java.lang.String vdbVersion, int status)
          Change the status of the VDB
 java.util.List getAvailableVDBs()
          Get the list of VDBs available from the service
 java.util.List getConnectorBindingNames(java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String modelName)
          Get connector bindings for a particular vdb model.
 java.lang.String getConnectorName(java.lang.String connectorBindingID)
           
 int getFileVisibility(java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String pathInVDB)
          Get visibility of the file at the given path in the vdb.
 int getModelVisibility(java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String modelName)
          Get model visibility
 java.util.List getMultiSourceModels(java.lang.String vdbName, java.lang.String vdbVersion)
          Get all multi-source model names (models that can be bound to multiple connector bindings) for this VDB name and version.
 java.io.InputStream getVDBResource(java.lang.String vdbName, java.lang.String vdbVersion)
          Get VDB resource contents
 int getVDBStatus(java.lang.String vdbName, java.lang.String vdbVersion)
          Get the Status of VDB
 void initialize(java.util.Properties props)
          Initialize the service with the specified properties.
 boolean isActiveVDB(java.lang.String vdbName, java.lang.String vdbVersion)
           
 void processEvent(RuntimeMetadataEvent event)
           
 void start(ApplicationEnvironment environment)
          Start the service with the specified environment.
 void stop()
          Stop the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformVDBService

public PlatformVDBService()
Method Detail

isActiveVDB

public boolean isActiveVDB(java.lang.String vdbName,
                           java.lang.String vdbVersion)
                    throws MetaMatrixComponentException
Throws:
MetaMatrixComponentException

getConnectorBindingNames

public java.util.List getConnectorBindingNames(java.lang.String vdbName,
                                               java.lang.String vdbVersion,
                                               java.lang.String modelName)
                                        throws MetaMatrixComponentException
Description copied from interface: VDBService
Get connector bindings for a particular vdb model. For most models, there will be exactly one. For multi-source models, there may be more than one. The VDBConfiguration#getMultiSourceModels(String, String) method can be used to determine which models are multi-source models.

Specified by:
getConnectorBindingNames in interface VDBService
Parameters:
vdbName - VDB name
vdbVersion - VDB version
modelName - Model name
Returns:
list of String names of connectors
Throws:
MetaMatrixComponentException

getModelVisibility

public int getModelVisibility(java.lang.String vdbName,
                              java.lang.String vdbVersion,
                              java.lang.String modelName)
                       throws MetaMatrixComponentException
Description copied from interface: VDBService
Get model visibility

Specified by:
getModelVisibility in interface VDBService
Parameters:
vdbName - VDB name
vdbVersion - VDB version
modelName - The name of the model
Returns:
Visibility constant, as defined in this class
Throws:
MetaMatrixComponentException

getFileVisibility

public int getFileVisibility(java.lang.String vdbName,
                             java.lang.String vdbVersion,
                             java.lang.String pathInVDB)
                      throws MetaMatrixComponentException
Description copied from interface: VDBService
Get visibility of the file at the given path in the vdb.

Specified by:
getFileVisibility in interface VDBService
Parameters:
vdbName - VDB name
vdbVersion - VDB version
pathInVDB - The path to the model in the VDB
Returns:
Visibility constant, as defined in this class
Throws:
MetaMatrixComponentException
Since:
4.2
See Also:
com.metamatrix.dqp.service.VDBConfiguration#getFileVisibility(java.lang.String, java.lang.String, java.lang.String)

initialize

public void initialize(java.util.Properties props)
                throws ApplicationInitializationException
Description copied from interface: ApplicationService
Initialize the service with the specified properties.

Specified by:
initialize in interface ApplicationService
Parameters:
props - Initialialization properties
Throws:
ApplicationInitializationException - If an error occurs during initialization

start

public void start(ApplicationEnvironment environment)
           throws ApplicationLifecycleException
Description copied from interface: ApplicationService
Start the service with the specified environment. The environment can be used to find other services or resources.

Specified by:
start in interface ApplicationService
Parameters:
environment - Environment
Throws:
ApplicationLifecycleException - If an error occurs while starting

stop

public void stop()
          throws ApplicationLifecycleException
Description copied from interface: ApplicationService
Stop the service.

Specified by:
stop in interface ApplicationService
Throws:
ApplicationLifecycleException - If an error occurs while starting

getConnectorName

public java.lang.String getConnectorName(java.lang.String connectorBindingID)
                                  throws MetaMatrixComponentException
Specified by:
getConnectorName in interface VDBService
Throws:
MetaMatrixComponentException

processEvent

public void processEvent(RuntimeMetadataEvent event)
Specified by:
processEvent in interface RuntimeMetadataListener
Since:
4.2
See Also:
RuntimeMetadataListener.processEvent(com.metamatrix.metadata.runtime.event.RuntimeMetadataEvent)

getMultiSourceModels

public java.util.List getMultiSourceModels(java.lang.String vdbName,
                                           java.lang.String vdbVersion)
                                    throws MetaMatrixComponentException
Description copied from interface: VDBService
Get all multi-source model names (models that can be bound to multiple connector bindings) for this VDB name and version.

Specified by:
getMultiSourceModels in interface VDBService
Parameters:
vdbName - VDB name
vdbVersion - VDB version
Returns:
List of model names that are multi-source models.
Throws:
MetaMatrixComponentException
Since:
4.2
See Also:
com.metamatrix.dqp.service.VDBConfiguration#getMultiSourceModels(java.lang.String, java.lang.String)

getVDBResource

public java.io.InputStream getVDBResource(java.lang.String vdbName,
                                          java.lang.String vdbVersion)
                                   throws MetaMatrixComponentException
Description copied from interface: VDBService
Get VDB resource contents

Specified by:
getVDBResource in interface VDBService
Parameters:
vdbName - VDB name
vdbVersion - VDB version
Returns:
VDB resource file name
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
VDBService.getVDBResource(java.lang.String, java.lang.String)

getVDBStatus

public int getVDBStatus(java.lang.String vdbName,
                        java.lang.String vdbVersion)
                 throws MetaMatrixComponentException
Description copied from interface: VDBService
Get the Status of VDB

Specified by:
getVDBStatus in interface VDBService
Parameters:
vdbName - - Name of the VDB
vdbVersion - - Version of the VDB
Returns:
int Current status of VDB
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
VDBService.getVDBStatus(java.lang.String, java.lang.String)

changeVDBStatus

public void changeVDBStatus(java.lang.String vdbName,
                            java.lang.String vdbVersion,
                            int status)
                     throws ApplicationLifecycleException,
                            MetaMatrixComponentException
Description copied from interface: VDBService
Change the status of the VDB

Specified by:
changeVDBStatus in interface VDBService
Parameters:
vdbName - - Name of the VDB
vdbVersion - - Version of the VDB
status - -
Throws:
ApplicationLifecycleException
MetaMatrixComponentException
Since:
4.3
See Also:
VDBService.changeVDBStatus(java.lang.String, java.lang.String, int)

getAvailableVDBs

public java.util.List getAvailableVDBs()
                                throws MetaMatrixComponentException
Description copied from interface: VDBService
Get the list of VDBs available from the service

Specified by:
getAvailableVDBs in interface VDBService
Returns:
List of com.metamatrix.metadata.runtime.admin.vdb.VDBDefn
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
VDBService.getAvailableVDBs()


Copyright © 2009. All Rights Reserved.