IBM DB2 UDB
Plugin Interface
for Extending the Control Center

com.ibm.db2.tools.cc.navigator
Interface CCTableObject

All Superinterfaces:
CCObject
All Known Subinterfaces:
CCTreeObject

public interface CCTableObject
extends CCObject

The CCTableObject interface allows users to override the behavior of a Control Center object or to define a new plugin object type which can be added to the Control Center tree by returning it as a child of a CCTreeObject in getChildren.

This interface allows users to define the contents of a row in the Control Center details view.

A new object will appear in the tree view and details view of the Control Center, if it is a child (see getChildren) of a plugin object or Control Center object which is not a tree leaf object (see isLeaf).

A new object will appear only in the details view of the Control Center, if it is a child (see getChildren) of a new plugin object which is a tree leaf object (see isLeaf).

Note: Adding a new plugin object as a child of an existing Control Center object which is a tree leaf object is not supported. Also adding a new plugin object as a child of an existing Control Center object which is not in the tree is not supported. For example, you can not add a new plugin object under UDB_TABLE objects because UDB_TABLE objects only appear in the details view and not in the Control Center tree.

See Also:
CCTreeObject

Field Summary
 
Fields inherited from interface com.ibm.db2.tools.cc.navigator.CCObject
DCS_GATEWAY_CONNECTION, DCS_GATEWAY_CONNECTIONS_FOLDER, NUM_OBJECT_TYPES, S390_ALIAS, S390_ALIASES_FOLDER, S390_APPLICATION_OBJECTS_FOLDER, S390_BUFFERPOOL, S390_BUFFERPOOLS_FOLDER, S390_CATALOG_TABLE, S390_CATALOG_TABLES_FOLDER, S390_COLLECTION, S390_COLLECTIONS_FOLDER, S390_DATABASE, S390_DATABASES_FOLDER, S390_DATASET, S390_DATASET_TEMPLATE, S390_DATASET_TEMPLATES_FOLDER, S390_DATASETS_FOLDER, S390_DB_USER, S390_DB_USERS_FOLDER, S390_DISTINCT_TYPE, S390_DISTINCT_TYPES_FOLDER, S390_INDEX, S390_INDEXS_FOLDER, S390_LOCATION, S390_LOCATIONS_FOLDER, S390_PACKAGE, S390_PACKAGES_FOLDER, S390_PLAN, S390_PLANS_FOLDER, S390_PROCEDURE, S390_PROCEDURES_FOLDER, S390_SCHEMA, S390_SCHEMAS_FOLDER, S390_STORAGE_GROUP, S390_STORAGE_GROUPS_FOLDER, S390_SUBSYSTEM, S390_SUBSYSTEMS_FOLDER, S390_SYNONYM, S390_SYNONYMS_FOLDER, S390_TABLE, S390_TABLES_FOLDER, S390_TABLESPACE, S390_TABLESPACES_FOLDER, S390_TRIGGER, S390_TRIGGERS_FOLDER, S390_USER_DEFINED_FUNCTION, S390_USER_DEFINED_FUNCTIONS_FOLDER, S390_UTILITY_LIST, S390_UTILITY_LISTS_FOLDER, S390_UTILITY_OBJECTS_FOLDER, S390_UTILITY_PROCEDURE, S390_UTILITY_PROCEDURES_FOLDER, S390_VIEW, S390_VIEWS_FOLDER, UDB_ALIAS, UDB_ALIASES_FOLDER, UDB_APPLICATION_OBJECTS_FOLDER, UDB_BUFFERPOOL, UDB_BUFFERPOOLS_FOLDER, UDB_CACHE_OBJECTS_FOLDER, UDB_CACHE_TABLE, UDB_CACHE_TABLES_FOLDER, UDB_CONNECTION, UDB_CONNECTIONS_FOLDER, UDB_CTEINDEX, UDB_CTEINDEXES_FOLDER, UDB_DATABASE, UDB_DATABASES_FOLDER, UDB_DB_GROUP, UDB_DB_GROUPS_FOLDER, UDB_DB_USER, UDB_DB_USERS_FOLDER, UDB_DRDA_TABLE, UDB_DRDA_TABLES_FOLDER, UDB_EVENT_MONITOR, UDB_EVENT_MONITORS_FOLDER, UDB_FEDERATED_DATABASE_OBJECT, UDB_FEDERATED_DATABASE_OBJECTS_FOLDER, UDB_FEDERATED_NICKNAME, UDB_FEDERATED_NICKNAMES_FOLDER, UDB_FEDERATED_REMOTE_TABLE, UDB_FEDERATED_REMOTE_TABLES_FOLDER, UDB_FEDERATED_SERVER, UDB_FEDERATED_SERVERS_FOLDER, UDB_FEDERATED_STORED_PROCEDURE, UDB_FEDERATED_STORED_PROCEDURES_FOLDER, UDB_FEDERATED_USER_MAPPING, UDB_FEDERATED_USER_MAPPINGS_FOLDER, UDB_FEDERATED_VIEWS_FOLDER, UDB_INDEX, UDB_INDEXES_FOLDER, UDB_INSTANCE, UDB_INSTANCES_FOLDER, UDB_MQT, UDB_MQTS_FOLDER, UDB_NODEGROUP, UDB_NODEGROUPS_FOLDER, UDB_PACKAGE, UDB_PACKAGES_FOLDER, UDB_REPLICATION_SOURCE, UDB_REPLICATION_SOURCES_FOLDER, UDB_REPLICATION_SUBSCRIPTION, UDB_REPLICATION_SUBSCRIPTIONS_FOLDER, UDB_SCHEMA, UDB_SCHEMAS_FOLDER, UDB_STORE_PROCEDURE, UDB_STORE_PROCEDURES_FOLDER, UDB_SYSTEM, UDB_SYSTEMS_FOLDER, UDB_TABLE, UDB_TABLES_FOLDER, UDB_TABLESPACE, UDB_TABLESPACES_FOLDER, UDB_TRIGGER, UDB_TRIGGERS_FOLDER, UDB_USER_AND_GROUP_OBJECTS_FOLDER, UDB_USER_DEFINED_DISTINCT_DATATYPE, UDB_USER_DEFINED_DISTINCT_DATATYPES_FOLDER, UDB_USER_DEFINED_DISTINCT_FUNCTION, UDB_USER_DEFINED_DISTINCT_FUNCTIONS_FOLDER, UDB_USER_DEFINED_METHOD, UDB_USER_DEFINED_METHODS_FOLDER, UDB_USER_DEFINED_STRUCTURED_DATATYPE, UDB_USER_DEFINED_STRUCTURED_DATATYPES_FOLDER, UDB_VIEW, UDB_VIEWS_FOLDER, UDB_XMLREPOSITORY_FOLDER, UDB_XSROBJECT
 
