Class RepositoryInfo
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.webapp.RepositoryInfo
-
- All Implemented Interfaces:
Serializable
@Named @RequestScoped public class RepositoryInfo extends Object implements Serializable
Request-scoped bean to look up a repository name on Bitbucket Cloud.- Since:
- 5.0
- Author:
- Kaz Nishimura
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RepositoryInfo(UserContext context)
Constructs this object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BitbucketClient
getBitbucketClient()
Returns the Bitbucket client of the user context.String
getName()
Returns the repository name to look up.String
getOwnerName()
Returns the owner name to look up.BitbucketRepository
getRepository()
Returns the repository found by the last lookup.protected UserContext
getUserContext()
Returns the user context given to the constructor.boolean
isFound()
Returnstrue
if a repository was found by the last lookup.String
lookUp()
Performs an action to look up.void
setName(String value)
Sets the repository name to look up.void
setOwnerName(String value)
Sets the owner name to look up.
-
-
-
Constructor Detail
-
RepositoryInfo
@Inject public RepositoryInfo(UserContext context)
Constructs this object.- Parameters:
context
- user context
-
-
Method Detail
-
getUserContext
protected UserContext getUserContext()
Returns the user context given to the constructor.- Returns:
- the user context
-
getBitbucketClient
protected BitbucketClient getBitbucketClient()
Returns the Bitbucket client of the user context.- Returns:
- the Bitbucket client
-
getOwnerName
public String getOwnerName()
Returns the owner name to look up.- Returns:
- the owner name
-
setOwnerName
public void setOwnerName(String value)
Sets the owner name to look up.- Parameters:
value
- new value of the owner name
-
getName
public String getName()
Returns the repository name to look up.- Returns:
- the repository name
-
setName
public void setName(String value)
Sets the repository name to look up.- Parameters:
value
- new value of the repository name
-
getRepository
public BitbucketRepository getRepository()
Returns the repository found by the last lookup.- Returns:
- the repository if one was found;
null
otherwise - See Also:
isFound()
-
isFound
public boolean isFound()
Returnstrue
if a repository was found by the last lookup.- Returns:
true
if found;false
otherwise
-
lookUp
public String lookUp()
Performs an action to look up.This method always returns
null
.- Returns:
null
-
-