Skip Headers

Oracle9i Warehouse Builder User's Guide
Release 2 (v9.0.2)

Part Number A95949-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

E
Batch Services API

The Warehouse Builder Batch Services interface is called WBBatchInvokeAPI.java. All third parties should use this Batch Service API to integrate with and invoke essential services that are provided by Warehouse Builder. The services supported through Batch Services are metadata import, validation, generation, and deployment.

WBBatchInvokeAPI can be accessed by importing in a Java class by using the following:

  1. oracle/wh/service/sdk/batchservice/WBBatchInvokeAPI.java

  2. oracle/wh/service/impl/batchservice/WBBatchInvoke.java

The Batch Service interface provides the following types of methods to enable third party developers to access Oracle9i Warehouse Builder through batch interaction:

Repository

Repository methods include:

Open Repository Connection

To establish a connection with the metadata repository, use the following method. You must enter five parameters: username, password, host name, port number, and SID. This method will cause a WBConnectionFailureException and WBException if the method fails to establish a connection with the repository.

public void openConnection(
String username, String password,  
String host, String port, String sid)
throws WBConnectionFailureException, WBException;

Close Repository Connection

The following methods are available for closing repository connections:

Projects

The following methods are available for manipulating projects:

Modules

The following methods are available for manipulating modules:

Validation

An element such as a dimension or a table must be validated. This can be done using the validate method. Provide an application name, the element name, and type of the element. The typename can be any of the following: TABLE, VIEW, MATERIALIZEDVIEW, DIMENSION, FACT, SEQUENCE, MAPPING.

				public boolean validate(
String appName, String elementname, String typename)
throws WBException;

After the validation has been performed, you can get the validation results in an array of strings.

				public String[] getValidationResults(
String appName, String element, String typeName)
throws WBException;

Display the validation results in the console by using the following method:

				public void displayValidationResults(
String appName, String element, String type) 
throws WBException;

Generation

To generate an element, use the following generate method. The typename can be any of the following: TABLE, VIEW, MATERIALIZEDVIEW, DIMENSION, FACT, SEQUENCE, MAPPING.

				public void generate(
String appName, String elementname, String typename) 
throws WBException;

Deployment

The following methods allow you to deploy your previously generated scripts to either a file system or database. The typename can be any of the following: TABLE, VIEW, MATERIALIZEDVIEW, DIMENSION, FACT, SEQUENCE, MAPPING.

Deployment into a File System

				public void deployInFileSystem(
String appName, String elementname, String typeName,
String deployDir)
throws WBException;

Deployment in a Database

				public void deployInDatabase(
String appName, String elementname, String typename,
String user, String passwd, 
String host, String port, String sid)
throws WBException, Exception;

Deployment Results can extracted by using the following:

				public String[] getDeploymentResults() throws WBException;


Note:

Batch Services does not generate objects when you run the deployment methods. You must generate the scripts first by using the generation method.


Metadata Import

The following method allows importing of MDL exported data as an input stream. The log file parameter must include the full path name. The Mode denotes the mode of importing (Create, Update). The usePhyiscalName parameter ensures that the user uses a physical name while importing.

				public void importMetaData(
InputStream importFileStream,  String logFile,  
String mode, boolean usePhysicalNames) 
			throws WBException, IOException;

The following method allows the import of Metadata using an MDL exported file without using the character set. The default character set is used.

				public void importMetaData(
String m_import_file, String m_log_file,
String m_mode, boolean m_usePhysicalNames) 
throws WBException;

The following method allows the import of metadata using an MDL exported file. A valid character set string would look like WE8MSWIN1252.

				public void importMetaData(
	String m_import_file, String m_log_file,
String m_mode, boolean m_usePhysicalNames, 
String characterSet)
throws WBException;

Metadata Export

The following method exports metadata using mandatory parameters.

public boolean exportMetaData(
        String projectName,
        String appName, 
        String elementName, 
        String typeName,
        String exportFileName,
        String logFileName,
        String characterSet,
        String fieldSeparator
        ) throws WBException, Exception

The following method exports metadata using mandatory parameters. It also allows the user to specify the use of the physicalName. The physicalName argument can be true or false. The default value is true.

public boolean exportMetaData(
        String projectName,
        String appName, 
        String elementName, 
        String typeName,
        String exportFileName,
        String logFileName,
        String characterSet,
        String fieldSeparator,
        String physicalName
        ) throws WBException, Exception
 

The following method exports metadata using mandatory parameters and optional parameters.

public boolean exportMetaData(
        String projectName,
        String appName,
        String elementName, 
        String typeName,
        String exportFileName,
        String logFileName,
        String characterSet,
        String fieldSeparator,
        String physicalName,
        String configParameter
        ) throws WBException, Exception


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index