Package com.google.api.ads.dfa.axis.v1_19

Examples of com.google.api.ads.dfa.axis.v1_19.SpotlightRemote


  private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the user role service.
    UserRoleRemote userRoleService = dfaServices.get(session, UserRoleRemote.class);

    // Get user roles that match the search criteria.
    UserRoleSearchCriteria userRoleSearchCriteria = new UserRoleSearchCriteria();
    userRoleSearchCriteria.setSearchString(searchString);
    userRoleSearchCriteria.setPageSize(10);
    UserRoleRecordSet userRoleRecordSet = userRoleService.getUserRoles(userRoleSearchCriteria);

    // Display user role names, IDs, subnetwork IDs, number of assigned users, and
    // assigned permissions.
    if (userRoleRecordSet.getUserRoles().length > 0) {
      for (UserRole userRole: userRoleRecordSet.getUserRoles()) {
View Full Code Here


      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the user role service.
    UserRoleRemote userRoleService = dfaServices.get(session, UserRoleRemote.class);

    // Get user roles that match the search criteria.
    UserRoleSearchCriteria userRoleSearchCriteria = new UserRoleSearchCriteria();
    userRoleSearchCriteria.setSearchString(searchString);
    userRoleSearchCriteria.setPageSize(10);
    UserRoleRecordSet userRoleRecordSet = userRoleService.getUserRoles(userRoleSearchCriteria);

    // Display user role names, IDs, subnetwork IDs, number of assigned users, and
    // assigned permissions.
    if (userRoleRecordSet.getUserRoles().length > 0) {
View Full Code Here

    // advertiser filters. See the User class documentation for the names of
    // methods for other filters.
    user.setAdvertiserUserFilter(filterToAdd);

    // Save the changes made and display a success message.
    UserSaveResult userSaveResult = userService.saveUser(user);
    System.out.printf("User with ID \"%s\" was modified.", userSaveResult.getId());
  }
View Full Code Here

      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the user service.
    UserRemote userService = dfaServices.get(session, UserRemote.class);

    // Get users that match the search criteria.
    UserSearchCriteria userSearchCriteria = new UserSearchCriteria();
    userSearchCriteria.setSearchString(searchString);
    userSearchCriteria.setPageSize(10);
    UserRecordSet userRecordSet = userService.getUsersByCriteria(userSearchCriteria);

    // Display user names, IDs, network IDs, subnetwork IDs, and group IDs.
    if (userRecordSet.getRecords().length > 0) {
      for (User user: userRecordSet.getRecords()) {
View Full Code Here

*/
public class GetCountries {

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set search criteria.
    CountrySearchCriteria countrySearchCriteria = new CountrySearchCriteria ();
    countrySearchCriteria.setSecure(false);

    // Get countries.
    Country[] countries = service.getCountriesByCriteria(countrySearchCriteria);

    // Display country names, codes and secure server support information.
    for (Country result : countries) {
      System.out.println("Country name \"" + result.getName()
          + "\", country code \"" + result.getCountryCode() + "\", supports a secure server? \""
View Full Code Here

  private static final String ADVERTISER_ID = "INSERT_ADVERTISER_ID_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, long advertiserId) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set activity group search criteria structure and
    // use advertiser ID as search criteria.
    SpotlightActivityGroupSearchCriteria activityGroupSearchCriteria =
        new SpotlightActivityGroupSearchCriteria();
    activityGroupSearchCriteria.setAdvertiserId(advertiserId);

    // Get activity group.
    SpotlightActivityGroupRecordSet spotlightActivityGroupRecordSet =
        service.getSpotlightActivityGroups(activityGroupSearchCriteria);

    // Display activity group names and IDs.
    if (spotlightActivityGroupRecordSet.getRecords() != null) {
      for (SpotlightActivityGroup result : spotlightActivityGroupRecordSet.getRecords()) {
        System.out.println("Activity group with name \"" + result.getName()
View Full Code Here

*/
public class GetActivityTypes {

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Get activity types.
    SpotlightActivityType[] spotlightActivityTypes = service.getSpotlightActivityTypes();

    // Display activity type names and IDs.
    for (SpotlightActivityType result : spotlightActivityTypes) {
      System.out.println("Activity type with name \"" + result.getName()
          + "\" and ID \"" + result.getId() + "\" was found.");
View Full Code Here

  public static void runExample(
      DfaServices dfaServices, DfaSession session, String groupName, long spotlightConfigurationId)
          throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Create the spotlight activity group.
    SpotlightActivityGroup spotlightActivityGroup = new SpotlightActivityGroup();
    spotlightActivityGroup.setId(0);
    spotlightActivityGroup.setName(groupName);
    spotlightActivityGroup.setSpotlightConfigurationId(spotlightConfigurationId);
    // The type ID for for a counter group is 1. See GetActivityTypes.java
    spotlightActivityGroup.setGroupType(1);

    // Save the activity group.
    SpotlightActivityGroupSaveResult activityGroupSaveResult =
        service.saveSpotlightActivityGroup(spotlightActivityGroup);

    // Display the new activity group ID.
    if (activityGroupSaveResult != null) {
      System.out.printf("Activity group with ID \"%s\" was created.%n",
          activityGroupSaveResult.getId());
View Full Code Here

*/
public class GetTagMethodTypes {

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Get method types.
    SpotlightTagMethodType[] spotlightTagMethodTypes = service.getSpotlightTagMethodTypes();

    // Display method type names and IDs.
    for (SpotlightTagMethodType result : spotlightTagMethodTypes) {
      System.out.println("Method type with name \"" + result.getName()
          + "\" and ID \"" + result.getId() + "\" was found.");
View Full Code Here

  private static final String ACTIVITY_GROUP_ID = "INSERT_ACTIVITY_GROUP_ID_HERE";

  public static void runExample(DfaServices dfaServices, DfaSession session, String activityName,
      String url, long activityGroupId) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set spotlight activity structure.
    SpotlightActivity spotActivity = new SpotlightActivity();
    spotActivity.setId(0);
    spotActivity.setName(activityName);
    spotActivity.setActivityGroupId(activityGroupId);
    spotActivity.setExpectedUrl(new URL(url).toString());
    // The type ID for for a counter activity is 1. See GetActivityTypes.java
    spotActivity.setActivityTypeId(1);
    // The standard tag method type has an ID of 1. See GetTagMethodTypes.java
    spotActivity.setTagMethodTypeId(1);

    // Create the spotlight tag activity.
    SpotlightActivitySaveResult spotlightActivityResult =
        service.saveSpotlightActivity(spotActivity);

    // Display new spotlight activity ID.
    if (spotlightActivityResult != null) {
      System.out.printf("Spotlight activity with ID \"%s\" was created.%n",
          spotlightActivityResult.getId());
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfa.axis.v1_19.SpotlightRemote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.