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, waitperformUploadprotected 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
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 Set<UploaderResult.ArtifactResult> getUploadedArtifacts()
UploadergetUploadedArtifacts in interface Uploaderpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2016–2018. All rights reserved.