com.atlassian.jira.issue.customfields.impl
Class MultiUserCFType

java.lang.Object
  extended bycom.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType
      extended bycom.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType
          extended bycom.atlassian.jira.issue.customfields.impl.StringCFType
              extended bycom.atlassian.jira.issue.customfields.impl.TextCFType
                  extended bycom.atlassian.jira.issue.customfields.impl.AbstractMultiCFType
                      extended bycom.atlassian.jira.issue.customfields.impl.MultiUserCFType
All Implemented Interfaces:
CustomFieldType, SortableCustomField

public class MultiUserCFType
extends AbstractMultiCFType

Multiple Select Type

Transport Object Type
Collection
Singular Object Type
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
 
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType
DEFAULT_VALUE_TYPE
 
Constructor Summary
MultiUserCFType(CustomFieldValuePersister customFieldValuePersister, StringConverter stringConverter, GenericConfigManager genericConfigManager, MultiUserConverter multiUserConverter)
           
 
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.
 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.
 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, convertTypesToStrings, 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, getVelocityParameters, init, isRenderable, valuesEqual
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multiUserConverter

protected final MultiUserConverter multiUserConverter
Constructor Detail

MultiUserCFType

public MultiUserCFType(CustomFieldValuePersister customFieldValuePersister,
                       StringConverter stringConverter,
                       GenericConfigManager genericConfigManager,
                       MultiUserConverter multiUserConverter)
Method Detail

getTypeComparator

protected Comparator getTypeComparator()
Description copied from class: AbstractMultiCFType
Returns a comparator for underlying type of this custom field.

Specified by:
getTypeComparator in class AbstractMultiCFType
Returns:
a comparator

getValueFromCustomFieldParams

public Object getValueFromCustomFieldParams(CustomFieldParams parameters)
                                     throws FieldValidationException
Description copied from interface: CustomFieldType
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. This return type must exactly match that of the value Object parameter in the persistance methods (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).

Specified by:
getValueFromCustomFieldParams in interface CustomFieldType
Overrides:
getValueFromCustomFieldParams in class AbstractSingleFieldType
Throws:
FieldValidationException

getStringValueFromCustomFieldParams

public Object getStringValueFromCustomFieldParams(CustomFieldParams parameters)
Description copied from interface: CustomFieldType
Return the String value object from the CustomFieldParams. The object may be a single String (e.g. TextCFType, List of Strings (e.g. MultiSelectCFType) or CustomFieldParams of Strings (e.g. CascadingSelectCFType)

Specified by:
getStringValueFromCustomFieldParams in interface CustomFieldType
Overrides:
getStringValueFromCustomFieldParams in class AbstractSingleFieldType

validateFromParams

public void validateFromParams(CustomFieldParams relevantParams,
                               ErrorCollection errorCollectionToAddTo,
                               FieldConfig config)
Description copied from interface: CustomFieldType
Ensures that the 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.

Specified by:
validateFromParams in interface CustomFieldType
Overrides:
validateFromParams in class AbstractSingleFieldType

getStringFromSingularObject

public String getStringFromSingularObject(Object o)
Description copied from interface: CustomFieldType
Returns the 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

Specified by:
getStringFromSingularObject in interface CustomFieldType
Overrides:
getStringFromSingularObject in class TextCFType

getSingularObjectFromString

public Object getSingularObjectFromString(String s)
                                   throws FieldValidationException
Description copied from interface: CustomFieldType
Returns a Singular Object, given the string value as passed by the presentation tier. Throws FieldValidationException if the string is an invalid representation of the Object.

Specified by:
getSingularObjectFromString in interface CustomFieldType
Overrides:
getSingularObjectFromString in class TextCFType
Throws:
FieldValidationException

getRelatedIndexers

public List getRelatedIndexers(CustomField customField)
Description copied from interface: CustomFieldType
Returns a list of indexers that will be used for the field. This will over-ride the anonymous searcher specified by AbstractCustomFieldSearcher.getRelatedIndexers() and AbstractCustomFieldSearcher.index(Document, CustomField, Object)

Specified by:
getRelatedIndexers in interface CustomFieldType
Overrides:
getRelatedIndexers in class AbstractCustomFieldType

convertTypeToString

protected String convertTypeToString(Object value)
Description copied from class: AbstractMultiCFType
Converts a given underlying type to String.

Specified by:
convertTypeToString in class AbstractMultiCFType
Parameters:
value - underlying type
Returns:
string representation of underlying type

convertStringToType

protected Object convertStringToType(String string)
Description copied from class: AbstractMultiCFType
Converts a given String to underlying type

Specified by:
convertStringToType in class AbstractMultiCFType
Parameters:
string - string representation of underlying type
Returns:
underlying type


Copyright © 2002-2006 Atlassian. All Rights Reserved.