|
||||||||||
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.SelectCFType
public class SelectCFType
Field Summary |
---|
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 | |
---|---|
SelectCFType(CustomFieldValuePersister customFieldValuePersister,
StringConverter stringConverter,
SelectConverter selectConverter,
OptionsManager optionsManager,
GenericConfigManager genericConfigManager)
|
Method Summary | |
---|---|
int |
compare(Object customFieldObjectValue1,
Object customFieldObjectValue2,
FieldConfig fieldConfig)
Comapares the two custom field objects. |
List |
getConfigurationItemTypes()
Returns a List of FieldConfigItemType objects. |
Set |
getIssueIdsWithValue(CustomField field,
Option option)
Returns a Set with of Long Objects representing the issue ids that the value has been set for |
Options |
getOptions(FieldConfig config,
JiraContextNode jiraContextNode)
|
Object |
getSingularObjectFromString(String string)
Returns a Singular Object, given the string value as passed by the presentation tier. |
String |
getStringFromSingularObject(Object value)
Returns the String representation of a single value within the CustomFieldType. |
protected SearchParameter |
makeSearchParameter(CustomField field,
String paramValue,
String paramPrefix)
|
Set |
remove(CustomField field)
called when removing a field. |
void |
removeValue(CustomField field,
Issue issue,
Option option)
This default implementation will remove all values from the custom field for an issue. |
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.TextCFType |
---|
getDatabaseType |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.StringCFType |
---|
getDbValueFromObject, getObjectFromDbValue |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType |
---|
createValue, getChangelogValue, getDefaultValue, getStringValueFromCustomFieldParams, getValueFromCustomFieldParams, getValueFromIssue, setDefaultValue, updateValue |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
assertObjectImplementsType, availableForBulkEdit, getChangelogString, getDescription, getDescriptor, getI18nBean, getKey, getName, getRelatedIndexers, getVelocityParameters, 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.issue.customfields.CustomFieldType |
---|
availableForBulkEdit, createValue, getChangelogString, getChangelogValue, getDefaultValue, getDescription, getDescriptor, getKey, getName, getRelatedIndexers, getStringValueFromCustomFieldParams, getValueFromCustomFieldParams, getValueFromIssue, getVelocityParameters, init, isRenderable, setDefaultValue, updateValue, valuesEqual |
Constructor Detail |
---|
public SelectCFType(CustomFieldValuePersister customFieldValuePersister, StringConverter stringConverter, SelectConverter selectConverter, OptionsManager optionsManager, GenericConfigManager genericConfigManager)
Method Detail |
---|
public Set remove(CustomField field)
AbstractSingleFieldType
Subclasses should override this if they have specific cleanup that they need to do (such as removing select list values)
remove
in interface CustomFieldType
remove
in class AbstractSingleFieldType
field
- The custom field that is being removed, so any data stored for
any issues for that field can be deleted.
Set
of issue ids that has been affectedpublic void removeValue(CustomField field, Issue issue, Option option)
removeValue
in interface MultipleSettableCustomFieldType
field
- issue
- option
- - ignoredpublic Object getSingularObjectFromString(String string) throws FieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
getSingularObjectFromString
in class TextCFType
FieldValidationException
public String getStringFromSingularObject(Object value)
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 Set getIssueIdsWithValue(CustomField field, Option option)
MultipleSettableCustomFieldType
getIssueIdsWithValue
in interface MultipleSettableCustomFieldType
field
- the CustomField to search onoption
- the Object representing a single value to search on.
public List getConfigurationItemTypes()
CustomFieldType
FieldConfigItemType
objects.
This opens up possibilties for configurable custom fields
getConfigurationItemTypes
in interface CustomFieldType
getConfigurationItemTypes
in class AbstractCustomFieldType
FieldConfigItemType
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)protected SearchParameter makeSearchParameter(CustomField field, String paramValue, String paramPrefix)
makeSearchParameter
in class StringCFType
public Options getOptions(FieldConfig config, JiraContextNode jiraContextNode)
getOptions
in interface MultipleCustomFieldType
public int compare(Object customFieldObjectValue1, Object customFieldObjectValue2, FieldConfig fieldConfig)
SortableCustomField
compare
in interface SortableCustomField
compare
in class TextCFType
customFieldObjectValue1
- Never nullcustomFieldObjectValue2
- Never null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |