wt.clients.vc
Class ReviseTask

java.lang.Object
  extended bywt.clients.vc.ReviseTask

public class ReviseTask
extends Object

Construct a ReviseTask to handle the creeation of a new version of a Versioned object. This code calls ReviseTaskLogic to perform an availability check of the object for a new version and then presents the user with a dialog, either ReviseDialog or ReviseViewDialog dependent on the value of the second parameter in the call to revise(boolean withView). Below is an example of using ReviseTask.

 import wt.clients.vc.ReviseTask;
 

void reviseMenuItem_Action(java.awt.event.ActionEvent event) { reviseObject(false); }

protected void reviseObject(boolean withView) { try { setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) ); // You must supply the getVersionedObject() method. Versioned versionedObject = getVersionedObject(); // You must supply the getParentApplet() method for the calling // GUI component. // You must supply the getFrame() method for the calling // GUI component. ReviseTask revise_task = new ReviseTask( getParentApplet(), getFrame(), versionedObject ); revise_task.revise(withView); } finally { setCursor( Cursor.getDefaultCursor() ); } }



Supported API: false

Extendable: false


Field Summary
private  Applet parentApplet
           
private  Frame parentFrame
           
private static ResourceBundle resources
           
static String RESOURCES
           
private  Versionable reviseItem
           
private static String versionID
           
 
Constructor Summary
ReviseTask(Applet parent_applet, Frame parent_frame, Versionable revise_item)
           
 
Method Summary
private  boolean decideAction(Frame parent_frame, String message)
           
private  void dispatchRefreshEvent(Object obj, int action)
           
private  EPMBuildRule getBuildRule(WTPart part)
           
private  WTContext getContext()
           
 Applet getParentApplet()
          Supported API: false
 Frame getParentFrame()
          Supported API: false
 Versionable getReviseItem()
          Supported API: false
private  Frame getTopLevelFrame()
           
private  void initResources()
           
 Versionable revise(boolean withView)
          This call will present the user with a dialog to create a new version of the the current Versioned object.
 void setParentApplet(Applet parent_applet)
          Supported API: false
 void setParentFrame(Frame parent_frame)
          Supported API: false
 void setReviseItem(Versionable revise_item)
          Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

RESOURCES

public static String RESOURCES

resources

private static ResourceBundle resources

parentApplet

private Applet parentApplet

parentFrame

private Frame parentFrame

reviseItem

private Versionable reviseItem
Constructor Detail

ReviseTask

public ReviseTask(Applet parent_applet,
                  Frame parent_frame,
                  Versionable revise_item)
Method Detail

setParentApplet

public void setParentApplet(Applet parent_applet)
Supported API: false


getParentApplet

public Applet getParentApplet()
Supported API: false

Returns:
Applet

setParentFrame

public void setParentFrame(Frame parent_frame)
Supported API: false


getParentFrame

public Frame getParentFrame()
Supported API: false

Returns:
Frame

setReviseItem

public void setReviseItem(Versionable revise_item)
Supported API: false


getReviseItem

public Versionable getReviseItem()
Supported API: false

Returns:
The current wt.vc.Versioned object that is a candidate for a new version

revise

public Versionable revise(boolean withView)
This call will present the user with a dialog to create a new version of the the current Versioned object. The current object to be revised can be retrieved with a call to getReviseItem(). This method will present either a ReviseDialog dialog ( false ) or a ReviseViewDialog ( true ) dependent upon the value of the boolean parameter passed in the call. The ReviseViewDialog will allow the user to select the "view" of the Versioned object if the object has different views available. After the dialog is presented and closed, the version that was originally passed in is returned. A call to RefreshService updates the UI.

Supported API: false

Returns:
The old version of the wt.vc.Versioned object

decideAction

private boolean decideAction(Frame parent_frame,
                             String message)

getBuildRule

private EPMBuildRule getBuildRule(WTPart part)

initResources

private void initResources()

getTopLevelFrame

private Frame getTopLevelFrame()

getContext

private WTContext getContext()

dispatchRefreshEvent

private void dispatchRefreshEvent(Object obj,
                                  int action)