com.metamatrix.dqp.embedded.admin
Class DQPConfigAdminImpl

java.lang.Object
  extended by com.metamatrix.dqp.embedded.admin.DQPConfigAdminImpl
All Implemented Interfaces:
CoreConfigAdmin, EmbeddedConfigAdmin

public class DQPConfigAdminImpl
extends java.lang.Object
implements EmbeddedConfigAdmin

DQP implementation of the Config Admin API

Since:
4.3

Constructor Summary
DQPConfigAdminImpl(EmbeddedConnectionFactoryImpl manager)
           
 
Method Summary
protected  AdminException accumulateProcessingException(AdminException parent, java.lang.Exception e)
           
protected  AdminException accumulateSystemException(AdminException parent, java.lang.Exception e)
           
 void addConnectorArchive(byte[] contents, AdminOptions options)
          Add Connector Type and all the required extension modules required by the this connector type into the system from the given file byte stream which is encoded inthe Connector Archive format.
 ConnectorBinding addConnectorBinding(java.lang.String deployName, char[] xmlFile, AdminOptions options)
          Import a ConnectorBinding into the Configuration.
 ConnectorBinding addConnectorBinding(java.lang.String deployName, java.lang.String type, java.util.Properties properties, AdminOptions options)
          Deploy a ConnectorBinding to Configuration
 void addConnectorType(java.lang.String deployName, char[] cdkFile)
          Add Connector Type, will import Connector Type from a file
 void addExtensionModule(java.lang.String type, java.lang.String sourceName, byte[] source, java.lang.String description)
          Adds an ExtensionModule to the end of the list of modules.
 void addUDF(byte[] modelFileContents, java.lang.String classpath)
          Add User Defined Function model to the system.
 VDB addVDB(java.lang.String deployName, byte[] vdbFile, AdminOptions options)
          Import a VDB file.
 void assignBindingToModel(java.lang.String deployedConnectorBindingName, java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String modelName)
          Assign a ConnectorBinding to a VDB's Model
protected  java.util.Collection convertPropertyDefinitions(ComponentType ctype, java.util.Properties properties)
          Convert a ComponentType and a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects
protected  java.util.Collection convertPropertyDefinitions(java.util.Properties properties)
          Convert a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects
protected  java.lang.Object convertToAdminObjects(java.lang.Object src)
           
protected  java.lang.Object convertToAdminObjects(java.lang.Object src, java.lang.Object parent)
           
 void deleteConnectorBinding(java.lang.String identifier)
          Delete the ConnectorBinding from the Configuration
 void deleteConnectorType(java.lang.String deployName)
          Delete Connector Type from Next Configuration
 void deleteExtensionModule(java.lang.String sourceName)
          Deletes an ExtensionModule from the list of modules.
 void deleteUDF()
          Delete the User Defined Function model.
 char[] exportConfiguration()
          Export Configuration to character Array in XML format
 byte[] exportConnectorArchive(java.lang.String identifier)
          Export Connector Archive, which is bundled connector type with its xml properties file and all the extension modules required by the this connector type
 char[] exportConnectorBinding(java.lang.String identifier)
          Export a ConnectorBinding to character Array in XML format
 char[] exportConnectorType(java.lang.String identifier)
          Export Connector Type to character array
 byte[] exportExtensionModule(java.lang.String sourceName)
          Export an ExtensionModule to byte array
 byte[] exportVDB(java.lang.String name, java.lang.String version)
          Export VDB to byte array
protected  java.util.Collection getAdminObjects(java.lang.String identifier, java.lang.String className)
          Get admin objects of the specified className that match the specified identifier.
 LogConfiguration getLogConfiguration()
          Get the LogConfiguration
 EmbeddedConnectionFactoryImpl getManager()
           
 SystemObject getSystem()
          Get the system state.
