Class InitialWatchersCFType
java.lang.Object
com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType<Collection<S>,S>
com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType<ApplicationUser>
com.atlassian.jira.issue.customfields.impl.MultiUserCFType
com.atlassian.jira.plugins.initialwatchers.InitialWatchersCFType
- All Implemented Interfaces:
ProjectImportableCustomField
,CustomFieldType<Collection<ApplicationUser>,
,ApplicationUser> SortableCustomField<String>
,ExportableCustomFieldType
,RestAwareCustomFieldType
,RestCustomFieldTypeOperations
,UserField
,UserCFNotificationTypeAware
Custom field type used for adding watchers during issue creation.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.issue.customfields.impl.MultiUserCFType
MultiUserCFType.Visitor<T>
Nested classes/interfaces inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType
AbstractCustomFieldType.VisitorBase<X>
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType
customFieldValuePersister, genericConfigManager
Fields inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType
DEFAULT_VALUE_TYPE, RESOURCE_PREVIEW
-
Constructor Summary
ConstructorsConstructorDescriptionInitialWatchersCFType
(CustomFieldValuePersister customFieldValuePersister, GenericConfigManager genericConfigManager, MultiUserConverter multiUserConverter, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, UserSearchService searchService, FieldVisibilityManager fieldVisibilityManager, JiraBaseUrls jiraBaseUrls, UserBeanFactory userBeanFactory, GroupManager groupManager, ProjectRoleManager projectRoleManager, SoyTemplateRendererProvider soyTemplateRendererProvider, UserFilterManager userFilterManager, FieldConfigSchemeManager fieldConfigSchemeManager, ProjectManager projectManager, FeatureManager featureManager, InitialWatchersFields field, InitialWatchersPermissionChecker permissionChecker) -
Method Summary
Modifier and TypeMethodDescriptionavailableForBulkEdit
(BulkEditBean bulkEditBean) Allow the custom field type perform a specific check as to its availability for bulk editing.void
createValue
(CustomField customField, Issue issue, Collection<ApplicationUser> value) Create a multi-select value for an issue.getChangelogValue
(CustomField field, Collection<ApplicationUser> value) Returns a string representation of the value if not null.boolean
shouldDisplayField
(OperationContext context, Issue issue) Field should only be displayed on Create and only if user has Manage Watchers permissionvoid
updateValue
(CustomField customField, Issue issue, Collection<ApplicationUser> value) Update a multi-select value for an issue.void
validateFromParams
(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config) Ensures that theCustomFieldParams
of Strings is a valid representation of the Custom Field values.Methods inherited from class com.atlassian.jira.issue.customfields.impl.MultiUserCFType
accept, compare, convertDbValueToType, convertTypeToDbValue, getChangelogString, getConfigurationItemTypes, getDatabaseType, getFieldTypeInfo, getJsonDefaultValue, getJsonFromIssue, getJsonSchema, getNonNullCustomFieldProvider, getProjectImporter, getRelatedIndexers, getRepresentationFromIssue, getRestFieldOperation, getSingularObjectFromString, getStringFromSingularObject, getStringValueFromCustomFieldParams, getTypeComparator, getValueFromCustomFieldParams, getVelocityParameters
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType
convertDbObjectToTypes, convertTypesToDbObjects, getDefaultValue, getValueFromIssue, getValueFromIssue, remove, setDefaultValue
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType
assertObjectImplementsType, 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
areAllRequiredParametersPresent, getCloneOptionConfiguration, getCloneValue, isUserInputRequiredForMove, requiresAdditionalParams
Methods inherited from interface com.atlassian.jira.notification.type.UserCFNotificationTypeAware
getValueFromIssue
-
Constructor Details
-
InitialWatchersCFType
public InitialWatchersCFType(CustomFieldValuePersister customFieldValuePersister, GenericConfigManager genericConfigManager, MultiUserConverter multiUserConverter, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, UserSearchService searchService, FieldVisibilityManager fieldVisibilityManager, JiraBaseUrls jiraBaseUrls, UserBeanFactory userBeanFactory, GroupManager groupManager, ProjectRoleManager projectRoleManager, SoyTemplateRendererProvider soyTemplateRendererProvider, UserFilterManager userFilterManager, FieldConfigSchemeManager fieldConfigSchemeManager, ProjectManager projectManager, FeatureManager featureManager, InitialWatchersFields field, InitialWatchersPermissionChecker permissionChecker)
-
-
Method Details
-
getChangelogValue
Description copied from class:AbstractMultiCFType
Returns a string representation of the value if not null.- Specified by:
getChangelogValue
in interfaceCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Overrides:
getChangelogValue
in classMultiUserCFType
- Parameters:
field
- not usedvalue
- value to create a change log for- Returns:
- string representaion of value if not null, empty string otherwise
-
updateValue
Description copied from class:AbstractMultiCFType
Update a multi-select value for an issue.- Specified by:
updateValue
in interfaceCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Overrides:
updateValue
in classMultiUserCFType
- Parameters:
customField
-CustomField
for which the value is being storedissue
- TheIssue
.value
- Transport Object representing the value instance of the CustomField.- See Also:
-
createValue
public void createValue(CustomField customField, Issue issue, @Nonnull Collection<ApplicationUser> value) Description copied from class:AbstractMultiCFType
Create a multi-select value for an issue.- Specified by:
createValue
in interfaceCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Overrides:
createValue
in classAbstractMultiCFType<ApplicationUser>
- Parameters:
customField
-CustomField
for which the value is being storedissue
- TheIssue
.value
- Transport Object representing the value instance of the CustomField.- See Also:
-
validateFromParams
public void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config) Description copied from interface:CustomFieldType
Ensures that theCustomFieldParams
of Strings is a valid representation of the Custom Field values. Any errors should be added to theErrorCollection
under the appropriate key as required.- Specified by:
validateFromParams
in interfaceCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Overrides:
validateFromParams
in classMultiUserCFType
- Parameters:
relevantParams
- parameter object of StringserrorCollectionToAddTo
- errorCollection to which any errors should be added (never null)config
- FieldConfig
-
availableForBulkEdit
Description copied from interface:CustomFieldType
Allow the custom field type perform a specific check as to its availability for bulk editing.- Specified by:
availableForBulkEdit
in interfaceCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Overrides:
availableForBulkEdit
in classAbstractCustomFieldType<Collection<ApplicationUser>,
ApplicationUser> - Parameters:
bulkEditBean
- BulkEditBean- Returns:
- null if available for bulk edit or appropriate unavailable message
-
shouldDisplayField
Field should only be displayed on Create and only if user has Manage Watchers permission
-