1 package org.onap.vid.job.command;
3 import org.onap.vid.job.Job;
4 import org.onap.vid.job.NextCommand;
5 import org.onap.vid.job.impl.JobSharedData;
6 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
7 import org.springframework.context.annotation.Scope;
8 import org.springframework.stereotype.Component;
10 import java.util.List;
13 @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
14 public class WatchingCommand extends BaseWatchingCommand {
16 public WatchingCommand() {}
18 public WatchingCommand(JobSharedData sharedData, List<String> childrenJobsIds, boolean isService) {
19 super(sharedData, childrenJobsIds, isService);
22 protected NextCommand getNextCommand(Job.JobStatus cumulativeJobsStatus) {
23 if (cumulativeJobsStatus==Job.JobStatus.IN_PROGRESS) {
24 return (isService) ? new NextCommand(Job.JobStatus.IN_PROGRESS, this)
25 : new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, this);
28 asyncInstantiationBL.updateServiceInfoAndAuditStatus(getSharedData().getJobUuid(), cumulativeJobsStatus);
30 return new NextCommand(cumulativeJobsStatus);