@PublicApi public interface

IssueTypeService

com.atlassian.jira.config.IssueTypeService
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Service for managing issue types.

Summary

Nested Classes
class IssueTypeService.CreateValidationResult  
class IssueTypeService.DeleteValidationResult  
class IssueTypeService.IssueTypeCreateInput  
class IssueTypeService.IssueTypeDeleteInput  
class IssueTypeService.IssueTypeResult  
class IssueTypeService.IssueTypeUpdateInput  
class IssueTypeService.UpdateValidationResult  
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.

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)

Parameters
applicationUser user which requests access to issue types.
Returns
  • all issue types visible for the given user.

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