Sun WBEM SDK Developer's Guide

Reference: CIM WorkShop Window and Dialogs

The following section provides descriptions of the frames, toolbar icons, and fields that comprise the CIM WorkShop window. It also describes CIM WorkShop dialogs.

The CIM WorkShop Window

The CIM WorkShop window is divided into two main frames. In the left frame, you can view the class inheritance tree of the current host. In the right frame, you can view the properties and methods of a selected class.

Figure 2–2 The CIM WorkShop Window

Graphic

Table 2–1 Frames of the CIM WorkShop Window

Frame 

Description 

Left frame 

Displays classes and instances contained in the namespace of the current host. The left frame in the CIM WorkShop shows the contents of the selected namespace. The classes that belong to the namespace are displayed hierarchically. This organization of classes is known as a class inheritance tree. Classes that contain subclasses are represented as a key icon and a folder. Clicking the key or double-clicking the folder causes the list of subclasses to display. Classes that do not contain subclasses are represented by page icons.  

Right frame 

Provides a Properties tab and a Methods tab from which you can view the values of properties and methods of a class. You can view attributes and values of qualifiers and flavors by right-clicking on a property or method. 

Toolbar 

Provides icons that enable you to change hosts, change location to a namespace within the default namespace root\cimv2, find a class in the class inheritance tree, create a subclass, and show instances and qualifiers of a selected class and refresh selected class.

Title bar 

Posts the title of the CIM WorkShop window 

CIM WorkShop Toolbar Icons

The icons provided in the CIM WorkShop toolbar enable you to display and change namespaces and search for classes and instances.

Figure 2–3 The CIM WorkShop Toolbar

Graphic

Table 2–2 Icons of the CIM WorkShop Toolbar

Icon 

Description 

Change Hosts 

Enables you to connect to a different host or name space and to log in with a different user name and password, and set the transfer protocol. 

Change Namespace 

Causes the Change Namespace dialog box to display in which you can select another name space to view. 

Find Class 

Enables you to search for a specific class in the name space. 

Add New Class 

Causes the New Class dialog box to display in which you can create a new subclass of a selected class. 

Show Instances 

Causes the Show Instances dialog box to display in which you can view instances of a selected class. 

Show Qualifiers 

Causes the Qualifiers dialog box to display in which you can view the qualifiers of a selected class. 

Refresh Selected Class 

Resets the display of the class hierarchy tree. Open class folders are closed and the tree is returned to the state it was in when it was first displayed. 

The Properties Tab

The Properties tab shows information about a selected property. An icon resembling a folder with an arrow indicates that the property is inherited from a superclass. An icon resembling a gold key indicates that the property is a Key. Key properties provide unique identifiers for an instance of the domain class. The unique instance is indicated by a key qualifier.

In the Properties tab, the Name, Type, and Value of the property are displayed. You can change the value of a property when you create a new class of the domain class.

The Methods Tab

A method is a function that describes the behavior of a class. Examples of methods are behaviors such as start service, stop service, format disk, and so on. By selecting the Methods tab, you can view all methods of the class. Methods are listed consecutively.

Methods have two parts, a signature and a body. The signature consists of the method name, the parameters names, types, and their order, and the method return type. The method body consists of a sequence of instructions.

Reading from left to right horizontally, the method contains three parts:

In the following example, the method SetDateTime takes the input parameter Time, which is of type datetime and returns a boolean.

boolean SetDateTime([IN(true)] datetime Time);

CIM WorkShop Menus

The following table describes the CIM WorkShop menus and menu items.

Table 2–3 CIM WorkShop Menus and Menu Items

Menu 

Menu Item 

Description 

Workshop 

Change Host 

Causes the Login Dialog box to display, in which you can change the host and namespace. 

Change Namespace 

Causes the Change Namespace dialog box to display, in which you can change to a location other than the default namespace in the root\cimv2 namespace.

Exit 

Enables you to exit CIM Workshop. 

Action 

Add Class 

Causes the New Class dialog box to display in which you can create a subclass for a selected class. 

