|
||||||||||
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
Nested Class Summary | |
---|---|
static interface |
SelectCFType.Visitor<T>
|
Nested classes/interfaces inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
AbstractCustomFieldType.VisitorBase<T> |
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 | |
---|---|
java.lang.Object |
accept(AbstractCustomFieldType.VisitorBase visitor)
|
int |
compare(java.lang.String customFieldObjectValue1,
java.lang.String customFieldObjectValue2,
FieldConfig fieldConfig)
Compares the two custom field objects. |
java.util.List |
getConfigurationItemTypes()
Returns a List of FieldConfigItemType objects. |
java.util.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)
|
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. |
org.apache.lucene.search.Query |
getQueryForGroup(java.lang.String fieldID,
java.lang.String groupName)
This method should be implemented in your custom type to return a Query. |
java.lang.Object |
getSingularObjectFromString(java.lang.String string)
Returns a Singular Object, given the string value as passed by the presentation tier. |
java.lang.String |
getStringFromSingularObject(java.lang.Object value)
Returns the String representation of a single value within the CustomFieldType. |
java.util.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 java.util.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 java.lang.Object getSingularObjectFromString(java.lang.String string) throws FieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
getSingularObjectFromString
in class TextCFType
string
- the String
FieldValidationException
- if the string is an invalid representation of the Object.public java.lang.String getStringFromSingularObject(java.lang.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
value
- the object
public java.util.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 java.util.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)config
- FieldConfigpublic Options getOptions(FieldConfig config, JiraContextNode jiraContextNode)
getOptions
in interface MultipleCustomFieldType
public int compare(java.lang.String customFieldObjectValue1, java.lang.String customFieldObjectValue2, FieldConfig fieldConfig)
SortableCustomField
compare
in interface SortableCustomField<java.lang.String>
compare
in class TextCFType
customFieldObjectValue1
- Never nullcustomFieldObjectValue2
- 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()
public java.lang.Object accept(AbstractCustomFieldType.VisitorBase visitor)
accept
in class TextCFType
public org.apache.lucene.search.Query getQueryForGroup(java.lang.String fieldID, java.lang.String groupName)
GroupSelectorField
fieldName:groupName
. However some custom fields, such as (@Link SelectCFType)
manipulate the field identifiers and values before storing in the index. In cases like this you will have to
implement the method such that it searches the correct fields.
getQueryForGroup
in interface GroupSelectorField
fieldID
- the id of the custom fieldgroupName
- the name of the group to filter on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |