wt.clients.workflow.definer
Class WfApplRobotTemplateEditor

java.lang.Object
  extended bywt.clients.workflow.definer.WfNodeTemplateEditor
      extended bywt.clients.workflow.definer.WfTemplateObjectEditor
          extended bywt.clients.workflow.definer.WfApplRobotTemplateEditor

public class WfApplRobotTemplateEditor
extends WfTemplateObjectEditor

Editor for the WfApplRobotTemplate robot. An editor needs to be created so the Process Editor knows about WfApplRobotTemplates. You must specify a wt.workflow.definer.editor.x= in the wt.properties file for the Process Editor to add it to the tools.


Nested Class Summary
 
Nested classes inherited from class wt.clients.workflow.definer.WfNodeTemplateEditor
WfNodeTemplateEditor.RefreshThread
 
Field Summary
static String APPLICATION
           
private static Vector subtypes
           
private static String versionID
           
 
Fields inherited from class wt.clients.workflow.definer.WfTemplateObjectEditor
INSTRUCTIONS, PRIMARY_BUSINESS_OBJECT, processLink, transitionExpressions
 
Fields inherited from class wt.clients.workflow.definer.WfNodeTemplateEditor
batch, component, container, context_ref, createdOne, editable, graphNode, icon, model, name, node, propertyChange, refreshType, routerExpression, subtype, transaction
 
Constructor Summary
WfApplRobotTemplateEditor()
           
 
Method Summary
 Component getComponent()
           
static String getSubtypeCategory(String subtype)
           
static String getSubtypeHelp(String subtype)
           
static String getSubtypeIconName(String subtype)
           
static String getSubtypeName(String subtype)
           
static Vector getSubtypes()
           
static Class getWfTemplateClass()
           
 WfNodeTemplate newWfTemplate()
          Creates a new WfApplRobotTemplate.
 void pasteCopyMap(Hashtable copy_map, WfContainerTemplateEditor container)
          This method must be implemented to set the subtype of a Editor when a node template is pasted into a workflow.
 void populateWfTemplate(WfNodeTemplate template)
          Populates this editor with the specified template.
 void saveWfTemplate()
          Saves the WfNodeTemplate this Editor references.
 
Methods inherited from class wt.clients.workflow.definer.WfTemplateObjectEditor
createMappings, deleteWfTemplate, getCategory, getContextSignature, getCopyMap, getProcessStepTemplateLink, getTransitionExpression, newWfTemplate, populateWfTemplate, setProcessStepTemplateLink, setTransitionExpression, updateMappings
 
Methods inherited from class wt.clients.workflow.definer.WfNodeTemplateEditor
addPropertyChangeListener, computeContainerRef, getBatchContainer, getContainer, getContainerRef, getGraphModel, getGraphNode, getIconName, getName, getPosition, getRefreshType, getRouterExpression, getSubtype, getSuccessorLinks, getTransactionContainer, getWfTemplate, hasUnsavedChanges, isEditable, refreshAssertionTarget, removePropertyChangeListener, replaceWfTemplate, setBatchContainer, setComponent, setContainerRef, setEditable, setGraphModel, setGraphNode, setIconName, setName, setRouterExpression, setSubtype, setTransactionContainer, setWfTemplate, transactionSave
 
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

APPLICATION

public static final String APPLICATION
See Also:
Constant Field Values

subtypes

private static Vector subtypes
Constructor Detail

WfApplRobotTemplateEditor

public WfApplRobotTemplateEditor()
Method Detail

getWfTemplateClass

public static Class getWfTemplateClass()
Returns:
The Class this editor support. Returns WfApplRobotTemplate.class. This method must be implemented so the Process Editor know what Editor to create for the WfTimerTemplate class.

getSubtypes

public static Vector getSubtypes()
Returns:
A Vector of subtypes this editor supports. The elements of the Vector or just strings. This method must be implemented so the Process Editor knows what subtypes this editor supports. A tool will be created for each subtype. An example might be a method robot which has several subtypes corresponding to different methods.

