Class VcsRepository<T extends VcsRepository<T,E>,E extends VcsRepositoryProperties>
- Direct Known Subclasses:
AnyVcsRepository
,BitbucketCloudRepository
,BitbucketServerRepository
,GitHubRepository
,GitRepository
This class contains common data only. In order to define a specific type of repository one should use the specialised
implementation or, if such is not available, AnyVcsRepository
class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected BambooOidProperties
protected String
protected ProjectProperties
protected VcsRepositoryViewerProperties
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract E
build()
description
(@Nullable String description) Sets repository description.@NotNull VcsRepositoryIdentifier
Returns identifier for this object.@NotNull String
getName()
Returns repository name, which serves as identifier for this object.@NotNull BambooOid
getOid()
Returns repository's oid.Entity type and id representation that is shown to human.Entity type that is shown to human.Sets the name by which repository will be identified by Bamboo.Sets the repository's oid.Sets the repository's oid from string.Sets the parent of this repository should inherit data from.Set the repository's project.repositoryViewer
(@Nullable VcsRepositoryViewer repositoryViewer) Sets a web repository viewer to be used with this repository.
-
Field Details
-
TYPE
- See Also:
-
parent
-
name
-
oid
-
description
-
project
-
repositoryViewer
-
-
Constructor Details
-
VcsRepository
Specifies a new repository definition.A repository can be global, in which case any changes made to a repository are automatically applied to all plans or jobs that use that repository. Also repository can be project, in which case it can be used only in plans from corresponding project. Repository can also be defined in scope of a
Plan
, in which case it is only accessible in context of plan it is defined for.- Throws:
PropertiesValidationException
-
-
Method Details
-
name
Sets the name by which repository will be identified by Bamboo. In the absence of oid, the name is used to identify the repository. If the repository with given name does not exist, a new one is created, otherwise existing one is updated.The name should be unique in scope a repository is defined in.
The name must not be set if repository inherits data from another repository.
- Throws:
PropertiesValidationException
- See Also:
-
oid
Sets the repository's oid from string.If set, it is used to identify the repository. If the repository with given oid does not exist, a new one is created, otherwise existing one is updated. Setting both oid and name may result in existing repository being renamed.
- Throws:
PropertiesValidationException
-
oid
Sets the repository's oid.If set, it is used to identify the repository. If the repository with given oid does not exist, a new one is created, otherwise existing one is updated. Setting both oid and name may result in existing repository being renamed.
- Throws:
PropertiesValidationException
-
parent
Sets the parent of this repository should inherit data from. When defining repository for a plan user can decide to inherit its data from an existing global repository instead of creating it from scratch. In that case, any change to parent's repository configuration will automatically be applied to all its children, unless a respective data has been overridden.- Throws:
PropertiesValidationException
-
description
Sets repository description.The description must not be set if repository inherits from another repository.
- Throws:
PropertiesValidationException
-
repositoryViewer
public T repositoryViewer(@Nullable @Nullable VcsRepositoryViewer repositoryViewer) throws PropertiesValidationException Sets a web repository viewer to be used with this repository.Web repository viewer allows Bamboo to render correct links to commits, files, etc. in the Bamboo UI.
- Throws:
PropertiesValidationException
- See Also:
-
project
Set the repository's project. Available for Bamboo DC only.If set, it is Project repository, otherwise it is Global or plan repository.
- Since:
- 8.0
-
getName
Returns repository name, which serves as identifier for this object.- Throws:
IllegalStateException
- if name is undefined
-
getOid
Returns repository's oid.- Throws:
IllegalStateException
- if oid is undefined
-
getIdentifier
Returns identifier for this object.- Throws:
IllegalStateException
- if key is undefined
-
humanReadableType
Description copied from class:RootEntityPropertiesBuilder
Entity type that is shown to human.- Specified by:
humanReadableType
in classRootEntityPropertiesBuilder<E extends VcsRepositoryProperties>
-
humanReadableId
Description copied from class:RootEntityPropertiesBuilder
Entity type and id representation that is shown to human.- Specified by:
humanReadableId
in classRootEntityPropertiesBuilder<E extends VcsRepositoryProperties>
-
build
- Specified by:
build
in classEntityPropertiesBuilder<E extends VcsRepositoryProperties>
- Throws:
PropertiesValidationException
-