com.sonyericsson.jenkins.plugins.bfa.model.indication
Class FoundIndication

java.lang.Object
  extended by com.sonyericsson.jenkins.plugins.bfa.model.indication.FoundIndication

public class FoundIndication
extends Object

Found Indication of an unsuccessful build.

Author:
Tomas Westling <tomas.westling@sonymobile.com>

Field Summary
protected static String FILE_ENCODING
          The platform file encoding.
 
Constructor Summary
FoundIndication(hudson.model.AbstractBuild build, String originalPattern, String matchingFile, String matchingString)
          Standard constructor.
FoundIndication(String pattern, String matchingFile, String matchingString)
          JSON Constructor.
 
Method Summary
 void convertFromLineNumber(List<String> log)
          Replaces matchingLine with matchingString from the text in the list at matchingLines position.
 hudson.model.AbstractBuild getBuild()
          Getter for the build.
 String getMatchingFile()
          Getter for the matching file.
 int getMatchingHash()
          The hash-code of the matchingString.
 int getMatchingLine()
          Deprecated. since 1.3.2, 1.4.0 replaced with getMatchingString().
 String getMatchingString()
          Getter for the matching String.
 String getPattern()
          Getter for the pattern.
 Object readResolve()
          Called after deserialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_ENCODING

protected static final String FILE_ENCODING
The platform file encoding. We assume that Jenkins uses it when writing the logs.

Constructor Detail

FoundIndication

public FoundIndication(hudson.model.AbstractBuild build,
                       String originalPattern,
                       String matchingFile,
                       String matchingString)
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 matching line.

FoundIndication

public FoundIndication(String pattern,
                       String matchingFile,
                       String matchingString)
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 matching line.
Method Detail

getMatchingFile

public String getMatchingFile()
Getter for the matching file.

Returns:
the file in which we found the match.

getPattern

public String getPattern()
Getter for the pattern.

Returns:
the pattern.

getBuild

public hudson.model.AbstractBuild getBuild()
Getter for the build.

Returns:
the build.

getMatchingString

public String getMatchingString()
Getter for the matching String.

Returns:
the matching String.

convertFromLineNumber

public void convertFromLineNumber(List<String> log)
Replaces matchingLine with matchingString from the text in the list at matchingLines position. But only if matchingLine is non null.

Parameters:
log - the build-log.

readResolve

public Object readResolve()
Called after deserialization. Will schedule this indication for conversion via OldDataConverter from matchingLine to matchingString if matchingLine is non null.

Returns:
this

getMatchingLine

@Deprecated
public int getMatchingLine()
Deprecated. since 1.3.2, 1.4.0 replaced with getMatchingString().

The old matching line number.

Returns:
the matching line number.

getMatchingHash

public int getMatchingHash()
The hash-code of the matchingString. Convenience method mostly for jelly.

Returns:
the hash of the line of text.


Copyright © 2004-2014. All Rights Reserved.