getSubtypeName

public static String getSubtypeName(String subtype)
Parameters:
subtype - The subtype to get the name for.
Returns:
A displayable name for the specified subtype. This will be the default name for the node once it is placed in a workflow.

getSubtypeIconName

public static String getSubtypeIconName(String subtype)
Parameters:
subtype - The subtype to get the icon for.
Returns:
A path to the icon for the subtype from the current codebase. The Process Editor will load the icon specified and use it for the tools palette and the nodes in the workflow.

getSubtypeCategory

public static String getSubtypeCategory(String subtype)

getSubtypeHelp

public static String getSubtypeHelp(String subtype)
Parameters:
subtype - The subtype to return the help for.
Returns:
Help for the specified subtype. The help returned will be displayed as tooltips in the tools palette of the Process Editor. When the mouse floats over the tools palette button for this Editor, a tooltip will be displayed containing the help.

newWfTemplate

public WfNodeTemplate newWfTemplate()
Creates a new WfApplRobotTemplate. This method must be implemented so the Process Editor can create the correct template for this editor. You should set the name of the WfApplRobotTemplate and set the subtype of the Editor in this method. After the new template is created setWfTemplate(template) should be called to set the WfTemplate of the Editor. Finally, you should call super to add the template to the batch container so it will get saved.

Overrides:
newWfTemplate in class WfTemplateObjectEditor
Returns:
The new WfTimerTemplate which was created.

populateWfTemplate

public void populateWfTemplate(WfNodeTemplate template)
Populates this editor with the specified template. This method must be implemented so an Editor is created when a process template is updated. When a process template is updated, the Process Editor queries for all of the node templates in the process template. The Process Editor then needs to create Editors for the templates to display them. It creates them by first asking each Editor if it supports the node template class using the getWfTemplateClass method. If it finds an Editor which supports the node template class it creates a new Editor for it an calls populateWfTemplate to set the node template of the Editor. The subtype of the Editor should be set in this method. Make sure to call the super so the icon and name for the Editor get created. Calling super will also populate the batch container with the template so it can be saved if it is changed.

Overrides:
populateWfTemplate in class WfTemplateObjectEditor
Parameters:
template - The node template for this Editor.

getComponent

public Component getComponent()
Overrides:
getComponent in class WfNodeTemplateEditor
Returns:
A component which is a subclass of WfNodeTemplatePanel for editing the properties of the template. The component returned will be displayed in a Dialog with OK and Cancel buttons. When the dialog is displayed, the initialize() method of the component will be called allowing you to initialize any fields in the UI. When the OK button is pressed, the save() method of the component is called allowing you to save any fields in the UI to the template itself. When the Cancel button is called, the cancel() method of the component is called allowing you to cancel any changes that may have been done to the template itself.
See Also:
WfApplRobotTemplatePanel

pasteCopyMap

public void pasteCopyMap(Hashtable copy_map,
                         WfContainerTemplateEditor container)
                  throws WTException
This method must be implemented to set the subtype of a Editor when a node template is pasted into a workflow. Make sure to call the super so the node is actually pasted into the workflow. You only need to set the subtype of the Editor. If you need to get the template which is to be pasted, the copy_map Hastable can be used. The template is stored under the String key "template" in copy_map.

Overrides:
pasteCopyMap in class WfTemplateObjectEditor
Parameters:
copy_map - A Hashtable which contains information required to perform the paste. It is used a storage for the copy or cut action. You can get the template which is to be pasted by using the String key "template".
container - The container the template is to be pasted into.
Throws:
WTException

saveWfTemplate

public void saveWfTemplate()
                    throws WTException
Saves the WfNodeTemplate this Editor references.

Overrides:
saveWfTemplate in class WfTemplateObjectEditor
Throws:
WTException