1 package org
.argeo
.slc
.client
.ui
.commands
;
3 import org
.argeo
.slc
.client
.oxm
.OxmInterface
;
4 import org
.argeo
.slc
.client
.ui
.views
.ProcessParametersView
;
5 import org
.argeo
.slc
.process
.RealizedFlow
;
6 import org
.eclipse
.core
.commands
.AbstractHandler
;
7 import org
.eclipse
.core
.commands
.ExecutionEvent
;
8 import org
.eclipse
.core
.commands
.ExecutionException
;
9 import org
.eclipse
.ui
.handlers
.HandlerUtil
;
15 * Command handler to display and edit the attributes of a given
16 * Realizedflow. The corresponding RealizedFlow is passed via command
17 * parameters and unmarshalled with the oxmBean which is injected by
20 * Note thet passing an index of -1 will cause the reset of the View
21 * (used among others when removing processes from the batch).
24 public class EditRealizedFlowDetailsHandler
extends AbstractHandler
{
27 private OxmInterface oxmBean
;
29 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
30 // We pass Realized flow through command parameters as XML
31 String rfAsXml
= event
32 .getParameter("org.argeo.slc.client.commands.realizedFlowAsXml");
33 int index
= new Integer(
34 event
.getParameter("org.argeo.slc.client.commands.realizedFlowIndex"))
37 ProcessParametersView ppView
= (ProcessParametersView
) HandlerUtil
38 .getActiveWorkbenchWindow(event
).getActivePage()
39 .showView(ProcessParametersView
.ID
);
42 ppView
.setRealizedFlow(-1, null);
44 RealizedFlow rf
= (RealizedFlow
) oxmBean
.unmarshal(rfAsXml
);
45 ppView
.setRealizedFlow(index
, rf
);
48 } catch (Exception e
) {
55 public void setOxmBean(OxmInterface oxmBean
) {
56 this.oxmBean
= oxmBean
;