Class PartialVcsRepositoryDataImpl
- java.lang.Object
-
- com.atlassian.bamboo.vcs.configuration.PartialVcsRepositoryDataImpl
-
- All Implemented Interfaces:
BambooIdProvider
,ImmutableEntityWithOid
,ProjectIdProvider
,PluginKeyProvider
,DescriptionProvider
,NameProvider
,PartialVcsRepositoryData
,Versionable
public class PartialVcsRepositoryDataImpl extends Object implements PartialVcsRepositoryData
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PartialVcsRepositoryDataImpl(long id, BambooEntityOid oid, String pluginKey, String name, String description, VcsBranch vcsBranch, String viewerPluginKey, Map<String,String> serverConfiguration, Map<String,String> changeDetectionConfiguration, Map<String,String> branchDetectionConfiguration, Map<String,String> branchConfiguration, Map<String,String> viewerConfiguration, Map<String,String> bambooSpecsDetectionConfiguration, String legacyXml, String legacyViewerXml, boolean linked, VcsRepositoryData inheritedData, Long projectId, Long version)
PartialVcsRepositoryDataImpl(@NotNull RepositoryDataEntity repositoryData, @NotNull RawRepositoryConfiguration rawRepositoryConfiguration, @Nullable VcsRepositoryData inheritedData)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull RepositoryData
asLegacyData()
static PartialVcsRepositoryDataImpl
createChild(@NotNull VcsRepositoryData repositoryData)
Create overriding repository which doesn't actually override anything.static PartialVcsRepositoryDataImpl
createChildWithNewBranch(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator)
Create overriding repository which overrides branch.static PartialVcsRepositoryDataImpl
createChildWithNewBranchAndOverwrittenLocationForForkScenario(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator, VcsLocationConfigurator vcsLocationConfigurator, VcsForkDto vcsForkDto)
@Nullable VcsBambooSpecsDetectionOptions
getBambooSpecsConfiguration()
@Nullable VcsBranchDefinition
getBranch()
@NotNull VcsRepositoryData
getCompleteData()
Complete view on this configuration.@Nullable String
getDescription()
long
getId()
@Nullable VcsRepositoryData
getInheritedData()
Complete view on a configuration of a parent repository or null if there's no parent.@NotNull String
getName()
BambooEntityOid
getOid()
OID assigned to this object.@Nullable Long
getParentId()
Get id of the repository this inherits data from or null if none.@Nullable BambooEntityOid
getParentOid()
Get oid of the repository this inherits data from or null if none.@NotNull String
getPluginKey()
@Nullable Long
getProjectId()
long
getRootVcsRepositoryId()
Get id of the repository that is the root of the hierarchy this repository belongs to.@Nullable VcsBranchDetectionOptions
getVcsBranchDetectionOptions()
@Nullable VcsChangeDetectionOptions
getVcsChangeDetectionOptions()
@Nullable VcsLocationDefinition
getVcsLocation()
@NotNull Long
getVersion()
Returns the version number of this object.@Nullable VcsRepositoryViewerDefinition
getViewerConfiguration()
boolean
isLegacyRepository()
boolean
isLinked()
boolean
isMarkedForDeletion()
boolean
isRootVcsLinked()
boolean
isRootVcsProjectRepository()
boolean
isRootVcsShared()
boolean
isShared()
boolean
overridesBranch()
boolean
overridesBranchDetectionOptions()
boolean
overridesChangeDetectionOptions()
boolean
overridesLocation()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.vcs.configuration.PartialVcsRepositoryData
getEntityType
-
-
-
-
Constructor Detail
-
PartialVcsRepositoryDataImpl
protected PartialVcsRepositoryDataImpl(long id, BambooEntityOid oid, String pluginKey, String name, String description, VcsBranch vcsBranch, String viewerPluginKey, Map<String,String> serverConfiguration, Map<String,String> changeDetectionConfiguration, Map<String,String> branchDetectionConfiguration, Map<String,String> branchConfiguration, Map<String,String> viewerConfiguration, Map<String,String> bambooSpecsDetectionConfiguration, String legacyXml, String legacyViewerXml, boolean linked, VcsRepositoryData inheritedData, Long projectId, Long version)
-
PartialVcsRepositoryDataImpl
public PartialVcsRepositoryDataImpl(@NotNull @NotNull RepositoryDataEntity repositoryData, @NotNull @NotNull RawRepositoryConfiguration rawRepositoryConfiguration, @Nullable @Nullable VcsRepositoryData inheritedData)
-
-
Method Detail
-
createChild
public static PartialVcsRepositoryDataImpl createChild(@NotNull @NotNull VcsRepositoryData repositoryData)
Create overriding repository which doesn't actually override anything.
-
createChildWithNewBranch
public static PartialVcsRepositoryDataImpl createChildWithNewBranch(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator)
Create overriding repository which overrides branch.
-
createChildWithNewBranchAndOverwrittenLocationForForkScenario
public static PartialVcsRepositoryDataImpl createChildWithNewBranchAndOverwrittenLocationForForkScenario(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator, VcsLocationConfigurator vcsLocationConfigurator, VcsForkDto vcsForkDto)
-
getInheritedData
@Nullable public @Nullable VcsRepositoryData getInheritedData()
Description copied from interface:PartialVcsRepositoryData
Complete view on a configuration of a parent repository or null if there's no parent.- Specified by:
getInheritedData
in interfacePartialVcsRepositoryData
-
overridesLocation
public boolean overridesLocation()
- Specified by:
overridesLocation
in interfacePartialVcsRepositoryData
-
overridesBranch
public boolean overridesBranch()
- Specified by:
overridesBranch
in interfacePartialVcsRepositoryData
-
overridesChangeDetectionOptions
public boolean overridesChangeDetectionOptions()
- Specified by:
overridesChangeDetectionOptions
in interfacePartialVcsRepositoryData
-
overridesBranchDetectionOptions
public boolean overridesBranchDetectionOptions()
- Specified by:
overridesBranchDetectionOptions
in interfacePartialVcsRepositoryData
-
getOid
public BambooEntityOid getOid()
Description copied from interface:ImmutableEntityWithOid
OID assigned to this object. TheBambooEntityOid.getEntityType()
should be the same as this object'sImmutableEntityWithOid.getEntityType()
.- Specified by:
getOid
in interfaceImmutableEntityWithOid
-
getPluginKey
@NotNull public @NotNull String getPluginKey()
- Specified by:
getPluginKey
in interfacePluginKeyProvider
- Returns:
- full plugin module key
-
getVcsLocation
@Nullable public @Nullable VcsLocationDefinition getVcsLocation()
- Specified by:
getVcsLocation
in interfacePartialVcsRepositoryData
-
getBranch
@Nullable public @Nullable VcsBranchDefinition getBranch()
- Specified by:
getBranch
in interfacePartialVcsRepositoryData
-
getVcsChangeDetectionOptions
@Nullable public @Nullable VcsChangeDetectionOptions getVcsChangeDetectionOptions()
- Specified by:
getVcsChangeDetectionOptions
in interfacePartialVcsRepositoryData
-
getVcsBranchDetectionOptions
@Nullable public @Nullable VcsBranchDetectionOptions getVcsBranchDetectionOptions()
- Specified by:
getVcsBranchDetectionOptions
in interfacePartialVcsRepositoryData
-
getBambooSpecsConfiguration
@Nullable public @Nullable VcsBambooSpecsDetectionOptions getBambooSpecsConfiguration()
- Specified by:
getBambooSpecsConfiguration
in interfacePartialVcsRepositoryData
-
getViewerConfiguration
@Nullable public @Nullable VcsRepositoryViewerDefinition getViewerConfiguration()
- Specified by:
getViewerConfiguration
in interfacePartialVcsRepositoryData
-
getProjectId
@Nullable public @Nullable Long getProjectId()
- Specified by:
getProjectId
in interfacePartialVcsRepositoryData
- Specified by:
getProjectId
in interfaceProjectIdProvider
- Returns:
- id of project which is associated with this repository, returns null if repository is either global or plan.
-
getVersion
@NotNull public @NotNull Long getVersion()
Description copied from interface:Versionable
Returns the version number of this object.- Specified by:
getVersion
in interfaceVersionable
- Returns:
- the version number
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletion
in interfacePartialVcsRepositoryData
-
isLinked
public boolean isLinked()
- Specified by:
isLinked
in interfacePartialVcsRepositoryData
-
isShared
public boolean isShared()
- Specified by:
isShared
in interfacePartialVcsRepositoryData
-
isRootVcsLinked
public boolean isRootVcsLinked()
- Specified by:
isRootVcsLinked
in interfacePartialVcsRepositoryData
- Returns:
- true if this repository is a linked repository or inherits data (possibly indirectly) from a linked repository
-
isRootVcsProjectRepository
public boolean isRootVcsProjectRepository()
- Specified by:
isRootVcsProjectRepository
in interfacePartialVcsRepositoryData
- Returns:
- true if this repository is a project repository or inherits data (possibly indirectly) from a project repository
-
isRootVcsShared
public boolean isRootVcsShared()
- Specified by:
isRootVcsShared
in interfacePartialVcsRepositoryData
- Returns:
- true if this repository is either linked or project repository or inherits data (possibly indirectly) from a shared repository
-
getId
public long getId()
- Specified by:
getId
in interfaceBambooIdProvider
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
-
getDescription
@Nullable public @Nullable String getDescription()
- Specified by:
getDescription
in interfaceDescriptionProvider
-
isLegacyRepository
public boolean isLegacyRepository()
- Specified by:
isLegacyRepository
in interfacePartialVcsRepositoryData
- Returns:
- true if underlying repository is implemented with old API
-
asLegacyData
@NotNull public @NotNull RepositoryData asLegacyData()
- Specified by:
asLegacyData
in interfacePartialVcsRepositoryData
- Returns:
- this object in old format.
-
getCompleteData
@NotNull public @NotNull VcsRepositoryData getCompleteData()
Description copied from interface:PartialVcsRepositoryData
Complete view on this configuration.- Specified by:
getCompleteData
in interfacePartialVcsRepositoryData
-
getParentId
@Nullable public @Nullable Long getParentId()
Description copied from interface:PartialVcsRepositoryData
Get id of the repository this inherits data from or null if none.- Specified by:
getParentId
in interfacePartialVcsRepositoryData
-
getParentOid
@Nullable public @Nullable BambooEntityOid getParentOid()
Description copied from interface:PartialVcsRepositoryData
Get oid of the repository this inherits data from or null if none.- Specified by:
getParentOid
in interfacePartialVcsRepositoryData
-
getRootVcsRepositoryId
public long getRootVcsRepositoryId()
Description copied from interface:PartialVcsRepositoryData
Get id of the repository that is the root of the hierarchy this repository belongs to. Returns repository id if this repository is the root.- Specified by:
getRootVcsRepositoryId
in interfacePartialVcsRepositoryData
-
-