Project: stp

com.ibm.rational.stp.client.samples
Class ViewRecord

Object
  extended by com.ibm.rational.stp.client.samples.ViewRecord

public class ViewRecord
extends Object

View the current state of a record


Nested Class Summary
(package private) static class ViewRecord.RecordFrame
          An extension of JFrame for the record field display, exposing to clients the JTable component of the frame and the field list that is being displayed in the table.
(package private) static class ViewRecord.Viewer
          An instance of ExecuteQuery.Viewer that allows (read-only) viewing of a Record resource.
 
Field Summary
(package private) static javax.wvcm.PropertyRequestItem.PropertyRequest ATTACHMENT_PROPERTIES
          The attachment properties to be displayed in the attachment selection list generated by selectAttachment(java.awt.Component, com.ibm.rational.wvcm.stp.StpProperty.List>, int, java.lang.String).
(package private) static javax.wvcm.PropertyRequestItem.NestedPropertyName[] fieldMetaProperties
          The field meta-properties to be requested and displayed
private static int g_windowX
          X offset for the next window to be displayed
private static int g_windowY
          Y offset for the next window to be displayed
(package private) static javax.wvcm.PropertyRequestItem.PropertyRequest RECORD_PROPERTIES
          The PropertyRequest to use when reading data from a record to be displayed by this viewer.
(package private) static javax.wvcm.PropertyRequestItem.PropertyRequest VALUE_PROPERTIES
          Properties to be requested from each record field valie, including specific additional information for attachments
 
Constructor Summary
ViewRecord()
           
 
Method Summary
(package private) static CqRecord getRecordReferencedAt(com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields, int row)
          Examines the property value of a field and, if it references a record, returns a proxy for the referenced record.
(package private) static boolean isAttachmentList(com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields, int row)
          Whether or not the indicated field is an attachment field.
static void main(String[] args)
          The main program for the ViewRecord example.
(package private) static CqAttachment selectAttachment(java.awt.Component frame, com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields, int row, String op)
          Presents to the user a list of the attachments associated with a specified field of a record and allows the user to select one.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_PROPERTIES

static final javax.wvcm.PropertyRequestItem.PropertyRequest VALUE_PROPERTIES
Properties to be requested from each record field valie, including specific additional information for attachments


fieldMetaProperties

static final javax.wvcm.PropertyRequestItem.NestedPropertyName[] fieldMetaProperties
The field meta-properties to be requested and displayed


RECORD_PROPERTIES

static final javax.wvcm.PropertyRequestItem.PropertyRequest RECORD_PROPERTIES
The PropertyRequest to use when reading data from a record to be displayed by this viewer. Note the level of indirection used to request the meta-properties of the fields in the ALL_FIELD_VALUES list rather than those meta-properties of the ALL_FIELD_VALUES property itself.


ATTACHMENT_PROPERTIES

static final javax.wvcm.PropertyRequestItem.PropertyRequest ATTACHMENT_PROPERTIES
The attachment properties to be displayed in the attachment selection list generated by selectAttachment(java.awt.Component, com.ibm.rational.wvcm.stp.StpProperty.List>, int, java.lang.String).


g_windowX

private static int g_windowX
X offset for the next window to be displayed


g_windowY

private static int g_windowY
Y offset for the next window to be displayed

Constructor Detail

ViewRecord

public ViewRecord()
Method Detail

getRecordReferencedAt

static CqRecord getRecordReferencedAt(com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields,
                                      int row)
Examines the property value of a field and, if it references a record, returns a proxy for the referenced record. Otherwise it returns null.

Parameters:
fields - The Property.List to examine.
row - The index of the element in the list to examine.
Returns:
A Record proxy if the field references a record; null otherwise

isAttachmentList

static boolean isAttachmentList(com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields,
                                int row)
Whether or not the indicated field is an attachment field.

Parameters:
fields - The Property.List to examine.
row - The index of the element in the list to examine.
Returns:
true iff the field at the given index is an attachment field

selectAttachment

static CqAttachment selectAttachment(java.awt.Component frame,
                                     com.ibm.rational.wvcm.stp.StpProperty.List<CqFieldValue<?>> fields,
                                     int row,
                                     String op)
Presents to the user a list of the attachments associated with a specified field of a record and allows the user to select one.

Parameters:
frame - The parent frame for the dialog generated by this method.
fields - The Property.List to examine.
row - The index of the element in the list to examine.
op - A string identifying the operation that will be performed on the selected attachment.
Returns:
An Attachment proxy for the selected attachment; null if the user chooses to make no selection.

main

public static void main(String[] args)
The main program for the ViewRecord example. Instantiates a Provider and then invokes the ExecuteQuery example, passing in a version of Viewer that displays fields of a ClearQuest record.

Parameters:
args - not used.

Generated Wed 14-Mar-2018 10:41 PM

Copyright © IBM 2018. All rights reserved.