hudson.plugins.warnings.util
Class AbstractAnnotationsDetail

java.lang.Object
  extended by hudson.plugins.warnings.util.model.AnnotationContainer
      extended by hudson.plugins.warnings.util.AbstractAnnotationsDetail
All Implemented Interfaces:
hudson.model.ModelObject, AnnotationProvider, java.io.Serializable
Direct Known Subclasses:
AttributeDetail, FileDetail, FixedWarningsDetail, ModuleDetail, NewWarningsDetail, PackageDetail, PrioritiesDetail

public abstract class AbstractAnnotationsDetail
extends AnnotationContainer
implements hudson.model.ModelObject

Base class for annotation detail objects. Instances of this class could be used for Hudson Stapler objects that contain a subset of annotations.

Author:
Ulli Hafner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.plugins.warnings.util.model.AnnotationContainer
AnnotationContainer.Hierarchy
 
Constructor Summary
AbstractAnnotationsDetail(hudson.model.AbstractBuild<?,?> owner, java.util.Collection<FileAnnotation> annotations, java.lang.String name, AnnotationContainer.Hierarchy hierarchy)
          Creates a new instance of AbstractWarningsDetail.
 
Method Summary
protected  void createDetailGraph(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, AnnotationProvider detailObject, int upperBound)
          Creates a detail graph for the specified detail object.
 void doStatistics(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Generates a PNG image for high/normal/low distribution of the specified object.
 java.lang.Object getDynamic(java.lang.String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Returns the dynamic result of this module detail view.
 java.lang.String getHeader()
          Returns the header for the detail screen.
 java.lang.String getLocalizedPriority(java.lang.String priorityName)
          Returns a localized priority name.
 hudson.model.AbstractBuild<?,?> getOwner()
          Returns the build as owner of this object.
 Priority[] getPriorities()
          Returns all possible priorities.
 boolean isCurrent()
          Returns whether this build is the last available build.
 
Methods inherited from class hudson.plugins.warnings.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, containsCategory, containsFile, containsModule, containsPackage, containsType, getAnnotation, getAnnotation, getAnnotationBound, getAnnotations, getAnnotations, getAnnotations, getCategories, getCategory, getChildren, getContainer, getFile, getFile, getFiles, getHighAnnotations, getHighPriority, getLowAnnotations, getLowPriority, getModule, getModules, getName, getNormalAnnotations, getNormalPriority, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getPackage, getPackageCategoryName, getPackages, getToolTip, getType, getTypes, hasAnnotations, hasAnnotations, hasAnnotations, hasNoAnnotations, hasNoAnnotations, hasNoAnnotations, rebuildMappings, setHierarchy, setName
 
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
 

Constructor Detail

AbstractAnnotationsDetail

public AbstractAnnotationsDetail(hudson.model.AbstractBuild<?,?> owner,
                                 java.util.Collection<FileAnnotation> annotations,
                                 java.lang.String name,
                                 AnnotationContainer.Hierarchy hierarchy)
Creates a new instance of AbstractWarningsDetail.

Parameters:
owner - current build as owner of this object.
annotations - the set of warnings represented by this object
name - the name of this object
Method Detail

getHeader

public java.lang.String getHeader()
Returns the header for the detail screen.

Returns:
the header

getOwner

public final hudson.model.AbstractBuild<?,?> getOwner()
Returns the build as owner of this object.

Returns:
the owner

isCurrent

public final boolean isCurrent()
Returns whether this build is the last available build.

Returns:
true if this build is the last available build

createDetailGraph

protected final void createDetailGraph(org.kohsuke.stapler.StaplerRequest request,
                                       org.kohsuke.stapler.StaplerResponse response,
                                       AnnotationProvider detailObject,
                                       int upperBound)
                                throws java.io.IOException
Creates a detail graph for the specified detail object.

Parameters:
request - Stapler request
response - Stapler response
detailObject - the detail object to compute the graph for
upperBound - the upper bound of all tasks
Throws:
java.io.IOException - in case of an error

getLocalizedPriority

public java.lang.String getLocalizedPriority(java.lang.String priorityName)
Returns a localized priority name.

Parameters:
priorityName - priority as String value
Returns:
localized priority name

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 module detail view. Depending on the number of packages, one of the following detail objects is returned:

Parameters:
link - the link to identify the sub page to show
request - Stapler request
response - Stapler response
Returns:
the dynamic result of this module detail view

doStatistics

public void doStatistics(org.kohsuke.stapler.StaplerRequest request,
                         org.kohsuke.stapler.StaplerResponse response)
                  throws java.io.IOException
Generates a PNG image for high/normal/low distribution of the specified object.

Parameters:
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - in case of an error

getPriorities

public Priority[] getPriorities()
Returns all possible priorities.

Returns:
all priorities


Copyright © 2008. All Rights Reserved.