Class SArtifactDependencyImpl
- java.lang.Object
-
- jetbrains.buildServer.artifacts.BaseArtifactDependency
-
- jetbrains.buildServer.serverSide.artifacts.SArtifactDependencyImpl
-
- All Implemented Interfaces:
ArtifactDependency
,ArtifactDependencyEx
,SArtifactDependency
- Direct Known Subclasses:
UnresolvedArtifactDependency
public class SArtifactDependencyImpl extends BaseArtifactDependency implements ArtifactDependencyEx
Externalizable implementation of ArtifactDependency
-
-
Constructor Summary
Constructors Constructor Description SArtifactDependencyImpl(String id, ProjectManager projectManager, RevisionRuleBuildFinders buildFinders, BuildTypeIdentifiersManager buildTypeIdentifiersManager, String sourceInternalId, String sourcePaths, RevisionRule revisionRule)
Constructs ArtifactDependency object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SArtifactDependency
createCopy()
Creates copy of this artifact dependency.SArtifactDependency
createOptionalCopy()
SBuildType
getSourceBuildType()
String
getSourceBuildTypeId()
Returns internal id of build configuration this artifact belongs toString
getSourceExternalId()
Returns external id of source build configurationString
getSourceName()
Returns name of the source build configurationboolean
isAccessible()
Return whether this artifact dependency is accessible for current authority holder.SBuild
resolveForBuild(SBuild targetBuild)
Searches for a build according to dependency settings for the specified target buildvoid
setOriginalSourceBuildTypeExternalId(String srcBuildTypeExtId)
Sets original external id of the source build type.void
setSourceBuildTypeId(String sourceBuildTypeInternalId)
Sets new source build configuration id-
Methods inherited from class jetbrains.buildServer.artifacts.BaseArtifactDependency
equals, getId, getReferences, getRevisionRule, getSourcePaths, hashCode, isCleanDestinationFolder, isSimilarTo, replaceReferences, setCleanDestinationFolder, setRevisionRule, setSourcePaths, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.artifacts.ArtifactDependency
getId, getReferences, getRevisionRule, getSourcePaths, isCleanDestinationFolder, isSimilarTo, replaceReferences, setCleanDestinationFolder, setRevisionRule, setSourcePaths
-
Methods inherited from interface jetbrains.buildServer.serverSide.artifacts.ArtifactDependencyEx
allRulesAreOptional
-
-
-
-
Constructor Detail
-
SArtifactDependencyImpl
public SArtifactDependencyImpl(@NotNull String id, @NotNull ProjectManager projectManager, @NotNull RevisionRuleBuildFinders buildFinders, @NotNull BuildTypeIdentifiersManager buildTypeIdentifiersManager, @NotNull String sourceInternalId, @NotNull String sourcePaths, @NotNull RevisionRule revisionRule)
Constructs ArtifactDependency object- Parameters:
id
- artifact dependency idprojectManager
- project managerbuildFinders
-sourceInternalId
- the source build type entity id.sourcePaths
- seeBaseArtifactDependency.getSourcePaths()
revisionRule
- seeBaseArtifactDependency.getRevisionRule()
-
-
Method Detail
-
getSourceExternalId
@NotNull public String getSourceExternalId()
Description copied from interface:ArtifactDependency
Returns external id of source build configuration- Specified by:
getSourceExternalId
in interfaceArtifactDependency
- Specified by:
getSourceExternalId
in classBaseArtifactDependency
- Returns:
- build configuration external id
-
getSourceBuildTypeId
@NotNull public String getSourceBuildTypeId()
Description copied from class:BaseArtifactDependency
Returns internal id of build configuration this artifact belongs to- Specified by:
getSourceBuildTypeId
in interfaceArtifactDependency
- Specified by:
getSourceBuildTypeId
in classBaseArtifactDependency
- Returns:
- internal id of build configuration containing this artifact
-
setSourceBuildTypeId
public void setSourceBuildTypeId(@NotNull String sourceBuildTypeInternalId)
Description copied from class:BaseArtifactDependency
Sets new source build configuration id- Specified by:
setSourceBuildTypeId
in interfaceArtifactDependency
- Specified by:
setSourceBuildTypeId
in classBaseArtifactDependency
- Parameters:
sourceBuildTypeInternalId
- new source build configuration id
-
createCopy
public SArtifactDependency createCopy()
Description copied from interface:SArtifactDependency
Creates copy of this artifact dependency.- Specified by:
createCopy
in interfaceSArtifactDependency
- Returns:
- copy of this artifact dependency.
-
createOptionalCopy
public SArtifactDependency createOptionalCopy()
- Specified by:
createOptionalCopy
in interfaceSArtifactDependency
- Returns:
- A full copy of this artifact dependency where all include rules are replaced with optional rules, i.e. failure to download corresponding artifacts won't fail the build
-
resolveForBuild
public SBuild resolveForBuild(@NotNull SBuild targetBuild)
Description copied from interface:SArtifactDependency
Searches for a build according to dependency settings for the specified target build- Specified by:
resolveForBuild
in interfaceSArtifactDependency
- Parameters:
targetBuild
- the build for which the resolving is performed- Returns:
- build or null if build was not found
-
getSourceName
@NotNull public String getSourceName()
Description copied from interface:ArtifactDependency
Returns name of the source build configuration- Specified by:
getSourceName
in interfaceArtifactDependency
- Returns:
- name of the source build configuration
-
isAccessible
public boolean isAccessible()
Description copied from interface:ArtifactDependencyEx
Return whether this artifact dependency is accessible for current authority holder.- Specified by:
isAccessible
in interfaceArtifactDependencyEx
- Returns:
- true if artifact dependency is accessible
-
setOriginalSourceBuildTypeExternalId
public void setOriginalSourceBuildTypeExternalId(@NotNull String srcBuildTypeExtId)
Description copied from interface:ArtifactDependencyEx
Sets original external id of the source build type. This external id will be used when dependency is persisted in XML form and internal id cannot be mapped to external id anymore.- Specified by:
setOriginalSourceBuildTypeExternalId
in interfaceArtifactDependencyEx
-
getSourceBuildType
@Nullable public SBuildType getSourceBuildType()
- Specified by:
getSourceBuildType
in interfaceSArtifactDependency
- Returns:
- build configuration we depend on, can be null if configuration does not exist
-
-