de.smartics.maven.issues
Class RendererConfig

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

public final class RendererConfig
     
     
extends Object

Configuration to control the rendering process.

Author:
Robert Reiner

Nested Class Summary
static class RendererConfig.Builder
          Builder to create instances of type RendererConfig.
 
Method Summary
 ResourceBundle getBundle()
          Returns the message bundle for labels.
 List<String> getColumns()
          Returns the value for columns.
 List<String> getColumnWidths()
          Returns the value for columnWidths.
 String getComponent()
          Returns the value for component.
 org.apache.maven.artifact.versioning.ArtifactVersion getCurrentReleaseVersion()
          Returns the current version of the project.
 String getDescription()
          Returns the description to be set in the configuration to be used instead of the one found in the localized files.
 File getDescriptionFile()
          Returns the description file is a XDoc file to be included as-is into the generated report.
 String getDescriptionFileBodyContent()
          Reads the body content from the description file.
 String getFooterText()
          Returns the text to be added as a footer as raw text.
 int getIncludeComponentAtIndex()
          Returns the value for includeComponentAtIndex.
 int getIncludeComponentAtIndexColumnWidth()
          Returns the value for includeComponentAtIndexColumnWidth.
 VersionType getIncludeOnSamePageAllOfVersion()
          Returns the value for includeOnSamePageAll.
 String getNoResultsDescription()
          Returns 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.
 String getQueryName()
          Returns the name of the query to execute.
 List<ReportReference> getReportReferences()
          Returns the references to former reports.
 List<String> getSections()
          Returns the order of the values specified for the section type.
 String getSectionType()
          Returns 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.
 String getTitle()
          Returns the title to be set in the configuration to be used instead of the one found in the localized files.
 VersionFactory getVersionFactoryInstance()
          Returns the factory to create comparable version instances.
 ArtifactVersionRange getVersionRange()
          Returns a range defining the versions of issues to be rendered.
 boolean isRenderEmailAdresses()
          Returns the value of the flag that indicates whether or not eMail addresses should be rendered.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getBundle

public ResourceBundle getBundle()
Returns the message bundle for labels.

Returns:
the message bundle for labels.

getComponent

public String getComponent()
Returns 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.

Returns:
the value for component.

getSectionType

public String getSectionType()
Returns 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 .

Returns:
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.

getSections

public List<String> getSections()
Returns the order of the values specified for the section type. Only values specified in this list will be rendered at all.

Regarding the example given for getSectionType(), 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.

Returns:
the order of the values specified for the section type.

getQueryName

public String getQueryName()
Returns the name of the query to execute. If the query name is specified none of the other query properties is taken into account.

Returns:
the name of the query to execute.

getColumns

public List<String> getColumns()
Returns 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.

Returns:
the value for columns.

getColumnWidths

public List<String> getColumnWidths()
Returns 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.

Returns:
the value for columnWidths.

getIncludeComponentAtIndex

public int getIncludeComponentAtIndex()
Returns 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.

Returns:
the value for includeComponentAtIndex.

getIncludeComponentAtIndexColumnWidth

public int getIncludeComponentAtIndexColumnWidth()
Returns the value for includeComponentAtIndexColumnWidth.

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

Returns:
the value for includeComponentAtIndexColumnWidth.

isRenderEmailAdresses

public boolean isRenderEmailAdresses()
Returns 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.

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

getIncludeOnSamePageAllOfVersion

public VersionType getIncludeOnSamePageAllOfVersion()
Returns 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.

Returns:
the value for includeOnSamePageAll.

getVersionRange

public ArtifactVersionRange getVersionRange()
Returns a range defining the versions of issues to be rendered.

Returns:
a range defining the versions of issues to be rendered.

getCurrentReleaseVersion

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

Returns:
the current version of the project.

getVersionFactoryInstance

public VersionFactory getVersionFactoryInstance()
Returns the factory to create comparable version instances. This factory is used to sort issues by their version information.

Returns:
the factory to create comparable version instances.

getTitle

public String getTitle()
Returns 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).

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

getDescription

public String getDescription()
Returns 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).

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

getDescriptionFile

public File getDescriptionFile()
Returns 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.

Returns:
the description file is a XDoc file to include in the report.

getNoResultsDescription

public String getNoResultsDescription()
Returns 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).

Returns:
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.

getFooterText

public String getFooterText()
Returns the text to be added as a footer as raw text.

Returns:
the text to be added as a footer as raw text.

getReportReferences

public List<ReportReference> getReportReferences()
Returns the references to former reports.

Returns:
the references to former reports.

getDescriptionFileBodyContent

public String getDescriptionFileBodyContent()
                                     throws IOException
Reads the body content from the description file.

Returns:
the content of the body element (without the body tags). If no description file is given, the empty string is returned.
Throws:
IOException - if the file cannot be parsed to extract the body element content.

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


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