Delete Class 

Deletes a selected class. 

Find Class 

Enables you to specify a class to find in the class inheritance tree. 

Instances 

Causes the Instances dialog box to display for the selected class. In this dialog box, you can view all instances of the class, add new instances, and delete instances. 

Qualifiers 

Causes the Qualifiers dialog box to display. In this dialog box, you can view qualifier values, scope, and flavor of a selected class. You can select either deep or shallow enumeration of instances. 

Association Traversal 

Causes the Association Traversal dialog box to display, in which you can view and traverse the associations of a class. 

Refresh 

Causes the latest changes to be retrieved from the CIM Object Manager and displayed in CIM WorkShop for a selected class or namespace. 

Login Dialog Box

The login dialog box is displayed when you first encounter CIM WorkShop. In the login dialog box, you specify the following:

If you do not specify a user name and password, you log in to CIM WorkShop as a guest. Guest privileges are read-only.

By default, CIM WorkShop uses the RMI protocol to connect to the CIM Object Manager on the local host, in the default namespace, root\cimv2. You can select HTTP if you want to communicate to a CIM Object Manager using the standard XML/HTTP protocol from the Desktop Management Task Force. When a connection is established, all classes contained in the default namespace are displayed in the left side of the CIM WorkShop window.

New Class Dialog Box

In the New Class dialog box, you can create a new class.

Figure 2–4 The New Class Dialog Box

Graphic

Add Property Dialog Box

In the Add Property dialog box, you can add new properties to a class as you create it. In the Name field, you specify the name of the property. In the type field, select a type and click OK.

Qualifiers Dialog Box

In the Qualifiers dialog box, you can view qualifiers for a selected class, property, or method. When you create a new class, you can add qualifiers to the class or modify qualifiers of the class, its properties, or its methods in the Qualifiers dialog box. The title bar of the Qualifiers dialog box indicates the name of the class for which you view qualifiers or the class for which you add or modify qualifiers.

The following table describes the fields of the Qualifiers dialog box.

Table 2–4 Qualifiers Dialog Box Fields

Name of Field 

Description 

Example 

Name 

Shows the name of the qualifier 

Provider 

Type 

Shows the type of value that the qualifier provides 

string

Value 

Shows the value of the qualifier 

Solaris

The following table describes the buttons of the Qualifiers dialog box.

Table 2–5 Qualifiers Dialog Box Buttons

Name of Button 

Description 

Scope 

Causes the Scope dialog box to display, in which you can view the scope of a selected qualifier 

Flavors 

Causes the Flavors dialog box to display, in which you can view the flavor of a selected qualifier 

Add Qualifier 

Causes the Add Qualifier dialog box to display, in which you can select a qualifier to add for a new subclass, property, or method 

Delete Qualifier 

Causes a selected qualifier to be deleted from the Qualifiers dialog box 

Scope Dialog Box

In the Scope dialog box, you can view the scope of a qualifier that modifies an existing class, property, or method.

Flavors Dialog Box

In the Flavors dialog box, you can view the flavor of a qualifier.

Value Type Dialog Boxes

When you create new properties for a class or set input parameters for a method, you can use any of the dialog boxes that CIM WorkShop provides for specifying values of a particular type. These dialog boxes are configured to accept only a value of the appropriate type. The dialog boxes include the following:

Real Integer Dialog Box

The Values field of this dialog box accepts only a real integer. A real integer can be a negative or positive number including a decimal point. When you create a property that is of the type Real Integer, type a real integer in the Values field of this dialog box.

Signed Integer Dialog Box

The Values field of this dialog box accepts only a signed integer of a specified size. A signed integer can be a negative or positive whole number. CIM properties that have values which are signed integers can be 8 bits, 16 bits, 32 bits, or 64 bits in size. Depending on the size of the signed integer that makes up the value of the property, type the following in the Values field of this dialog box:

Unsigned Integer Dialog Box

