|
||||||||||
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.AbstractMultiCFType<Group> com.atlassian.jira.issue.customfields.impl.MultiGroupCFType
public class MultiGroupCFType
Multiple User Group Select Type
Collection
of Group
s
Field Summary | |
---|---|
protected MultiGroupConverter |
multiGroupConverter
|
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, log |
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
DEFAULT_VALUE_TYPE |
Constructor Summary | |
---|---|
MultiGroupCFType(CustomFieldValuePersister customFieldValuePersister,
StringConverter stringConverter,
GenericConfigManager genericConfigManager,
MultiGroupConverter multiGroupConverter,
PermissionManager permissionManager,
JiraAuthenticationContext authenticationContext,
GroupManager groupManager,
FieldVisibilityManager fieldVisibilityManager)
|
Method Summary | |
---|---|
protected Group |
convertStringToType(String string)
Converts a given String to underlying type |
protected String |
convertTypeToString(Object value)
Converts a given underlying type to String. |
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. |
List |
getRelatedIndexers(CustomField customField)
Returns a list of indexers that will be used for the field. |
Object |
getSingularObjectFromString(String s)
Returns a Singular Object, given the string value as passed by the presentation tier. |
String |
getStringFromSingularObject(Object o)
Returns the String representation of a single value within the CustomFieldType. |
Object |
getStringValueFromCustomFieldParams(CustomFieldParams parameters)
Return the String value object from the CustomFieldParams. |
protected Comparator<Group> |
getTypeComparator()
Returns a comparator for underlying type of this custom field. |
Object |
getValueFromCustomFieldParams(CustomFieldParams parameters)
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. |
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). |
protected boolean |
isMultiple()
|
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.AbstractMultiCFType |
---|
convertStringsToTypes, convertTypesToStringsIfRequired, createValue, getChangelogValue, getDefaultValue, getValueFromIssue, setDefaultValue, updateValue |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.TextCFType |
---|
compare, 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 |
---|
remove |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
assertObjectImplementsType, availableForBulkEdit, getChangelogString, getConfigurationItemTypes, getDescription, getDescriptor, getI18nBean, getKey, getName, 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, getChangelogString, getConfigurationItemTypes, getDescription, getDescriptor, getKey, getName, init, isRenderable, remove, valuesEqual |
Field Detail |
---|
protected final MultiGroupConverter multiGroupConverter
Constructor Detail |
---|
public MultiGroupCFType(CustomFieldValuePersister customFieldValuePersister, StringConverter stringConverter, GenericConfigManager genericConfigManager, MultiGroupConverter multiGroupConverter, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, GroupManager groupManager, FieldVisibilityManager fieldVisibilityManager)
Method Detail |
---|
protected Comparator<Group> getTypeComparator()
AbstractMultiCFType
getTypeComparator
in class AbstractMultiCFType<Group>
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
getValueFromCustomFieldParams
in class AbstractSingleFieldType
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
getStringValueFromCustomFieldParams
in class AbstractSingleFieldType
parameters
- - CustomFieldParams containing String values
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 String getStringFromSingularObject(Object o)
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
o
- the object
public Object getSingularObjectFromString(String s) throws FieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
getSingularObjectFromString
in class TextCFType
s
- the String
FieldValidationException
- if the string is an invalid representation of the Object.public List getRelatedIndexers(CustomField customField)
CustomFieldType
getRelatedIndexers
in interface CustomFieldType
getRelatedIndexers
in class AbstractCustomFieldType
customField
- the custom field to get the related indexers of.
FieldIndexer
objects. Null if no related indexers.public Map<String,Object> 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')field
- CustomFieldfieldLayoutItem
- FieldLayoutItem
Map
of parameters to add to the velocity context, or an empty Map otherwise (never null)protected String convertTypeToString(Object value)
AbstractMultiCFType
convertTypeToString
in class AbstractMultiCFType<Group>
value
- underlying type
protected Group convertStringToType(String string)
AbstractMultiCFType
convertStringToType
in class AbstractMultiCFType<Group>
string
- string representation of underlying type
protected boolean isMultiple()
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |