public class CustomFieldUtilities extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
CustomFieldUtilities.CustomFieldByNameComparator |
|
static class |
CustomFieldUtilities.CustomFieldValueByNameComparator |
Compares 2 CustomFieldValues by name.
|
Modifier and Type | Field | Description |
---|---|---|
static String |
DATE_FORMAT_DATEONLY |
|
static String |
DATE_FORMAT_FULL |
|
static String |
DATE_FORMAT_TIMEONLY |
|
static String |
DATE_FORMAT_UNKNOWN |
Constructor | Description |
---|---|
CustomFieldUtilities() |
Modifier and Type | Method | Description |
---|---|---|
static String |
getCustomFieldLabelKey(Integer fieldId) |
Returns the label key for a particular custom field.
|
static String |
getCustomFieldName(Integer fieldId) |
Returns the label for a custom field in the default locale.
|
static String |
getCustomFieldName(Integer fieldId,
Locale locale) |
Returns the label for a custom field in the specified locale.
|
static CustomFieldValue |
getCustomFieldOptionByValue(List<CustomFieldValue> fields,
String value) |
|
static String |
getCustomFieldOptionLabelKey(Integer fieldId,
Integer optionId) |
Returns the label key for a particular custom field option.
|
static String |
getCustomFieldOptionName(Integer fieldId,
Integer optionId,
Locale locale) |
Returns the label for a custom field option in the specified locale.
|
static String |
getCustomFieldOptionName(CustomField field,
String value,
Locale locale) |
|
static String |
getCustomFieldOptionName(CustomFieldValue option,
Locale locale) |
|
static String |
getTypeString(int code,
Locale locale) |
Returns the string representation of a field type
|
static String |
getTypeString(CustomField.Type type,
Locale locale) |
Returns the string representation of a field type.
|
public static final String DATE_FORMAT_UNKNOWN
public static final String DATE_FORMAT_FULL
public static final String DATE_FORMAT_DATEONLY
public static final String DATE_FORMAT_TIMEONLY
public static String getTypeString(int code, Locale locale)
code
- type code to translatelocale
- the locale to translate the type intopublic static String getTypeString(CustomField.Type type, Locale locale)
type
- the type to translatelocale
- the locale to translate the type intopublic static String getCustomFieldLabelKey(Integer fieldId)
fieldId
- the CustomField id to return the label key forpublic static String getCustomFieldOptionLabelKey(Integer fieldId, Integer optionId)
fieldId
- the CustomField id to return the label key foroptionId
- the CustomField option's id to return the label key forpublic static String getCustomFieldName(Integer fieldId)
fieldId
- the id of the field to return the label forpublic static String getCustomFieldName(Integer fieldId, Locale locale)
fieldId
- the id of the field to return the label forlocale
- the locale to return the label forpublic static String getCustomFieldOptionName(Integer fieldId, Integer optionId, Locale locale)
fieldId
- the id of the field to return the label foroptionId
- the id of the field option to return the label forlocale
- the locale to return the label forpublic static String getCustomFieldOptionName(CustomFieldValue option, Locale locale)
public static CustomFieldValue getCustomFieldOptionByValue(List<CustomFieldValue> fields, String value)
public static String getCustomFieldOptionName(CustomField field, String value, Locale locale)
Copyright © 2002–2019 itracker. All rights reserved.