1 package org
.argeo
.slc
.ws
.process
;
3 import org
.springframework
.ws
.server
.endpoint
.AbstractMarshallingPayloadEndpoint
;
5 import org
.apache
.commons
.logging
.Log
;
6 import org
.apache
.commons
.logging
.LogFactory
;
8 import org
.argeo
.slc
.core
.process
.SlcExecution
;
9 import org
.argeo
.slc
.dao
.process
.SlcExecutionDao
;
10 import org
.argeo
.slc
.msg
.process
.SlcExecutionStepsRequest
;
12 public class SlcExecutionStepsRequestEp
extends
13 AbstractMarshallingPayloadEndpoint
{
15 private Log log
= LogFactory
.getLog(getClass());
17 private final SlcExecutionDao slcExecutionDao
;
19 public SlcExecutionStepsRequestEp(SlcExecutionDao slcExecutionDao
) {
20 this.slcExecutionDao
= slcExecutionDao
;
24 protected Object
invokeInternal(Object requestObject
) throws Exception
{
25 SlcExecutionStepsRequest msg
= (SlcExecutionStepsRequest
) requestObject
;
26 String uuid
= msg
.getSlcExecutionUuid();
27 SlcExecution slcExecution
= slcExecutionDao
.getSlcExecution(uuid
);
29 slcExecution
.getSteps().addAll(msg
.getSteps());
31 slcExecutionDao
.update(slcExecution
);
32 log
.debug("Added " + msg
.getSteps().size()
33 + "steps to SlcExecution with uuid " + slcExecution
.getUuid());