Package org.vx68k.bitbucket.api.client
Class BitbucketClientAccount
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.BitbucketClientObject
-
- org.vx68k.bitbucket.api.client.BitbucketClientAccount
-
- All Implemented Interfaces:
BitbucketAccount
- Direct Known Subclasses:
BitbucketClientUser
public class BitbucketClientAccount extends BitbucketClientObject implements BitbucketAccount
Client implementation ofBitbucketAccount. This class represents an account by a JSON object.- Since:
- 5.0
- Author:
- Kaz Nishimura
- See Also:
BitbucketClientUser
-
-
Field Summary
-
Fields inherited from interface org.vx68k.bitbucket.api.BitbucketAccount
TEAM, USER
-
-
Constructor Summary
Constructors Constructor Description BitbucketClientAccount(JsonObject object)Constructs this object with no Bitbucket client.BitbucketClientAccount(JsonObject object, BitbucketClient client)Constructs this object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetCreated()Returns the date and time when the account was created.StringgetDisplayName()Returns the display name of the account.StringgetLocation()Returns the location of the account.StringgetName()Returns the name of the account.BitbucketRepositorygetRepository(String name)Returns a repository owned by the account.UUIDgetUUID()Returns the UUID of the account.StringgetWebsite()Returns the website URI of the account.Collection<BitbucketRepository>repositories()Returns aCollectionview of the repositories owned by the account.-
Methods inherited from class org.vx68k.bitbucket.api.client.BitbucketClientObject
equals, getBitbucketClient, getJsonObject, getLink, getType, hashCode, setBitbucketClient, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.vx68k.bitbucket.api.BitbucketAccount
getType
-
-
-
-
Constructor Detail
-
BitbucketClientAccount
public BitbucketClientAccount(JsonObject object)
Constructs this object with no Bitbucket client.- Parameters:
object- JSON object- Throws:
IllegalArgumentException- ifobjectisnull
-
BitbucketClientAccount
public BitbucketClientAccount(JsonObject object, BitbucketClient client)
Constructs this object.- Parameters:
object- JSON objectclient- Bitbucket client, ornull- Throws:
IllegalArgumentException- ifobjectisnull
-
-
Method Detail
-
getName
public final String getName()
Returns the name of the account. This property identifies the account.- Specified by:
getNamein interfaceBitbucketAccount- Returns:
- the name of the account
-
getUUID
public final UUID getUUID()
Returns the UUID of the account.- Specified by:
getUUIDin interfaceBitbucketAccount- Returns:
- the UUID of the account
-
getDisplayName
public final String getDisplayName()
Returns the display name of the account.- Specified by:
getDisplayNamein interfaceBitbucketAccount- Returns:
- the display name of the account
-
getWebsite
public final String getWebsite()
Returns the website URI of the account.- Specified by:
getWebsitein interfaceBitbucketAccount- Returns:
- the website URI of the account
-
getLocation
public final String getLocation()
Returns the location of the account.- Specified by:
getLocationin interfaceBitbucketAccount- Returns:
- the location of the account
-
getCreated
public final Instant getCreated()
Returns the date and time when the account was created.- Specified by:
getCreatedin interfaceBitbucketAccount- Returns:
- the date and time when the account was created
-
getRepository
public final BitbucketRepository getRepository(String name)
Returns a repository owned by the account.- Specified by:
getRepositoryin interfaceBitbucketAccount- Parameters:
name- the name of a repository- Returns:
- a repository owned by the account if one was found;
nullotherwise
-
repositories
public final Collection<BitbucketRepository> repositories()
Returns aCollectionview of the repositories owned by the account.This implementation returns a
PaginatedListobject.- Specified by:
repositoriesin interfaceBitbucketAccount- Returns:
- a
Collectionview of the repositories owned by the account - See Also:
BitbucketClientRepository.creator(BitbucketClient)
-
-