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 ArtifactData
getArtifactData()
Returns artifact data for this artifact if it's a file, null otherwise.long
getBuildId()
BuildPromotion
getBuildPromotion()
Returns build promotion for this artifact.Map<String,String>
getCommonProperties()
Returns common properties for this artifact.InputStream
getInputStream()
Creates input stream for this artifact.Map<String,String>
getStorageSettings()
Returns settings of the artifact storage where this artifacts is stored.String
getStorageType()
Returns type of the artifact storage where this artifact is stored.long
getTimestamp()
boolean
isArchive()
-
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:
isArchive
in interfaceBuildArtifact
- Overrides:
isArchive
in 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:BuildArtifact
Creates input stream for this artifact. Client must close the stream at end Exception will be thrown if artifact does not contains content- Specified by:
getInputStream
in interfaceBuildArtifact
- Overrides:
getInputStream
in classAbstractBuildArtifact<ExternalBuildArtifacts>
- Returns:
- file content or null
- Throws:
IOException
-
getStorageType
@Nullable public String getStorageType()
Description copied from interface:StoredBuildArtifactInfo
Returns type of the artifact storage where this artifact is stored. Will return null if the storage is no longer available.- Specified by:
getStorageType
in interfaceStoredBuildArtifactInfo
- Returns:
- see above
-
getStorageSettings
@NotNull public Map<String,String> getStorageSettings()
Description copied from interface:StoredBuildArtifactInfo
Returns settings of the artifact storage where this artifacts is stored. Will return empty map if the storage is no longer available.- Specified by:
getStorageSettings
in interfaceStoredBuildArtifactInfo
- Returns:
- see above
-
getArtifactData
@Nullable public ArtifactData getArtifactData()
Description copied from interface:StoredBuildArtifactInfo
Returns artifact data for this artifact if it's a file, null otherwise.- Specified by:
getArtifactData
in interfaceStoredBuildArtifactInfo
- Returns:
- see above
-
getCommonProperties
@NotNull public Map<String,String> getCommonProperties()
Description copied from interface:StoredBuildArtifactInfo
Returns common properties for this artifact.- Specified by:
getCommonProperties
in interfaceStoredBuildArtifactInfo
- Returns:
- see above
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestamp
in interfaceBuildArtifact
- Overrides:
getTimestamp
in classAbstractBuildArtifact<ExternalBuildArtifacts>
- Returns:
- artifact last modification timestamp
-
getBuildPromotion
@NotNull public BuildPromotion getBuildPromotion()
Description copied from interface:StoredBuildArtifactInfo
Returns build promotion for this artifact.- Specified by:
getBuildPromotion
in interfaceStoredBuildArtifactInfo
- Returns:
- see above
-
getBuildId
public long getBuildId()
-
-