hudson.plugins.warnings.util
Class CategoryUrlBuilder

java.lang.Object
  extended by hudson.plugins.warnings.util.CategoryUrlBuilder
All Implemented Interfaces:
SerializableUrlGenerator, java.io.Serializable, org.jfree.chart.urls.CategoryURLGenerator

public class CategoryUrlBuilder
extends java.lang.Object
implements SerializableUrlGenerator

Builds a URL for the links in a clickable map. The URL is composed of the build number, a slash, the plug-in name, and an optional detail URL.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
CategoryUrlBuilder(java.lang.String rootUrl, java.lang.String pluginName)
          Creates a new instance of CategoryUrlBuilder.
 
Method Summary
 java.lang.String generateURL(org.jfree.data.category.CategoryDataset dataset, int row, int column)
          
protected  java.lang.String getDetailUrl(int row)
          Returns a relative URL based on the specified row that will be appended to the base URL.
 java.lang.String getPluginName()
          Returns the plug-in name.
 java.lang.String getRootUrl()
          Returns the root URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryUrlBuilder

public CategoryUrlBuilder(java.lang.String rootUrl,
                          java.lang.String pluginName)
Creates a new instance of CategoryUrlBuilder.

Parameters:
rootUrl - root URL that is used as prefix
pluginName - the name of the plug-in
Method Detail

generateURL

public java.lang.String generateURL(org.jfree.data.category.CategoryDataset dataset,
                                    int row,
                                    int column)

Specified by:
generateURL in interface org.jfree.chart.urls.CategoryURLGenerator

getRootUrl

public java.lang.String getRootUrl()
Returns the root URL.

Returns:
the root URL

getPluginName

public java.lang.String getPluginName()
Returns the plug-in name.

Returns:
the plug-in name

getDetailUrl

protected java.lang.String getDetailUrl(int row)
Returns a relative URL based on the specified row that will be appended to the base URL. This default implementation returns an empty string, indicating that there is no detail URL based on the selected row.

Parameters:
row - the selected row
Returns:
a relative URL based on the specified row.


Copyright © 2009. All Rights Reserved.