From 00901edec05a9f839675b8bcf74605086095ecf9 Mon Sep 17 00:00:00 2001 From: nattofriends Date: Thu, 14 Apr 2022 19:11:24 -0700 Subject: [PATCH] Export information about the indication --- .../jenkins/plugins/bfa/model/FoundFailureCause.java | 1 + .../plugins/bfa/model/indication/FoundIndication.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FoundFailureCause.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FoundFailureCause.java index 1f884813..9aaa9f81 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FoundFailureCause.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FoundFailureCause.java @@ -123,6 +123,7 @@ public List getCategories() { * * @return the list. */ + @Exported public List getIndications() { if (indications == null) { indications = new LinkedList(); diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/indication/FoundIndication.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/indication/FoundIndication.java index 49937c59..eab33c37 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/indication/FoundIndication.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/indication/FoundIndication.java @@ -29,6 +29,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.sonyericsson.jenkins.plugins.bfa.utils.OldDataConverter; import hudson.model.Run; +import org.kohsuke.stapler.export.Exported; +import org.kohsuke.stapler.export.ExportedBean; import java.util.List; import java.util.Scanner; @@ -41,6 +43,7 @@ * * @author Tomas Westling <tomas.westling@sonymobile.com> */ +@ExportedBean @JsonIgnoreProperties(ignoreUnknown = true) public class FoundIndication { @@ -127,6 +130,7 @@ public FoundIndication(@JsonProperty("pattern") String pattern, * * @return the file in which we found the match. */ + @Exported public String getMatchingFile() { return matchingFile; } @@ -136,6 +140,7 @@ public String getMatchingFile() { * * @return the pattern. */ + @Exported public String getPattern() { return pattern; } @@ -154,6 +159,7 @@ public Run getBuild() { * * @return the matching String. */ + @Exported public String getMatchingString() { return matchingString; } @@ -162,6 +168,7 @@ public String getMatchingString() { * Getter for the first matching line (useful with multi-line build log indications. * @return the first line from {@code getMatchingString()}. */ + @Exported public String getFirstMatchingLine() { final Scanner scanner = new Scanner(matchingString); try { @@ -204,6 +211,7 @@ public Object readResolve() { * * @return the matching line number. */ + @Exported public int getMatchingLine() { if (matchingLine != null) { return matchingLine; @@ -218,6 +226,7 @@ public int getMatchingLine() { * * @return the hash of the line of text. */ + @Exported public int getMatchingHash() { if (matchingString != null) { return matchingString.hashCode();