com.atlassian.bamboo.plugins.hg.bitbucket.impl
Class BitbucketApiServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.plugins.hg.bitbucket.impl.BitbucketApiServiceImpl
All Implemented Interfaces:
BitbucketApiService

public class BitbucketApiServiceImpl
extends java.lang.Object
implements BitbucketApiService


Constructor Summary
BitbucketApiServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver)
           
 
Method Summary
 java.util.List<BitbucketNodeEntity> getBranches(java.lang.String repositoryName, java.lang.String username, java.lang.String password)
          Retrieve list of branches for given repository
 java.util.List<BitbucketNodeEntity> getBranches(java.lang.String owner, java.lang.String slug, java.lang.String username, java.lang.String password)
          JAXB binding cannot be used in this method as Bitbucket returns JSON with node names containing characters which cannot be used as XML element names.
 java.util.List<BitbucketResourceEntity> getPublicRepositories(java.lang.String username)
          Return a list of public repositories that user has access to.
 java.util.List<BitbucketResourceEntity> getRepositories(java.lang.String username, java.lang.String password)
          Retrieve list of all repositories accessible to Bitbucket user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitbucketApiServiceImpl

public BitbucketApiServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver)
Method Detail

getPublicRepositories

@NotNull
public java.util.List<BitbucketResourceEntity> getPublicRepositories(@NotNull
                                                                             java.lang.String username)
                                                              throws BitbucketApiException
Description copied from interface: BitbucketApiService
Return a list of public repositories that user has access to.

Specified by:
getPublicRepositories in interface BitbucketApiService
Returns:
Throws:
BitbucketApiException

getRepositories

@NotNull
public java.util.List<BitbucketResourceEntity> getRepositories(@NotNull
                                                                       java.lang.String username,
                                                                       @NotNull
                                                                       java.lang.String password)
                                                        throws BitbucketApiException
Description copied from interface: BitbucketApiService
Retrieve list of all repositories accessible to Bitbucket user

Specified by:
getRepositories in interface BitbucketApiService
Returns:
Throws:
BitbucketApiException

getBranches

@NotNull
public java.util.List<BitbucketNodeEntity> getBranches(@NotNull
                                                               java.lang.String owner,
                                                               @NotNull
                                                               java.lang.String slug,
                                                               @NotNull
                                                               java.lang.String username,
                                                               @NotNull
                                                               java.lang.String password)
                                                throws BitbucketApiException
JAXB binding cannot be used in this method as Bitbucket returns JSON with node names containing characters which cannot be used as XML element names. Internals of JAXB - JSON parsing use XML DOM as intermediate format so it obviously fails.

Specified by:
getBranches in interface BitbucketApiService
Parameters:
owner -
slug -
username -
password -
Returns:
Throws:
BitbucketApiException

getBranches

@NotNull
public java.util.List<BitbucketNodeEntity> getBranches(@NotNull
                                                               java.lang.String repositoryName,
                                                               @NotNull
                                                               java.lang.String username,
                                                               @NotNull
                                                               java.lang.String password)
                                                throws BitbucketApiException
Description copied from interface: BitbucketApiService
Retrieve list of branches for given repository

Specified by:
getBranches in interface BitbucketApiService
Returns:
Throws:
BitbucketApiException


Copyright © 2012 Atlassian. All Rights Reserved.