com.atlassian.greenhopper.service.rank
Class RankManager

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.service.rank.RankManager

@Service
public class RankManager
extends AbstractLoggable

Manager to work with the rank index. Ranking always takes place with rankable objects, which can either be backed by an issue or a rankableobject.


Field Summary
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
RankManager()
           
 
Method Summary
 int compareRankablePosition(com.atlassian.jira.issue.fields.CustomField rankField, Rankable first, Rankable second)
          Compares two rankables to each other.
 ServiceOutcome<java.lang.Long> getRankablePosition(com.atlassian.jira.issue.fields.CustomField rankField, Rankable rankable)
           
 ServiceOutcome<RankChange> rankAfter(com.atlassian.jira.issue.fields.CustomField rankField, Rankable rankable, Rankable rankAfter)
           
 ServiceOutcome<RankChange> rankBefore(com.atlassian.jira.issue.fields.CustomField rankField, Rankable rankable, Rankable rankBefore)
           
 ServiceOutcome<RankChange> rankFirst(com.atlassian.jira.issue.fields.CustomField rankField, Rankable rankable)
           
 ServiceOutcome<RankChange> rankLast(com.atlassian.jira.issue.fields.CustomField rankField, Rankable rankable)
           
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RankManager

public RankManager()
Method Detail

rankBefore

@NotNull
public ServiceOutcome<RankChange> rankBefore(com.atlassian.jira.issue.fields.CustomField rankField,
                                                     Rankable rankable,
                                                     Rankable rankBefore)

rankAfter

@NotNull
public ServiceOutcome<RankChange> rankAfter(com.atlassian.jira.issue.fields.CustomField rankField,
                                                    Rankable rankable,
                                                    Rankable rankAfter)

rankFirst

@NotNull
public ServiceOutcome<RankChange> rankFirst(com.atlassian.jira.issue.fields.CustomField rankField,
                                                    Rankable rankable)

rankLast

@NotNull
public ServiceOutcome<RankChange> rankLast(com.atlassian.jira.issue.fields.CustomField rankField,
                                                   Rankable rankable)

getRankablePosition

@NotNull
public ServiceOutcome<java.lang.Long> getRankablePosition(com.atlassian.jira.issue.fields.CustomField rankField,
                                                                  Rankable rankable)

compareRankablePosition

public int compareRankablePosition(com.atlassian.jira.issue.fields.CustomField rankField,
                                   Rankable first,
                                   Rankable second)
Compares two rankables to each other. Note: this method simply compares two positions, and does not take into account issue hierarchy



Copyright © 2007-2012 Atlassian. All Rights Reserved.