Interface LexoRankManager
- All Known Implementing Classes:
LexoRankManagerImpl
public interface LexoRankManager
Manager for performing rank operations.
-
Method Summary
Modifier and TypeMethodDescriptiondeleteRanksForDeletedIssue
(long issueId) Deltes all ranks for given issue.deleteRanksForIssueIdsBetween
(long startIdInclusive, long endIdInclusive) Deletes all ranks for the issues between startIdInclusive and endIdInclusive. startIdInclusive must be less than or equal to endIdInclusivedeleteRanksForIssues
(Iterable<Long> issueIds) Deletes all ranks for the given issuesDrops all fields that no longer have corresponding custom fields.dropField
(long fieldId) Drops given field within certain timeout.io.atlassian.fugue.Option
<LexoRank> getRank
(long fieldId, long issueId) Looks up the rank for given issue.getRankOrRankInitially
(long fieldId, long issueId) Returns the rank of an issue for a custom field.getRankOrRankInitially
(long fieldId, long issueId, boolean reIndex) Returns the rank of an issue for a custom field.getRankValues
(long fieldId, Collection<Long> issueIds) Looks up the ranks for given issues.healDuplicates
(long fieldId) Performs healing operation for given field.initField
(long fieldId) Initializes given field for lexo rank.rankAfter
(long fieldId, long issueId, long otherIssueId) Ranks given issue after other given issue.rankAfter
(long fieldId, long issueId, long otherIssueId, int remainingRankOperations) Ranks given issue after other given issue with indication how many rank operations will follow.rankBefore
(long fieldId, long issueId, long otherIssueId) Ranks given issue before other given issue.rankBefore
(long fieldId, long issueId, long otherIssueId, int remainingRankOperations) Ranks given issue before other given issue with indication how many rank operations will follow.rankFirst
(long fieldId, long issueId) Ranks given issue as first.rankLast
(long fieldId, long issueId) Ranks given issue as last.
-
Method Details
-
initField
Initializes given field for lexo rank.- Parameters:
fieldId
- of the lexo rank custom field.- Returns:
- void.
-
dropField
Drops given field within certain timeout.- Parameters:
fieldId
- of the lexo rank custom field- Returns:
- empty ServiceOutcome if no errors occurred and operation finished within timeout.
-
dropAllObsoleteFields
ServiceOutcome<Set<Long>> dropAllObsoleteFields()Drops all fields that no longer have corresponding custom fields.- Returns:
- A set of fieldIds whose entries were removed if successful.
-
getRankOrRankInitially
Returns the rank of an issue for a custom field. If no rank currently exists for the issue, an initial rank value will be assigned to the issue. This operation will reIndex the issue and its sub-tasks.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue- Returns:
- result representing rank change
-
getRankOrRankInitially
LexoRankOperationOutcome<LexoRankChange> getRankOrRankInitially(long fieldId, long issueId, boolean reIndex) Returns the rank of an issue for a custom field. If no rank currently exists for the issue, an initial rank value will be assigned to the issue.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issuereIndex
- whether to reIndex issue after operation- Returns:
- result representing rank change
-
deleteRanksForDeletedIssue
Deltes all ranks for given issue.- Parameters:
issueId
- of the issue.- Returns:
- empty ServiceOutcome if no errors occurred.
-
deleteRanksForIssues
Deletes all ranks for the given issues- Parameters:
issueIds
- of the issues- Returns:
- empty ServiceOutcome if no errors occurred.
-
deleteRanksForIssueIdsBetween
Deletes all ranks for the issues between startIdInclusive and endIdInclusive. startIdInclusive must be less than or equal to endIdInclusive- Parameters:
startIdInclusive
- of the rank to delete fromendIdInclusive
- of the rank to delete to- Returns:
- empty ServiceOutcome if no errors occurred.
-
rankBefore
Ranks given issue before other given issue. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom field.issueId
- of the issue to be ranked.otherIssueId
- before which the issue will be ranked.- Returns:
- result representing rank change
-
rankBefore
LexoRankOperationOutcome<LexoRankChange> rankBefore(long fieldId, long issueId, long otherIssueId, int remainingRankOperations) Ranks given issue before other given issue with indication how many rank operations will follow. The subsequent rank operations should berankAfter(long, long, long, int)
. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be rankedotherIssueId
- before which the issue will be rankedremainingRankOperations
- to follow- Returns:
- result representing rank change
-
rankAfter
Ranks given issue after other given issue. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be ranked.otherIssueId
- after which issue will be ranked.- Returns:
- result representing rank change
-
rankAfter
LexoRankOperationOutcome<LexoRankChange> rankAfter(long fieldId, long issueId, long otherIssueId, int remainingRankOperations) Ranks given issue after other given issue with indication how many rank operations will follow. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be rankedotherIssueId
- after which issue will be rankedremainingRankOperations
- to follow- Returns:
- result representing rank change
-
rankFirst
Ranks given issue as first. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be ranked.- Returns:
- result representing rank change
-
rankLast
Ranks given issue as last. This method won't trigger any reindex operations.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be ranked.- Returns:
- result representing rank change
-
healDuplicates
Performs healing operation for given field. @see LexoRankHealOperation- Parameters:
fieldId
- for which heal operation will be performed.- Returns:
- empty ServiceOutcome if no errors occurred.
-
getRank
Looks up the rank for given issue.- Parameters:
fieldId
- of the lexo rank custom fieldissueId
- of the issue to be looked up.- Returns:
- Lexo rank for given issue and field.
-
getRankValues
Looks up the ranks for given issues.- Parameters:
fieldId
- of the lexo rank custom fieldissueIds
- of the issues to be looked up.- Returns:
- Lexo ranks for given issues in the field.
-