Class FoundIndication
java.lang.Object
com.sonyericsson.jenkins.plugins.bfa.model.indication.FoundIndication
Found Indication of an unsuccessful build.
- Author:
- Tomas Westling <tomas.westling@sonymobile.com>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFoundIndication
(Run build, String originalPattern, String matchingFile, String matchingString) Deprecated.FoundIndication
(Run build, String originalPattern, String matchingFile, String matchingString, Integer matchingLine) Standard constructor.FoundIndication
(String pattern, String matchingFile, String matchingString) Deprecated.UseFoundIndication(String, String, String, Integer)
insteadFoundIndication
(String pattern, String matchingFile, String matchingString, Integer matchingLine) JSON Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
convertFromLineNumber
(List<String> log) ReplacesmatchingLine
withmatchingString
from the text in the list atmatchingLine
s position.getBuild()
Getter for the build.Getter for the first matching line (useful with multi-line build log indications.Getter for the matching file.int
The hash-code of thematchingString
.int
The matching line number.Getter for the matching String.Getter for the pattern.Called after deserialization.
-
Field Details
-
FILE_ENCODING
The platform file encoding. We assume that Jenkins uses it when writing the logs.
-
-
Constructor Details
-
FoundIndication
@Deprecated public FoundIndication(Run build, String originalPattern, String matchingFile, String matchingString) Deprecated.Standard constructor.- Parameters:
build
- the build of this indication.originalPattern
- the original pattern we used to match.matchingFile
- the path to the file in which we found the match.matchingString
- the String that makes up the match.
-
FoundIndication
Deprecated.UseFoundIndication(String, String, String, Integer)
insteadJSON Constructor.- Parameters:
pattern
- the pattern we used to match.matchingFile
- the path to the file in which we found the match.matchingString
- the String that makes up the match.
-
FoundIndication
public FoundIndication(Run build, String originalPattern, String matchingFile, String matchingString, Integer matchingLine) Standard constructor.- Parameters:
build
- the build of this indication.originalPattern
- the original pattern we used to match.matchingFile
- the path to the file in which we found the match.matchingString
- the String that makes up the match.matchingLine
- the line number of the found indication
-
FoundIndication
public FoundIndication(String pattern, String matchingFile, String matchingString, Integer matchingLine) JSON Constructor.- Parameters:
pattern
- the pattern we used to match.matchingFile
- the path to the file in which we found the match.matchingString
- the String that makes up the match.matchingLine
- the line number of the found indication
-
-
Method Details
-
getMatchingFile
Getter for the matching file.- Returns:
- the file in which we found the match.
-
getPattern
Getter for the pattern.- Returns:
- the pattern.
-
getBuild
Getter for the build.- Returns:
- the build.
-
getMatchingString
Getter for the matching String.- Returns:
- the matching String.
-
getFirstMatchingLine
Getter for the first matching line (useful with multi-line build log indications.- Returns:
- the first line from
getMatchingString()
.
-
convertFromLineNumber
ReplacesmatchingLine
withmatchingString
from the text in the list atmatchingLine
s position. But only ifmatchingLine
is non null.- Parameters:
log
- the build-log.
-
readResolve
Called after deserialization. Will schedule this indication for conversion viaOldDataConverter
frommatchingLine
tomatchingString
ifmatchingLine
is non null.- Returns:
- this
-
getMatchingLine
@Exported public int getMatchingLine()The matching line number.- Returns:
- the matching line number.
-
getMatchingHash
@Exported public int getMatchingHash()The hash-code of thematchingString
. Convenience method mostly for jelly.- Returns:
- the hash of the line of text.
-
FoundIndication(Run, String, String, String, Integer)
instead