public static class FactoryConfiguration.Builder extends Object implements Builder<FactoryConfiguration>
DEFAULT_CONFIGURATION_FILENAME| Constructor and Description |
|---|
FactoryConfiguration.Builder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FactoryConfiguration |
build()
Builds the
FactoryConfiguration. |
FactoryConfiguration |
buildDefault()
Tries to construct a FactoryConfiguration from file.
|
FactoryConfiguration.Builder |
from(org.apache.commons.configuration.Configuration config)
Reads properties from the provided
Configuration object.Known properties: api.ads.soapClientHandlerModule |
FactoryConfiguration.Builder |
fromFile()
Loads credentials from "ads.properties" file in one of the following
locations according to the following order: in the current directory, in
the user home directory, in the classpath
|
FactoryConfiguration.Builder |
fromFile(File path)
Populates this builder from a properties file from a specified path.
|
FactoryConfiguration.Builder |
fromFile(String path)
Populates this builder from a properties file from a specified path.
|
FactoryConfiguration.Builder |
fromFile(URL path)
Populates this builder from a properties file from a specified path.
|
FactoryConfiguration.Builder |
withAdWordsSoapModule(ProductFrameworkModule soapModuleClass)
Specifies which SOAP client handler module class to use for AdWords.
|
FactoryConfiguration.Builder |
withDfaSoapModule(ProductFrameworkModule soapModuleClass)
Specifies which SOAP client handler module class to use for DFA.
|
FactoryConfiguration.Builder |
withDfpSoapModule(ProductFrameworkModule soapModuleClass)
Specifies which SOAP client handler module class to use for DFP.
|
public FactoryConfiguration.Builder fromFile() throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<FactoryConfiguration>com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.public FactoryConfiguration.Builder fromFile(String path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<FactoryConfiguration>path - the path to try first as a resource, then as a filecom.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.public FactoryConfiguration.Builder fromFile(File path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<FactoryConfiguration>path - the path to load properties fromcom.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.public FactoryConfiguration.Builder fromFile(URL path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<FactoryConfiguration>path - the path to try first as a resource, then as a filecom.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.public FactoryConfiguration.Builder from(org.apache.commons.configuration.Configuration config)
Configuration object.from in interface Builder<FactoryConfiguration>config - the factory configurationpublic FactoryConfiguration.Builder withAdWordsSoapModule(ProductFrameworkModule soapModuleClass)
public FactoryConfiguration.Builder withDfaSoapModule(ProductFrameworkModule soapModuleClass)
public FactoryConfiguration.Builder withDfpSoapModule(ProductFrameworkModule soapModuleClass)
@Nullable public FactoryConfiguration buildDefault()
IllegalStateException - if we encounter an unexpected ConfigurationLoadException or we
fail validation.public FactoryConfiguration build() throws ValidationException
FactoryConfiguration.build in interface Builder<FactoryConfiguration>FactoryConfigurationValidationException - if the FactoryConfiguration did not
validateCopyright © 2012. All Rights Reserved.