com.atlassian.bitbucket.repository.Repository |
Describes a repository within the system.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Repository.State | Enumerates the possible states for a given repository . |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MAX_NAME_LENGTH | The maximum number of characters of a repository's name | |||||||||
String | NAME_REGEXP | ||||||||||
int | SLUG_MAX_SIZE | ||||||||||
String | SLUG_REGEXP |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the unique identifier for the hierarchy of forks to which this repository belongs.
| |||||||||||
Retrieves the repository's ID, which represents its primary key.
| |||||||||||
Retrieves the repository's name, which is guaranteed to be unique within its
project but
not within the system at large. | |||||||||||
Retrieves the repository from which this repository was forked, if any.
| |||||||||||
Retrieves the
project to which this repository belongs. | |||||||||||
Retrieves the unique identifier for the SCM used by this repository.
| |||||||||||
Retrieves the "slug" for this repository, which is a URL-friendly variant of its
name . | |||||||||||
Retrieves the repository's current
state . | |||||||||||
Retrieves the
status message for the repository's current state . | |||||||||||
This method is deprecated.
in 5.10 to be removed in 6.0. Use
search(WatcherSearchRequest, PageRequest) instead
| |||||||||||
Retrieves a flag indicating whether this repository is a fork of another repository.
| |||||||||||
Retrieves a flag indicating whether this repository may be forked.
| |||||||||||
Retrieves a flag indicating whether this repository is public.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.bitbucket.watcher.Watchable
|
The maximum number of characters of a repository's name
Retrieves the unique identifier for the hierarchy of forks to which this repository belongs. Every repository will be a member of a hierarchy, even if the hierarchy only contains that one repository. This allows logical grouping of repositories and their forks, regardless of how many layers of forks there may be.
Retrieves the repository's ID, which represents its primary key.
Retrieves the repository's name, which is guaranteed to be unique within its project
but
not within the system at large.
Retrieves the repository from which this repository was forked, if any. For top-level repositories, this value
will be null
.
Note: Even when a repository's origin is null
, it will still have a hierarchy
ID
. If the repository is ever forked, its forks will inherit the same hierarchy ID.
Retrieves the unique identifier for the SCM used by this repository.
Retrieves the repository's current state
.
Retrieves the status message
for the repository's current state
.
This method is deprecated.
in 5.10 to be removed in 6.0. Use search(WatcherSearchRequest, PageRequest)
instead
This method will always produce an empty set of watchers
regardless of the actual
number of users watching the repository. It is only here for API compatibility and will be removed
in the next major release.
Retrieves a flag indicating whether this repository is a fork of another repository. When true
, the
repository will always have an origin
.
Note: Even repositories that are not forks, and have not been used as the origin of a fork, still exist in a
hierarchy
; the hierarchy just consists of a single repository.
true
if this repository is a fork; otherwise, false
Retrieves a flag indicating whether this repository may be forked. This flag is orthogonal to isFork()
.
It is possible to create a fork from a fork, if the repository is configured so, just as it may not be possible
to create forks from some top-level repositories.
If forking is disabled
at the system level, even repositories which
are configured to allow forking (where this flag is true
) may not be forked.
true
if the repository may be forkedRetrieves a flag indicating whether this repository is public.
Note, this flag is taken into account when calculating whether this repository is accessible to
unauthenticated users but is not the definitive answer. For a definitive answer, use
isPubliclyAccessible
.
true
if the repository has been marked as public, false
otherwise