hudson.plugins.analysis.views
Class DetailFactory

java.lang.Object
  extended by hudson.plugins.analysis.views.DetailFactory

public class DetailFactory
extends Object

Creates detail objects for the selected element of a annotation container.

Author:
Ulli Hafner

Constructor Summary
DetailFactory()
           
 
Method Summary
static void addDetailBuilder(Class<? extends ResultAction<? extends BuildResult>> actionType, DetailFactory detailBuilder)
          Sets the detail builder class to the specified value.
static DetailFactory create(Class<? extends ResultAction<? extends BuildResult>> actionType)
          Creates a new detail builder.
protected  AttributeDetail createAttributeDetail(hudson.model.AbstractBuild<?,?> owner, DefaultAnnotationContainer annotations, String displayName, String header, String defaultEncoding)
          Creates a generic detail tab with the specified link.
 Object createDetails(String link, hudson.model.AbstractBuild<?,?> owner, AnnotationContainer container, String defaultEncoding, String displayName)
          Returns a detail object for the selected element of the specified annotation container.
protected  FixedWarningsDetail createFixedWarningsDetail(hudson.model.AbstractBuild<?,?> owner, Collection<FileAnnotation> fixedAnnotations, String defaultEncoding, String displayName)
          Creates a generic fixed warnings detail tab with the specified link.
protected  TabDetail createTabDetail(hudson.model.AbstractBuild<?,?> owner, Collection<FileAnnotation> annotations, String url, String defaultEncoding)
          Creates a generic detail tab with the specified link.
 Object createTrendDetails(String link, hudson.model.AbstractBuild<?,?> owner, AnnotationContainer container, Collection<FileAnnotation> fixedAnnotations, Collection<FileAnnotation> newAnnotations, Collection<String> errors, String defaultEncoding, String displayName)
          Returns a detail object for the selected element of the specified annotation container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DetailFactory

public DetailFactory()
Method Detail

create

public static DetailFactory create(Class<? extends ResultAction<? extends BuildResult>> actionType)
Creates a new detail builder.

Parameters:
actionType - the type of the action (i.e., the plug-in) to get the detail builder for
Returns:
the detail builder

addDetailBuilder

public static void addDetailBuilder(Class<? extends ResultAction<? extends BuildResult>> actionType,
                                    DetailFactory detailBuilder)
Sets the detail builder class to the specified value.

Parameters:
actionType - the type of the action (i.e., the plug-in) to set the detail builder for
detailBuilder - the value to set

createTrendDetails

public Object createTrendDetails(String link,
                                 hudson.model.AbstractBuild<?,?> owner,
                                 AnnotationContainer container,
                                 Collection<FileAnnotation> fixedAnnotations,
                                 Collection<FileAnnotation> newAnnotations,
                                 Collection<String> errors,
                                 String defaultEncoding,
                                 String displayName)
Returns a detail object for the selected element of the specified annotation container. The details will include the new and fixed warnings trends as well as the errors report.

Parameters:
link - the link to identify the sub page to show
owner - the build as owner of the detail page
container - the annotation container to get the details for
fixedAnnotations - the annotations fixed in this build
newAnnotations - the annotations new in this build
errors - the errors in this build
defaultEncoding - the default encoding to be used when reading and parsing files
displayName - the name of the selected object
Returns:
the dynamic result of this module detail view

createDetails

public Object createDetails(String link,
                            hudson.model.AbstractBuild<?,?> owner,
                            AnnotationContainer container,
                            String defaultEncoding,
                            String displayName)
Returns a detail object for the selected element of the specified annotation container.

Parameters:
link - the link to identify the sub page to show
owner - the build as owner of the detail page
container - the annotation container to get the details for
defaultEncoding - the default encoding to be used when reading and parsing files
displayName - the name of the selected object
Returns:
the dynamic result of this module detail view

createAttributeDetail

protected AttributeDetail createAttributeDetail(hudson.model.AbstractBuild<?,?> owner,
                                                DefaultAnnotationContainer annotations,
                                                String displayName,
                                                String header,
                                                String defaultEncoding)
Creates a generic detail tab with the specified link.

Parameters:
owner - the build as owner of the detail page
annotations - the annotations to display
displayName - the name of the view
header - the bread crumb name
defaultEncoding - the default encoding to be used when reading and parsing files
Returns:
the detail view

createTabDetail

protected TabDetail createTabDetail(hudson.model.AbstractBuild<?,?> owner,
                                    Collection<FileAnnotation> annotations,
                                    String url,
                                    String defaultEncoding)
Creates a generic detail tab with the specified link.

Parameters:
owner - the build as owner of the detail page
annotations - the annotations to display
url - the URL for the details view
defaultEncoding - the default encoding to be used when reading and parsing files
Returns:
the detail view

createFixedWarningsDetail

protected FixedWarningsDetail createFixedWarningsDetail(hudson.model.AbstractBuild<?,?> owner,
                                                        Collection<FileAnnotation> fixedAnnotations,
                                                        String defaultEncoding,
                                                        String displayName)
Creates a generic fixed warnings detail tab with the specified link.

Parameters:
owner - the build as owner of the detail page
fixedAnnotations - the annotations to display
defaultEncoding - the default encoding to be used when reading and parsing files
displayName - the name of the view
Returns:
the detail view


Copyright © 2004-2012 Hudson. All Rights Reserved.