1 package org
.argeo
.slc
.web
.mvc
.process
;
3 import javax
.servlet
.http
.HttpServletRequest
;
4 import javax
.servlet
.http
.HttpServletResponse
;
6 import org
.argeo
.slc
.dao
.process
.SlcExecutionDao
;
7 import org
.argeo
.slc
.msg
.ObjectList
;
8 import org
.argeo
.slc
.process
.SlcExecution
;
9 import org
.argeo
.slc
.web
.mvc
.AbstractServiceController
;
10 import org
.springframework
.oxm
.Unmarshaller
;
11 import org
.springframework
.web
.servlet
.ModelAndView
;
12 import org
.springframework
.xml
.transform
.StringSource
;
14 /** Lists SLC executions possibly filtering them. */
15 public class GetSlcExecution
extends AbstractServiceController
{
16 private SlcExecutionDao slcExecutionDao
;
17 private Unmarshaller unmarshaller
;
20 protected void handleServiceRequest(HttpServletRequest request
,
21 HttpServletResponse response
, ModelAndView modelAndView
)
23 String uuid
= request
.getParameter("uuid");
24 SlcExecution slcExecution
= slcExecutionDao
.getSlcExecution(uuid
);
26 StringSource source
= new StringSource(slcExecution
27 .getRealizedFlowsXml());
28 ObjectList ol2
= (ObjectList
) unmarshaller
.unmarshal(source
);
29 ol2
.fill(slcExecution
.getRealizedFlows());
31 modelAndView
.addObject(slcExecution
);
34 public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao
) {
35 this.slcExecutionDao
= slcExecutionDao
;
38 public void setUnmarshaller(Unmarshaller unmarshaller
) {
39 this.unmarshaller
= unmarshaller
;