wt.clients.workflow.definer
Class WfTimerTemplateEditor
java.lang.Object
wt.clients.workflow.definer.WfNodeTemplateEditor
wt.clients.workflow.definer.WfTemplateObjectEditor
wt.clients.workflow.definer.WfTimerTemplateEditor
- public class WfTimerTemplateEditor
- extends WfTemplateObjectEditor
Editor for the WfTimerTemplate robot.
An editor needs to be created so the Process Editor knows about WfTimerTemplates.
You must specify a wt.workflow.definer.editor.x= in the
wt.properties file for the Process Editor to add it to the tools.
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 |
Methods inherited from class wt.clients.workflow.definer.WfTemplateObjectEditor |
createMappings, deleteWfTemplate, getCategory, getContextSignature, getCopyMap, getProcessStepTemplateLink, getTransitionExpression, newWfTemplate, populateWfTemplate, saveWfTemplate, 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 |
versionID
private static final String versionID
- See Also:
- Constant Field Values
TIMER_ROBOT
public static final String TIMER_ROBOT
- See Also:
- Constant Field Values
subtypes
private static Vector subtypes
WfTimerTemplateEditor
public WfTimerTemplateEditor()
getWfTemplateClass
public static Class getWfTemplateClass()
- Returns:
- The Class this editor support.
Returns WfTimerTemplate.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.
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 WfTimerTemplate.
This method must be implemented so the Process Editor can create the correct
template for this editor. You should set the name of the WfTimerTemplate 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:
WfTimerTemplatePanel
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