public class

DefaultIssueLinkTypeManager

extends Object
implements IssueLinkTypeManager
java.lang.Object
   ↳ com.atlassian.jira.issue.link.DefaultIssueLinkTypeManager

Summary

Public Constructors
DefaultIssueLinkTypeManager(OfBizDelegator delegator, DbConnectionManager dbConnectionManager, CacheManager cacheManager)
Public Methods
void createIssueLinkType(String name, String outward, String inward, String style)
IssueLinkType getIssueLinkType(Long id)
Returns a user-defined (non-system) issue link type object for the specified ID.
IssueLinkType getIssueLinkType(Long id, boolean excludeSystemLinks)
Collection<IssueLinkType> getIssueLinkTypes(boolean excludeSystemLinks)
Collection<IssueLinkType> getIssueLinkTypes()
Find only the user defined link types
Collection<IssueLinkType> getIssueLinkTypesByInwardDescription(String desc)
Returns a collection of IssueLinkTypes with the given description as the inward description.
Collection<IssueLinkType> getIssueLinkTypesByName(String name)
Returns a collection of IssueLinkTypes with the given name.
Collection<IssueLinkType> getIssueLinkTypesByOutwardDescription(String desc)
Returns a collection of IssueLinkTypes with the given description as the outward description.
Collection<IssueLinkType> getIssueLinkTypesByStyle(String style)
@EventListener void onClearCache(ClearCacheEvent event)
void removeIssueLinkType(Long issueLinkTypeId)
This method removed the issue link type from the database
WARNING: This method DOES NOT check if there are any existing issue links of this issue link type.
void updateIssueLinkType(IssueLinkType issueLinkType, String name, String outward, String inward)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.link.IssueLinkTypeManager

Public Constructors

public DefaultIssueLinkTypeManager (OfBizDelegator delegator, DbConnectionManager dbConnectionManager, CacheManager cacheManager)

Public Methods

public void createIssueLinkType (String name, String outward, String inward, String style)

public IssueLinkType getIssueLinkType (Long id)

Returns a user-defined (non-system) issue link type object for the specified ID.

Parameters
id the id
Returns
  • the issue link type object

public IssueLinkType getIssueLinkType (Long id, boolean excludeSystemLinks)

public Collection<IssueLinkType> getIssueLinkTypes (boolean excludeSystemLinks)

public Collection<IssueLinkType> getIssueLinkTypes ()

Find only the user defined link types

Returns
  • the collection

public Collection<IssueLinkType> getIssueLinkTypesByInwardDescription (String desc)

Returns a collection of IssueLinkTypes with the given description as the inward description.

There is no restriction on inward and outward descriptions being unique across issue link types, which is why this may return more than one IssueLinkType.

Parameters
desc the inward description to search on
Returns
  • the collection of matched issue link types; never null.

public Collection<IssueLinkType> getIssueLinkTypesByName (String name)

Returns a collection of IssueLinkTypes with the given name. Actually this collection should always have either one or zero elements - it is illegal to have two link types with the same name.

Parameters
name The name to search for Issue Link Types by.
Returns
  • a collection of IssueLinkTypes, or an empty collection if name isn't a link type. TODO: Reconsider this method. The GUI enforces unique names.

public Collection<IssueLinkType> getIssueLinkTypesByOutwardDescription (String desc)

Returns a collection of IssueLinkTypes with the given description as the outward description.

There is no restriction on inward and outward descriptions being unique across issue link types, which is why this may return more than one IssueLinkType.

Parameters
desc the outward description to search on
Returns
  • the collection of matched issue link types; never null.

public Collection<IssueLinkType> getIssueLinkTypesByStyle (String style)

@EventListener public void onClearCache (ClearCacheEvent event)

public void removeIssueLinkType (Long issueLinkTypeId)

This method removed the issue link type from the database
WARNING: This method DOES NOT check if there are any existing issue links of this issue link type. It simply removes the record from the datastore. Use IssueLinkTypeDestroyer to 'nicely' remove the issue link type taking care of existing issue links.

Parameters
issueLinkTypeId the id of the IssueLinkType to remove

public void updateIssueLinkType (IssueLinkType issueLinkType, String name, String outward, String inward)