Class ClientFactory
java.lang.Object
com.google.jenkins.plugins.storage.client.ClientFactory
Creates clients for communicating with Google APIs.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientFactory(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId, Optional<com.google.api.client.http.HttpTransport> httpTransport) Creates aClientFactoryinstance.ClientFactory(ItemGroup itemGroup, String credentialsId) Creates aClientFactoryinstance without specifying domainRequirements or httpTransport. -
Method Summary
-
Field Details
-
APPLICATION_NAME
- See Also:
-
-
Constructor Details
-
ClientFactory
public ClientFactory(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId, Optional<com.google.api.client.http.HttpTransport> httpTransport) throws AbortException Creates aClientFactoryinstance.- Parameters:
itemGroup- A handle to the Jenkins instance.domainRequirements- A list of domain requirements.credentialsId- The ID of the GoogleRobotCredentials to be retrieved from Jenkins and utilized for authorization.httpTransport- If specified, the HTTP transport this factory will utilize for clients it creates.- Throws:
AbortException- If failed to create a new client factory.
-
ClientFactory
Creates aClientFactoryinstance without specifying domainRequirements or httpTransport.- Parameters:
itemGroup- A handle to the Jenkins instance.credentialsId- The ID of the GoogleRobotCredentials to be retrieved from Jenkins and utilized for authorization.- Throws:
AbortException- If failed to create a new client factory.
-
-
Method Details
-
storageClient
Creates a newStorageClient.- Returns:
- A new
StorageClientinstance.
-
getDefaultProjectId
- Returns:
- The default Project ID associated with this ClientFactory's credentials.
-
getCredentialsId
- Returns:
- The Credentials ID for this ClientFactory.
-