Class ExternalBuildArtifactFile
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.AbstractBuildArtifact<ExternalBuildArtifacts>
-
- jetbrains.buildServer.serverSide.impl.artifacts.ExternalBuildArtifactFile
-
- All Implemented Interfaces:
BuildArtifact,BuildArtifactInfo,StoredBuildArtifactInfo
public class ExternalBuildArtifactFile extends AbstractBuildArtifact<ExternalBuildArtifacts> implements StoredBuildArtifactInfo
- Author:
- vbedrosova
-
-
Constructor Summary
Constructors Constructor Description ExternalBuildArtifactFile(ArtifactData artifact, ExternalBuildArtifacts origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactDatagetArtifactData()Returns artifact data for this artifact if it's a file, null otherwise.longgetBuildId()BuildPromotiongetBuildPromotion()Returns build promotion for this artifact.Map<String,String>getCommonProperties()Returns common properties for this artifact.InputStreamgetInputStream()Creates input stream for this artifact.Map<String,String>getStorageSettings()Returns settings of the artifact storage where this artifacts is stored.StringgetStorageType()Returns type of the artifact storage where this artifact is stored.longgetTimestamp()booleanisArchive()-
Methods inherited from class jetbrains.buildServer.serverSide.impl.AbstractBuildArtifact
equals, getChildren, getName, getOrigin, getRelativePath, getSize, hashCode, isContainer, isDirectory, isFile, toString
-
-
-
-
Constructor Detail
-
ExternalBuildArtifactFile
public ExternalBuildArtifactFile(@NotNull ArtifactData artifact, @NotNull ExternalBuildArtifacts origin)
-
-
Method Detail
-
isArchive
public boolean isArchive()
- Specified by:
isArchivein interfaceBuildArtifact- Overrides:
isArchivein classAbstractBuildArtifact<ExternalBuildArtifacts>- Returns:
- true if this artifact is archive file (.zip, .jar, .tar.gz, etc.)
-
getInputStream
@NotNull public InputStream getInputStream() throws IOException
Description copied from interface:BuildArtifactCreates input stream for this artifact. Client must close the stream at end Exception will be thrown if artifact does not contains content- Specified by:
getInputStreamin interfaceBuildArtifact- Overrides:
getInputStreamin classAbstractBuildArtifact<ExternalBuildArtifacts>- Returns:
- file content or null
- Throws:
IOException
-
getStorageType
@Nullable public String getStorageType()
Description copied from interface:StoredBuildArtifactInfoReturns type of the artifact storage where this artifact is stored. Will return null if the storage is no longer available.- Specified by:
getStorageTypein interfaceStoredBuildArtifactInfo- Returns:
- see above
-
getStorageSettings
@NotNull public Map<String,String> getStorageSettings()
Description copied from interface:StoredBuildArtifactInfoReturns settings of the artifact storage where this artifacts is stored. Will return empty map if the storage is no longer available.- Specified by:
getStorageSettingsin interfaceStoredBuildArtifactInfo- Returns:
- see above
-
getArtifactData
@Nullable public ArtifactData getArtifactData()
Description copied from interface:StoredBuildArtifactInfoReturns artifact data for this artifact if it's a file, null otherwise.- Specified by:
getArtifactDatain interfaceStoredBuildArtifactInfo- Returns:
- see above
-
getCommonProperties
@NotNull public Map<String,String> getCommonProperties()
Description copied from interface:StoredBuildArtifactInfoReturns common properties for this artifact.- Specified by:
getCommonPropertiesin interfaceStoredBuildArtifactInfo- Returns:
- see above
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfaceBuildArtifact- Overrides:
getTimestampin classAbstractBuildArtifact<ExternalBuildArtifacts>- Returns:
- artifact last modification timestamp
-
getBuildPromotion
@NotNull public BuildPromotion getBuildPromotion()
Description copied from interface:StoredBuildArtifactInfoReturns build promotion for this artifact.- Specified by:
getBuildPromotionin interfaceStoredBuildArtifactInfo- Returns:
- see above
-
getBuildId
public long getBuildId()
-
-