|
||||||||||
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.VersionCFType
public class VersionCFType
Field Summary |
---|
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
DEFAULT_VALUE_TYPE |
Constructor Summary | |
---|---|
VersionCFType(PermissionManager permissionManager,
JiraAuthenticationContext jiraAuthenticationContext,
VersionManager versionManager,
CustomFieldValuePersister customFieldValuePersister,
GenericConfigManager genericConfigManager,
VersionHelperBean versionHelperBean)
|
Method Summary | |
---|---|
String |
availableForBulkEdit(BulkEditBean bulkEditBean)
Allow the custom field type perform a specific check as to its availability for bulk editing. |
int |
compare(Object customFieldObjectValue1,
Object customFieldObjectValue2,
FieldConfig fieldConfig)
Comapares the two custom field objects. |
void |
createValue(CustomField field,
Issue issue,
Object value)
Persists the object to the datastore for the given issue. |
String |
getChangelogString(CustomField field,
Object 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. |
String |
getChangelogValue(CustomField field,
Object value)
Returns a values to be stored in the change log, example is the id of the changed item. |
List |
getConfigurationItemTypes()
Returns a List of FieldConfigItemType objects. |
Object |
getDefaultValue(FieldConfig fieldConfig)
Retrieves the Object representing the default CustomField value for the Custom Field. |
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 customFieldObject)
Returns the String representation of a single value within the CustomFieldType. |
Object |
getStringValueFromCustomFieldParams(CustomFieldParams parameters)
Return the String value object from the CustomFieldParams. |
Object |
getValueFromCustomFieldParams(CustomFieldParams parameters)
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. |
Object |
getValueFromIssue(CustomField field,
Issue issue)
Retrieves the Object representing the current CustomField value for the given issue. |
Map |
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). |
Set |
remove(CustomField field)
Performs additional tasks when a CustomField of this type is being removed CustomField.remove() . |
void |
setDefaultValue(FieldConfig fieldConfig,
Object value)
Sets the default value for a Custom Field |
void |
updateValue(CustomField field,
Issue issue,
Object value)
|
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.AbstractCustomFieldType |
---|
assertObjectImplementsType, getDescription, getDescriptor, getI18nBean, getKey, getName, getRelatedIndexers, 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 |
---|
getDescription, getDescriptor, getKey, getName, getRelatedIndexers, init, isRenderable, valuesEqual |
Constructor Detail |
---|
public VersionCFType(PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext, VersionManager versionManager, CustomFieldValuePersister customFieldValuePersister, GenericConfigManager genericConfigManager, VersionHelperBean versionHelperBean)
Method Detail |
---|
public Set remove(CustomField field)
CustomFieldType
CustomField.remove()
.
This includes removal of values & options.
remove
in interface CustomFieldType
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 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
relevantParams
- parameter object of StringserrorCollectionToAddTo
- errorCollection to which any erros should be added (never null)public void createValue(CustomField field, Issue issue, Object value)
createValue
in interface CustomFieldType
field
- issue
- value
- public void updateValue(CustomField field, Issue issue, Object value)
updateValue
in interface CustomFieldType
public Object getValueFromCustomFieldParams(CustomFieldParams parameters) throws FieldValidationException
CustomFieldType
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
) and Object returned from CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue)
.
getValueFromCustomFieldParams
in interface CustomFieldType
parameters
- CustomFieldParams of String objects. Will contain one value for Singular field types.
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
FieldValidationException
- if the String value fails to convert into ObjectsCustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
,
CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
,
CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue)
public Object getStringValueFromCustomFieldParams(CustomFieldParams parameters)
CustomFieldType
getStringValueFromCustomFieldParams
in interface CustomFieldType
parameters
- - CustomFieldParams containing String values
public Object getValueFromIssue(CustomField field, Issue issue)
CustomFieldType
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
for more detailed notes.
getValueFromIssue
in interface CustomFieldType
field
- Custom field for which to retrieve the valueissue
- Issue from which to retrieve the value
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
public void setDefaultValue(FieldConfig fieldConfig, Object value)
CustomFieldType
setDefaultValue
in interface CustomFieldType
fieldConfig
- CustomField for which the default is being storedvalue
- Transport Object representing the value instance of the CustomFieldpublic Object getDefaultValue(FieldConfig fieldConfig)
CustomFieldType
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
for more detailed notes.
getDefaultValue
in interface CustomFieldType
fieldConfig
- CustomField for default value
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.Issue, java.lang.Object)
public String getChangelogValue(CustomField field, Object value)
CustomFieldType
getChangelogValue
in interface CustomFieldType
field
- CustomField that the value belongs tovalue
- Transport Object representing the value instance of the CustomField
public String getChangelogString(CustomField field, Object value)
CustomFieldType
getChangelogString
in interface CustomFieldType
getChangelogString
in class AbstractCustomFieldType
field
- CustomField that the value belongs tovalue
- Transport Object representing the value instance of the CustomField
public String getStringFromSingularObject(Object customFieldObject)
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
public Object getSingularObjectFromString(String string) throws FieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
FieldValidationException
public int compare(Object customFieldObjectValue1, Object customFieldObjectValue2, FieldConfig fieldConfig)
SortableCustomField
compare
in interface SortableCustomField
customFieldObjectValue1
- Never nullcustomFieldObjectValue2
- Never null
public List getConfigurationItemTypes()
CustomFieldType
FieldConfigItemType
objects.
This opens up possibilties for configurable custom fields
getConfigurationItemTypes
in interface CustomFieldType
getConfigurationItemTypes
in class AbstractCustomFieldType
FieldConfigItemType
public Options getOptions(FieldConfig config, JiraContextNode jiraContextNode)
getOptions
in interface MultipleCustomFieldType
public String availableForBulkEdit(BulkEditBean bulkEditBean)
CustomFieldType
availableForBulkEdit
in interface CustomFieldType
availableForBulkEdit
in class AbstractCustomFieldType
public Map getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem)
CustomFieldType
getVelocityParameters
in interface CustomFieldType
getVelocityParameters
in class AbstractCustomFieldType
issue
- The issue currently in context (Note: this will be null in cases like 'default value')
Map
of parameters to add to the velocity context, or an empty Map otherwise (never null)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |