public static class DfpSession.Builder extends Object implements Builder<DfpSession>
DfpSession.
 Implementation is not thread-safe.
DEFAULT_CONFIGURATION_FILENAME| Constructor and Description | 
|---|
DfpSession.Builder()
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
DfpSession | 
build()
Builds the  
DfpSession. | 
DfpSession.Builder | 
from(org.apache.commons.configuration.Configuration config)
Reads properties from the provided  
Configuration object.Known properties: api.dfp.applicationName api.dfp.networkCode api.dfp.endpoint  | 
DfpSession.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 
 | 
DfpSession.Builder | 
fromFile(File path)
Populates this builder from a properties file from a specified path. 
 | 
DfpSession.Builder | 
fromFile(String path)
Populates this builder from a properties file from a specified path. 
 | 
DfpSession.Builder | 
fromFile(URL path)
Populates this builder from a properties file from a specified path. 
 | 
DfpSession.Builder | 
withApplicationName(String applicationName)
Includes application name (any string of your choice). 
 | 
DfpSession.Builder | 
withEndpoint(String endpoint)
Override the endpoint server. 
 | 
DfpSession.Builder | 
withNetworkCode(String networkCode)
Includes network code. 
 | 
DfpSession.Builder | 
withOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
Includes OAuth2 credential to be used for OAuth2 authentication. 
 | 
public DfpSession.Builder fromFile() throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<DfpSession>com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
         loaded.public DfpSession.Builder fromFile(String path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<DfpSession>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 DfpSession.Builder fromFile(File path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<DfpSession>path - the path to load properties fromcom.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
         loaded.public DfpSession.Builder fromFile(URL path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
BuilderfromFile in interface Builder<DfpSession>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 DfpSession.Builder from(org.apache.commons.configuration.Configuration config)
Configuration object.from in interface Builder<DfpSession>config - the configurationpublic DfpSession.Builder withOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
public DfpSession.Builder withNetworkCode(String networkCode)
public DfpSession.Builder withApplicationName(String applicationName)
public DfpSession.Builder withEndpoint(String endpoint)
public DfpSession build() throws ValidationException
DfpSession.build in interface Builder<DfpSession>DfpSessionValidationException - if the DfpSession did not validateCopyright © 2015. All Rights Reserved.