protected  java.lang.String prettyPrintBindingNames(java.util.List bindings)
           
 void setLogConfiguration(LogConfiguration config)
          Set the LogConfiguration in the MetaMatrix Server
 void setProperty(java.lang.String identifier, java.lang.String className, java.lang.String propertyName, java.lang.String propertyValue)
          Set a Property for an AdminObject
 void setSystemProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Set system-wide property.
 void updateProperties(java.lang.String identifier, java.lang.String className, java.util.Properties properties)
          Set several properties for an AdminObject.
 void updateSystemProperties(java.util.Properties properties)
          Set several system-wide properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DQPConfigAdminImpl

public DQPConfigAdminImpl(EmbeddedConnectionFactoryImpl manager)
Method Detail

setSystemProperty

public void setSystemProperty(java.lang.String propertyName,
                              java.lang.String propertyValue)
                       throws AdminException
Description copied from interface: CoreConfigAdmin
Set system-wide property. This will be written to config_ns.xml

Specified by:
setSystemProperty in interface CoreConfigAdmin
Parameters:
propertyName - Name of the System Property
propertyValue - Value of the System Property
Throws:
AdminException - if there's a system error or if there's a user input error.
Since:
4.3
See Also:
CoreConfigAdmin.setSystemProperty(java.lang.String, java.lang.String)

updateSystemProperties

public void updateSystemProperties(java.util.Properties properties)
                            throws AdminException
Description copied from interface: CoreConfigAdmin
Set several system-wide properties. These will be written to config_ns.xml Any existing properties not specified will not be changed.

Specified by:
updateSystemProperties in interface CoreConfigAdmin
Parameters:
properties - Properties to set.
Throws:
AdminException - if there's a system error or if there's a user input error.
Since:
4.3
See Also:
CoreConfigAdmin.updateSystemProperties(java.util.Properties)

setProperty

public void setProperty(java.lang.String identifier,
                        java.lang.String className,
                        java.lang.String propertyName,
                        java.lang.String propertyValue)
                 throws AdminException
Description copied from interface: CoreConfigAdmin
Set a Property for an AdminObject

