@PublicSpi public abstract class

CalculatedCFType

extends AbstractCustomFieldType<T, S>
java.lang.Object
   ↳ com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType<T, S>
     ↳ com.atlassian.jira.issue.customfields.impl.CalculatedCFType<T, S>

@PublicSpi

This class is designed for plugins to implement.

Clients of @PublicSpi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicSpi as per each product's API policy (clients should refer to each product's API policy for the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).

Note: @PublicSpi interfaces and classes are specifically designed to be implemented/extended by clients. Hence, the guarantee of binary compatibility is different to that of @PublicApi elements (if an element is both @PublicApi and @PublicSpi, both guarantees apply).

Class Overview

A CustomFieldType which is calculated rather than set. Transport Object is defined by subclass.

Note that this used to implement SortableCustomField, but it is now up to subclasses to opt-in to sortable if they really want it. This is mostly not recommended because of the poor performance of using that interface - see NaturallyOrderedCustomFieldSearcher and SortableCustomFieldSearcher for the preferred approach to sortable Custom Fields.

Summary

Nested Classes
interface CalculatedCFType.Visitor<X>  
[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.customfields.CustomFieldType
Public Constructors
CalculatedCFType()
Public Methods
Object accept(VisitorBase visitor)
int compare(T o1, T o2, FieldConfig fieldConfig)
void createValue(CustomField field, Issue issue, T value)
String getChangelogValue(CustomField field, T value)
@Nonnull List<FieldConfigItemType> getConfigurationItemTypes()
Returns a List of FieldConfigItemType objects.
T getDefaultValue(FieldConfig fieldConfig)
Object getStringValueFromCustomFieldParams(CustomFieldParams parameters)
T getValueFromCustomFieldParams(CustomFieldParams parameters)
Set<Long> remove(CustomField field)
void setDefaultValue(FieldConfig fieldConfig, T value)
void updateValue(CustomField field, Issue issue, T value)
void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config)
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType
From class java.lang.Object
From interface com.atlassian.jira.issue.customfields.CustomFieldType

Public Constructors

public CalculatedCFType ()

Public Methods

public Object accept (VisitorBase visitor)

public int compare (T o1, T o2, FieldConfig fieldConfig)

public void createValue (CustomField field, Issue issue, T value)

public String getChangelogValue (CustomField field, T value)

@Nonnull public List<FieldConfigItemType> getConfigurationItemTypes ()

Returns a List of FieldConfigItemType objects. Can not be immutable. This opens up possibilities for configurable custom fields.

Returns

public T getDefaultValue (FieldConfig fieldConfig)

public Object getStringValueFromCustomFieldParams (CustomFieldParams parameters)

public T getValueFromCustomFieldParams (CustomFieldParams parameters)

public Set<Long> remove (CustomField field)

public void setDefaultValue (FieldConfig fieldConfig, T value)

public void updateValue (CustomField field, Issue issue, T value)

public void validateFromParams (CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config)