|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.customfields.CustomFieldUtils
public class CustomFieldUtils
Field Summary | |
---|---|
static String |
CUSTOM_FIELD_PREFIX
|
Constructor Summary | |
---|---|
CustomFieldUtils()
|
Method Summary | |
---|---|
static List<org.ofbiz.core.entity.GenericValue> |
buildIssueTypes(ConstantsManager constantsManager,
String[] issueTypes)
|
static List<JiraContextNode> |
buildJiraIssueContexts(boolean global,
Long[] projectCategories,
Long[] projects,
JiraContextTreeManager treeManager)
|
static Map<String,Object> |
buildParams(CustomField customField,
FieldConfig config,
Issue issue,
FieldLayoutItem fieldLayoutItem,
Object value,
Map customFieldValuesHolder,
webwork.action.Action action,
Map displayParameters)
|
static List<IssueContext> |
convertToIssueContexts(org.ofbiz.core.entity.GenericValue project,
List<String> issueTypeIds)
Deprecated. Please use convertToIssueContexts(Project, List) . Since v4.0 |
static List<IssueContext> |
convertToIssueContexts(Project project,
List<String> issueTypeIds)
Converts list of issue type ids to IssueContexts . |
static Long |
getCustomFieldId(String key)
Given a custom field key, return its id or null. |
static String |
getCustomFieldKey(String searchParamKey)
|
static String |
getDateFormat()
Deprecated. Use DateTimeFormatUtils.getDateFormat() instead. Since v5.0. |
static String |
getDateTimeFormat()
Deprecated. Use DateTimeFormatUtils.getDateTimeFormat() instead. Since v5.0. |
protected static I18nHelper |
getI18nBean()
|
static String |
getSearchParamSuffix(String searchParamKey)
|
static String |
getTimeFormat()
Deprecated. Use DateTimeFormatUtils.getTimeFormat() instead. Since v5.0. |
static boolean |
isCollectionNotEmpty(Collection stringCollection)
|
static boolean |
isShownAndVisible(CustomField customField,
com.atlassian.crowd.embedded.api.User user,
SearchContext searchContext,
FieldVisibilityManager fieldVisibilityManager)
Checks if the custom field is in the search context scope (using OrderableField.isShown(com.atlassian.jira.issue.Issue) )
and visible in all field schemes (using FieldVisibilityManager.isFieldHiddenInAllSchemes(String,SearchContext,User) ) |
static boolean |
isUserHasPermissionToProjects(CustomField customField,
com.atlassian.crowd.embedded.api.User user)
Does the user have permission to at least one project that falls under this custom field. |
static Map<CustomField,Object> |
parseCustomFieldValuesFromActionParams(Map actionParameters,
List<CustomField> customFields)
Parses action parameters (Map of Collections of Strings with |
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 |
---|
public static final String CUSTOM_FIELD_PREFIX
Constructor Detail |
---|
public CustomFieldUtils()
Method Detail |
---|
public static String getSearchParamSuffix(String searchParamKey)
public static String getCustomFieldKey(String searchParamKey)
public static Long getCustomFieldId(String key)
key
- eg. "customfield_10000"
public static boolean isCollectionNotEmpty(Collection stringCollection)
public static Map<CustomField,Object> parseCustomFieldValuesFromActionParams(Map actionParameters, List<CustomField> customFields)
actionParameters
- map of action parameterscustomFields
- a list of custom fields
public static List<JiraContextNode> buildJiraIssueContexts(boolean global, Long[] projectCategories, Long[] projects, JiraContextTreeManager treeManager)
public static List<org.ofbiz.core.entity.GenericValue> buildIssueTypes(ConstantsManager constantsManager, String[] issueTypes)
public static List<IssueContext> convertToIssueContexts(org.ofbiz.core.entity.GenericValue project, List<String> issueTypeIds)
convertToIssueContexts(Project, List)
. Since v4.0
IssueContexts
.
project
- project generic valueissueTypeIds
- Type ids as strings, eg. ["3", "4"]
public static List<IssueContext> convertToIssueContexts(Project project, List<String> issueTypeIds)
IssueContexts
.
project
- The project (may be null).issueTypeIds
- Type ids as strings, eg. ["3", "4"]. May be null or empty.
public static boolean isUserHasPermissionToProjects(CustomField customField, com.atlassian.crowd.embedded.api.User user)
customField
- custom fielduser
- user
public static String prettyPrintOptions(Options options)
public static Map<String,Object> buildParams(CustomField customField, FieldConfig config, Issue issue, FieldLayoutItem fieldLayoutItem, Object value, Map customFieldValuesHolder, webwork.action.Action action, Map displayParameters)
public static String getDateFormat()
DateTimeFormatUtils.getDateFormat()
instead. Since v5.0.
ie the format stored in the "jira.date.picker.javascript.format" application property.
public static String getDateTimeFormat()
DateTimeFormatUtils.getDateTimeFormat()
instead. Since v5.0.
ie the format stored in the "jira.date.time.picker.javascript.format" application property.
public static String getTimeFormat()
DateTimeFormatUtils.getTimeFormat()
instead. Since v5.0.
protected static I18nHelper getI18nBean()
public static boolean isShownAndVisible(CustomField customField, com.atlassian.crowd.embedded.api.User user, SearchContext searchContext, FieldVisibilityManager fieldVisibilityManager)
OrderableField.isShown(com.atlassian.jira.issue.Issue)
)
and visible in all field schemes (using FieldVisibilityManager.isFieldHiddenInAllSchemes(String,SearchContext,User)
)
customField
- customfield to check visibility ofuser
- current usersearchContext
- search contextfieldVisibilityManager
- field visibility bean
OrderableField.isShown(com.atlassian.jira.issue.Issue)
,
FieldVisibilityManager.isFieldHiddenInAllSchemes(String,com.atlassian.jira.issue.search.SearchContext,User)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |