hudson.plugins.tasks
Class TasksResult

java.lang.Object
  extended by hudson.plugins.tasks.util.BuildResult
      extended by hudson.plugins.tasks.TasksResult
All Implemented Interfaces:
hudson.model.ModelObject, AnnotationProvider, java.io.Serializable
Direct Known Subclasses:
TasksMavenResult

public class TasksResult
extends BuildResult

Represents the results of the task scanner. One instance of this class is persisted for each build via an XML file.

Author:
Ulli Hafner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class hudson.plugins.tasks.util.BuildResult
high, low, normal, XSTREAM
 
Constructor Summary
TasksResult(hudson.model.AbstractBuild<?,?> build, java.lang.String defaultEncoding, TasksParserResult result, BuildResult previous, java.lang.String highTags, java.lang.String normalTags, java.lang.String lowTags)
          Creates a new instance of TasksResult.
TasksResult(hudson.model.AbstractBuild<?,?> build, java.lang.String defaultEncoding, TasksParserResult result, java.lang.String highTags, java.lang.String normalTags, java.lang.String lowTags)
          Creates a new instance of TasksResult.
 
Method Summary
 java.lang.String getDetails()
          Returns the detail messages for the summary.jelly file.
 java.lang.String getDisplayName()
          Returns the display name (bread crumb name) of this result.
 java.lang.Object getDynamic(java.lang.String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Returns the dynamic result of this tasks detail view.
 int getNumberOfFiles()
          Returns the number of scanned files in this project.
 java.lang.String getPackageCategoryName()
          Returns the package category name for the scanned files.
 Priority[] getPriorities()
          Returns the actually used priorities.
protected  java.lang.Class<? extends ResultAction<? extends BuildResult>> getResultActionType()
          Returns the actual type of the associated result action.
protected  java.lang.String getSerializationFileName()
          Returns the name of the file to store the serialized annotations.
 java.lang.String getSummary()
          Returns a summary message for the summary.jelly file.
 java.lang.String getTags(Priority priority)
          Returns the tags for the specified priority.
 
Methods inherited from class hudson.plugins.tasks.util.BuildResult
getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getApi, getContainer, getDataFile, getDays, getDefaultEncoding, getDelta, getErrors, getFixedWarnings, getHighScoreGap, getModules, getNewWarnings, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfFixedWarnings, getNumberOfModules, getNumberOfNewWarnings, getNumberOfWarnings, getOwner, getPreviousResult, getProject, getWarningsDelta, getZeroWarningsHighScore, getZeroWarningsSinceBuild, getZeroWarningsSinceDate, hasAnnotations, hasAnnotations, hasAnnotations, hasError, hasNoAnnotations, hasNoAnnotations, hasNoAnnotations, hasPreviousResult, isCurrent, isNewZeroWarningsHighScore, readResolve, setHighWarnings, setLowWarnings, setNormalWarnings, setWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TasksResult

public TasksResult(hudson.model.AbstractBuild<?,?> build,
                   java.lang.String defaultEncoding,
                   TasksParserResult result,
                   java.lang.String highTags,
                   java.lang.String normalTags,
                   java.lang.String lowTags)
Creates a new instance of TasksResult.

Parameters:
build - the current build as owner of this action
defaultEncoding - the default encoding to be used when reading and parsing files
result - the parsed annotations
highTags - tag identifiers indicating high priority
normalTags - tag identifiers indicating normal priority
lowTags - tag identifiers indicating low priority

TasksResult

public TasksResult(hudson.model.AbstractBuild<?,?> build,
                   java.lang.String defaultEncoding,
                   TasksParserResult result,
                   BuildResult previous,
                   java.lang.String highTags,
                   java.lang.String normalTags,
                   java.lang.String lowTags)
Creates a new instance of TasksResult.

Parameters:
build - the current build as owner of this action
defaultEncoding - the default encoding to be used when reading and parsing files
result - the parsed FindBugs result
previous - the previous result of open tasks
highTags - tag identifiers indicating high priority
normalTags - tag identifiers indicating normal priority
lowTags - tag identifiers indicating low priority
Method Detail

getSummary

public java.lang.String getSummary()
Returns a summary message for the summary.jelly file.

Returns:
the summary message

getNumberOfFiles

public int getNumberOfFiles()
Returns the number of scanned files in this project.

Returns:
the number of scanned files in this project

getDisplayName

public java.lang.String getDisplayName()
Returns the display name (bread crumb name) of this result.

Returns:
the display name of this result.

getSerializationFileName

protected java.lang.String getSerializationFileName()
Returns the name of the file to store the serialized annotations.

Specified by:
getSerializationFileName in class BuildResult
Returns:
the name of the file to store the serialized annotations

getDynamic

public java.lang.Object getDynamic(java.lang.String link,
                                   org.kohsuke.stapler.StaplerRequest request,
                                   org.kohsuke.stapler.StaplerResponse response)
Returns the dynamic result of this tasks detail view. Depending on the number of modules and packages, one of the following detail objects is returned:

Overrides:
getDynamic in class BuildResult
Parameters:
link - the link to the source code
request - Stapler request
response - Stapler response
Returns:
the dynamic result of the FindBugs analysis (detail page for a package).

getPriorities

public Priority[] getPriorities()
Returns the actually used priorities.

Overrides:
getPriorities in class BuildResult
Returns:
the actually used priorities.

getTags

public final java.lang.String getTags(Priority priority)
Returns the tags for the specified priority.

Parameters:
priority - the priority
Returns:
the tags for the specified priority

getPackageCategoryName

public java.lang.String getPackageCategoryName()
Returns the package category name for the scanned files. Currently, only java and c# files are supported.

Returns:
the package category name for the scanned files

getResultActionType

protected java.lang.Class<? extends ResultAction<? extends BuildResult>> getResultActionType()
Returns the actual type of the associated result action.

Specified by:
getResultActionType in class BuildResult
Returns:
the actual type of the associated result action

getDetails

public java.lang.String getDetails()
Returns the detail messages for the summary.jelly file.

Specified by:
getDetails in class BuildResult
Returns:
the summary message


Copyright © 2009. All Rights Reserved.