com.atlassian.greenhopper.manager.issuelink
Class EpicLinkManagerImpl

java.lang.Object
  extended by com.atlassian.greenhopper.manager.issuelink.EpicLinkManagerImpl
All Implemented Interfaces:
EpicLinkManager

@Service
public class EpicLinkManagerImpl
extends java.lang.Object
implements EpicLinkManager


Constructor Summary
EpicLinkManagerImpl()
           
 
Method Summary
 void addChangeHistoryForAdd(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue child, com.atlassian.jira.issue.Issue oldEpic, com.atlassian.jira.issue.Issue newEpic)
          Adds a change history entry on the child issue when the epic of that issue has been updated.
 void addChangeHistoryForRemove(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue child, com.atlassian.jira.issue.Issue oldEpic)
          Adds a change history entry on the child issue when the epic of that issue has been removed.
 ServiceOutcome<java.lang.Void> createLink(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue epic, com.atlassian.jira.issue.Issue child)
          Create an epic issue link between the specified epic and child.
 com.atlassian.fugue.Option<com.atlassian.jira.issue.Issue> getEpic(com.atlassian.jira.issue.Issue child)
          Get the Epic of an issue, if one exists, by performing a database lookup of an issue's links.
 ServiceOutcome<com.atlassian.fugue.Option<com.atlassian.jira.issue.Issue>> removeLinkedEpic(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue child)
          Removes existing link to epic from a child issue (if it exists)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EpicLinkManagerImpl

public EpicLinkManagerImpl()
Method Detail

getEpic

@Nonnull
public com.atlassian.fugue.Option<com.atlassian.jira.issue.Issue> getEpic(com.atlassian.jira.issue.Issue child)
Description copied from interface: EpicLinkManager
Get the Epic of an issue, if one exists, by performing a database lookup of an issue's links.

Specified by:
getEpic in interface EpicLinkManager
Parameters:
child - the issue
Returns:
the epic issue if the child has one

removeLinkedEpic

@Nonnull
public ServiceOutcome<com.atlassian.fugue.Option<com.atlassian.jira.issue.Issue>> removeLinkedEpic(com.atlassian.crowd.embedded.api.User user,
                                                                                                           com.atlassian.jira.issue.Issue child)
Description copied from interface: EpicLinkManager
Removes existing link to epic from a child issue (if it exists)

Specified by:
removeLinkedEpic in interface EpicLinkManager
Parameters:
user - the user removing the link
child - the child issue to remove the epic from
Returns:
the old epic of the child, if one existed

createLink

@Nonnull
public ServiceOutcome<java.lang.Void> createLink(com.atlassian.crowd.embedded.api.User user,
                                                         com.atlassian.jira.issue.Issue epic,
                                                         com.atlassian.jira.issue.Issue child)
Description copied from interface: EpicLinkManager
Create an epic issue link between the specified epic and child. Does not create a change history item for this link.

Specified by:
createLink in interface EpicLinkManager
Parameters:
user - the user
epic - the epic
child - the child issue
Returns:
the outcome

addChangeHistoryForAdd

public void addChangeHistoryForAdd(com.atlassian.crowd.embedded.api.User user,
                                   @Nonnull
                                   com.atlassian.jira.issue.Issue child,
                                   @Nullable
                                   com.atlassian.jira.issue.Issue oldEpic,
                                   @Nonnull
                                   com.atlassian.jira.issue.Issue newEpic)
Description copied from interface: EpicLinkManager
Adds a change history entry on the child issue when the epic of that issue has been updated. Does not return anything as currently it should not "Stop Everything" if change history cannot be added.

Specified by:
addChangeHistoryForAdd in interface EpicLinkManager
Parameters:
user - the user performing the change
child - the issue being changed
oldEpic - its old epic (may be null)
newEpic - its new epic (may not be null)

addChangeHistoryForRemove

public void addChangeHistoryForRemove(com.atlassian.crowd.embedded.api.User user,
                                      @Nonnull
                                      com.atlassian.jira.issue.Issue child,
                                      @Nonnull
                                      com.atlassian.jira.issue.Issue oldEpic)
Description copied from interface: EpicLinkManager
Adds a change history entry on the child issue when the epic of that issue has been removed. Does not return anything as currently it should not "Stop Everything" if change history cannot be added.

Specified by:
addChangeHistoryForRemove in interface EpicLinkManager
Parameters:
user - the user performing the change
child - the issue being changed
oldEpic - its old epic (may be null)


Copyright © 2007-2012 Atlassian. All Rights Reserved.