public abstract class AbstractUploader extends Object implements Uploader
| Modifier and Type | Field and Description |
|---|---|
protected Map<File,String> |
filesToUpload |
protected Map<String,String> |
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() |
Map<String,String> |
getUploadedArtifacts()
Returns all artifacts successfully 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, waitperformUploadprotected static final Charset UTF_8
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
IOExceptionpublic void addArtifact(File file, String filename)
UploaderaddArtifact in interface Uploaderfile - the local file to be uploaded.filename - the name for the uploaded file.public Map<String,String> getUploadedArtifacts()
UploadergetUploadedArtifacts in interface Uploaderpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2016–2017. All rights reserved.