commonj.connector.metadata
Interface MetadataService

All Known Subinterfaces:
MetadataBuild, MetadataDiscovery

public interface MetadataService

Common super interface for MetadataBuild and MetadataDiscovery top-level interfaces for building and discovering services.

Since:
1.1

Method Summary
 AdapterType getAdapterType(String adapterTypeID)
          Return the AdapterType matching adapter type ID passed as argument.
 AdapterTypeSummary[] getAdapterTypeSummaries()
          List the types of adapters this Metadata service has access to.
 MetadataConfigurationType[] getConfiguration()
          Returns an array of MetadataConfigurationType values representing configuration properties that are currently set on the metadata service.
 MetadataConfigurationType[] getSupportedConfiguration()
          Returns an array of MetadataConfigurationType values representing configuration properties that the metadata service supports.
 void setConfiguration(MetadataConfigurationType[] capabilities)
          Configures the metadata service with the supported configuration properties that were returned from getSupportedConfiguration().
 void setToolContext(ToolContext context)
          Sets the tool context to be used by the EMD service provider when performing operations before a MetadataConnection is obtained.
 

Method Detail

getAdapterType

AdapterType getAdapterType(String adapterTypeID)
                           throws MetadataException
Return the AdapterType matching adapter type ID passed as argument. Tools will use this method to retrieve an AdapterType from a selected AdapterTypeSummary.

Parameters:
adapterTypeID - - the String identifier for the desired AdapterType. This is usually obtained from the AdapterTypeSummary.getId() method.
Returns:
The requested non null AdapterType.
Throws:
MetadataException - is thrown if any error occurs during execution. This includes conditions where the ID passed in doesn't match any available AdapterTypes.
Since:
1.0

getAdapterTypeSummaries

AdapterTypeSummary[] getAdapterTypeSummaries()
                                             throws MetadataException
List the types of adapters this Metadata service has access to. This will generally be a single adapter. However, multiple adapters might be returned when the metadata discovery service provider is actually an adapter to an external engine that hosts multiple adapters. In this case, the IDs returned represent the adapters deployed in the external adapter engine.

Returns:
A non null, non-empty array of AdapterTypeSummary objects.
Throws:
MetadataException - is thrown if any error occurs during execution.
Since:
1.0

getConfiguration

MetadataConfigurationType[] getConfiguration()
Returns an array of MetadataConfigurationType values representing configuration properties that are currently set on the metadata service.

Returns:
MetadataConfigurationType[] - array representing configuration properties that has been set or null if no configuration has been set.

getSupportedConfiguration

MetadataConfigurationType[] getSupportedConfiguration()
Returns an array of MetadataConfigurationType values representing configuration properties that the metadata service supports. The configuration properties are supplied by the metadata service provider. If a metadata service does not support configuration, then null is returned.

Returns:
MetadataConfigurationType[] - array representing configuration properties that are supported or null if no configuration is supported.

setConfiguration

void setConfiguration(MetadataConfigurationType[] capabilities)
                      throws MetadataException
Configures the metadata service with the supported configuration properties that were returned from getSupportedConfiguration(). The argument can be a subset of the array list returned from the method.

Parameters:
capabilities - - a MetadataConfigurationType array representing configuration properties
Throws:
MetadataException - - thrown if any error occurs in the configuration

setToolContext

void setToolContext(ToolContext context)
Sets the tool context to be used by the EMD service provider when performing operations before a MetadataConnection is obtained. The context is used by the provider to report progress and to log and trace execution for any of the operations provided in its metadata import service implementations.

This context should be used when executing methods such as getAdapterTypeSummaries(),getAdapterType(String), and OutboundConnectionType.openMetadataConnection(commonj.connector.metadata.discovery.connection.OutboundConnectionConfiguration). This is becuase there is no MetadataConnection in use during the execution of these methods, hence there is no available tool context. When an EMD provider creates a new MetadataConnection using the OutboundConnectionType.openMetadataConnection(commonj.connector.metadata.discovery.connection.OutboundConnectionConfiguration), it must use this context as the default ToolContext for the created MetadataConnection. Tool environments should then update the MetadataConnection's ToolContext according to their needs.

EMD service providers are responsible for always using the current context. This must be done by always checking the last context, that was set using this method, before attempting to update any progress to the context.

Parameters:
context - A non null reference that allows services offered by the tool environment to be used by the discovery service during the execution of this method. See ToolContext for more details on the use of this context.
Since:
1.0
See Also:
ToolContext