public class

DefaultStatusService

extends Object
implements StatusService
java.lang.Object
   ↳ com.atlassian.jira.bc.config.DefaultStatusService

Summary

Public Constructors
DefaultStatusService(StatusManager statusManager, I18nHelper i18nHelper, ConstantsManager constantsManager)
Public Methods
ServiceOutcome<Status> createStatus(ApplicationUser user, String name, String description, String iconUrl, StatusCategory statusCategory)
Validates and when validation is performed successfully creates new status basing on given parameters
ServiceOutcome<Status> editStatus(ApplicationUser user, Status status, String name, String description, String iconUrl, StatusCategory statusCategory)
Validates and when validation is performed successfully alters given status basing on given parameters
Status getStatusById(ApplicationUser user, String id)
Get a status by id.
ServiceResult removeStatus(ApplicationUser user, Status status)
Removes a status.
ServiceResult validateCreateStatus(ApplicationUser user, String name, String description, String iconUrl, StatusCategory statusCategory)
Validates new status basing on given parameters
ServiceResult validateEditStatus(ApplicationUser user, Status status, String name, String description, String iconUrl, StatusCategory statusCategory)
Validates given status basing on given parameters
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.bc.config.StatusService

Public Constructors

public DefaultStatusService (StatusManager statusManager, I18nHelper i18nHelper, ConstantsManager constantsManager)

Public Methods

public ServiceOutcome<Status> createStatus (ApplicationUser user, String name, String description, String iconUrl, StatusCategory statusCategory)

Validates and when validation is performed successfully creates new status basing on given parameters

Parameters
user User performing operation
name Name of the status. Should neither be blank nor duplicate existing name
description Optional description of the status
iconUrl URL of the icon for representing given status. May be relative or absolute. Cannot be null
statusCategory StatusCategory for given status. Cannot be null
Returns
  • The result of performed operation

public ServiceOutcome<Status> editStatus (ApplicationUser user, Status status, String name, String description, String iconUrl, StatusCategory statusCategory)

Validates and when validation is performed successfully alters given status basing on given parameters

Parameters
user User performing operation
status The status to be edited
name Name of the status. Should neither be blank nor duplicate existing name
description Optional description of the status
iconUrl URL of the icon for representing given status. May be relative or absolute. Cannot be null
statusCategory StatusCategory for given status. Cannot be null
Returns
  • The result of performed operation

public Status getStatusById (ApplicationUser user, String id)

Get a status by id.

Parameters
user User performing operation
id status id
Returns
  • the Status, or null if no status with this id exists.

public ServiceResult removeStatus (ApplicationUser user, Status status)

Removes a status.

Parameters
user User performing operation
status Status
Returns
  • The result of performed operation

public ServiceResult validateCreateStatus (ApplicationUser user, String name, String description, String iconUrl, StatusCategory statusCategory)

Validates new status basing on given parameters

Parameters
user User performing operation
name Name of the status. Should neither be blank nor duplicate existing name
description Optional description of the status
iconUrl URL of the icon for representing given status. May be relative or absolute. Cannot be null
statusCategory StatusCategory for given status. Cannot be null
Returns
  • The result of performed operation

public ServiceResult validateEditStatus (ApplicationUser user, Status status, String name, String description, String iconUrl, StatusCategory statusCategory)

Validates given status basing on given parameters

Parameters
user User performing operation
status The status to be edited
name Name of the status. Should neither be blank nor duplicate existing name
description Optional description of the status
iconUrl URL of the icon for representing given status. May be relative or absolute. Cannot be null
statusCategory StatusCategory for given status. Cannot be null
Returns
  • The result of performed operation