Package jetbrains.buildServer.artifacts
Class BaseArtifactDependency
- java.lang.Object
-
- jetbrains.buildServer.artifacts.BaseArtifactDependency
-
- All Implemented Interfaces:
ArtifactDependency
- Direct Known Subclasses:
ArtifactDependencyInfo
,SArtifactDependencyImpl
public abstract class BaseArtifactDependency extends Object implements ArtifactDependency
Base class for artifact dependency information.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseArtifactDependency(String id, String sourcePaths, RevisionRule revisionRule)
Represents dependency on one or more artifacts of some build.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getId()
Returns artifact dependency idList<String>
getReferences()
Returns references used in this dependency (in destination path, source paths or in the build number)RevisionRule
getRevisionRule()
Returns revision rule for downloaded artifacts.abstract String
getSourceBuildTypeId()
Returns internal id of build configuration this artifact belongs toabstract String
getSourceExternalId()
Returns external id of source build configurationString
getSourcePaths()
Returns path to this artifact in the build of the source build configurationint
hashCode()
boolean
isCleanDestinationFolder()
Returns true if destination directory should be cleaned before artifacts downloadedboolean
isSimilarTo(ArtifactDependency dep)
Checks if another artifact dependency object is equal to this, ignoring differences in ids (if any)void
replaceReferences(ValueResolver resolver)
Replaces references in this artifact dependency using the provided resolvervoid
setCleanDestinationFolder(boolean cleanDestinationFolder)
Set to true if destination directory should be cleaned before artifacts processingvoid
setRevisionRule(RevisionRule revisionRule)
Sets new revision rule to this artifact dependencyabstract void
setSourceBuildTypeId(String sourceBuildTypeInternalId)
Sets new source build configuration idvoid
setSourcePaths(String paths)
Sets new source paths to this artifact dependencyString
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.artifacts.ArtifactDependency
getSourceName
-
-
-
-
Constructor Detail
-
BaseArtifactDependency
protected BaseArtifactDependency(@NotNull String id, @NotNull String sourcePaths, @NotNull RevisionRule revisionRule)
Represents dependency on one or more artifacts of some build.- Parameters:
id
- artifact dependency idsourcePaths
- paths to artifacts in source build configurationrevisionRule
- rule by which to select build with artifacts
-
-
Method Detail
-
setCleanDestinationFolder
public void setCleanDestinationFolder(boolean cleanDestinationFolder)
Set to true if destination directory should be cleaned before artifacts processing- Specified by:
setCleanDestinationFolder
in interfaceArtifactDependency
- Parameters:
cleanDestinationFolder
- true to clean destination directory
-
getSourceBuildTypeId
@NotNull public abstract String getSourceBuildTypeId()
Returns internal id of build configuration this artifact belongs to- Specified by:
getSourceBuildTypeId
in interfaceArtifactDependency
- Returns:
- internal id of build configuration containing this artifact
-
getSourceExternalId
@NotNull public abstract String getSourceExternalId()
Description copied from interface:ArtifactDependency
Returns external id of source build configuration- Specified by:
getSourceExternalId
in interfaceArtifactDependency
- Returns:
- build configuration external id
-
getSourcePaths
@NotNull public String getSourcePaths()
Returns path to this artifact in the build of the source build configuration- Specified by:
getSourcePaths
in interfaceArtifactDependency
- Returns:
- artifacts source paths.
-
isCleanDestinationFolder
public boolean isCleanDestinationFolder()
Returns true if destination directory should be cleaned before artifacts downloaded- Specified by:
isCleanDestinationFolder
in interfaceArtifactDependency
- Returns:
- if destination directory should be cleaned before artifacts downloaded.
-
getRevisionRule
@NotNull public RevisionRule getRevisionRule()
Description copied from interface:ArtifactDependency
Returns revision rule for downloaded artifacts. Revision rule identifies build from which artifacts should be downloaded.- Specified by:
getRevisionRule
in interfaceArtifactDependency
- Returns:
- revision rule
-
setSourceBuildTypeId
public abstract void setSourceBuildTypeId(@NotNull String sourceBuildTypeInternalId)
Sets new source build configuration id- Specified by:
setSourceBuildTypeId
in interfaceArtifactDependency
- Parameters:
sourceBuildTypeInternalId
- new source build configuration id
-
setRevisionRule
public void setRevisionRule(@NotNull RevisionRule revisionRule)
Sets new revision rule to this artifact dependency- Specified by:
setRevisionRule
in interfaceArtifactDependency
- Parameters:
revisionRule
- new revision rule
-
setSourcePaths
public void setSourcePaths(@NotNull String paths)
Description copied from interface:ArtifactDependency
Sets new source paths to this artifact dependency- Specified by:
setSourcePaths
in interfaceArtifactDependency
- Parameters:
paths
- paths
-
replaceReferences
public void replaceReferences(@NotNull ValueResolver resolver)
Description copied from interface:ArtifactDependency
Replaces references in this artifact dependency using the provided resolver- Specified by:
replaceReferences
in interfaceArtifactDependency
- Parameters:
resolver
- replacement map
-
getReferences
public List<String> getReferences()
Description copied from interface:ArtifactDependency
Returns references used in this dependency (in destination path, source paths or in the build number)- Specified by:
getReferences
in interfaceArtifactDependency
- Returns:
- see above
-
isSimilarTo
public boolean isSimilarTo(ArtifactDependency dep)
Description copied from interface:ArtifactDependency
Checks if another artifact dependency object is equal to this, ignoring differences in ids (if any)- Specified by:
isSimilarTo
in interfaceArtifactDependency
- Parameters:
dep
- Another artifact dependency- Returns:
- true if artifact dependency objects are equal (ignoring ids)
-
getId
@NotNull public String getId()
Description copied from interface:ArtifactDependency
Returns artifact dependency id- Specified by:
getId
in interfaceArtifactDependency
- Returns:
- id
-
-