com.atlassian.jira.issue.link
Class DefaultRemoteIssueLinkManager

java.lang.Object
  extended by com.atlassian.jira.issue.link.DefaultRemoteIssueLinkManager
All Implemented Interfaces:
RemoteIssueLinkManager

public class DefaultRemoteIssueLinkManager
extends Object
implements RemoteIssueLinkManager

Default implementation of the RemoteIssueLinkManager.

Since:
v5.0

Field Summary
static int MAX_LONG_VARCHAR_LENGTH
           
 
Constructor Summary
DefaultRemoteIssueLinkManager(RemoteIssueLinkStore remoteIssueLinkStore, IssueManager issueManager, IssueUpdater issueUpdater, I18nHelper.BeanFactory i18nBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 RemoteIssueLink createRemoteIssueLink(RemoteIssueLink remoteIssueLink, com.atlassian.crowd.embedded.api.User user)
          Creates the given remote issue link.
 RemoteIssueLink getRemoteIssueLink(Long remoteIssueLinkId)
          Returns the remote issue link with the given id, or null if it does not exist.
 RemoteIssueLink getRemoteIssueLinkByGlobalId(Issue issue, String globalId)
          Returns the first remote issue link found that links with the given JIRA issue and has the given globalId, or null if none exists.
 List<RemoteIssueLink> getRemoteIssueLinksForIssue(Issue issue)
          Gets the remote issue links that link with the given JIRA issue.
 void removeRemoteIssueLink(Long remoteIssueLinkId, com.atlassian.crowd.embedded.api.User user)
          Deletes the given remote issue link id.
 void removeRemoteIssueLinkByGlobalId(Issue issue, String globalId, com.atlassian.crowd.embedded.api.User user)
          Deletes any remote issue link that links with the given JIRA issue and has the given global id.
 void updateRemoteIssueLink(RemoteIssueLink remoteIssueLink, com.atlassian.crowd.embedded.api.User user)
          Updates the given remote issue link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LONG_VARCHAR_LENGTH

public static final int MAX_LONG_VARCHAR_LENGTH
See Also:
Constant Field Values
Constructor Detail

DefaultRemoteIssueLinkManager

public DefaultRemoteIssueLinkManager(RemoteIssueLinkStore remoteIssueLinkStore,
                                     IssueManager issueManager,
                                     IssueUpdater issueUpdater,
                                     I18nHelper.BeanFactory i18nBeanFactory,
                                     com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

getRemoteIssueLink

public RemoteIssueLink getRemoteIssueLink(Long remoteIssueLinkId)
Description copied from interface: RemoteIssueLinkManager
Returns the remote issue link with the given id, or null if it does not exist.

Specified by:
getRemoteIssueLink in interface RemoteIssueLinkManager
Parameters:
remoteIssueLinkId - the id of the remote issue link to get
Returns:
the remote issue link with the given id

getRemoteIssueLinksForIssue

public List<RemoteIssueLink> getRemoteIssueLinksForIssue(Issue issue)
Description copied from interface: RemoteIssueLinkManager
Gets the remote issue links that link with the given JIRA issue.

Specified by:
getRemoteIssueLinksForIssue in interface RemoteIssueLinkManager
Parameters:
issue - the issue to get the remote issue links for
Returns:
the remote issue links for the given issue. This will never return null. If no remote issue links are stored against the issue, the list will be empty.

getRemoteIssueLinkByGlobalId

public RemoteIssueLink getRemoteIssueLinkByGlobalId(Issue issue,
                                                    String globalId)
Description copied from interface: RemoteIssueLinkManager
Returns the first remote issue link found that links with the given JIRA issue and has the given globalId, or null if none exists.

Specified by:
getRemoteIssueLinkByGlobalId in interface RemoteIssueLinkManager
Parameters:
issue - the issue to get the remote issue links for
globalId - the globalId to get the remote issue link for
Returns:
the remote issue link for the given issue with the given globalId

createRemoteIssueLink

public RemoteIssueLink createRemoteIssueLink(RemoteIssueLink remoteIssueLink,
                                             com.atlassian.crowd.embedded.api.User user)
                                      throws CreateException
Description copied from interface: RemoteIssueLinkManager
Creates the given remote issue link.

Specified by:
createRemoteIssueLink in interface RemoteIssueLinkManager
Parameters:
remoteIssueLink - the remote issue link to create
user - the current user
Returns:
the RemoteIssueLink object that was created including the generated id
Throws:
CreateException

updateRemoteIssueLink

public void updateRemoteIssueLink(RemoteIssueLink remoteIssueLink,
                                  com.atlassian.crowd.embedded.api.User user)
                           throws UpdateException
Description copied from interface: RemoteIssueLinkManager
Updates the given remote issue link. The remote issue link is updated using all of the values in this object. Null values are written as null, and must adhere to the required field constraints.

Specified by:
updateRemoteIssueLink in interface RemoteIssueLinkManager
Parameters:
remoteIssueLink - the remote issue link to update
user - the current user
Throws:
UpdateException

removeRemoteIssueLink

public void removeRemoteIssueLink(Long remoteIssueLinkId,
                                  com.atlassian.crowd.embedded.api.User user)
Description copied from interface: RemoteIssueLinkManager
Deletes the given remote issue link id.

Specified by:
removeRemoteIssueLink in interface RemoteIssueLinkManager
Parameters:
remoteIssueLinkId - the id of the remote issue link to delete
user - the current user

removeRemoteIssueLinkByGlobalId

public void removeRemoteIssueLinkByGlobalId(Issue issue,
                                            String globalId,
                                            com.atlassian.crowd.embedded.api.User user)
Description copied from interface: RemoteIssueLinkManager
Deletes any remote issue link that links with the given JIRA issue and has the given global id.

Specified by:
removeRemoteIssueLinkByGlobalId in interface RemoteIssueLinkManager
Parameters:
issue - the issue of the remote issue link
globalId - the global id of the remote issue link
user - the current user


Copyright © 2002-2012 Atlassian. All Rights Reserved.