com.atlassian.crucible.spi.data
Class AnchorData

java.lang.Object
  extended by com.atlassian.crucible.spi.data.AnchorData

public class AnchorData
extends java.lang.Object

Pojo for patch anchor data. See ReviewService.createReviewFromPatch(ReviewData, String, AnchorData) on how to use this class to specify patch anchoring information.


Constructor Summary
AnchorData()
          Required constructor for jaxb.
AnchorData(java.lang.String anchorRepository)
          A convenience constructor.
AnchorData(java.lang.String anchorRepository, java.lang.String anchorPath, java.lang.Integer stripCount)
          Creates an AnchorData pojo, used to indicate how a patch is to be anchored.
 
Method Summary
 java.lang.String getAnchorPath()
           
 java.lang.String getAnchorRepository()
           
 java.lang.Integer getStripCount()
           
 void setAnchorPath(java.lang.String anchorPath)
          Sets the path to anchor a patch to.
 void setAnchorRepository(java.lang.String anchorRepository)
          Sets the repository to anchor to.
 void setStripCount(java.lang.Integer stripCount)
          Sets the stripCount, which indicates how many path elements (or directories) to strip away, starting from the root, before appending to the value returned by getAnchorPath() to create a complete path to anchor to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorData

public AnchorData()
Required constructor for jaxb. Creates an instance where all properties are set to null. Do not use.


AnchorData

public AnchorData(java.lang.String anchorRepository)
A convenience constructor. Equivilent to calling AnchorData(String, String, Integer) with the second and third parameter as null.

Parameters:
anchorRepository - the repository to anchor to. Must not be null.

AnchorData

public AnchorData(java.lang.String anchorRepository,
                  java.lang.String anchorPath,
                  java.lang.Integer stripCount)
Creates an AnchorData pojo, used to indicate how a patch is to be anchored. The anchorRepository parameter may not be null, and must be an active repository in fisheye. The anchorPath and stripCount can optionally be set, to indicate which path to anchor to, and how many path elements to strip from the patch. See setAnchorPath(String) and setStripCount(Integer) for more information.

Parameters:
anchorRepository - the repository to anchor to
anchorPath - optional, path to anchor to. Can be null.
stripCount - optional, number of path elements to strip away from the patch before appending to the anchorPath. Can be null.
Method Detail

getAnchorPath

public java.lang.String getAnchorPath()

setAnchorPath

public void setAnchorPath(java.lang.String anchorPath)
Sets the path to anchor a patch to. This path must exist in the repository specified by getAnchorRepository(). If this is set to null, crucible will automatically compute the "best" path based on the information provided inside the patch. see ReviewService.createReviewFromPatch(ReviewData, String, AnchorData) for more information.

Parameters:
anchorPath - the path to anchor the patch to. Can be null.

getAnchorRepository

public java.lang.String getAnchorRepository()

setAnchorRepository

public void setAnchorRepository(java.lang.String anchorRepository)
Sets the repository to anchor to. Must not be null.

Parameters:
anchorRepository -

getStripCount

public java.lang.Integer getStripCount()

setStripCount

public void setStripCount(java.lang.Integer stripCount)
Sets the stripCount, which indicates how many path elements (or directories) to strip away, starting from the root, before appending to the value returned by getAnchorPath() to create a complete path to anchor to. if set to null, crucible will automatically compute the correct number. see ReviewService.createReviewFromPatch(ReviewData, String, AnchorData) for more information.

Parameters:
stripCount -