|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType com.atlassian.jira.issue.customfields.impl.StringCFType com.atlassian.jira.issue.customfields.impl.TextCFType com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType com.atlassian.jira.issue.customfields.impl.MultiUserCFType
public class MultiUserCFType
Multiple Select Type
Collection
String
Field Summary | |
---|---|
protected MultiUserConverter |
multiUserConverter
|
Fields inherited from class com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType |
---|
customFieldValuePersister, FIELD_TYPE_DATE, FIELD_TYPE_NUMBER, FIELD_TYPE_STRING, FIELD_TYPE_TEXT, genericConfigManager, log |
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
DEFAULT_VALUE_TYPE |
Constructor Summary | |
---|---|
MultiUserCFType(CustomFieldValuePersister customFieldValuePersister,
StringConverter stringConverter,
GenericConfigManager genericConfigManager,
MultiUserConverter multiUserConverter,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
UserPickerSearchService searchService)
|
Method Summary | |
---|---|
protected Object |
convertStringToType(String string)
Converts a given String to underlying type |
protected String |
convertTypeToString(Object value)
Converts a given underlying type to String. |
ProjectCustomFieldImporter |
getProjectImporter()
This method will return a NoTransformationCustomFieldImporter , be mindful that if you are extending
this class you need to have a good hard think about whether this is the right field importer for your custom
field values. |
List |
getRelatedIndexers(CustomField customField)
Returns a list of indexers that will be used for the field. |
Object |
getSingularObjectFromString(String s)
Returns a Singular Object, given the string value as passed by the presentation tier. |
String |
getStringFromSingularObject(Object o)
Returns the String representation of a single value within the CustomFieldType. |
Object |
getStringValueFromCustomFieldParams(CustomFieldParams parameters)
Return the String value object from the CustomFieldParams. |
protected Comparator |
getTypeComparator()
Returns a comparator for underlying type of this custom field. |
Object |
getValueFromCustomFieldParams(CustomFieldParams parameters)
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. |
Map |
getVelocityParameters(Issue issue,
CustomField field,
FieldLayoutItem fieldLayoutItem)
The custom field may wish to pass parameters to the velocity context beyond the getValueFromIssue methods (eg managers). |
void |
validateFromParams(CustomFieldParams relevantParams,
ErrorCollection errorCollectionToAddTo,
FieldConfig config)
Ensures that the CustomFieldParams of Strings is a valid representation of the Custom Field values. |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType |
---|
convertStringsToTypes, convertTypesToStringsIfRequired, createValue, getChangelogValue, getDefaultValue, getValueFromIssue, setDefaultValue, updateValue |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.TextCFType |
---|
compare, getDatabaseType |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.StringCFType |
---|
getDbValueFromObject, getObjectFromDbValue, makeSearchParameter |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType |
---|
remove |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
assertObjectImplementsType, availableForBulkEdit, getChangelogString, getConfigurationItemTypes, getDescription, getDescriptor, getI18nBean, getKey, getName, getVelocityParameters, init, isRenderable, valuesEqual |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.notification.type.UserCFNotificationTypeAware |
---|
getValueFromIssue |
Methods inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
availableForBulkEdit, getChangelogString, getConfigurationItemTypes, getDescription, getDescriptor, getKey, getName, init, isRenderable, remove, valuesEqual |
Field Detail |
---|
protected final MultiUserConverter multiUserConverter
Constructor Detail |
---|
public MultiUserCFType(CustomFieldValuePersister customFieldValuePersister, StringConverter stringConverter, GenericConfigManager genericConfigManager, MultiUserConverter multiUserConverter, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, UserPickerSearchService searchService)
Method Detail |
---|
protected Comparator getTypeComparator()
AbstractMultiCFType
getTypeComparator
in class AbstractMultiCFType
public Object getValueFromCustomFieldParams(CustomFieldParams parameters) throws FieldValidationException
CustomFieldType
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
) and Object returned from CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue)
.
getValueFromCustomFieldParams
in interface CustomFieldType
getValueFromCustomFieldParams
in class AbstractSingleFieldType
parameters
- CustomFieldParams of String objects. Will contain one value for Singular field types.
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
FieldValidationException
- if the String value fails to convert into ObjectsCustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
,
CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
,
CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue)
public Object getStringValueFromCustomFieldParams(CustomFieldParams parameters)
CustomFieldType
getStringValueFromCustomFieldParams
in interface CustomFieldType
getStringValueFromCustomFieldParams
in class AbstractSingleFieldType
parameters
- - CustomFieldParams containing String values
public void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config)
CustomFieldType
CustomFieldParams
of Strings is a valid representation of the Custom Field values.
Any errors should be added to the ErrorCollection
under the appropriate key as required.
validateFromParams
in interface CustomFieldType
validateFromParams
in class AbstractSingleFieldType
relevantParams
- parameter object of StringserrorCollectionToAddTo
- errorCollection to which any erros should be added (never null)public String getStringFromSingularObject(Object o)
CustomFieldType
String
representation of a single value within the CustomFieldType. This is the value that
will is passed to the presentation tier for editing. For single CustomFieldTypes the Singular Object is
the same as a Transport Object. However, for multi-dimensional CustomFieldTypes, the Singular Object is
the Object contained within the Collection
or CustomFieldParams
getStringFromSingularObject
in interface CustomFieldType
getStringFromSingularObject
in class TextCFType
public Object getSingularObjectFromString(String s) throws FieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
getSingularObjectFromString
in class TextCFType
FieldValidationException
public List getRelatedIndexers(CustomField customField)
CustomFieldType
AbstractCustomFieldSearcher.getRelatedIndexers()
and AbstractCustomFieldSearcher.index(Document,
CustomField, Object)
getRelatedIndexers
in interface CustomFieldType
getRelatedIndexers
in class AbstractCustomFieldType
FieldIndexer
objects. Null if no related indexers.protected String convertTypeToString(Object value)
AbstractMultiCFType
convertTypeToString
in class AbstractMultiCFType
value
- underlying type
protected Object convertStringToType(String string)
AbstractMultiCFType
convertStringToType
in class AbstractMultiCFType
string
- string representation of underlying type
public Map getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem)
CustomFieldType
getVelocityParameters
in interface CustomFieldType
getVelocityParameters
in class AbstractCustomFieldType
issue
- The issue currently in context (Note: this will be null in cases like 'default value')
Map
of parameters to add to the velocity context, or an empty Map otherwise (never null)public ProjectCustomFieldImporter getProjectImporter()
TextCFType
NoTransformationCustomFieldImporter
, be mindful that if you are extending
this class you need to have a good hard think about whether this is the right field importer for your custom
field values.
getProjectImporter
in interface ProjectImportableCustomField
getProjectImporter
in class TextCFType
NoTransformationCustomFieldImporter
ProjectImportableCustomField.getProjectImporter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |