hudson.plugins.analysis.util
Class CategoryUrlBuilder

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

public class CategoryUrlBuilder
extends 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(String rootUrl, String pluginName)
          Creates a new instance of CategoryUrlBuilder.
 
Method Summary
 String generateURL(org.jfree.data.category.CategoryDataset dataset, int row, int column)
          
protected  String getDetailUrl(int row)
          Returns a relative URL based on the specified row that will be appended to the base URL.
 String getPluginName()
          Returns the plug-in name.
 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(String rootUrl,
                          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 String generateURL(org.jfree.data.category.CategoryDataset dataset,
                          int row,
                          int column)

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

getRootUrl

public String getRootUrl()
Returns the root URL.

Returns:
the root URL

getPluginName

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

Returns:
the plug-in name

getDetailUrl

protected 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 © 2004-2012 Hudson. All Rights Reserved.