DFP to Ad Manager rebrand guide

Chris Seeley edited this page Aug 27, 2018 · 5 revisions

Overview

DoubleClick for Publishers was recently renamed to Google Ad Manager. To be consistent with these changes, we've updated our example code and refactored type names throughout this library. You'll only need to make a few small changes to upgrade your existing code.

What changed?

  • The package com.google.api.ads.dfpwas renamed to com.google.api.ads.admanager
  • The property keys prefixed with api.dfp were renamed to api.admanager
  • Classes containing "Dfp" were renamed to "AdManager". See the complete list of class name changes at the end of this post.

Note: The maven package names are not changing and will continue to be dfp_axis and dfp_appengine.

How to migrate

  1. In your ads.properties or other configuration file, change the prefix of ads.dfp properties to ads.admanager. The property values should remain unchanged.

Failure to make this change will cause an error like:

Invalid configuration in the ads.properties file. Exception: Client ID must be set as api.admanager.clientId in ads.properties.
  1. Change import statements from import com.google.api.ads.dfp to import com.google.api.ads.admanager.

Failure to make this change will cause an error like:

Cannot resolve symbol dfp
  1. Change usage of DfpServices and DfpSession to AdManagerServices and AdManagerSession. If you are using other classes that have been

renamed, update those too. You can use a tool like grepto find usage of the old class names. Copy the old names into a file like oldnames.txt and run a command like the following in your project's root directory:

grep -r -f oldnames.txt .

Failure to make this change will cause an error like:

Cannot resolve symbol 'DfpServices'
  1. When instantiating Credential objects with OfflineCredentials, change Api.DFP to Api.AD_MANAGER.
Credential oAuth2Credential = new OfflineCredentials.Builder()
    .forApi(Api.AD_MANAGER).fromFile().build().generateCredential();

Failure to make this change will cause an error like:

Cannot resolve symbol 'DFP'

For questions about this or any other API changes, reach out to us on the Ad Manager API forums.

Class name changes

Old name New name
com.google.api.ads.dfp.lib.factory.DfpServiceClientFactory com.google.api.ads.dfp.lib.factory.DfpServicesInterface com.google.api.ads.dfp.lib.factory.BaseDfpServices com.google.api.ads.dfp.lib.factory.helper.DfpServiceClientFactoryHelper com.google.api.ads.dfp.axis.DfpAxisHeaderHandler com.google.api.ads.dfp.axis.DfpAxisModule com.google.api.ads.dfp.jaxws.DfpJaxWsHeaderHandler com.google.api.ads.dfp.jaxws.DfpJaxWsModule com.google.api.ads.dfp.lib.DfpModule com.google.api.ads.dfp.lib.DfpSoapModule com.google.api.ads.dfp.lib.DfpProductFrameworkModule com.google.api.ads.dfp.lib.soap.DfpHttpHeaderHandler com.google.api.ads.dfp.lib.utils.DfpInternals com.google.api.ads.dfp.lib.conf.DfpApiConfiguration com.google.api.ads.dfp.lib.conf.DfpApiConfigurationModule com.google.api.ads.dfp.lib.conf.DfpLibConfiguraiton com.google.api.ads.dfp.lib.client.DfpServiceDescriptor com.google.api.ads.dfp.jaxws.factory.DfpServices com.google.api.ads.dfp.lib.client.DfpServiceClient com.google.api.ads.dfp.axis.factory.DfpServices com.google.api.ads.dfp.lib.client.DfpSession com.google.api.ads.admanager.lib.factory.AdManagerServiceClientFactory com.google.api.ads.admanager.lib.factory.AdManagerServicesInterface com.google.api.ads.admanger.lib.factory.BaseAdManagerServices com.google.api.ads.admanager.lib.factory.helper.AdManagerServiceClientFactoryHelper com.google.api.ads.admanager.axis.AdManagerAxisHeaderHandler com.google.api.ads.admanager.axis.AdManagerAxisModule com.google.api.ads.admanager.jaxws.AdManagerJaxWsHeaderHandler com.google.api.ads.admanager.jaxws.AdManagerJaxWsModule com.google.api.ads.admanager.lib.AdManagerModule com.google.api.ads.admanager.lib.AdManagerSoapModule com.google.api.ads.admanager.lib.AdManagerProductFrameworkModule com.google.api.ads.admanager.lib.soap.AdManagerHeaderHandler com.google.api.ads.admanager.lib.utils.AdManagerInternals com.google.api.ads.admanager.lib.conf.AdManagerApiConfiguration com.google.api.ads.admanager.lib.conf.AdManagerApiConfigurationModule com.google.api.ads.admanager.lib.conf.AdManagerLibConfiguraiton com.google.api.ads.admanager.lib.client.AdManagerServiceDescriptor com.google.api.ads.admanager.jaxws.factory.AdManagerServices com.google.api.ads.admanager.lib.client.AdManagerServiceClient com.google.api.ads.admanager.axis.factory.AdManagerServices com.google.api.ads.admanager.lib.client.AdManagerSession
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.