hudson.plugins.analysis.core
Class NullBuildHistory

java.lang.Object
  extended by hudson.plugins.analysis.core.BuildHistory
      extended by hudson.plugins.analysis.core.NullBuildHistory

public class NullBuildHistory
extends BuildHistory

Empty build history.

Author:
Ulli Hafner

Constructor Summary
NullBuildHistory()
          Creates a new instance of NullBuildHistory.
 
Method Summary
 ResultAction<? extends BuildResult> getBaseline()
          Returns the baseline action.
 Collection<FileAnnotation> getFixedWarnings(Set<FileAnnotation> annotations)
          Returns the fixed warnings as a difference between the warnings of the reference build and the specified collection of warnings.
 AbstractHealthDescriptor getHealthDescriptor()
          Returns the health descriptor used for the builds.
 Collection<FileAnnotation> getNewWarnings(Set<FileAnnotation> annotations)
          Returns the new warnings as a difference between the specified collection of warnings and the warnings of the reference build.
 BuildResult getPreviousResult()
          Returns the previous build result.
 AnnotationContainer getReferenceAnnotations()
          Returns the annotations of the reference build.
 hudson.model.AbstractBuild<?,?> getReferenceBuild()
          Returns the reference build or null if there is no such build.
 Calendar getTimestamp()
          Returns the time of the baseline build.
 boolean hasPreviousResult()
          Returns whether a previous build result exists.
 boolean hasReferenceBuild()
          Returns whether a reference build is available to compare the results with.
 boolean isEmpty()
          Returns whether there is no history available, i.e.
 
Methods inherited from class hudson.plugins.analysis.core.BuildHistory
getResultAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullBuildHistory

public NullBuildHistory()
Creates a new instance of NullBuildHistory.

Method Detail

getBaseline

public ResultAction<? extends BuildResult> getBaseline()
Description copied from class: BuildHistory
Returns the baseline action.

Overrides:
getBaseline in class BuildHistory
Returns:
the baseline action
See Also:
BuildHistory.hasPreviousResult()

getTimestamp

public Calendar getTimestamp()
Description copied from class: BuildHistory
Returns the time of the baseline build.

Overrides:
getTimestamp in class BuildHistory
Returns:
the time

getReferenceAnnotations

public AnnotationContainer getReferenceAnnotations()
Description copied from class: BuildHistory
Returns the annotations of the reference build.

Overrides:
getReferenceAnnotations in class BuildHistory
Returns:
the annotations of the reference build

getReferenceBuild

public hudson.model.AbstractBuild<?,?> getReferenceBuild()
Description copied from class: BuildHistory
Returns the reference build or null if there is no such build.

Overrides:
getReferenceBuild in class BuildHistory
Returns:
the reference build
See Also:
BuildHistory.hasReferenceBuild()

hasReferenceBuild

public boolean hasReferenceBuild()
Description copied from class: BuildHistory
Returns whether a reference build is available to compare the results with.

Overrides:
hasReferenceBuild in class BuildHistory
Returns:
true if a reference build exists, false otherwise

hasPreviousResult

public boolean hasPreviousResult()
Description copied from class: BuildHistory
Returns whether a previous build result exists.

Overrides:
hasPreviousResult in class BuildHistory
Returns:
true if a previous build result exists.
See Also:
BuildHistory.isEmpty()

isEmpty

public boolean isEmpty()
Description copied from class: BuildHistory
Returns whether there is no history available, i.e. the current build is the first valid one.

Overrides:
isEmpty in class BuildHistory
Returns:
true if there is no previous build available
See Also:
BuildHistory.hasPreviousResult()

getPreviousResult

public BuildResult getPreviousResult()
Description copied from class: BuildHistory
Returns the previous build result.

Overrides:
getPreviousResult in class BuildHistory
Returns:
the previous build result
See Also:
BuildHistory.hasPreviousResult()

getNewWarnings

public Collection<FileAnnotation> getNewWarnings(Set<FileAnnotation> annotations)
Description copied from class: BuildHistory
Returns the new warnings as a difference between the specified collection of warnings and the warnings of the reference build.

Overrides:
getNewWarnings in class BuildHistory
Parameters:
annotations - the warnings in the current build
Returns:
the difference "current build" - "reference build"

getFixedWarnings

public Collection<FileAnnotation> getFixedWarnings(Set<FileAnnotation> annotations)
Description copied from class: BuildHistory
Returns the fixed warnings as a difference between the warnings of the reference build and the specified collection of warnings.

Overrides:
getFixedWarnings in class BuildHistory
Parameters:
annotations - the warnings in the current build
Returns:
the difference "reference build" - "current build"

getHealthDescriptor

public AbstractHealthDescriptor getHealthDescriptor()
Description copied from class: BuildHistory
Returns the health descriptor used for the builds.

Overrides:
getHealthDescriptor in class BuildHistory
Returns:
the health descriptor


Copyright © 2004-2012 Hudson. All Rights Reserved.