|
||||||||||
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<com.opensymphony.user.Group> com.atlassian.jira.issue.customfields.impl.MultiGroupCFType
public class MultiGroupCFType
Multiple User Group Select Type
Collection
of Group
s
Nested Class Summary | |
---|---|
static interface |
MultiGroupCFType.Visitor<T>
|
Nested classes/interfaces inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
AbstractCustomFieldType.VisitorBase<T> |
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 | |
---|---|
java.lang.Object |
accept(AbstractCustomFieldType.VisitorBase visitor)
|
protected com.opensymphony.user.Group |
convertStringToType(java.lang.String string)
Converts a given String to underlying type |
protected java.lang.String |
convertTypeToString(java.lang.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. |
org.apache.lucene.search.Query |
getQueryForGroup(java.lang.String fieldName,
java.lang.String groupName)
This method should be implemented in your custom type to return a Query. |
java.util.List |
getRelatedIndexers(CustomField customField)
Returns a list of indexers that will be used for the field. |
java.lang.Object |
getSingularObjectFromString(java.lang.String s)
Returns a Singular Object, given the string value as passed by the presentation tier. |
java.lang.String |
getStringFromSingularObject(java.lang.Object o)
Returns the String representation of a single value within the CustomFieldType. |
java.lang.Object |
getStringValueFromCustomFieldParams(CustomFieldParams parameters)
Return the String value object from the CustomFieldParams. |
protected java.util.Comparator<com.opensymphony.user.Group> |
getTypeComparator()
Returns a comparator for underlying type of this custom field. |
java.lang.Object |
getValueFromCustomFieldParams(CustomFieldParams parameters)
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. |
java.util.Map<java.lang.String,java.lang.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). |
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 java.util.Comparator<com.opensymphony.user.Group> getTypeComparator()
AbstractMultiCFType
getTypeComparator
in class AbstractMultiCFType<com.opensymphony.user.Group>
public java.lang.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 java.lang.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 java.lang.String getStringFromSingularObject(java.lang.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 java.lang.Object getSingularObjectFromString(java.lang.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 java.util.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 java.util.Map<java.lang.String,java.lang.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 java.lang.String convertTypeToString(java.lang.Object value)
AbstractMultiCFType
convertTypeToString
in class AbstractMultiCFType<com.opensymphony.user.Group>
value
- underlying type
protected com.opensymphony.user.Group convertStringToType(java.lang.String string)
AbstractMultiCFType
convertStringToType
in class AbstractMultiCFType<com.opensymphony.user.Group>
string
- string representation of underlying type
public 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()
public org.apache.lucene.search.Query getQueryForGroup(java.lang.String fieldName, java.lang.String groupName)
GroupSelectorField
fieldName:groupName
. However some custom fields, such as (@Link SelectCFType)
manipulate the field identifiers and values before storing in the index. In cases like this you will have to
implement the method such that it searches the correct fields.
getQueryForGroup
in interface GroupSelectorField
fieldName
- the id of the custom fieldgroupName
- the name of the group to filter on
public java.lang.Object accept(AbstractCustomFieldType.VisitorBase visitor)
accept
in class AbstractMultiCFType<com.opensymphony.user.Group>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |