@PublicSpi public abstract class AbstractCustomFieldType<T,S> extends Object implements CustomFieldType<T,S>
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractCustomFieldType.Visitor<X>
Visitor interface for AbstractCustomFieldType.
|
static interface |
AbstractCustomFieldType.VisitorBase<X>
Marker interface for visitors of AbstractCustomFieldType (acyclic visitor).
|
DEFAULT_VALUE_TYPE, RESOURCE_PREVIEW
Constructor and Description |
---|
AbstractCustomFieldType() |
Modifier and Type | Method and Description |
---|---|
Object |
accept(AbstractCustomFieldType.VisitorBase visitor) |
protected void |
assertObjectImplementsType(Class<?> clazz,
Object o) |
String |
availableForBulkEdit(BulkEditBean bulkEditBean)
Allow the custom field type perform a specific check as to its availability for bulk editing.
|
String |
getChangelogString(CustomField field,
T value)
Returns a String of representing values to be stored in the change log, an example is the name of a version
field that a version id will resolve to within JIRA.
|
List<FieldConfigItemType> |
getConfigurationItemTypes()
Returns a List of
FieldConfigItemType objects. |
String |
getDescription() |
CustomFieldTypeModuleDescriptor |
getDescriptor() |
protected I18nHelper |
getI18nBean() |
String |
getKey()
Returns the full key of the CustomFieldType.
|
String |
getName() |
List<FieldIndexer> |
getRelatedIndexers(CustomField customField)
Returns a list of indexers that will be used for the field.
|
Map |
getVelocityParameters(Issue issue)
Implementers should override the 3-param version of this.
|
Map<String,Object> |
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 |
init(CustomFieldTypeModuleDescriptor descriptor)
Initialises the CustomFieldType with the given descriptor.
|
boolean |
isRenderable()
This is a mirror of the method from the RenderableField interface and is needed to bridge the gap between
CustomFields and CustomFieldTypes.
|
boolean |
valuesEqual(T v1,
T v2)
Used to compare 2 field values and work out whether a change item should be generated
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areAllRequiredParametersPresent, createValue, getChangelogValue, getCloneOptionConfiguration, getCloneValue, getDefaultValue, getNonnullCustomFieldProvider, getNonNullCustomFieldProvider, getSingularObjectFromString, getStringFromSingularObject, getStringValueFromCustomFieldParams, getValueFromCustomFieldParams, getValueFromIssue, isUserInputRequiredForMove, remove, setDefaultValue, updateValue, validateFromParams
public void init(CustomFieldTypeModuleDescriptor descriptor)
CustomFieldType
init
in interface CustomFieldType<T,S>
descriptor
- CustomFieldTypeModuleDescriptorpublic final String getKey()
CustomFieldType
getKey
in interface CustomFieldType<T,S>
public final String getName()
getName
in interface CustomFieldType<T,S>
public final String getDescription()
getDescription
in interface CustomFieldType<T,S>
public final CustomFieldTypeModuleDescriptor getDescriptor()
getDescriptor
in interface CustomFieldType<T,S>
@Nonnull public Map<String,Object> getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem)
CustomFieldType
The values are added to the context for all velocity views (edit, search, view, xml)
getVelocityParameters
in interface CustomFieldType<T,S>
issue
- The issue currently in context (Note: this will be null in cases like 'default value')field
- CustomFieldfieldLayoutItem
- FieldLayoutItemMap
of parameters to add to the velocity context, or an empty Map otherwise (never null)public final Map getVelocityParameters(Issue issue) throws IllegalAccessException
@Nonnull public List<FieldConfigItemType> getConfigurationItemTypes()
CustomFieldType
FieldConfigItemType
objects. Can not be immutable.
This opens up possibilities for configurable custom fields.getConfigurationItemTypes
in interface CustomFieldType<T,S>
FieldConfigItemType
public List<FieldIndexer> getRelatedIndexers(CustomField customField)
CustomFieldType
getRelatedIndexers
in interface CustomFieldType<T,S>
customField
- the custom field to get the related indexers of.FieldIndexer
objects. Null if no related indexers.public boolean isRenderable()
CustomFieldType
isRenderable
in interface CustomFieldType<T,S>
public boolean valuesEqual(T v1, T v2)
CustomFieldType
valuesEqual
in interface CustomFieldType<T,S>
v1
- current valuev2
- new valuepublic String getChangelogString(CustomField field, T value)
CustomFieldType
getChangelogString
in interface CustomFieldType<T,S>
field
- CustomField that the value belongs tovalue
- Transport Object representing the value instance of the CustomFieldpublic String availableForBulkEdit(BulkEditBean bulkEditBean)
CustomFieldType
availableForBulkEdit
in interface CustomFieldType<T,S>
bulkEditBean
- BulkEditBeanprotected I18nHelper getI18nBean()
public Object accept(AbstractCustomFieldType.VisitorBase visitor)
Copyright © 2002-2024 Atlassian. All Rights Reserved.