com.atlassian.jira.charts.util
Class ChartReportUtils

java.lang.Object
  extended by com.atlassian.jira.charts.util.ChartReportUtils

public class ChartReportUtils
extends Object

Common utility methods for charting reports

Since:
v4.0

Field Summary
static String FILTER_PARAM_PREFIX
           
static String PROJECT_PARAM_PREFIX
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_PARAM_PREFIX

public static final String PROJECT_PARAM_PREFIX
See Also:
Constant Field Values

FILTER_PARAM_PREFIX

public static final String FILTER_PARAM_PREFIX
See Also:
Constant Field Values
Method Detail

isValidProjectParamFormat

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
See Also:
isValidFilterParamFormat(String)

isValidFilterParamFormat

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
See Also:
isValidFilterParamFormat(String)

extractProjectOrFilterId

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


Copyright © 2002-2014 Atlassian. All Rights Reserved.