com.atlassian.jira.charts.util
Class ChartUtilsImpl

java.lang.Object
  extended by com.atlassian.jira.charts.util.ChartUtilsImpl
All Implemented Interfaces:
ChartUtils

public class ChartUtilsImpl
extends Object
implements ChartUtils

Utility class for charting

Since:
v4.0

Constructor Summary
ChartUtilsImpl(SearchRequestService searchRequestService, JiraAuthenticationContext authenticationContext, ProjectManager projectManager, SearchService searchService, JiraHome jiraHome)
           
 
Method Summary
 File getChartDirectory()
          Get the directory that charts are temporarily stored in.
 String renderBase64Chart(BufferedImage image, String chartName)
          Encode given image into the base 64 string.
 SearchRequest retrieveOrMakeSearchRequest(String projectOrFilterId, Map<String,Object> params)
          Make a search request out of the searchQuery parameter and populate the report/portlet param map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartUtilsImpl

public ChartUtilsImpl(SearchRequestService searchRequestService,
                      JiraAuthenticationContext authenticationContext,
                      ProjectManager projectManager,
                      SearchService searchService,
                      JiraHome jiraHome)
Method Detail

retrieveOrMakeSearchRequest

public SearchRequest retrieveOrMakeSearchRequest(String projectOrFilterId,
                                                 Map<String,Object> params)
Description copied from interface: ChartUtils
Make a search request out of the searchQuery parameter and populate the report/portlet param map

Specified by:
retrieveOrMakeSearchRequest in interface ChartUtils
Parameters:
projectOrFilterId - a jql string, a project id or a filter id
params - the map of parameters to modify
Returns:
The SearchRequest for the project/filter id

getChartDirectory

public File getChartDirectory()
Description copied from interface: ChartUtils
Get the directory that charts are temporarily stored in.

Specified by:
getChartDirectory in interface ChartUtils
Returns:
Directory

renderBase64Chart

public String renderBase64Chart(BufferedImage image,
                                String chartName)
Description copied from interface: ChartUtils
Encode given image into the base 64 string.

Specified by:
renderBase64Chart in interface ChartUtils
Parameters:
image - image to be encoded
chartName - name that occurs in log in case of error
Returns:
image as a String in base 64 encoded format ("data:image/png;base64,iVBORw0KGgoAAAANS...")


Copyright © 2002-2014 Atlassian. All Rights Reserved.