public class ClientFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_NAME |
Constructor and Description |
---|
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)
Creates a
ClientFactory instance. |
ClientFactory(ItemGroup itemGroup,
String credentialsId)
Creates a
ClientFactory instance without specifying domainRequirements or
httpTransport. |
Modifier and Type | Method and Description |
---|---|
String |
getCredentialsId() |
String |
getDefaultProjectId() |
StorageClient |
storageClient()
Creates a new
StorageClient . |
public static final String APPLICATION_NAME
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
ClientFactory
instance.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.AbortException
- If failed to create a new client factory.public ClientFactory(ItemGroup itemGroup, String credentialsId) throws AbortException
ClientFactory
instance without specifying domainRequirements or
httpTransport.itemGroup
- A handle to the Jenkins instance.credentialsId
- The ID of the GoogleRobotCredentials to be retrieved from Jenkins and
utilized for authorization.AbortException
- If failed to create a new client factory.public StorageClient storageClient()
StorageClient
.StorageClient
instance.public String getDefaultProjectId()
public String getCredentialsId()
Copyright © 2016–2019. All rights reserved.