Method Summary
 CCColumn[] getColumns()
          Return an array of CCColumns representing the names and classes of the columns shown in the details view for this object.
 void getData(java.lang.Object[] data)
          Given an array of Objects corresponding to the columns shown in details view of the Control Center, this method assigns a value to each element of the array.
 javax.swing.Icon getIcon(int iconState)
          Returns the Icon that is displayed to the left of the name of this CCObject in the tree and in the details view.
 void setParentName(java.lang.String name)
          This is called by the Control Center to provide the full name of the parent of this CCTableObject.
 
Methods inherited from interface com.ibm.db2.tools.cc.navigator.CCObject
getMenuActions, getName, getType, isConfigurable, isEditable
 

Method Detail

getData

public void getData(java.lang.Object[] data)
Given an array of Objects corresponding to the columns shown in details view of the Control Center, this method assigns a value to each element of the array.

An instance of a CCTableObject object contains information about itself. This information can be shown in a row of the details view. The elements of the array are set by getData and represent the columns of a row in the details view.

The class of each column's data must match the class returned by getColumnClass for the corresponding column.

In the Control Center details view, the first column is always called Name and contains both the object name and icon. To create a column like this, getData should return a column whose value is the plugin object itself. The CCColumn object for this column should return CCTableObject.class from getColumnClass. When the Control Center recieves a CCTableObject subclass in the data array, it knows that it can call getIcon and getName for that column.

The following example sets the data array for two columns:

  public class Example3Child implements CCTableObject {
  ...
    public void getData(Object[] data) {
       data[0] = this;
       data[1] = state;
     }
  ...
  }

Parameters:
data - The array of objects to which values are assigned

getColumns

public CCColumn[] getColumns()
Return an array of CCColumns representing the names and classes of the columns shown in the details view for this object. The name is used to determine what is shown in the column headings and the class is used to know how to format the data for that column.

Returns:
an array of columns shown in the details view for this object

getIcon

public javax.swing.Icon getIcon(int iconState)
Returns the Icon that is displayed to the left of the name of this CCObject in the tree and in the details view. Because folders can have two possible states, open or closed, the Control Center passes in this state when it asks for the icon. This state may be set to CLOSED_FOLDER or OPEN_FOLDER. This state should be ignored by CCObjects that are not folders.

Parameters:
iconState - A state that represents either the opened or closed state for a folder
Returns:
the icon for this CCObject

setParentName

public void setParentName(java.lang.String name)
This is called by the Control Center to provide the full name of the parent of this CCTableObject. This method is called after the CCTableObject is constructed when one of the following events occur:

Parameters:
name - full name of parent

Parent name syntax: xxxxx - yyyyy - ...

where xxxxx - yyyyy - ... is the fully qualified name of the parents of this object. This represents a series of names of all the parent objects of this object in the Control Center tree. Each name is separated by the " - " characters. There are as many names as there are parents for this object.

For example, a CCTableObject which is the child of a particular UDB_DATABASE, may have a parent name of MYSYSTEM - DB2 - MYDB. This represents the names of the parents in the tree which are a particular DB2 System, Instance and Database.


IBM DB2 UDB
Plugin Interface
for Extending the Control Center

(C)Copyright IBM Corp. 2002, 2004. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.