public class

DefaultIssueTypeService

extends Object
implements IssueTypeService
java.lang.Object
   ↳ com.atlassian.jira.config.DefaultIssueTypeService

Summary

Public Constructors
DefaultIssueTypeService(ConstantsManager constantsManager, IssueTypeTypeAvatarService avatarService, I18nHelper i18n, GlobalPermissionManager globalPermissionManager, IssueTypeManager issueTypeManager, PermissionManager permissionManager, IssueTypeSchemeManager issueTypeSchemeManager, SubTaskManager subTaskManager, ApplicationProperties applicationProperties)
Public Methods
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 IssueTypes to which issues with the supplied issue type can be moved to.
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.config.IssueTypeService

Public Constructors

public DefaultIssueTypeService (ConstantsManager constantsManager, IssueTypeTypeAvatarService avatarService, I18nHelper i18n, GlobalPermissionManager globalPermissionManager, IssueTypeManager issueTypeManager, PermissionManager permissionManager, IssueTypeSchemeManager issueTypeSchemeManager, SubTaskManager subTaskManager, ApplicationProperties applicationProperties)

Public Methods

public IssueTypeService.IssueTypeResult createIssueType (ApplicationUser user, IssueTypeService.CreateValidationResult validationResult)

This method will store a new issue type in JIRA DB. This method will trigger a new IssueTypeCreatedEvent.

Parameters
user against whom the permission checks will be run.
validationResult validation result returned by validateCreateIssueType(ApplicationUser, com.atlassian.jira.config.IssueTypeService.IssueTypeCreateInput).
Returns
  • the result of issue type creation.

public void deleteIssueType (ApplicationUser user, IssueTypeService.DeleteValidationResult validationResult)

Removes the issue from JIRA database and triggers IssueTypeDeletedEvent. All issues which are associated to the removed issue type are going to be migrated to an alternative issue type.

Parameters
user against whom the permission checks will be run.
validationResult validation result returned by validateDeleteIssueType(ApplicationUser, IssueTypeDeleteInput).

public Iterable<IssueType> getAvailableAlternativesForIssueType (ApplicationUser applicationUser, String id)

Returns a collection of suitable alternative IssueTypes to which issues with the supplied issue type can be moved to. The suitable alternative IssueTypes will have to use the same workflow, the same field configuration and the same screen scheme.

Parameters
applicationUser user which requests access to issue types.
id of an issue type to find alternative for.
Returns
  • issue type alternative for issue type with given id.

public Option<IssueType> getIssueType (ApplicationUser applicationUser, String id)

Returns an issue type for the given issue type id, if it is visible for the user.

Parameters
applicationUser user which requests access to the issue type.
id of an issue type to return.
Returns
  • issue type for id.

public Iterable<IssueType> getIssueTypes (ApplicationUser applicationUser)

public 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.

Parameters
user against whom the permission checks will be run.
validationResult validation result returned by validateUpdateIssueType(ApplicationUser, String, com.atlassian.jira.config.IssueTypeService.IssueTypeUpdateInput).
Returns
  • the result of issue type creation.

public IssueTypeService.CreateValidationResult validateCreateIssueType (ApplicationUser user, IssueTypeService.IssueTypeCreateInput issueTypeCreateInput)

This method validates the parameters for creation of an issue type and execute permission checks. If the checks pass the method constructs a new instance of IssueTypeService.CreateValidationResult which can be passed to createIssueType(ApplicationUser, CreateValidationResult).

Parameters
user against whom the permission checks will be run.
issueTypeCreateInput this represents the issue type values.
Returns

public 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.

Parameters
user against whom the permission checks will be run.
issueTypeDeleteInput issue type delete input.
Returns

public 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. If checks pass the method constructs a new instance of IssueTypeService.UpdateValidationResult which can be passed to updateIssueType(ApplicationUser, UpdateValidationResult).

Parameters
user against whom the permission checks will be run.
issueTypeId issue type to update.
issueTypeUpdateInput represents the issue type values.
Returns