public class DefaultIssueTypeService extends Object implements IssueTypeService
IssueTypeService.CreateValidationResult, IssueTypeService.DeleteValidationResult, IssueTypeService.IssueTypeCreateInput, IssueTypeService.IssueTypeDeleteInput, IssueTypeService.IssueTypeResult, IssueTypeService.IssueTypeUpdateInput, IssueTypeService.UpdateValidationResult
Constructor and Description |
---|
DefaultIssueTypeService(ConstantsManager constantsManager,
IssueTypeTypeAvatarService avatarService,
I18nHelper i18n,
GlobalPermissionManager globalPermissionManager,
IssueTypeManager issueTypeManager,
PermissionManager permissionManager,
IssueTypeSchemeManager issueTypeSchemeManager,
SubTaskManager subTaskManager,
ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
IssueTypeService.IssueTypeResult |
createIssueType(ApplicationUser user,
IssueTypeService.CreateValidationResult validationResult)
This method will store a new issue type in JIRA DB.
|
void |
deleteIssueType(ApplicationUser user,
IssueTypeService.DeleteValidationResult validationResult)
Removes the issue from JIRA database and triggers
IssueTypeDeletedEvent . |
Iterable<IssueType> |
getAvailableAlternativesForIssueType(ApplicationUser applicationUser,
String id)
Returns a collection of suitable alternative
IssueType s to which issues with the supplied issue type can be moved to. |
com.atlassian.fugue.Option<IssueType> |
getIssueType(ApplicationUser applicationUser,
String id)
Returns an issue type for the given issue type id, if it is visible for the user.
|
Iterable<IssueType> |
getIssueTypes(ApplicationUser applicationUser) |
IssueTypeService.IssueTypeResult |
updateIssueType(ApplicationUser user,
IssueTypeService.UpdateValidationResult validationResult)
This method will store the update issue type value in JIRA database and trigger a new
IssueTypeUpdatedEvent . |
IssueTypeService.CreateValidationResult |
validateCreateIssueType(ApplicationUser user,
IssueTypeService.IssueTypeCreateInput issueTypeCreateInput)
This method validates the parameters for creation of an issue type and execute permission checks.
|
IssueTypeService.DeleteValidationResult |
validateDeleteIssueType(ApplicationUser user,
IssueTypeService.IssueTypeDeleteInput issueTypeDeleteInput)
This method validates if it is possible to remove issue type with given id and executes permission checks.
|
IssueTypeService.UpdateValidationResult |
validateUpdateIssueType(ApplicationUser user,
String issueTypeId,
IssueTypeService.IssueTypeUpdateInput issueTypeUpdateInput)
This method validates the parameters for update of an issue type and execute permission checks.
|
public DefaultIssueTypeService(ConstantsManager constantsManager, IssueTypeTypeAvatarService avatarService, I18nHelper i18n, GlobalPermissionManager globalPermissionManager, IssueTypeManager issueTypeManager, PermissionManager permissionManager, IssueTypeSchemeManager issueTypeSchemeManager, SubTaskManager subTaskManager, ApplicationProperties applicationProperties)
public com.atlassian.fugue.Option<IssueType> getIssueType(ApplicationUser applicationUser, String id)
IssueTypeService
getIssueType
in interface IssueTypeService
applicationUser
- user which requests access to the issue type.id
- of an issue type to return.public Iterable<IssueType> getIssueTypes(ApplicationUser applicationUser)
getIssueTypes
in interface IssueTypeService
applicationUser
- user which requests access to issue types.public Iterable<IssueType> getAvailableAlternativesForIssueType(ApplicationUser applicationUser, String id)
IssueTypeService
IssueType
s to which issues with the supplied issue type can be moved to.
The suitable alternative IssueType
s will have to use the same workflow, the same field configuration and the same screen scheme.getAvailableAlternativesForIssueType
in interface IssueTypeService
applicationUser
- user which requests access to issue types.id
- of an issue type to find alternative for.public IssueTypeService.CreateValidationResult validateCreateIssueType(ApplicationUser user, @Nonnull IssueTypeService.IssueTypeCreateInput issueTypeCreateInput)
IssueTypeService
IssueTypeService.CreateValidationResult
which can be passed
to IssueTypeService.createIssueType(ApplicationUser, CreateValidationResult)
.validateCreateIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.issueTypeCreateInput
- this represents the issue type values.IssueTypeService.CreateValidationResult
.public IssueTypeService.IssueTypeResult createIssueType(ApplicationUser user, @Nonnull IssueTypeService.CreateValidationResult validationResult)
IssueTypeService
IssueTypeCreatedEvent
.createIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.validationResult
- validation result returned by IssueTypeService.validateCreateIssueType(ApplicationUser, com.atlassian.jira.config.IssueTypeService.IssueTypeCreateInput)
.public IssueTypeService.UpdateValidationResult validateUpdateIssueType(ApplicationUser user, @Nonnull String issueTypeId, @Nonnull IssueTypeService.IssueTypeUpdateInput issueTypeUpdateInput)
IssueTypeService
IssueTypeService.UpdateValidationResult
which can be passed to
IssueTypeService.updateIssueType(ApplicationUser, UpdateValidationResult)
.validateUpdateIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.issueTypeId
- issue type to update.issueTypeUpdateInput
- represents the issue type values.IssueTypeService.UpdateValidationResult
.public IssueTypeService.IssueTypeResult updateIssueType(ApplicationUser user, @Nonnull IssueTypeService.UpdateValidationResult validationResult)
IssueTypeService
IssueTypeUpdatedEvent
.updateIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.validationResult
- validation result returned by IssueTypeService.validateUpdateIssueType(ApplicationUser, String, com.atlassian.jira.config.IssueTypeService.IssueTypeUpdateInput)
.public IssueTypeService.DeleteValidationResult validateDeleteIssueType(ApplicationUser user, @Nonnull IssueTypeService.IssueTypeDeleteInput issueTypeDeleteInput)
IssueTypeService
validateDeleteIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.issueTypeDeleteInput
- issue type delete input.IssueTypeService.DeleteValidationResult
.public void deleteIssueType(ApplicationUser user, @Nonnull IssueTypeService.DeleteValidationResult validationResult)
IssueTypeService
IssueTypeDeletedEvent
.
All issues which are associated to the removed issue type are going to be migrated to an alternative issue type.deleteIssueType
in interface IssueTypeService
user
- against whom the permission checks will be run.validationResult
- validation result returned by IssueTypeService.validateDeleteIssueType(ApplicationUser, IssueTypeDeleteInput)
.Copyright © 2002-2015 Atlassian. All Rights Reserved.