wt.clients.workflow.definer
Class WfSynchRobotTemplateEditor
java.lang.Object
wt.clients.workflow.definer.WfNodeTemplateEditor
wt.clients.workflow.definer.WfTemplateObjectEditor
wt.clients.workflow.definer.WfSynchRobotTemplateEditor
- public class WfSynchRobotTemplateEditor
- extends WfTemplateObjectEditor
Editor for the WfSynchronization robot.
An editor needs to be created so the Process Editor knows about WfSynchTemplates.
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, 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 |
versionID
private static final String versionID
- See Also:
- Constant Field Values
SYNCHRONIZE
public static final String SYNCHRONIZE
- See Also:
- Constant Field Values
subtypes
private static Vector subtypes
synchExpression
WfExpression synchExpression
initialSynchExpression
WfExpression initialSynchExpression
WfSynchRobotTemplateEditor
public WfSynchRobotTemplateEditor()
getWfTemplateClass
public static Class getWfTemplateClass()
- Returns:
- The Class this editor support.
Returns WfSynchRobotTemplate.class. This method must be implemented so the
Process Editor know what Editor to create for the WfSynchRobotTemplate 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.
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:
WfSynchRobotTemplatePanel
newWfTemplate
public WfNodeTemplate newWfTemplate()
- Creates a new WfSynchRobotTemplate.
This method must be implemented so the Process Editor can create the correct
template for this editor. You should set the name of the WfSynchRobotTemplate 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 WfSynchRobotTemplate 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. 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.
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
getCopyMap
public Hashtable getCopyMap(DefinerGraphNode graph_node)
throws WTException
- Overrides:
getCopyMap
in class WfTemplateObjectEditor
- Throws:
WTException
saveWfTemplate
public void saveWfTemplate()
throws WTException
- Saves the WfNodeTemplate this Editor references.
- Overrides:
saveWfTemplate
in class WfTemplateObjectEditor
- Throws:
WTException
setSynchExpression
public void setSynchExpression(WfExpression synch_expression)
getSynchExpression
public WfExpression getSynchExpression(boolean create_new)
throws WTException
- Throws:
WTException
setInitSynchExpression
public void setInitSynchExpression(WfExpression synch_expression)
getInitSynchExpression
public WfExpression getInitSynchExpression(boolean create_new)
throws WTException
- Throws:
WTException
getInitSynchExpression
public WfExpression getInitSynchExpression(WfRobotActivityTemplate template)
throws WTException
- Throws:
WTException
getId
private ObjectIdentifier getId(Object object)
- Helper method that extracts object identifier.