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
;
12 * Command handler to display and edit the attributes of a given Realizedflow.
13 * The corresponding RealizedFlow is passed via command parameters and
14 * unmarshalled with the oxmBean which is injected by Spring.
20 public class EditRealizedFlowDetailsHandler
extends AbstractHandler
{
23 private OxmInterface oxmBean
;
25 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
26 // We pass Realized flow through command parameters as XML
27 String rfAsXml
= event
28 .getParameter("org.argeo.slc.client.commands.realizedFlowAsXml");
29 int index
= new Integer(
30 event
.getParameter("org.argeo.slc.client.commands.realizedFlowIndex"))
32 RealizedFlow rf
= (RealizedFlow
) oxmBean
.unmarshal(rfAsXml
);
35 ProcessParametersView ppView
= (ProcessParametersView
) HandlerUtil
36 .getActiveWorkbenchWindow(event
).getActivePage()
37 .showView(ProcessParametersView
.ID
);
38 ppView
.setRealizedFlow(index
, rf
);
39 } catch (Exception e
) {
46 public void setOxmBean(OxmInterface oxmBean
) {
47 this.oxmBean
= oxmBean
;