Package com.atlassian.jira.bc.issue.link
Class DefaultIssueLinkTypeService
java.lang.Object
com.atlassian.jira.bc.issue.link.DefaultIssueLinkTypeService
- All Implemented Interfaces:
IssueLinkTypeService
- Since:
- v6.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIssueLinkTypeService(GlobalPermissionManager permissionManager, IssueLinkTypeManager issueLinkTypeManager, IssueLinkTypeDestroyer issueLinkTypeDestroyer, I18nHelper.BeanFactory i18nFactory, ApplicationProperties applicationProperties, IssueLinkingHandler issueLinkingHandler) -
Method Summary
Modifier and TypeMethodDescriptioncreateIssueLinkType(ApplicationUser user, String name, String outward, String inward) Create a new issue link type.deleteIssueLinkType(ApplicationUser user, IssueLinkType linkType) Delete a given IssueLinkType, checking for permissions.Get a list of all issue link types in the system.moveIssueLinkType(ApplicationUser user, Long issueLinkTypeId, Long newPosition) Move an existing issue link type through the list which will lead the others to be moved too.resetOrderAlphabetically(ApplicationUser user, String direction) Reset the order of the issue link types alphabetically.updateIssueLinkType(ApplicationUser user, IssueLinkType linkType, String name, String outward, String inward) Update an existing issue link type
-
Constructor Details
-
DefaultIssueLinkTypeService
public DefaultIssueLinkTypeService(GlobalPermissionManager permissionManager, IssueLinkTypeManager issueLinkTypeManager, IssueLinkTypeDestroyer issueLinkTypeDestroyer, I18nHelper.BeanFactory i18nFactory, ApplicationProperties applicationProperties, IssueLinkingHandler issueLinkingHandler)
-
-
Method Details
-
createIssueLinkType
public ServiceOutcome<IssueLinkType> createIssueLinkType(ApplicationUser user, String name, String outward, String inward) Description copied from interface:IssueLinkTypeServiceCreate a new issue link type.- Specified by:
createIssueLinkTypein interfaceIssueLinkTypeService- Parameters:
user- the user who will create itname- the name of the link to createoutward- the description to use for outbound links of this typeinward- the description to use for inbound links of this type- Returns:
- a ServiceOutcome that contains a description of the failure or the created IssueLinkType
-
deleteIssueLinkType
public ServiceOutcome<IssueLinkType> deleteIssueLinkType(ApplicationUser user, IssueLinkType linkType) Description copied from interface:IssueLinkTypeServiceDelete a given IssueLinkType, checking for permissions.- Specified by:
deleteIssueLinkTypein interfaceIssueLinkTypeService- Parameters:
user- the user who is performing the actionlinkType- the IssueLinkType to delete- Returns:
- a ServiceOutcome indicating success or failure
-
getIssueLinkTypes
Description copied from interface:IssueLinkTypeServiceGet a list of all issue link types in the system.- Specified by:
getIssueLinkTypesin interfaceIssueLinkTypeService- Parameters:
user- the user who wants to know- Returns:
- a list of all issue link types
-
updateIssueLinkType
public ServiceOutcome<IssueLinkType> updateIssueLinkType(ApplicationUser user, IssueLinkType linkType, String name, String outward, String inward) Description copied from interface:IssueLinkTypeServiceUpdate an existing issue link type- Specified by:
updateIssueLinkTypein interfaceIssueLinkTypeService- Parameters:
user- the user performing the modificationlinkType- the link you want to updatename- the new name to useoutward- the new outbound description to useinward- the new inbound description to use- Returns:
- the updated IssueLinkType
-
moveIssueLinkType
public ServiceOutcome<IssueLinkType> moveIssueLinkType(ApplicationUser user, Long issueLinkTypeId, Long newPosition) Description copied from interface:IssueLinkTypeServiceMove an existing issue link type through the list which will lead the others to be moved too. e.g. if you move a link type from position 1 to position 3, the link types that were in position 2 and 3 will be moved to 1 and 2.- Specified by:
moveIssueLinkTypein interfaceIssueLinkTypeService- Parameters:
user- the user performing the modificationissueLinkTypeId- the link type you want to movenewPosition- the new position of the link type, must be 1 or greater- Returns:
- the moved IssueLinkType
-
resetOrderAlphabetically
public ServiceOutcome<Collection<IssueLinkType>> resetOrderAlphabetically(ApplicationUser user, String direction) Description copied from interface:IssueLinkTypeServiceReset the order of the issue link types alphabetically.- Specified by:
resetOrderAlphabeticallyin interfaceIssueLinkTypeService- Parameters:
user- the user performing the modificationdirection- Case-insensitive "asc" or "desc" to indicate the direction to sort- Returns:
- reordered issue link types along with ServiceOutcome indicating success or failure
-