com.atlassian.crucible.plugin.export
Class CrucibleRestClient

java.lang.Object
  extended by com.atlassian.crucible.plugin.export.CrucibleRestClient
All Implemented Interfaces:
CrucibleClient

public class CrucibleRestClient
extends java.lang.Object
implements CrucibleClient

Provides helper methods to access the Crucible Web Services API.

Author:
Ross Rowe

Constructor Summary
CrucibleRestClient()
           
 
Method Summary
 java.util.List<com.atlassian.crucible.spi.data.GeneralCommentData> getGeneralComments(java.lang.String reviewId)
          Returns the list of GeneralCommentData instances for the reviewId.
 com.atlassian.crucible.spi.data.ReviewData getReview(java.lang.String reviewId)
          Retrieves the ReviewData instance for the reviewId.
 com.atlassian.crucible.spi.data.FisheyeReviewItemData getReviewItemData(java.lang.String reviewId, java.lang.String reviewItemId)
          Retrieves the FisheyeReviewItemData instance for the reviewId and the reviewItemId
 java.lang.String getUserName(java.lang.String userId)
          Returns the userId (there isn't a mechanism within the Crucible REST API to retrieve the user name).
 java.util.List<com.atlassian.crucible.spi.data.VersionedLineCommentData> getVersionedComments(java.lang.String reviewId)
          Returns a list of VersionedLineCommentData instances for the reviewId.
 java.lang.String login(java.lang.String userName, java.lang.String password)
          Performs a login action using the username and password.
 void setBaseUrl(java.lang.String baseUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrucibleRestClient

public CrucibleRestClient()
Method Detail

login

public java.lang.String login(java.lang.String userName,
                              java.lang.String password)
Performs a login action using the username and password.

Specified by:
login in interface CrucibleClient
Returns:

getReview

public com.atlassian.crucible.spi.data.ReviewData getReview(java.lang.String reviewId)
Retrieves the ReviewData instance for the reviewId.

Specified by:
getReview in interface CrucibleClient
Parameters:
reviewId -
Returns:

getGeneralComments

public java.util.List<com.atlassian.crucible.spi.data.GeneralCommentData> getGeneralComments(java.lang.String reviewId)
Returns the list of GeneralCommentData instances for the reviewId.

Specified by:
getGeneralComments in interface CrucibleClient
Parameters:
token -
reviewId -
Returns:

getVersionedComments

public java.util.List<com.atlassian.crucible.spi.data.VersionedLineCommentData> getVersionedComments(java.lang.String reviewId)
Returns a list of VersionedLineCommentData instances for the reviewId.

Specified by:
getVersionedComments in interface CrucibleClient
Parameters:
token -
reviewId -
Returns:

setBaseUrl

public void setBaseUrl(java.lang.String baseUrl)
Parameters:
baseUrl -

getReviewItemData

public com.atlassian.crucible.spi.data.FisheyeReviewItemData getReviewItemData(java.lang.String reviewId,
                                                                               java.lang.String reviewItemId)
Retrieves the FisheyeReviewItemData instance for the reviewId and the reviewItemId

Specified by:
getReviewItemData in interface CrucibleClient
Parameters:
reviewId -
reviewItemId -
Returns:

getUserName

public java.lang.String getUserName(java.lang.String userId)
Returns the userId (there isn't a mechanism within the Crucible REST API to retrieve the user name).

Specified by:
getUserName in interface CrucibleClient
Returns:


Copyright © 2008. All Rights Reserved.