com.sonyericsson.jenkins.plugins.bfa.model
Class FailureCauseMatrixBuildAction

java.lang.Object
  extended by com.sonyericsson.jenkins.plugins.bfa.model.FailureCauseMatrixBuildAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.BuildBadgeAction, hudson.model.ModelObject

public class FailureCauseMatrixBuildAction
extends Object
implements hudson.model.BuildBadgeAction

Build action for the aggregated result of failure causes.

Author:
Tomas Westling <thomas.westling@sonyericsson.com>

Constructor Summary
FailureCauseMatrixBuildAction(hudson.matrix.MatrixBuild build, List<hudson.matrix.MatrixRun> runs)
          Standard constructor.
 
Method Summary
 void convertOldData()
          Converts from the use of the buggy runs to use runIds.
 String findUpStreamName()
          Finds the name of the matrix project that this action probably belongs to.
 FailureCauseBuildAction getActionForBuild(hudson.matrix.MatrixRun run)
          Convenience method for getting the action for a specific run.
 String getBadgeImageUrl()
          Gets the image url for the badge page.
 String getDisplayName()
           
static FailureCauseDisplayData getFailureCauseDisplayData(hudson.matrix.MatrixRun run)
          Gets the failure causes for a specific matrix run.
 FoundFailureCause getFirstFailureCause()
          Finds the first run with the first identified cause.
 List<FoundFailureCause> getFoundFailureCauses(hudson.matrix.MatrixRun run)
          Gets the failure causes for a specific matrix run.
 String getIconFileName()
           
 String getImageUrl()
          Gets the image url for the summary page.
 List<hudson.matrix.MatrixRun> getRunsWithAction()
          Gets all the matrix runs that have the failure cause build action.
 String getUrlName()
           
 boolean needsConvertOld()
          Check to see if convertOldData() is needed.
 Object readResolve()
          Signal that this object is de-serialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureCauseMatrixBuildAction

public FailureCauseMatrixBuildAction(hudson.matrix.MatrixBuild build,
                                     List<hudson.matrix.MatrixRun> runs)
Standard constructor.

Parameters:
build - the build where this action is placed.
runs - the list of MatrixRuns for this action.
Method Detail

getIconFileName

public String getIconFileName()
Specified by:
getIconFileName in interface hudson.model.Action

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject

getUrlName

public String getUrlName()
Specified by:
getUrlName in interface hudson.model.Action

getActionForBuild

public FailureCauseBuildAction getActionForBuild(hudson.matrix.MatrixRun run)
Convenience method for getting the action for a specific run.

Parameters:
run - the run to get the action for.
Returns:
the FailureCauseBuildAction.

getRunsWithAction

public List<hudson.matrix.MatrixRun> getRunsWithAction()
Gets all the matrix runs that have the failure cause build action.

Returns:
the runs with the action.

getFirstFailureCause

public FoundFailureCause getFirstFailureCause()
Finds the first run with the first identified cause. Null if there are none.

Returns:
the first cause found.

getImageUrl

public String getImageUrl()
Gets the image url for the summary page.

Returns:
the image url.

getBadgeImageUrl

public String getBadgeImageUrl()
Gets the image url for the badge page.

Returns:
the image url.

getFoundFailureCauses

public List<FoundFailureCause> getFoundFailureCauses(hudson.matrix.MatrixRun run)
Gets the failure causes for a specific matrix run.

Parameters:
run - the run to find failure causes for.
Returns:
the failure causes of the run.

getFailureCauseDisplayData

public static FailureCauseDisplayData getFailureCauseDisplayData(hudson.matrix.MatrixRun run)
Gets the failure causes for a specific matrix run.

Parameters:
run - the run to find failure causes for.
Returns:
the failure causes of the run.

readResolve

public Object readResolve()
Signal that this object is de-serialized. Will start by checking if runs should be converted, otherwise check if runIds should be converted to runs.

Returns:
this object.

needsConvertOld

public boolean needsConvertOld()
Check to see if convertOldData() is needed.

Returns:
true if so.

convertOldData

public void convertOldData()
Converts from the use of the buggy runs to use runIds. Only does the conversion if needed.


findUpStreamName

public String findUpStreamName()
Finds the name of the matrix project that this action probably belongs to.

Returns:
the name of the project or null if runs are bad.


Copyright © 2004-2014. All Rights Reserved.