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 Instant
getCreated()
Returns the date and time when the account was created.String
getDisplayName()
Returns the display name of the account.String
getLocation()
Returns the location of the account.String
getName()
Returns the name of the account.BitbucketRepository
getRepository(String name)
Returns a repository owned by the account.UUID
getUUID()
Returns the UUID of the account.String
getWebsite()
Returns the website URI of the account.Collection<BitbucketRepository>
repositories()
Returns aCollection
view 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
- ifobject
isnull
-
BitbucketClientAccount
public BitbucketClientAccount(JsonObject object, BitbucketClient client)
Constructs this object.- Parameters:
object
- JSON objectclient
- Bitbucket client, ornull
- Throws:
IllegalArgumentException
- ifobject
isnull
-
-
Method Detail
-
getName
public final String getName()
Returns the name of the account. This property identifies the account.- Specified by:
getName
in interfaceBitbucketAccount
- Returns:
- the name of the account
-
getUUID
public final UUID getUUID()
Returns the UUID of the account.- Specified by:
getUUID
in interfaceBitbucketAccount
- Returns:
- the UUID of the account
-
getDisplayName
public final String getDisplayName()
Returns the display name of the account.- Specified by:
getDisplayName
in interfaceBitbucketAccount
- Returns:
- the display name of the account
-
getWebsite
public final String getWebsite()
Returns the website URI of the account.- Specified by:
getWebsite
in interfaceBitbucketAccount
- Returns:
- the website URI of the account
-
getLocation
public final String getLocation()
Returns the location of the account.- Specified by:
getLocation
in interfaceBitbucketAccount
- Returns:
- the location of the account
-
getCreated
public final Instant getCreated()
Returns the date and time when the account was created.- Specified by:
getCreated
in 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:
getRepository
in interfaceBitbucketAccount
- Parameters:
name
- the name of a repository- Returns:
- a repository owned by the account if one was found;
null
otherwise
-
repositories
public final Collection<BitbucketRepository> repositories()
Returns aCollection
view of the repositories owned by the account.This implementation returns a
PaginatedList
object.- Specified by:
repositories
in interfaceBitbucketAccount
- Returns:
- a
Collection
view of the repositories owned by the account - See Also:
BitbucketClientRepository.creator(BitbucketClient)
-
-