com.atlassian.greenhopper.manager.issuelink
Interface EpicLinkManager

All Known Implementing Classes:
EpicLinkManagerImpl

public interface EpicLinkManager

Access information about epic-issue relationships from the database level.


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)
 

Method Detail

getEpic

@Nonnull
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.

Parameters:
child - the issue
Returns:
the epic issue if the child has one

removeLinkedEpic

@Nonnull
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)

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
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. Does not create a change history item for this link.

Parameters:
user - the user
epic - the epic
child - the child issue
Returns:
the outcome

addChangeHistoryForAdd

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)
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.

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

void addChangeHistoryForRemove(com.atlassian.crowd.embedded.api.User user,
                               @Nonnull
                               com.atlassian.jira.issue.Issue child,
                               @Nonnull
                               com.atlassian.jira.issue.Issue oldEpic)
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.

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.