Project: stp

com.ibm.rational.stp.client.samples
Class EditRecord.Viewer

Object
  extended by com.ibm.rational.stp.client.samples.ViewRecord.Viewer
      extended by com.ibm.rational.stp.client.samples.EditRecord.Viewer
All Implemented Interfaces:
ExecuteQuery.Viewer
Enclosing class:
EditRecord

static class EditRecord.Viewer
extends ViewRecord.Viewer

An extension of the ViewRecord.Viewer that adds the ability to start an action under which fields of the record can be modified.


Field Summary
 
Fields inherited from class com.ibm.rational.stp.client.samples.ViewRecord.Viewer
m_provider
 
Constructor Summary
EditRecord.Viewer(CqProvider provider)
           
 
Method Summary
 void edit(CqRecord selected, CqAction action)
          Constructs a new change context in which the given record can be edited, initiates the editing using the given action, and then displays the editable record in a new window for editing.
(package private)  javax.swing.JFrame editRecord(String title, CqRecord record, CqRecord selected)
          Displays the fields of a record and allows the user to modify those fields (as permitted by the schema) until the changes are either committed back to the database or abandoned altogether by the user.
 javax.swing.JFrame view(CqRecord selected)
          Reads the legal actions for the current state of a given record then displays the fields of the record (using ViewRecord.Viewer.showRecord(java.lang.String, com.ibm.rational.wvcm.stp.cq.CqRecord, javax.swing.JComponent[])) with a drop-down containing the actions and buttons the user can use to initiate an edit or add or remove an attachment.
 
Methods inherited from class com.ibm.rational.stp.client.samples.ViewRecord.Viewer
showRecord, view
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditRecord.Viewer

EditRecord.Viewer(CqProvider provider)
Method Detail

view

public javax.swing.JFrame view(CqRecord selected)
Reads the legal actions for the current state of a given record then displays the fields of the record (using ViewRecord.Viewer.showRecord(java.lang.String, com.ibm.rational.wvcm.stp.cq.CqRecord, javax.swing.JComponent[])) with a drop-down containing the actions and buttons the user can use to initiate an edit or add or remove an attachment.

Specified by:
view in interface ExecuteQuery.Viewer
Overrides:
view in class ViewRecord.Viewer
Parameters:
selected - The Record proxy for the record to be displayed.
Returns:
TODO
See Also:
ExecuteQuery.Viewer.view(com.ibm.rational.wvcm.stp.cq.CqRecord)

edit

public void edit(CqRecord selected,
                 CqAction action)
Constructs a new change context in which the given record can be edited, initiates the editing using the given action, and then displays the editable record in a new window for editing.

Parameters:
selected - A Record proxy for the record to be edited. Must not be null but needs no properties defined.
action - An Action proxy for the action to be used for editing. Must not be null.

editRecord

javax.swing.JFrame editRecord(String title,
                              CqRecord record,
                              CqRecord selected)
                        throws javax.wvcm.WvcmException
Displays the fields of a record and allows the user to modify those fields (as permitted by the schema) until the changes are either committed back to the database or abandoned altogether by the user.

Parameters:
title - The title string for the window in which the record is displayed.
record - The Record proxy for the editable version of the record.
selected - The Record proxy for the original version of the record. Used to redisplay the record (in its original change context) after the editable version has either been committed or abandoned.
Throws:
javax.wvcm.WvcmException - If the properties required for the editable record are not defined by the editable record proxy.

Generated Wed 28-Aug-2013 02:39 AM

Copyright © IBM 2013. All rights reserved.