@RequiresDomain(value=StorageScopeRequirement.class) public class UploadModule extends Object
Constructor and Description |
---|
UploadModule() |
Modifier and Type | Method and Description |
---|---|
InputStream |
executeMediaAsInputStream(com.google.api.services.storage.Storage.Objects.Get getObject)
Returns an InputStream for the given GCS object.
|
int |
getInsertRetryCount() |
StorageScopeRequirement |
getRequirement()
Returns the scope requirement to access the GCS API.
|
com.google.api.services.storage.Storage |
getStorageService(com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials credentials,
String version)
Given GoogleRobotCredentials and plugin version, return a handle to a Storage object that has
already been authenticated.
|
String |
getVersion() |
com.google.jenkins.plugins.util.Executor |
newExecutor()
Interface for requesting the
Executor for executing requests. |
String |
prefix(String logMessage)
Prefix the given log message with our module name.
|
public com.google.jenkins.plugins.util.Executor newExecutor()
Executor
for executing requests.Executor
instance for issuing requests.public StorageScopeRequirement getRequirement()
public String getVersion()
public com.google.api.services.storage.Storage getStorageService(com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials credentials, String version) throws IOException
credentials
- Credentials needed to authenticate to the GCS API.version
- Current version of the plugin.IOException
- If there is an issue authenticating with the given credentials.public int getInsertRetryCount()
public String prefix(String logMessage)
logMessage
- Log message to log.public InputStream executeMediaAsInputStream(com.google.api.services.storage.Storage.Objects.Get getObject) throws IOException
getObject
- GCS object.IOException
- If there was in issue getting the InputStream for the GCS object.Copyright © 2016–2020. All rights reserved.