de.smartics.maven.issues
Class RendererConfig.Builder

Package class diagram package RendererConfig.Builder
java.lang.Object
  extended by de.smartics.maven.issues.RendererConfig.Builder
Enclosing class:
RendererConfig

public static final class RendererConfig.Builder
     
     
extends Object

Builder to create instances of type RendererConfig.


Constructor Summary
RendererConfig.Builder()
           
 
Method Summary
 RendererConfig build()
          Validates the information passed to the builder and creates in instance of type RendererConfig.
 void setBundle(ResourceBundle bundle)
          Sets the message bundle for labels.
 void setColumns(List<String> columns)
          Sets the value for columns.
 void setColumnWidths(List<String> columnWidths)
          Sets the value for columnWidths.
 void setComponent(String component)
          Sets the value for component.
 void setCurrentReleaseVersion(org.apache.maven.artifact.versioning.ArtifactVersion currentReleaseVersion)
          Sets the current version of the project.
 void setDescription(String description)
          Sets the description to be set in the configuration to be used instead of the one found in the localized files.
 void setDescriptionFile(File descriptionFile)
          Sets the description file is a XDoc file to be included as-is into the generated report.
 void setFooterText(String footerText)
          Sets the text to be added as a footer as raw text.
 void setIncludeComponentAtIndex(int includeComponentAtIndex)
          Sets the value for includeComponentAtIndex.
 void setIncludeComponentAtIndexColumnWidth(int includeComponentAtIndexColumnWidth)
          Sets the value for includeComponentAtIndexColumnWidth.
 void setIncludeOnSamePageAllOfVersion(VersionType includeOnSamePageAll)
          Sets the value for includeOnSamePageAll.
 void setNoResultsDescription(String noResultsDescription)
          Sets the description to be set in the configuration if no issue matches the query to be used instead of the one found in the localized files.
 void setQueryName(String queryName)
          Sets the name of the query to execute.
 void setRenderEmailAdresses(boolean renderEmailAdresses)
          Sets the value of the flag that indicates whether or not eMail addresses should be rendered.
 void setReportReferences(List<ReportReference> reportReferences)
          Sets the references to former reports.
 void setSections(List<String> sections)
          Sets the order of the values specified for the sectionType.
 void setSectionType(String sectionType)
          Sets the type (probably but not necessarily a user type) that specifies the information in the issue that is used to group the issues in sections.
 void setTitle(String title)
          Sets the title to be set in the configuration to be used instead of the one found in the localized files.
 void setVersionFactory(VersionFactory versionFactory)
          Sets the factory to create comparable version instances.
 void setVersionRange(ArtifactVersionRange versionRange)
          Sets the range defining the versions of issues to be rendered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererConfig.Builder

public RendererConfig.Builder()
Method Detail

setBundle

public void setBundle(ResourceBundle bundle)
Sets the message bundle for labels.

Parameters:
bundle - the message bundle for labels.

setComponent

public void setComponent(String component)
Sets the value for component.

Sets the component(s) that you want to limit your report to include. Multiple components can be separated by commas. If this is set to empty - that means all components.

Parameters:
component - the value for component.

setSectionType

public void setSectionType(String sectionType)
Sets the type (probably but not necessarily a user type) that specifies the information in the issue that is used to group the issues in sections.

For example a user type ct_type may be defined to specify the type of an issue. Valid types could be Bug, New Feature, Improvement, and Task .

Parameters:
sectionType - the type (probably but not necessarily a user type) that specifies the information in the issue that is used to group the issues in sections.

setSections

public void setSections(List<String> sections)
Sets the order of the values specified for the sectionType. Only values specified in this list will be rendered at all.

Regarding the example given for sectionType, this list could define New Feature, Bug, Improvement. This would render issues tagged as new features in the first, issues tagged as bugs in the second and issues tagged as improvements in the last section. Issues tagged as tasks will not be rendered.

Parameters:
sections - the order of the values specified for the sectionType.

setQueryName

public void setQueryName(String queryName)
Sets the name of the query to execute. If the query name is specified none of the other query properties is taken into account.

Parameters:
queryName - the name of the query to execute.

setColumns

public void setColumns(List<String> columns)
Sets the value for columns.

Lists the columns to be rendered. Each element of this list is a property of an issue. The identifiers given here must match the ones defined in the referenced issue management system. E.g. for Bugzilla these are defined in org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute.

Parameters:
columns - the value for columns.

setColumnWidths

public void setColumnWidths(List<String> columnWidths)
Sets the value for columnWidths.

Lists the column width to be used to set to the columns. If the value is 0 (zero) no width will be set explicitly for that column.

Parameters:
columnWidths - the value for columnWidths.

setIncludeComponentAtIndex

public void setIncludeComponentAtIndex(int includeComponentAtIndex)
Sets the value for includeComponentAtIndex.

