< Previous | Next >

Interfaces to import

To access Rational® ClearQuest® through the Rational ClearQuest CM API, you must import the common interfaces and the ones that are specific to the product.

About this task

Once you have added the installed Rational ClearQuest CM API files to your class path, you can begin programming with API. Like any Java™ programming, you need to import all interfaces containing methods that you are using in your code. Because the Rational ClearQuest interfaces are all in the same package, you can use a wildcard to include them:
import com.ibm.rational.wvcm.stp.cq.*
You need the classes from the Workspace Versioning and Configuration Management (WVCM) package that implement the basic mechanisms of the API. The remaining interfaces in the WVCM package deal specifically with source configuration management resources and are not used when working exclusively with Rational ClearQuest.
// WVCM classes to import for Rational
ClearQuest applications
import javax.wvcm.Feedback;
import javax.wvcm.PropertyNameList;
import javax.wvcm.ProviderFactory;
import javax.wvcm.ResourceList;
import javax.wvcm.PropertyRequestItem.NestedPropertyName;
import javax.wvcm.PropertyRequestItem.PropertyRequest;
import javax.wvcm.PropertyNameList.PropertyName;
import javax.wvcm.ProviderFactory.Callback;
import javax.wvcm.ProviderFactory.Callback.Authentication;
import javax.wvcm.WvcmException;
You also use many of the interfaces in the Software Team Package (STP) that specify the extensions to WVCM used by the Rational ClearQuest CM API.
// Common Rational
ClearQuest CM API classes to import for Rational
ClearQuest
import com.ibm.rational.wvcm.stp.StpException;
import com.ibm.rational.wvcm.stp.StpProperty;
import com.ibm.rational.wvcm.stp.StpResource;
import com.ibm.rational.wvcm.stp.StpProperty.MetaPropertyName;
import com.ibm.rational.wvcm.stp.StpLocation;
Finally, because the sample applications use the Swing GUI, you also must include a number of the Swing, AWT, and Java utility classes.
// other utility classes to import for this tutorial
import java.lang.reflect.InvocationTargetException;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Arrays;
import java.util.Comparator;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableModel;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;

Results

All of the required interfaces to complete this tutorial are now included in your code.

Lesson checkpoint

Now that you have completed the set up and know what interfaces are required to complete this programming tutorial, you can begin learning the Rational ClearQuest CM API programming model and how to use it to perform Rational ClearQuest operations.
In this lesson, you learned the following:
  • The final prerequisite to programming with Rational ClearQuest CM API
  • What common WVCM and Rational ClearQuest CM API interfaces you need to include in your code
  • How to import all Rational ClearQuest CM API interfaces for Rational ClearQuest
< Previous | Next >