1 package com.kodexa.client.remote;
2
3 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 import lombok.Data;
5
6 import java.util.*;
7
8
9
10
11 @Data
12 @JsonIgnoreProperties(ignoreUnknown = true)
13 public class CloudExecution {
14
15
16
17
18 private String id;
19
20
21
22
23 private String status;
24
25
26
27
28 private List<CloudExecutionStep> steps;
29
30
31
32
33 private List<CloudStore> stores = new ArrayList<>();
34
35
36
37
38 private List<ContentObject> contentObjects = new ArrayList<>();
39
40
41
42
43
44 private String outputId;
45
46
47
48
49 private String inputId;
50
51
52
53
54
55
56 public CloudExceptionDetail getExceptionDetail() {
57 for (CloudExecutionStep step : steps) {
58 if (step.getExceptionDetails() != null)
59 return step.getExceptionDetails();
60 }
61 return null;
62 }
63
64 public ContentObject getOutputDocument() {
65 return contentObjects.stream().filter(c -> c.getId().equals(outputId)).findFirst().orElse(null);
66 }
67 }