Specifies the index (zero bases) of the column at which the component information is to rendered. This option is only taken into account if the component property does not specify exactly one component. Please note that this cannot be used in named queries.

This is a handy option for running the report on a multi project. Sub projects specify exactly one component while the parent project specifies none. The result with setting an index of e.g. 1 is that in each sub project the component is not mentioned while it is on the parent project (listing all issues of all projects) it is rendered at the second column.

Parameters:
includeComponentAtIndex - the value for includeComponentAtIndex.

setIncludeComponentAtIndexColumnWidth

public void setIncludeComponentAtIndexColumnWidth(int includeComponentAtIndexColumnWidth)
Sets the value for includeComponentAtIndexColumnWidth.

Specifies the column width for the includeComponentAtIndex property. If that property is not set, this property value is ignored.

Parameters:
includeComponentAtIndexColumnWidth - the value for includeComponentAtIndexColumnWidth.

setRenderEmailAdresses

public void setRenderEmailAdresses(boolean renderEmailAdresses)
Sets the value of the flag that indicates whether or not eMail addresses should be rendered. Rendering eMail addresses may be useful for intranet sites. Due to spamming it might not be wise to render an eMail address on an internet server.

A value of true indicates that the eMail address should be rendered (e.g. as a mailto anchor in HTML for an assignee name), false if no eMail address information should be written.

Parameters:
renderEmailAdresses - the value of the flag that indicates whether or not eMail addresses should be rendered.

setIncludeOnSamePageAllOfVersion

public void setIncludeOnSamePageAllOfVersion(VersionType includeOnSamePageAll)
Sets the value for includeOnSamePageAll.

On the same page all of the given version type are rendered. For instance if this value refers to the major version, all versions having the same major version are rendered. A value of micro implies that only the current version is to be rendered.

Defaults to VersionType.MAJOR.

Parameters:
includeOnSamePageAll - the value for includeOnSamePageAll.

setVersionRange

public void setVersionRange(ArtifactVersionRange versionRange)
Sets the range defining the versions of issues to be rendered.

Parameters:
versionRange - the range defining the versions of issues to be rendered.

setCurrentReleaseVersion

public void setCurrentReleaseVersion(org.apache.maven.artifact.versioning.ArtifactVersion currentReleaseVersion)
Sets the current version of the project. This information is used to determine which issues are targeted prior or later than the current version.

Parameters:
currentReleaseVersion - the current version of the project.

setVersionFactory

public void setVersionFactory(VersionFactory versionFactory)
Sets the factory to create comparable version instances. This factory is used to sort issues by their version information.

Parameters:
versionFactory - the factory to create comparable version instances.

setTitle

public void setTitle(String title)
Sets the title to be set in the configuration to be used instead of the one found in the localized files. This property is used to specify the title from the configuration and is useful if the user wants to select a specific set of information retrieved by a specific query and now wants to set a specific title.

This value may be null in which case the renderer retrieves a default value (probably assuming that a release notes report is rendered).

Parameters:
title - the title to be set in the configuration to be used instead of the one found in the localized files.

setDescription

public void setDescription(String description)
Sets the description to be set in the configuration to be used instead of the one found in the localized files. This property is used to specify the description from the configuration and is useful if the user wants to select a specific set of information retrieved by a specific query and now wants to set a specific description.

This value may be null in which case the renderer retrieves a default value (probably assuming that a release notes report is rendered).

Parameters:
description - the description to be set in the configuration to be used instead of the one found in the localized files.

setDescriptionFile

public void setDescriptionFile(File descriptionFile)
Sets the description file is a XDoc file to be included as-is into the generated report. It is rendered between the main header and the report table where the description is normally written. The description is left out if a description file is given.

Parameters:
descriptionFile - the description file is a XDoc file to include in the report.

setNoResultsDescription

public void setNoResultsDescription(String noResultsDescription)
Sets the description to be set in the configuration if no issue matches the query to be used instead of the one found in the localized files. This property is used to specify the description from the configuration and is useful if the user wants to select a specific set of information retrieved by a specific query and now wants to set a specific description.

This value may be omitted in which case the renderer retrieves a default value (probably assuming that a release notes report is rendered).

Parameters:
noResultsDescription - the description to be set in the configuration if no issue matches the query to be used instead of the one found in the localized files.

setFooterText

public void setFooterText(String footerText)
Sets the text to be added as a footer as raw text.

Parameters:
footerText - the text to be added as a footer as raw text.

build

public RendererConfig build()
                     throws IllegalArgumentException
Validates the information passed to the builder and creates in instance of type RendererConfig.

Returns:
the created instance.
Throws:
IllegalArgumentException - if the information passed to the builder is invalid to create the instance.

setReportReferences

public void setReportReferences(List<ReportReference> reportReferences)
Sets the references to former reports.

Parameters:
reportReferences - the references to former reports.


Copyright © 2008-2010 Kronseder & Reiner GmbH - smartics. All Rights Reserved.