Class UploadService
java.lang.Object
com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService<UploadServiceData>
com.microsoftopentechnologies.windowsazurestorage.service.UploadService
- Direct Known Subclasses:
UploadToBlobService
,UploadToFileService
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Data object for https uploading command.protected static class
Data object for https uploading result. -
Field Summary
Fields inherited from class com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService
FP_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
final int
execute()
protected String
generateWriteSASURL
(StorageAccountInfo storageAccountInfo, String fileName, String storageType, String name) protected String
getItemPath
(FilePath path, String embeddedVP, UploadServiceData serviceData) Convert the path on local file system to relative path on azure storage.protected String
removePrefix
(URI srcURI, UploadServiceData serviceData) protected void
updateAzureBlobs
(List<UploadService.UploadResult> results, List<AzureBlob> azureBlobs) Update Jenkins controller's records of uploaded files.updateMetadata
(Map<String, String> metadata) protected abstract void
uploadArchive
(String archiveIncludes) protected void
uploadCloudFile
(com.azure.storage.file.share.ShareFileClient fileClient, FilePath localPath) protected abstract void
uploadIndividuals
(String embeddedVP, FilePath[] paths) protected abstract void
uploadIndividuals
(String embeddedVP, FilePath[] paths, FilePath workspace) protected void
Methods inherited from class com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService
error, getServiceData, getTime, println, setRunUnstable, setServiceData
-
Field Details
-
ZIP_FOLDER_NAME
- See Also:
-
ZIP_NAME
- See Also:
-
-
Constructor Details
-
UploadService
-
-
Method Details
-
updateAzureBlobs
protected void updateAzureBlobs(List<UploadService.UploadResult> results, List<AzureBlob> azureBlobs) throws WAStorageException Update Jenkins controller's records of uploaded files.- Parameters:
results
- Response from the the agents.azureBlobs
- Records of the uploaded files.- Throws:
WAStorageException
- throw exceptions when failing to fetch the the response.
-
generateWriteSASURL
protected String generateWriteSASURL(StorageAccountInfo storageAccountInfo, String fileName, String storageType, String name) throws MalformedURLException, URISyntaxException -
uploadIndividuals
protected abstract void uploadIndividuals(String embeddedVP, FilePath[] paths, FilePath workspace) throws WAStorageException - Throws:
WAStorageException
-
uploadIndividuals
protected abstract void uploadIndividuals(String embeddedVP, FilePath[] paths) throws WAStorageException - Throws:
WAStorageException
-
uploadArchive
- Throws:
WAStorageException
-
execute
- Specified by:
execute
in classStoragePluginService<UploadServiceData>
- Throws:
WAStorageException
-
waitForUploadEnd
-
excludedFilesAndZip
-
removePrefix
-
getItemPath
protected String getItemPath(FilePath path, String embeddedVP, UploadServiceData serviceData) throws IOException, InterruptedException Convert the path on local file system to relative path on azure storage.- Parameters:
path
- the local pathembeddedVP
- the embedded virtual path- Returns:
- Throws:
IOException
InterruptedException
-
updateMetadata
protected Map<String,String> updateMetadata(Map<String, String> metadata) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
getExecutorService
-