public abstract class AbstractUploader extends Object implements Uploader
Modifier and Type | Field and Description |
---|---|
protected Map<File,String> |
filesToUpload |
protected Set<UploaderResult.ArtifactResult> |
uploadedArtifacts
Map containing the id and filename of the successfully uploaded artifacts
Fill from the upload results
|
protected static Charset |
UTF_8 |
Constructor and Description |
---|
AbstractUploader(RunData runData,
ServerData serverData) |
Modifier and Type | Method and Description |
---|---|
void |
addArtifact(File file,
String filename)
Gathers a single file for upload with the given filename.
|
void |
close() |
protected void |
fillProperties(Map<String,String> properties) |
protected DroneClient |
getClient() |
protected ServerData |
getServerData() |
Set<UploaderResult.ArtifactResult> |
getUploadedArtifacts()
Returns all artifacts uploaded to the server.
|
protected static String |
makeString(org.apache.http.HttpEntity entity) |
protected void |
setupClient() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
performUpload
protected static final Charset UTF_8
protected final Set<UploaderResult.ArtifactResult> uploadedArtifacts
public AbstractUploader(RunData runData, ServerData serverData)
protected void setupClient()
protected DroneClient getClient()
protected ServerData getServerData()
protected static String makeString(org.apache.http.HttpEntity entity) throws IOException
IOException
public void addArtifact(File file, String filename)
Uploader
addArtifact
in interface Uploader
file
- the local file to be uploaded.filename
- the name for the uploaded file.public Set<UploaderResult.ArtifactResult> getUploadedArtifacts()
Uploader
getUploadedArtifacts
in interface Uploader
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2016–2018. All rights reserved.