|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType<T,S>
@PublicSpi public abstract class AbstractCustomFieldType<T,S>
Nested Class Summary | |
---|---|
static interface |
AbstractCustomFieldType.Visitor<X>
Visitor interface for AbstractCustomFieldType. |
static interface |
AbstractCustomFieldType.VisitorBase<X>
Marker interface for visitors of AbstractCustomFieldType (acyclic visitor). |
Field Summary |
---|
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
DEFAULT_VALUE_TYPE |
Constructor Summary | |
---|---|
AbstractCustomFieldType()
|
Method Summary | |
---|---|
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 |
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 |
---|
createValue, getChangelogValue, getDefaultValue, getSingularObjectFromString, getStringFromSingularObject, getStringValueFromCustomFieldParams, getValueFromCustomFieldParams, getValueFromIssue, remove, setDefaultValue, updateValue, validateFromParams |
Constructor Detail |
---|
public AbstractCustomFieldType()
Method Detail |
---|
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>
@NotNull public Map<String,Object> getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem)
CustomFieldType
getVelocityParameters
in interface CustomFieldType<T,S>
issue
- The issue currently in context (Note: this will be null in cases like 'default value')field
- CustomFieldfieldLayoutItem
- FieldLayoutItem
Map
of parameters to add to the velocity context, or an empty Map otherwise (never null)public final Map getVelocityParameters(Issue issue) throws IllegalAccessException
IllegalAccessException
getVelocityParameters(Issue, CustomField, FieldLayoutItem)
@NotNull public List<FieldConfigItemType> getConfigurationItemTypes()
CustomFieldType
FieldConfigItemType
objects. Can not be immutable.
This opens up possibilties 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 value
public 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 CustomField
protected void assertObjectImplementsType(Class<?> clazz, Object o)
public String availableForBulkEdit(BulkEditBean bulkEditBean)
CustomFieldType
availableForBulkEdit
in interface CustomFieldType<T,S>
bulkEditBean
- BulkEditBean
protected I18nHelper getI18nBean()
public Object accept(AbstractCustomFieldType.VisitorBase visitor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |