hudson.plugins.pmd.util
Class AbstractAnnotationsDetail

java.lang.Object
  extended by hudson.plugins.pmd.util.model.AnnotationContainer
      extended by hudson.plugins.pmd.util.AbstractAnnotationsDetail
All Implemented Interfaces:
hudson.model.ModelObject, AnnotationProvider, java.io.Serializable
Direct Known Subclasses:
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.

See Also:
Serialized Form

Constructor Summary
AbstractAnnotationsDetail(hudson.model.AbstractBuild<?,?> owner, java.util.Collection<FileAnnotation> annotations, java.lang.String header)
          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.
protected  AbstractAnnotationsDetail getDynamic(java.lang.String link)
          Returns the dynamic result of this module detail view.
 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 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.
protected  java.lang.String getTitle()
          Returns the header for the detail screen.
 boolean isCurrent()
          Returns whether this build is the last available build.
 
Methods inherited from class hudson.plugins.pmd.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, annotationAdded, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getPackageCategoryName, getToolTip, hasAnnotations, hasAnnotations, hasAnnotations, rebuildPriorities
 
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 header)
Creates a new instance of AbstractWarningsDetail.

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

getTitle

protected java.lang.String getTitle()
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

getDynamic

protected AbstractAnnotationsDetail getDynamic(java.lang.String link)
Returns the dynamic result of this module detail view. Depending on the link value the sub-class could return a special detail object. If there is no such one, then null must be returned. In this case, the link will be interpreted as source detail of the specified annotation.

Parameters:
link - the link to identify the sub page to show, or null if the source detail should be shown
Returns:
the dynamic result of this module detail view

getPriorities

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

Returns:
all priorities


Copyright © 2008. All Rights Reserved.