com.atlassian.jira.issue.customfields
Class CustomFieldUtils

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.CustomFieldUtils

public class CustomFieldUtils
extends Object


Field Summary
static String CUSTOM_FIELD_PREFIX
           
 
Constructor Summary
CustomFieldUtils()
           
 
Method Summary
static List buildIssueTypes(ConstantsManager constantsManager1, String[] issueTypes)
           
static List buildJiraIssueContexts(boolean global, Long[] projectCategories, Long[] projects, JiraContextTreeManager treeManager)
           
static List buildJiraIssueContexts(String basicScope, Long[] projectCategories, Long[] projects, String[] issuetypes, List returnIssueTypes, JiraContextTreeManager treeManager)
           
static Map buildParams(CustomField customField, FieldConfig config, Issue issue, FieldLayoutItem fieldLayoutItem, Object value, Map customFieldValuesHolder, webwork.action.Action action, Map displayParameters)
           
static List convertToIssueContexts(org.ofbiz.core.entity.GenericValue project, List issueTypeIds, ConstantsManager constantsManager)
           
static Long getCustomFieldId(String key)
          Given a custom field key, return its id.
static String getCustomFieldKey(String searchParamKey)
           
static String getDateFormat()
           
static String getDateTimeFormat()
           
static String getSearchParamSuffix(String searchParamKey)
           
static String getTimeFormat()
           
static org.apache.commons.collections.MultiMap invertMap(Map mapToInvert)
           
static boolean isCollectionNotEmpty(Collection stringCollection)
           
static boolean isUserHasPermissionToProjects(CustomField customField, User user)
          Does the user have permission to at least one project that falls under this custom field.
static Map parseCustomFieldValuesFromActionParams(Map actionParameters, List customFields)
          Parses action paramaters (Map of Collections of Strings with [:]> as key)
static String prettyPrintOptions(Options options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_FIELD_PREFIX

public static final String CUSTOM_FIELD_PREFIX
See Also:
Constant Field Values
Constructor Detail

CustomFieldUtils

public CustomFieldUtils()
Method Detail

getSearchParamSuffix

public static String getSearchParamSuffix(String searchParamKey)

getCustomFieldKey

public static String getCustomFieldKey(String searchParamKey)

getCustomFieldId

public static Long getCustomFieldId(String key)
Given a custom field key, return its id.

Parameters:
key - eg. "customfield_10000"
Returns:
Id, eg. 10000

isCollectionNotEmpty

public static boolean isCollectionNotEmpty(Collection stringCollection)

parseCustomFieldValuesFromActionParams

public static Map parseCustomFieldValuesFromActionParams(Map actionParameters,
                                                         List customFields)
                                                  throws org.ofbiz.core.entity.GenericEntityException,
                                                         FieldValidationException
Parses action paramaters (Map of Collections of Strings with [:]> as key)

Parameters:
actionParameters -
customFields -
Throws:
org.ofbiz.core.entity.GenericEntityException
FieldValidationException
Since:
3.1-DEV

buildJiraIssueContexts

public static List buildJiraIssueContexts(boolean global,
                                          Long[] projectCategories,
                                          Long[] projects,
                                          JiraContextTreeManager treeManager)

buildJiraIssueContexts

public static List buildJiraIssueContexts(String basicScope,
                                          Long[] projectCategories,
                                          Long[] projects,
                                          String[] issuetypes,
                                          List returnIssueTypes,
                                          JiraContextTreeManager treeManager)

invertMap

public static org.apache.commons.collections.MultiMap invertMap(Map mapToInvert)

buildIssueTypes

public static List buildIssueTypes(ConstantsManager constantsManager1,
                                   String[] issueTypes)

convertToIssueContexts

public static List convertToIssueContexts(org.ofbiz.core.entity.GenericValue project,
                                          List issueTypeIds,
                                          ConstantsManager constantsManager)
Parameters:
issueTypeIds - Type ids as strings, eg. ["3", "4"]

isUserHasPermissionToProjects

public static boolean isUserHasPermissionToProjects(CustomField customField,
                                                    User user)
Does the user have permission to at least one project that falls under this custom field. If the custom field has not been configured for anything, it won't return true either

Parameters:
customField -
user -

prettyPrintOptions

public static String prettyPrintOptions(Options options)

buildParams

public static Map buildParams(CustomField customField,
                              FieldConfig config,
                              Issue issue,
                              FieldLayoutItem fieldLayoutItem,
                              Object value,
                              Map customFieldValuesHolder,
                              webwork.action.Action action,
                              Map displayParameters)

getDateFormat

public static String getDateFormat()

getDateTimeFormat

public static String getDateTimeFormat()

getTimeFormat

public static String getTimeFormat()


Copyright © 2002-2007 Atlassian. All Rights Reserved.