Interface Repository
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumerates the possible states for a givenrepository.
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionRetrieves the repository's description.Retrieves the unique identifier for the hierarchy of forks to which this repository belongs.intgetId()Retrieves the repository's ID, which represents its primary key.getName()Retrieves the repository's name, which is guaranteed to be unique within itsprojectbut not within the system at large.Retrieves the repository from which this repository was forked, if any.intRetrieves the partition for the repository.Retrieves theprojectto which this repository belongs.getScmId()Retrieves the unique identifier for the SCM used by this repository.getSlug()Retrieves the "slug" for this repository, which is a URL-friendly variant of itsname.getState()Retrieves the repository's currentstate.Retrieves thestatus messagefor the repository's currentstate.booleanRetrieves a flag indicating whether this repository is archived.booleanisFork()Retrieves a flag indicating whether this repository is a fork of another repository.booleanRetrieves a flag indicating whether this repository may be forked.booleanisLocal()booleanReturns whether the repository is offline.booleanisPublic()Retrieves a flag indicating whether this repository is public.booleanRetrieves the read-only mode status for this repository.booleanisRemote()
- 
Field Details- 
MAX_DESCRIPTION_LENGTHstatic final int MAX_DESCRIPTION_LENGTHThe maximum number of characters of a repository's description- See Also:
 
- 
MAX_NAME_LENGTHstatic final int MAX_NAME_LENGTHThe maximum number of characters of a repository's name- Since:
- 4.11
- See Also:
 
- 
NAME_REGEXP- See Also:
 
- 
SLUG_MAX_SIZEstatic final int SLUG_MAX_SIZE- Since:
- 4.10
- See Also:
 
- 
SLUG_REGEXP- See Also:
 
 
- 
- 
Method Details- 
getDescription@Nullable @OptionalString(size=255, message="{com.atlassian.bitbucket.validation.repository.description.message}") String getDescription()Retrieves the repository's description.- Returns:
- the repository's description
- Since:
- 6.2
 
- 
getHierarchyIdRetrieves 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.- Returns:
- this repository's hierarchy identifier
 
- 
getIdint getId()Retrieves the repository's ID, which represents its primary key.- Returns:
- the repository's ID
 
- 
getName@Nonnull @RequiredString(size=128, regexp="[\\p{Alnum}][\\w\\-\\. ]*", message="{com.atlassian.bitbucket.validation.repository.name.pattern.message}") String getName()Retrieves the repository's name, which is guaranteed to be unique within itsprojectbut not within the system at large.- Returns:
- the repository's name
 
- 
getOriginRetrieves the repository from which this repository was forked, if any. For top-level repositories, this value will benull.Note: Even when a repository's origin is null, it will still have ahierarchy ID. If the repository is ever forked, its forks will inherit the same hierarchy ID.- Returns:
- the repository's origin, if it is a fork
 
- 
getPartitionint getPartition()Retrieves the partition for the repository.- Returns:
- the partition under which the repository is stored. -1for repositories that are notremotelymanaged.
- Since:
- 9.0
 
- 
getProjectRetrieves theprojectto which this repository belongs.Note: If this repository is a fork, it's originrepository may belong to a different project.- Returns:
- the project to which this repository belongs
 
- 
getScmIdRetrieves the unique identifier for the SCM used by this repository.- Returns:
- the unique identifier of the repository's SCM
- See Also:
 
- 
getSlugRetrieves the "slug" for this repository, which is a URL-friendly variant of itsname. Each repository's slug is guaranteed to be unique within itsproject, but not within the system at large.- Returns:
- the repository's slug
 
- 
getStateRetrieves the repository's currentstate.- Returns:
- the repository's state
 
- 
getStatusMessageRetrieves thestatus messagefor the repository's currentstate.- Returns:
- the repository's status message
 
- 
isForkboolean isFork()Retrieves a flag indicating whether this repository is a fork of another repository. Whentrue, the repository will always have anorigin.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.- Returns:
- trueif this repository is a fork; otherwise,- false
 
- 
isArchivedboolean isArchived()Retrieves a flag indicating whether this repository is archived. Whentrue, the repository can be considered as inactive.Note: An archived/inactive repository is used to restrict access and remove clutter. It is a less destructive and less permanent alternative to deletion. - Returns:
- trueif this repository is archived; otherwise,- false
- Since:
- 8.0
 
- 
isForkableboolean isForkable()Retrieves a flag indicating whether this repository may be forked. This flag is orthogonal toisFork(). 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 disabledat the system level, even repositories which are configured to allow forking (where this flag istrue) may not be forked.- Returns:
- trueif the repository may be forked
- See Also:
 
- 
isLocalboolean isLocal()- Returns:
- falseif the repository is managed by a remote Mesh node, otherwise- true.
- Since:
- 8.0
 
- 
isOfflineboolean isOffline()Returns whether the repository is offline. Onlyremoterepositories can be offline.- Returns:
- trueif the repository is currently offline.
- Since:
- 8.0
 
- 
isPublicboolean isPublic()Retrieves 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.- Returns:
- trueif the repository has been marked as public,- falseotherwise
 
- 
isReadOnlyboolean isReadOnly()Retrieves the read-only mode status for this repository.- Returns:
- trueif the repository is in read-only mode, otherwise- false
- Since:
- 8.0
 
- 
isRemoteboolean isRemote()- Returns:
- trueif the repository is managed by a remote Mesh node, otherwise- false.
- Since:
- 8.0
 
 
-