IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.ui
Class RecorderUi

java.lang.Object
  extended by com.ibm.rational.test.lt.recorder.ui.RecorderUi

public class RecorderUi
extends Object

Provides a central access point to the UI features of the recording framework. This class also provides static routines for common operations, label and images.


Field Summary
static String ANNOTATION_RECORDER_TOOLBAR
          Boolean option to enable the annotation tool bar.
static RecorderUi INSTANCE
          The unique instance of the singleton class RecorderUi.
 
Method Summary
static void activateRecordingView(IWorkbenchWindow window)
          Opens if necessary, and activates the Recording Control view in the specified workbench window, in the active page.
static INewRecordingSessionWizard createNewRecordingSessionWizard()
          Creates a NewRecordingSessionWizard.
static String getAnnotationTypeLabel(String annotationType)
          Returns a label for an annotation type.
static String getClientTypeLabel(String clientType)
          Returns a label for a client type.
 com.ibm.rational.test.lt.recorder.ui.internal.extensibility.RecorderUIExtensionRegistry getExtensionRegistry()
          Returns the recording framework UI extension registry.
static Image getImage(Object object)
          Returns the most descriptive image for a recording framework object.
static ImageDescriptor getImageDescriptor(Object object)
          Returns the most descriptive image descriptor for a recording framework object.
static String getLabel(Object object)
          Returns a label for a recording framework object.
static String getPacketTypeLabel(String packetType)
          Returns a label for a packet type.
static String getRecorderTypeLabel(String recorderType)
          Returns a label for a recorder type.
static String getRecordingSessionDescription(IRecordingSession session)
          Returns a short description of a recording session content.
static IRecordingSession launchSession(RecordingSessionConfiguration rsc, IWorkbenchWindow window)
          Launches a new recording session, based on the provided session configuration and displays it in the specified workbench window.
static void openEditorView(IRecordingSession session, IWorkbenchWindow window)
          Opens if necessary, and activates the Recording Session editor for the specified recording session, in the active page of the specified workbench window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATION_RECORDER_TOOLBAR

public static final String ANNOTATION_RECORDER_TOOLBAR
Boolean option to enable the annotation tool bar. Default value: true. This option must be specified in the configuration of the annotation recorder (ID: RecorderCore.ANNOTATION_RECORDER_TYPE).

See Also:
Constant Field Values

INSTANCE

public static RecorderUi INSTANCE
The unique instance of the singleton class RecorderUi.

Method Detail

getExtensionRegistry

public com.ibm.rational.test.lt.recorder.ui.internal.extensibility.RecorderUIExtensionRegistry getExtensionRegistry()
Returns the recording framework UI extension registry. This method is published for internal use only, it should not be invoked by extensions.

Returns:

launchSession

public static IRecordingSession launchSession(RecordingSessionConfiguration rsc,
                                              IWorkbenchWindow window)
Launches a new recording session, based on the provided session configuration and displays it in the specified workbench window. The current implementation may the recording view and/or the recording session editor, as specified in preferences. Any error reporting is taken in charge by this method.

Parameters:
rsc - A recording session configuration.
window - The window where the session should be displayed. This parameter may be null if the session is not to be displayed.
Returns:
The session that was created and attempted to launch, or null if the session could not be created.

activateRecordingView

public static void activateRecordingView(IWorkbenchWindow window)
                                  throws PartInitException
Opens if necessary, and activates the Recording Control view in the specified workbench window, in the active page.

Parameters:
window - A workbench window.
Throws:
PartInitException

openEditorView

public static void openEditorView(IRecordingSession session,
                                  IWorkbenchWindow window)
                           throws PartInitException
Opens if necessary, and activates the Recording Session editor for the specified recording session, in the active page of the specified workbench window.

Parameters:
session - A recording session.
window - A workbench window.
Throws:
PartInitException

getImageDescriptor

public static ImageDescriptor getImageDescriptor(Object object)
Returns the most descriptive image descriptor for a recording framework object.

Parameters:
object - An object from the recording framework. Supported types are IClient, IRecorder, IRecordingSession, IRecorderPacket and RecorderAnnotation. This list may be extended in the future.
Returns:
An image descriptor, or null if the specified object is not one of the types listed above.

getImage

public static Image getImage(Object object)
Returns the most descriptive image for a recording framework object. The returned image is cached and must not be disposed by the caller.

Parameters:
object - An object from the recording framework. Supported types are IClient, IRecorder, IRecordingSession, IRecorderPacket and RecorderAnnotation. This list may be extended in the future.
Returns:
An image, or null if the specified object is not one of the types listed above.

getLabel

public static String getLabel(Object object)
Returns a label for a recording framework object. The label is translated and can be presented in a user interface.

Parameters:
object - An object from the recording framework. Supported types are IClient, IRecorder, IRecordingSession, IRecorderPacket and RecorderAnnotation. This list may be extended in the future.
Returns:
A label, or null if the specified object is not one of the types listed above.

getClientTypeLabel

public static String getClientTypeLabel(String clientType)
Returns a label for a client type. The label is translated and can be presented in a user interface.

Parameters:
clientType - A client type. If the client type is not registered on the platform, a generic label with be returned.
Returns:

getRecorderTypeLabel

public static String getRecorderTypeLabel(String recorderType)
Returns a label for a recorder type. The label is translated and can be presented in a user interface.

Parameters:
recorderType - A recorder type. If the recorder type is not registered on the platform, a generic label with be returned.
Returns:

getPacketTypeLabel

public static String getPacketTypeLabel(String packetType)
Returns a label for a packet type. The label is translated and can be presented in a user interface.

Parameters:
packetType - A packet type. If the packet type is not registered on the platform, a generic label with be returned.
Returns:

getAnnotationTypeLabel

public static String getAnnotationTypeLabel(String annotationType)
Returns a label for an annotation type. The label is translated and can be presented in a user interface.

Parameters:
annotationType - An annotation type. If the annotation type is not registered on the platform, a generic label with be returned.
Returns:

createNewRecordingSessionWizard

public static INewRecordingSessionWizard createNewRecordingSessionWizard()
Creates a NewRecordingSessionWizard. The returned wizard can be used as-is in a wizard dialog, or used as sub-wizard of another wizard.

Returns:

getRecordingSessionDescription

public static String getRecordingSessionDescription(IRecordingSession session)
Returns a short description of a recording session content.

Returns:

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.