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;
7 import java.util.HashMap;
11 public class ResourceWithChildrenInProgressCommand extends BaseInProgressStatusCommand {
13 public ResourceWithChildrenInProgressCommand() {
16 public ResourceWithChildrenInProgressCommand(JobSharedData sharedData,
19 CommandParentData commandParentData) {
20 init(sharedData, requestId, instanceId, commandParentData);
23 protected BaseInProgressStatusCommand init(JobSharedData sharedData,
26 CommandParentData commandParentData) {
27 init(sharedData, requestId, instanceId);
28 this.commandParentData= commandParentData;
34 public Map<String, Object> getData() {
35 Map<String, Object> data = new HashMap<>(super.getData());
36 data.putAll(buildDataForChild());
41 public BaseInProgressStatusCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
44 (String) commandData.get("requestId"),
45 (String) commandData.get("instanceId"),
46 commandParentData.initParentData(commandData));
49 protected Map<String, Object> buildDataForChild() {
50 return commandParentData.getParentData();
56 protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
57 return new NextCommand(jobStatus, this);
61 protected ExpiryChecker getExpiryChecker() {