|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.dfp.lib.client.DfpSession.Builder
public static class DfpSession.Builder
Builder for DfpSession.
| Field Summary |
|---|
| Fields inherited from interface com.google.api.ads.common.lib.utils.Builder |
|---|
DEFAULT_CONFIGURATION_FILENAME |
| Constructor Summary | |
|---|---|
DfpSession.Builder()
Constructor. |
|
| Method Summary | |
|---|---|
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.clientLoginToken api.dfp.applicationName api.dfp.networkCode api.dfp.environment - e.g. |
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. |
DfpSession.Builder |
withClientLoginToken(String clientLoginToken)
Includes hard-coded ClientLogin token that will be used instead of fetching a new one. |
DfpSession.Builder |
withEndpoint(String endpoint)
Override the endpoint server. |
DfpSession.Builder |
withEnvironment(DfpSession.Environment environment)
Includes the specified environment, e.g. |
DfpSession.Builder |
withNetworkCode(String networkCode)
Includes network code.. |
DfpSession.Builder |
withOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
Includes OAuth parameters to be used for OAuth authentication. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DfpSession.Builder()
| Method Detail |
|---|
public DfpSession.Builder fromFile()
Builder
fromFile in interface Builder<DfpSession>public DfpSession.Builder fromFile(String path)
Builder
fromFile in interface Builder<DfpSession>path - the path to try first as a resource, then as a file
public DfpSession.Builder fromFile(File path)
Builder
fromFile in interface Builder<DfpSession>path - the path to load properties from
public DfpSession.Builder fromFile(URL path)
Builder
fromFile in interface Builder<DfpSession>path - the path to try first as a resource, then as a file
public DfpSession.Builder from(org.apache.commons.configuration.Configuration config)
Configuration object.
from in interface Builder<DfpSession>config -
public DfpSession.Builder withClientLoginToken(String clientLoginToken)
public DfpSession.Builder withOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
public DfpSession.Builder withNetworkCode(String networkCode)
public DfpSession.Builder withApplicationName(String applicationName)
public DfpSession.Builder withEnvironment(DfpSession.Environment environment)
DfpSession.Environment.SANDBOX
public DfpSession.Builder withEndpoint(String endpoint)
public DfpSession build()
throws ValidationException
DfpSession.
build in interface Builder<DfpSession>DfpSession
ValidationException - if the DfpSession did not validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||