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, java.lang.Comparable<AnnotationContainer>
Direct Known Subclasses:
AttributeDetail, FileDetail, FixedWarningsDetail, ModuleDetail, NewWarningsDetail, PackageDetail, PrioritiesDetail, TabDetail

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.pmd.util.model.AnnotationContainer
AnnotationContainer.Hierarchy
 
Constructor Summary
AbstractAnnotationsDetail(hudson.model.AbstractBuild<?,?> owner, java.util.Collection<FileAnnotation> annotations, java.lang.String defaultEncoding, java.lang.String name, AnnotationContainer.Hierarchy hierarchy)
          Creates a new instance of AbstractAnnotationsDetail.
 
Method Summary
 java.lang.String getDefaultEncoding()
          Returns the defined default encoding.
 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.pmd.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, compareTo, containsCategory, containsFile, containsModule, containsPackage, containsType, equals, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getCategories, getCategory, getCategory, getContainer, getFile, getFile, getFiles, getHighAnnotations, getHighPriority, getLowAnnotations, getLowPriority, getModule, getModule, getModules, getName, getNormalAnnotations, getNormalPriority, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfHighAnnotations, getNumberOfLowAnnotations, getNumberOfNormalAnnotations, getPackage, getPackage, getPackageCategoryName, getPackages, getToolTip, getType, getType, getTypes, getUpperBound, hasAnnotations, hasAnnotations, hasAnnotations, hashCode, hasNoAnnotations, hasNoAnnotations, hasNoAnnotations, rebuildMappings, setHierarchy, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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 defaultEncoding,
                                 java.lang.String name,
                                 AnnotationContainer.Hierarchy hierarchy)
Creates a new instance of AbstractAnnotationsDetail.

Parameters:
owner - current build as owner of this object.
annotations - the set of warnings represented by this object
defaultEncoding - the default encoding to be used when reading and parsing files
name - the name of this object
hierarchy - the hierarchy level of this detail object
Method Detail

getDefaultEncoding

public java.lang.String getDefaultEncoding()
Returns the defined default encoding.

Returns:
the default encoding

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

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

getPriorities

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

Returns:
all priorities


Copyright © 2008. All Rights Reserved.