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 protectedPartialVcsRepositoryDataImpl(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 RepositoryDataasLegacyData()static PartialVcsRepositoryDataImplcreateChild(@NotNull VcsRepositoryData repositoryData)Create overriding repository which doesn't actually override anything.static PartialVcsRepositoryDataImplcreateChildWithNewBranch(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator)Create overriding repository which overrides branch.static PartialVcsRepositoryDataImplcreateChildWithNewBranchAndOverwrittenLocationForForkScenario(VcsRepositoryData repositoryDefinition, VcsBranch newBranch, VcsBranchConfigurator vcsBranchConfigurator, VcsLocationConfigurator vcsLocationConfigurator, VcsForkDto vcsForkDto)@Nullable VcsBambooSpecsDetectionOptionsgetBambooSpecsConfiguration()@Nullable VcsBranchDefinitiongetBranch()@NotNull VcsRepositoryDatagetCompleteData()Complete view on this configuration.@Nullable StringgetDescription()longgetId()@Nullable VcsRepositoryDatagetInheritedData()Complete view on a configuration of a parent repository or null if there's no parent.@NotNull StringgetName()BambooEntityOidgetOid()OID assigned to this object.@Nullable LonggetParentId()Get id of the repository this inherits data from or null if none.@Nullable BambooEntityOidgetParentOid()Get oid of the repository this inherits data from or null if none.@NotNull StringgetPluginKey()@Nullable LonggetProjectId()longgetRootVcsRepositoryId()Get id of the repository that is the root of the hierarchy this repository belongs to.@Nullable VcsBranchDetectionOptionsgetVcsBranchDetectionOptions()@Nullable VcsChangeDetectionOptionsgetVcsChangeDetectionOptions()@Nullable VcsLocationDefinitiongetVcsLocation()@NotNull LonggetVersion()Returns the version number of this object.@Nullable VcsRepositoryViewerDefinitiongetViewerConfiguration()booleanisAncestorMarkedForDeletion()booleanisLegacyRepository()booleanisLinked()booleanisMarkedForDeletion()booleanisRootVcsLinked()booleanisRootVcsProjectRepository()booleanisRootVcsShared()booleanisShared()booleanoverridesBranch()booleanoverridesBranchDetectionOptions()booleanoverridesChangeDetectionOptions()booleanoverridesLocation()-
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:PartialVcsRepositoryDataComplete view on a configuration of a parent repository or null if there's no parent.- Specified by:
getInheritedDatain interfacePartialVcsRepositoryData
-
overridesLocation
public boolean overridesLocation()
- Specified by:
overridesLocationin interfacePartialVcsRepositoryData
-
overridesBranch
public boolean overridesBranch()
- Specified by:
overridesBranchin interfacePartialVcsRepositoryData
-
overridesChangeDetectionOptions
public boolean overridesChangeDetectionOptions()
- Specified by:
overridesChangeDetectionOptionsin interfacePartialVcsRepositoryData
-
overridesBranchDetectionOptions
public boolean overridesBranchDetectionOptions()
- Specified by:
overridesBranchDetectionOptionsin interfacePartialVcsRepositoryData
-
getOid
public BambooEntityOid getOid()
Description copied from interface:ImmutableEntityWithOidOID assigned to this object. TheBambooEntityOid.getEntityType()should be the same as this object'sImmutableEntityWithOid.getEntityType().- Specified by:
getOidin interfaceImmutableEntityWithOid
-
getPluginKey
@NotNull public @NotNull String getPluginKey()
- Specified by:
getPluginKeyin interfacePluginKeyProvider- Returns:
- full plugin module key
-
getVcsLocation
@Nullable public @Nullable VcsLocationDefinition getVcsLocation()
- Specified by:
getVcsLocationin interfacePartialVcsRepositoryData
-
getBranch
@Nullable public @Nullable VcsBranchDefinition getBranch()
- Specified by:
getBranchin interfacePartialVcsRepositoryData
-
getVcsChangeDetectionOptions
@Nullable public @Nullable VcsChangeDetectionOptions getVcsChangeDetectionOptions()
- Specified by:
getVcsChangeDetectionOptionsin interfacePartialVcsRepositoryData
-
getVcsBranchDetectionOptions
@Nullable public @Nullable VcsBranchDetectionOptions getVcsBranchDetectionOptions()
- Specified by:
getVcsBranchDetectionOptionsin interfacePartialVcsRepositoryData
-
getBambooSpecsConfiguration
@Nullable public @Nullable VcsBambooSpecsDetectionOptions getBambooSpecsConfiguration()
- Specified by:
getBambooSpecsConfigurationin interfacePartialVcsRepositoryData
-
getViewerConfiguration
@Nullable public @Nullable VcsRepositoryViewerDefinition getViewerConfiguration()
- Specified by:
getViewerConfigurationin interfacePartialVcsRepositoryData
-
getProjectId
@Nullable public @Nullable Long getProjectId()
- Specified by:
getProjectIdin interfacePartialVcsRepositoryData- Specified by:
getProjectIdin 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:VersionableReturns the version number of this object.- Specified by:
getVersionin interfaceVersionable- Returns:
- the version number
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletionin interfacePartialVcsRepositoryData
-
isLinked
public boolean isLinked()
- Specified by:
isLinkedin interfacePartialVcsRepositoryData
-
isShared
public boolean isShared()
- Specified by:
isSharedin interfacePartialVcsRepositoryData
-
isRootVcsLinked
public boolean isRootVcsLinked()
- Specified by:
isRootVcsLinkedin 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:
isRootVcsProjectRepositoryin 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:
isRootVcsSharedin interfacePartialVcsRepositoryData- Returns:
- true if this repository is either linked or project repository or inherits data (possibly indirectly) from a shared repository
-
isAncestorMarkedForDeletion
public boolean isAncestorMarkedForDeletion()
- Specified by:
isAncestorMarkedForDeletionin interfacePartialVcsRepositoryData- Returns:
- true if this repository or any of its ancestors of this repository is marked for deletion
-
getId
public long getId()
- Specified by:
getIdin interfaceBambooIdProvider
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider
-
getDescription
@Nullable public @Nullable String getDescription()
- Specified by:
getDescriptionin interfaceDescriptionProvider
-
isLegacyRepository
public boolean isLegacyRepository()
- Specified by:
isLegacyRepositoryin interfacePartialVcsRepositoryData- Returns:
- true if underlying repository is implemented with old API
-
asLegacyData
@NotNull public @NotNull RepositoryData asLegacyData()
- Specified by:
asLegacyDatain interfacePartialVcsRepositoryData- Returns:
- this object in old format.
-
getCompleteData
@NotNull public @NotNull VcsRepositoryData getCompleteData()
Description copied from interface:PartialVcsRepositoryDataComplete view on this configuration.- Specified by:
getCompleteDatain interfacePartialVcsRepositoryData
-
getParentId
@Nullable public @Nullable Long getParentId()
Description copied from interface:PartialVcsRepositoryDataGet id of the repository this inherits data from or null if none.- Specified by:
getParentIdin interfacePartialVcsRepositoryData
-
getParentOid
@Nullable public @Nullable BambooEntityOid getParentOid()
Description copied from interface:PartialVcsRepositoryDataGet oid of the repository this inherits data from or null if none.- Specified by:
getParentOidin interfacePartialVcsRepositoryData
-
getRootVcsRepositoryId
public long getRootVcsRepositoryId()
Description copied from interface:PartialVcsRepositoryDataGet 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:
getRootVcsRepositoryIdin interfacePartialVcsRepositoryData
-
-