com.almworks.jira.structure.api.forest
Class ForestOp.Move

java.lang.Object
  extended by com.almworks.jira.structure.api.forest.ForestOp
      extended by com.almworks.jira.structure.api.forest.ForestOp.Move
Enclosing class:
ForestOp

public static class ForestOp.Move
extends ForestOp

Represents move operation.

See Also:
ForestOp, ForestAccessor.moveSubtree(java.lang.Long, java.lang.Long, java.lang.Long, java.lang.Long), ForestAccessor.mergeForest(java.lang.Long, com.almworks.jira.structure.api.forest.Forest, java.lang.Long, java.lang.Long)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.almworks.jira.structure.api.forest.ForestOp
ForestOp.Add, ForestOp.Move, ForestOp.Remove
 
Constructor Summary
ForestOp.Move(long issue, Forest movedSubtree, com.almworks.integers.LongList parentPathFrom, long afterFrom, com.almworks.integers.LongList parentPathTo, long afterTo, int direction, com.almworks.integers.LongList parents, com.almworks.integers.LongList ancestors)
           
 
Method Summary
 com.almworks.integers.LongList getAffectedIssues()
          This method returns the list of issues that were subject to the operation, or possibly the reduced set of these issues if other affected issues can be implied from the returned list and the current forest state.
 long getAfter()
           
 long getAfterFrom()
           
 com.almworks.integers.LongList getAnchorIssues()
           
 int getDirection()
           
 long getIssue()
           
 Forest getMovedSubtree()
           
 com.almworks.integers.LongList getParentPathFrom()
           
 com.almworks.integers.LongList getParentPathTo()
           
 long getUnder()
           
 String toString()
           
 
Methods inherited from class com.almworks.jira.structure.api.forest.ForestOp
getAncestors, getParents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForestOp.Move

public ForestOp.Move(long issue,
                     Forest movedSubtree,
                     com.almworks.integers.LongList parentPathFrom,
                     long afterFrom,
                     com.almworks.integers.LongList parentPathTo,
                     long afterTo,
                     int direction,
                     com.almworks.integers.LongList parents,
                     com.almworks.integers.LongList ancestors)
Method Detail

getAffectedIssues

@NotNull
public com.almworks.integers.LongList getAffectedIssues()
Description copied from class: ForestOp

This method returns the list of issues that were subject to the operation, or possibly the reduced set of these issues if other affected issues can be implied from the returned list and the current forest state.

Namely, ForestOp.Move returns only the top issue in this list because all other issues moved can be figured from the state after the operation. If it wasn't the last operation then this holds true transitively via other operations.

Specified by:
getAffectedIssues in class ForestOp
Returns:
a list of issues affected by this operation

getAnchorIssues

@NotNull
public com.almworks.integers.LongList getAnchorIssues()
Specified by:
getAnchorIssues in class ForestOp
Returns:
issues that are used to define this operation - used to check whether the operation is visible to a user

getUnder

public long getUnder()
Returns:
The new parent of the moved issue, 0 if top level.

getAfter

public long getAfter()
Returns:
The new immediately preceding sibling of the moved issue, 0 if none.

getIssue

public long getIssue()
Returns:
The moved issue.

getMovedSubtree

@NotNull
public Forest getMovedSubtree()
Returns:
The whole moved subtree rooted at getIssue().

getParentPathFrom

@NotNull
public com.almworks.integers.LongList getParentPathFrom()
Returns:
The old parent path of the moved issue.
See Also:
Forest.getParentPathForIndex(int)

getAfterFrom

public long getAfterFrom()
Returns:
The old immediately preceding sibling of the moved issue, 0 if none.

getParentPathTo

@NotNull
public com.almworks.integers.LongList getParentPathTo()
Returns:
The new parent path of the moved issue.
See Also:
Forest.getParentPathForIndex(int)

getDirection

public int getDirection()
Returns:
Positive if the issue has been moved downwards; negative if upwards.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 ALMWorks. All Rights Reserved.