01: package org.bpmscript.web;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05:
06: import javax.servlet.http.HttpServletRequest;
07: import javax.servlet.http.HttpServletResponse;
08:
09: import org.bpmscript.IProcessSource;
10: import org.bpmscript.remote.IRemoteProcessManager;
11: import org.springframework.web.servlet.ModelAndView;
12: import org.springframework.web.servlet.mvc.ParameterizableViewController;
13:
14: public class ProcessSourceController extends
15: ParameterizableViewController {
16:
17: private IRemoteProcessManager remoteProcessManager;
18:
19: @Override
20: protected ModelAndView handleRequestInternal(
21: HttpServletRequest request, HttpServletResponse response)
22: throws Exception {
23: String processSourceId = request
24: .getParameter("processSourceId");
25: IProcessSource processSource = remoteProcessManager
26: .getProcessSource(processSourceId);
27: Map<String, Object> model = new HashMap<String, Object>();
28: model.put("processSource", processSource);
29: return new ModelAndView(getViewName(), model);
30: }
31:
32: public void setRemoteProcessManager(
33: IRemoteProcessManager remoteProcessManager) {
34: this.remoteProcessManager = remoteProcessManager;
35: }
36:
37: }
|