Specified by:
setProperty in interface CoreConfigAdmin
Parameters:
identifier - The unique identifier for for an AdminObject.
className - The class name of the sub-interface of AdminObject you are setting the property for. All of these sub-interfaces are in package com.metamatrix.admin.api.objects. You may specify either the fully-qualified or unqualified classname. For example "ConnectorBinding" or "com.metamatrix.admin.api.objects.ConnectorBinding".
propertyName - String Property key
propertyValue - String value to update
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.setProperty(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

updateProperties

public void updateProperties(java.lang.String identifier,
                             java.lang.String className,
                             java.util.Properties properties)
                      throws AdminException
Description copied from interface: CoreConfigAdmin
Set several properties for an AdminObject. Any existing properties not specified will not be changed.

Specified by:
updateProperties in interface CoreConfigAdmin
Parameters:
identifier - The unique identifier for for an AdminObject.
className - The class name of the sub-interface of AdminObject you are setting the property for. All of these sub-interfaces are in package com.metamatrix.admin.api.objects. You may specify either the fully-qualified or unqualified classname. For example "ConnectorBinding" or "com.metamatrix.admin.api.objects.ConnectorBinding".
properties - Properties to set.
Throws:
AdminException - if there's a system error or if there's a user input error.
Since:
4.3
See Also:
CoreConfigAdmin.updateProperties(java.lang.String, java.lang.String, java.util.Properties)

addConnectorType

public void addConnectorType(java.lang.String deployName,
                             char[] cdkFile)
                      throws AdminException
Description copied from interface: CoreConfigAdmin
Add Connector Type, will import Connector Type from a file

Specified by:
addConnectorType in interface CoreConfigAdmin
Parameters:
deployName - of the Connector Type to add
cdkFile - contents of File from Client
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.addConnectorType(java.lang.String, char[])

deleteConnectorType

public void deleteConnectorType(java.lang.String deployName)
                         throws AdminException
Description copied from interface: CoreConfigAdmin
Delete Connector Type from Next Configuration

Specified by:
deleteConnectorType in interface CoreConfigAdmin
Parameters:
deployName - String name of the Connector Type to delete
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.deleteConnectorType(java.lang.String)

addConnectorBinding

public ConnectorBinding addConnectorBinding(java.lang.String deployName,
                                            java.lang.String type,
                                            java.util.Properties properties,
                                            AdminOptions options)
                                     throws AdminException
Description copied from interface: CoreConfigAdmin
Deploy a ConnectorBinding to Configuration

Specified by:
addConnectorBinding in interface CoreConfigAdmin
Parameters:
deployName - is the Connector Binding name that will be added to Configuration
type - Name of the Connector Type
properties - Name & Value pair need to deploy the Connector Binding
options - The perferred options when executing this method. There are choices about what to do when a connector binding with the given identifier already exists in the system. See the interface AdminOptions.OnConflict for details.

Another option is to ignore a binding connection password decrypt error, when adding a connector binding whose password was encrypted with a different keystore, so that the new password property can be set after the connector binding has been added.

Returns:
the ConnectorBinding representing the current property values and runtime state. Note that if this is a system with multiple Processes, this method may actually create multiple deployed Connector Bindings (one for each process). This method will return one of them, arbitrarily.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.addConnectorBinding(java.lang.String, java.lang.String, java.util.Properties, AdminOptions)

addConnectorBinding

public ConnectorBinding addConnectorBinding(java.lang.String deployName,
                                            char[] xmlFile,
                                            AdminOptions options)
                                     throws AdminException
Description copied from interface: CoreConfigAdmin
Import a ConnectorBinding into the Configuration.

Specified by:
addConnectorBinding in interface CoreConfigAdmin
Parameters:
deployName - is the Connector Binding name that will be added to Configuration
xmlFile - contents of XML file that will be sent to the server.
options - The perferred options when executing this method. There are choices about what to do when a connector binding with the given identifier already exists in the system. See the interface AdminOptions.OnConflict for details.

Another option is to ignore a binding connection password decrypt error, when adding a connector binding whose password was encrypted with a different keystore, so that the new password property can be set after the connector binding has been added.

Returns:
the ConnectorBinding representing the current property values and runtime state. Note that if this is a system with multiple Processes, this method may actually create multiple deployed Connector Bindings (one for each process). This method will return one of them, arbitrarily.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.addConnectorBinding(java.lang.String, char[], AdminOptions)

deleteConnectorBinding

public void deleteConnectorBinding(java.lang.String identifier)
                            throws AdminException
Description copied from interface: CoreConfigAdmin
Delete the ConnectorBinding from the Configuration

Specified by:
deleteConnectorBinding in interface CoreConfigAdmin
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.deleteConnectorBinding(java.lang.String)

addVDB

public VDB addVDB(java.lang.String deployName,
                  byte[] vdbFile,
                  AdminOptions options)
           throws AdminException
Description copied from interface: CoreConfigAdmin
Import a VDB file.
A VDB file with internal definitions. Thise is the default VDB export configuration begining with MetaMatrix version 4.3.

Specified by:
addVDB in interface CoreConfigAdmin
Parameters:
deployName - VDB Name
vdbFile - byte array of the VDB Archive
options - The perferred options when executing this method. There are choices about what to do when a connector binding with the given identifier already exists in the system.
Returns:
the VDB representing the current property values and runtime state.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.addVDB(java.lang.String, byte[], AdminOptions)

addExtensionModule

public void addExtensionModule(java.lang.String type,
                               java.lang.String sourceName,
                               byte[] source,
                               java.lang.String description)
                        throws AdminException
Description copied from interface: CoreConfigAdmin
Adds an ExtensionModule to the end of the list of modules.
All caches (of Class objects) are cleared.

Specified by:
addExtensionModule in interface CoreConfigAdmin
Parameters:
type - one of the known types of extension file
sourceName - name (e.g. filename) of extension module
source - actual contents of module
description - (optional) description of the extension module - may be null
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.addExtensionModule(java.lang.String, java.lang.String, byte[], java.lang.String)

deleteExtensionModule

public void deleteExtensionModule(java.lang.String sourceName)
                           throws AdminException
Description copied from interface: CoreConfigAdmin
Deletes an ExtensionModule from the list of modules.
All caches (of Class objects) are cleared.

Specified by:
deleteExtensionModule in interface CoreConfigAdmin
Parameters:
sourceName - name (e.g. filename) of extension module
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.deleteExtensionModule(java.lang.String)

assignBindingToModel

public void assignBindingToModel(java.lang.String deployedConnectorBindingName,
                                 java.lang.String vdbName,
                                 java.lang.String vdbVersion,
                                 java.lang.String modelName)
                          throws AdminException
Description copied from interface: CoreConfigAdmin
Assign a ConnectorBinding to a VDB's Model

Specified by:
assignBindingToModel in interface CoreConfigAdmin
Parameters:
deployedConnectorBindingName - Name of the ConnectorBinding
vdbName - Name of the VDB
vdbVersion - Version of the VDB
modelName - Name of the Model to map Connector Binding
Throws:
AdminException - if there's a system error or if there's a user input error.
Since:
4.3
See Also:
CoreConfigAdmin.assignBindingToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

getLogConfiguration

public LogConfiguration getLogConfiguration()
                                     throws AdminException
Description copied from interface: CoreConfigAdmin
Get the LogConfiguration

Specified by:
getLogConfiguration in interface CoreConfigAdmin
Returns:
LogConfiguration object
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.getLogConfiguration()

setLogConfiguration

public void setLogConfiguration(LogConfiguration config)
                         throws AdminException
Description copied from interface: CoreConfigAdmin
Set the LogConfiguration in the MetaMatrix Server

Specified by:
setLogConfiguration in interface CoreConfigAdmin
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.setLogConfiguration(com.metamatrix.admin.api.objects.LogConfiguration)

exportExtensionModule

public byte[] exportExtensionModule(java.lang.String sourceName)
                             throws AdminException
Description copied from interface: CoreConfigAdmin
Export an ExtensionModule to byte array

Specified by:
exportExtensionModule in interface CoreConfigAdmin
Parameters:
sourceName - unique identifier for the ExtensionModule.
Returns:
byte array of the extension module
Throws:
AdminException
Since:
4.3
See Also:
CoreConfigAdmin.exportExtensionModule(java.lang.String)

exportConfiguration

public char[] exportConfiguration()
                           throws AdminException
Description copied from interface: CoreConfigAdmin
Export Configuration to character Array in XML format

Specified by:
exportConfiguration in interface CoreConfigAdmin
Returns:
character array of Configuration
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.exportConfiguration()

exportConnectorBinding

public char[] exportConnectorBinding(java.lang.String identifier)
                              throws AdminException
Description copied from interface: CoreConfigAdmin
Export a ConnectorBinding to character Array in XML format

Specified by:
exportConnectorBinding in interface CoreConfigAdmin
Parameters:
identifier - the unique identifier for a ConnectorBinding.
Returns:
character Array in XML format
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.exportConnectorBinding(java.lang.String)

exportConnectorType

public char[] exportConnectorType(java.lang.String identifier)
                           throws AdminException
Description copied from interface: CoreConfigAdmin
Export Connector Type to character array

Specified by:
exportConnectorType in interface CoreConfigAdmin
Parameters:
identifier - the unique identifier for for a ConnectorType
Returns:
character Array in XML format
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.exportConnectorType(java.lang.String)

exportVDB

public byte[] exportVDB(java.lang.String name,
                        java.lang.String version)
                 throws AdminException
Description copied from interface: CoreConfigAdmin
Export VDB to byte array

Specified by:
exportVDB in interface CoreConfigAdmin
Parameters:
name - identifier of the VDB
version - VDB version
Returns:
byte array of the MetaMatrix VDB Archive
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.exportVDB(java.lang.String, java.lang.String)

addConnectorArchive

public void addConnectorArchive(byte[] contents,
                                AdminOptions options)
                         throws AdminException
Description copied from interface: CoreConfigAdmin
Add Connector Type and all the required extension modules required by the this connector type into the system from the given file byte stream which is encoded inthe Connector Archive format.

Specified by:
addConnectorArchive in interface CoreConfigAdmin
Parameters:
contents - contents of File
options - resolution option in case of conflict in the connector type
Throws:
AdminException - if there's a system error.
Since:
4.3.2
See Also:
CoreConfigAdmin.addConnectorArchive(byte[], com.metamatrix.admin.api.objects.AdminOptions)

exportConnectorArchive

public byte[] exportConnectorArchive(java.lang.String identifier)
                              throws AdminException
Description copied from interface: CoreConfigAdmin
Export Connector Archive, which is bundled connector type with its xml properties file and all the extension modules required by the this connector type

Specified by:
exportConnectorArchive in interface CoreConfigAdmin
Parameters:
identifier - the unique identifier for for a ConnectorType
Returns:
byte array of the connector archive.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
CoreConfigAdmin.exportConnectorArchive(java.lang.String)

addUDF

public void addUDF(byte[] modelFileContents,
                   java.lang.String classpath)
            throws AdminException
Description copied from interface: CoreConfigAdmin
Add User Defined Function model to the system. If one is already deployed before this will replace the previous, otherwise add this as the new UDF model. Once the UDF is added the new UDF model is loaded.

Specified by:
addUDF in interface CoreConfigAdmin
Parameters:
modelFileContents - - UDF contents
classpath - - classpath for the UDF
Throws:
AdminException
See Also:
CoreConfigAdmin.addUDF(byte[], java.lang.String)

deleteUDF

public void deleteUDF()
               throws AdminException
Description copied from interface: CoreConfigAdmin
Delete the User Defined Function model. Note that this will not delete any supporting extension jar files added, those need to be deleted separately.

Specified by:
deleteUDF in interface CoreConfigAdmin
Throws:
AdminException
See Also:
CoreConfigAdmin.deleteUDF()

accumulateSystemException

protected AdminException accumulateSystemException(AdminException parent,
                                                   java.lang.Exception e)

accumulateProcessingException

protected AdminException accumulateProcessingException(AdminException parent,
                                                       java.lang.Exception e)

prettyPrintBindingNames

protected java.lang.String prettyPrintBindingNames(java.util.List bindings)

getManager

public EmbeddedConnectionFactoryImpl getManager()
Returns:
Returns the manager.
Since:
4.3

convertToAdminObjects

protected java.lang.Object convertToAdminObjects(java.lang.Object src)

convertToAdminObjects

protected java.lang.Object convertToAdminObjects(java.lang.Object src,
                                                 java.lang.Object parent)

getSystem

public SystemObject getSystem()
Get the system state.

Returns:

convertPropertyDefinitions

protected java.util.Collection convertPropertyDefinitions(ComponentType ctype,
                                                          java.util.Properties properties)
Convert a ComponentType and a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects

Parameters:
ctype -
properties -
Returns:
Since:
4.3

convertPropertyDefinitions

protected java.util.Collection convertPropertyDefinitions(java.util.Properties properties)
Convert a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects

Parameters:
ctype -
properties -
Returns:
Since:
4.3

getAdminObjects

protected java.util.Collection getAdminObjects(java.lang.String identifier,
                                               java.lang.String className)
                                        throws AdminException
Get admin objects of the specified className that match the specified identifier.

Parameters:
identifier -
className -
Returns:
Throws:
AdminException
Since:
4.3


Copyright © 2009. All Rights Reserved.