The Values field of this dialog box accepts only an unsigned integer of a specified size. An unsigned integer can be only a positive whole number. CIM properties that have values which are unsigned integers can be 8 bits, 16 bits, 32 bits, or 64 bits in size. Depending on the size of the unsigned integer that makes up the value of the property, type the following in the Values field of this dialog box:

String Dialog Box

The Values field of this dialog box accepts alphanumeric characters. When you specify the value of a property that is a character string, you must enter a character string, such as Processor_Type, in the Values field of this dialog box. Character strings may not contain integers.

Array Dialog Boxes

In the Array dialog boxes, you can specify an array as a value for a property. The following array dialog boxes are available to return arrays:

Boolean Dialog Box

In the Boolean dialog box, you can specify True or False as the value of a selected property.

Date/Time Dialog Box

The DateTime dialog box enables you to set the date and time value as specified in the CIM Specification for a new property or method. The DateTime dialog box is displayed from:

A Set Value dialog box is displayed. Click Add in the Set Value dialog box to display the Date/Time dialog box.

In the fields of the DateTime dialog box, type the date and time value in the following manner:

For example, Monday June 7, 1999 at 1:30:15 PM EST would be represented as: 19990607133015.000000-300

Instance Window

The Instance window lists all instances for a selected class. You can also view the properties, methods, and qualifiers associated with each instance.

You display the Instance window by:

Frames of the Instances Window

If the selected class has instances, the instances are listed in the left frame of the Instances window. Each instance is displayed with its Name, CreationClassName, and TargetOperatingSystem. If the selected class does not have instances, a message is displayed.

Like the CIM WorkShop window, the right frame of the Instances window contains two tabs: Properties tab and Methods tab. All properties of the selected instance are displayed in the table of the Properties tab. The Inherited Properties icon—which appears in the left column of the Properties table as a purple rectangle with an arrow pointing to a white rectangle—indicates that the property is inherited from the class used to create the instance. The Key Qualifiers icon—which appears as a gold key—indicates that a property has an inherited Key qualifier.

Instances Window Toolbar Icons

The Instances window contains the following icons in the toolbar:

Table 2–6 Instance Window Toolbar Icons

Icon Name 

Description 

Add New Instance 

Causes the Add Instance dialog box to display in which you can create a new instance to add to the class inheritance tree 

Delete Selected Instance 

Enables you to delete a selected instance 

Save Current Instance Property Values 

Updates the property values of the current instance. 

Refresh Instance List 

Updates the list of instances in the left side of the Instances window with the newest instances and the latest changes to instances 

Menus of the Instances Window

The instances window contains the following menus and menu items:

Table 2–7 Menus of the Instances Window

Menu Name 

Menu Item 

Description 

Instance Editor 

Exit 

Causes the Instances window to close 

Action 

Add Instance 

Causes the Add Instances dialog box to display, in which you can create new instances to add to the class inheritance tree 

 

Delete Instance 

Enables you to delete a selected instance 

 

Association Traversal 

Displays the Reference Traversal dialog box, in which you can view and traverse all the associations of a class. 

 

Refresh 

Causes the latest changes to be retrieved from the CIM Object Manager and displayed in CIM WorkShop for a selected class or namespace. 

Help 

 

Displays CIM WorkShop Copyright information. 

Add Instance Dialog Box

In the Add Instance dialog box, if a property can be changed, you can click in the value field to open a Reference Edit dialog box. In the Reference Edit dialog box, click the value field to open a value dialog box. You cannot change the values of inherited properties.

Invoke Methods Dialog Box

The Invoke Methods dialog box is displayed from the Methods tab of an instance of a class that contains methods. Right-click the method and select Invoke Method from the menu. In the Invoke Methods dialog box, you can set the input values for the variables, or parameters, of a method and invoke the method. An example of a parameter value is a signed integer or a Date/Time value.

The Invoke Methods dialog box supports three types of parameters:

The Parameter Type column of the Invoke Methods dialog box indicates whether the parameter of the method is input, output, or input/output. The value of an input parameter is displayed in the Input Value column. The value of an output parameter is displayed in the Output Value column.

For information about how to invoke a method, see Invoking Methods.