public class

ChartReportUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.charts.util.ChartReportUtils

Class Overview

Common utility methods for charting reports

Summary

Constants
String FILTER_PARAM_PREFIX
String PROJECT_PARAM_PREFIX
Public Methods
static String extractProjectOrFilterId(String projectOrFilterId)
Extracts the id component of the 'projectOrFilterId'.
static boolean isValidFilterParamFormat(String projectOrFilterId)
Checks that the projectOrFilterId has a valid format according to isValidFilterParamFormat(String) with prefix FILTER_PARAM_PREFIX
static boolean isValidProjectParamFormat(String projectOrFilterId)
Checks that the projectOrFilterId has a valid format according to isValidFilterParamFormat(String) with prefix PROJECT_PARAM_PREFIX
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String FILTER_PARAM_PREFIX

Constant Value: "filter-"

public static final String PROJECT_PARAM_PREFIX

Constant Value: "project-"

Public Methods

public static String extractProjectOrFilterId (String projectOrFilterId)

Extracts the id component of the 'projectOrFilterId'.

Parameters
projectOrFilterId the raw value of 'projectOrFilterId' from the request
Returns
  • the id component of the 'projectOrFilterId', null if projectOrFilterId is null or empty string or has no id

public static boolean isValidFilterParamFormat (String projectOrFilterId)

Checks that the projectOrFilterId has a valid format according to isValidFilterParamFormat(String) with prefix FILTER_PARAM_PREFIX

Parameters
projectOrFilterId the value from form to validate
Returns
  • true if the projectOrFilterId has filter-ID format

public static boolean isValidProjectParamFormat (String projectOrFilterId)

Checks that the projectOrFilterId has a valid format according to isValidFilterParamFormat(String) with prefix PROJECT_PARAM_PREFIX

Parameters
projectOrFilterId the value from form to validate
Returns
  • true if the projectOrFilterId has project-ID format