|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.common.lib.factory.FactoryConfiguration.Builder
public static class FactoryConfiguration.Builder
Builder for FactoryConfiguration.
| Field Summary |
|---|
| Fields inherited from interface com.google.api.ads.common.lib.utils.Builder |
|---|
DEFAULT_CONFIGURATION_FILENAME |
| Constructor Summary | |
|---|---|
FactoryConfiguration.Builder()
Constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FactoryConfiguration.Builder()
| Method Detail |
|---|
public FactoryConfiguration.Builder fromFile()
throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile 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
Builder
fromFile in interface Builder<FactoryConfiguration>path - the path to try first as a resource, then as a file
com.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
Builder
fromFile in interface Builder<FactoryConfiguration>path - the path to load properties from
com.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
Builder
fromFile in interface Builder<FactoryConfiguration>path - the path to try first as a resource, then as a file
com.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 configuration
public 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>FactoryConfiguration
ValidationException - if the FactoryConfiguration did not
validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||