|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.pmd.util.BuildResult
public abstract class BuildResult
A base class for build results that is capable of storing a reference to the current build. Provides support for persisting the results of the build and loading and saving of annotations (all, new, and fixed) and delta computation.
| Field Summary | |
|---|---|
protected java.lang.String |
high
Deprecated. |
protected java.lang.String |
low
Deprecated. |
protected java.lang.String |
normal
Deprecated. |
protected static com.thoughtworks.xstream.XStream |
XSTREAM
Serialization provider. |
| Constructor Summary | |
|---|---|
BuildResult(hudson.model.AbstractBuild<?,?> build,
java.lang.String defaultEncoding,
ParserResult result)
Creates a new instance of BuildResult. |
|
BuildResult(hudson.model.AbstractBuild<?,?> build,
java.lang.String defaultEncoding,
ParserResult result,
BuildResult previous)
Creates a new instance of BuildResult. |
|
| Method Summary | |
|---|---|
FileAnnotation |
getAnnotation(long key)
Returns the annotation with the specified key. |
FileAnnotation |
getAnnotation(java.lang.String key)
Returns the annotation with the specified key. |
java.util.Collection<FileAnnotation> |
getAnnotations()
Returns the annotations for this object. |
java.util.Collection<FileAnnotation> |
getAnnotations(Priority priority)
Returns the annotations of the specified priority for this object. |
java.util.Collection<FileAnnotation> |
getAnnotations(java.lang.String priority)
Returns the annotations of the specified priority for this object. |
AnnotationContainer |
getContainer()
Gets the annotation container. |
protected hudson.XmlFile |
getDataFile()
Returns the serialization file. |
static long |
getDays(long ms)
Returns the number of days for the specified number of milliseconds. |
java.lang.String |
getDefaultEncoding()
Returns the defined default encoding. |
int |
getDelta()
Returns the delta. |
abstract java.lang.String |
getDetails()
Returns the detail messages for the summary.jelly file. |
java.lang.Object |
getDynamic(java.lang.String link,
org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Returns the dynamic result of the selection element. |
java.util.List<java.lang.String> |
getErrors()
Returns the error messages associated with this build. |
java.util.Collection<FileAnnotation> |
getFixedWarnings()
Returns the fixed warnings of this build. |
long |
getHighScoreGap()
Returns the number of msec still to go before a new highscore is reached. |
java.util.Collection<java.lang.String> |
getModules()
Returns the modules of this build result. |
java.util.Collection<FileAnnotation> |
getNewWarnings()
Returns the new warnings of this build. |
int |
getNumberOfAnnotations()
Gets the number of warnings. |
int |
getNumberOfAnnotations(Priority priority)
Returns the total number of warnings of the specified priority for this object. |
int |
getNumberOfAnnotations(java.lang.String priority)
Returns the annotations of the specified priority for this object. |
int |
getNumberOfFixedWarnings()
Gets the number of fixed warnings. |
int |
getNumberOfModules()
Returns the number of modules in this project. |
int |
getNumberOfNewWarnings()
Gets the number of new warnings. |
hudson.model.AbstractBuild<?,?> |
getOwner()
Returns the build as owner of this action. |
protected abstract JavaProject |
getPreviousResult()
Returns the results of the previous build. |
Priority[] |
getPriorities()
Returns all possible priorities. |
JavaProject |
getProject()
Returns the associated project of this result. |
protected abstract java.lang.String |
getSerializationFileName()
Returns the name of the file to store the serialized annotations. |
long |
getZeroWarningsHighScore()
Returns the maximum period with zero warnings in a build. |
int |
getZeroWarningsSinceBuild()
Returns the build since we have zero warnings. |
long |
getZeroWarningsSinceDate()
Returns the time since we have zero warnings. |
boolean |
hasAnnotations()
Returns whether this objects has annotations. |
boolean |
hasAnnotations(Priority priority)
Returns whether this objects has annotations with the specified priority. |
boolean |
hasAnnotations(java.lang.String priority)
Returns whether this objects has annotations with the specified priority. |
boolean |
hasError()
Returns whether a module with an error is part of this project. |
boolean |
hasNoAnnotations()
Returns whether this objects has no annotations. |
boolean |
hasNoAnnotations(Priority priority)
Returns whether this objects has no annotations with the specified priority. |
boolean |
hasNoAnnotations(java.lang.String priority)
Returns whether this objects has no annotations with the specified priority. |
protected abstract boolean |
hasPreviousResult()
Returns whether a previous build result exists. |
boolean |
isCurrent()
Returns whether this result belongs to the last build. |
boolean |
isNewZeroWarningsHighScore()
Returns if the current result reached the old zero warnings highscore. |
protected java.lang.Object |
readResolve()
Initializes members that were not present in previous versions of this plug-in. |
protected void |
setHighWarnings(int highWarnings)
Sets the number of high warnings to the specified value. |
protected void |
setLowWarnings(int lowWarnings)
Sets the number of low warnings to the specified value. |
protected void |
setNormalWarnings(int normalWarnings)
Sets the number of normal warnings to the specified value. |
protected void |
setWarnings(int warnings)
Sets the number of warnings to the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.model.ModelObject |
|---|
getDisplayName |
| Field Detail |
|---|
protected static final com.thoughtworks.xstream.XStream XSTREAM
@Deprecated protected transient java.lang.String low
@Deprecated protected transient java.lang.String normal
@Deprecated protected transient java.lang.String high
| Constructor Detail |
|---|
public BuildResult(hudson.model.AbstractBuild<?,?> build,
java.lang.String defaultEncoding,
ParserResult result)
BuildResult.
build - the current build as owner of this actiondefaultEncoding - the default encoding to be used when reading and parsing filesresult - the parsed result with all annotations
public BuildResult(hudson.model.AbstractBuild<?,?> build,
java.lang.String defaultEncoding,
ParserResult result,
BuildResult previous)
BuildResult.
build - the current build as owner of this actiondefaultEncoding - the default encoding to be used when reading and parsing filesresult - the parsed result with all annotationsprevious - the result of the previous build| Method Detail |
|---|
public static long getDays(long ms)
ms - milliseconds
public boolean hasError()
true if at least one module has an error.public java.util.List<java.lang.String> getErrors()
protected java.lang.Object readResolve()
public java.util.Collection<java.lang.String> getModules()
public int getNumberOfModules()
public java.lang.String getDefaultEncoding()
protected final hudson.XmlFile getDataFile()
protected abstract java.lang.String getSerializationFileName()
public final boolean isCurrent()
true if this result belongs to the last buildpublic final hudson.model.AbstractBuild<?,?> getOwner()
public boolean hasAnnotations(Priority priority)
hasAnnotations in interface AnnotationProviderpriority - the priority
true if this objects has annotations.public boolean hasAnnotations(java.lang.String priority)
hasAnnotations in interface AnnotationProviderpriority - the priority as a string object
true if this objects has annotations.public final boolean hasAnnotations()
hasAnnotations in interface AnnotationProvidertrue if this objects has annotations.public boolean hasNoAnnotations()
hasNoAnnotations in interface AnnotationProvidertrue if this objects has no annotations.public boolean hasNoAnnotations(Priority priority)
hasNoAnnotations in interface AnnotationProviderpriority - the priority
true if this objects has no annotations.public boolean hasNoAnnotations(java.lang.String priority)
hasNoAnnotations in interface AnnotationProviderpriority - the priority as a string object
true if this objects has no annotations.public java.util.Collection<FileAnnotation> getAnnotations()
getAnnotations in interface AnnotationProviderpublic FileAnnotation getAnnotation(long key)
getAnnotation in interface AnnotationProviderkey - the key of the annotation
public FileAnnotation getAnnotation(java.lang.String key)
getAnnotation in interface AnnotationProviderkey - the key of the annotation as a long value in string representation
protected void setHighWarnings(int highWarnings)
highWarnings - the value to setprotected void setNormalWarnings(int normalWarnings)
normalWarnings - the value to setprotected void setLowWarnings(int lowWarnings)
lowWarnings - the value to setprotected void setWarnings(int warnings)
warnings - the value to setpublic java.util.Collection<FileAnnotation> getAnnotations(Priority priority)
getAnnotations in interface AnnotationProviderpriority - the priority
public abstract java.lang.String getDetails()
public int getZeroWarningsSinceBuild()
public long getZeroWarningsSinceDate()
public long getZeroWarningsHighScore()
public boolean isNewZeroWarningsHighScore()
true, if the current result reached the old zero warnings highscore.public long getHighScoreGap()
public int getNumberOfAnnotations()
getNumberOfAnnotations in interface AnnotationProviderpublic int getNumberOfAnnotations(Priority priority)
getNumberOfAnnotations in interface AnnotationProviderpriority - the priority
public int getNumberOfFixedWarnings()
public int getNumberOfNewWarnings()
public int getDelta()
public JavaProject getProject()
public java.util.Collection<FileAnnotation> getNewWarnings()
public java.util.Collection<FileAnnotation> getFixedWarnings()
protected abstract boolean hasPreviousResult()
true if a previous build result exists.protected abstract JavaProject getPreviousResult()
public java.lang.Object getDynamic(java.lang.String link,
org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
link - the link to identify the sub page to showrequest - Stapler requestresponse - Stapler response
public Priority[] getPriorities()
public java.util.Collection<FileAnnotation> getAnnotations(java.lang.String priority)
getAnnotations in interface AnnotationProviderpriority - the priority as a string object
public int getNumberOfAnnotations(java.lang.String priority)
getNumberOfAnnotations in interface AnnotationProviderpriority - the priority as a string object
public AnnotationContainer getContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||