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

Examples of com.google.api.ads.dfa.axis.v1_20.UserProfile


      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

      String jobTitle = userInfos.get(INFO_USER_JOB_TITLE);
      EmployerInfo employerInfo = WSRPTypeFactory.createEmployerInfo(employer, department, jobTitle);

      Contact homeInfo = createContactFrom(userInfos, false);
      Contact businessInfo = createContactFrom(userInfos, true);
      UserProfile userProfile = WSRPTypeFactory.createUserProfile(name, bdate, userInfos.get(INFO_USER_GENDER), employerInfo, homeInfo, businessInfo);

      return userProfile;
   }
View Full Code Here

      {
         this.desiredLocales = desiredLocales;
         this.locale = WSRPUtils.getLocale(preferredLocale);
         if (userContext != null)
         {
            UserProfile profile = userContext.getProfile();
            if (profile != null)
            {
               infos = new HashMap<String, String>();
               XMLGregorianCalendar bdate = profile.getBdate();
               if (bdate != null)
               {
                  infos.put(INFO_USER_BDATE, bdate.toString());
               }

               infos.put(INFO_USER_GENDER, profile.getGender());

               PersonName name = profile.getName();
               if (name != null)
               {
                  infos.put(INFO_USER_NAME_FAMILY, name.getFamily());
                  infos.put(INFO_USER_NAME_GIVEN, name.getGiven());
                  infos.put(INFO_USER_NAME_MIDDLE, name.getMiddle());
                  infos.put(INFO_USER_NAME_NICKNAME, name.getNickname());
                  infos.put(INFO_USER_NAME_PREFIX, name.getPrefix());
                  infos.put(INFO_USER_NAME_SUFFIX, name.getSuffix());
               }

               populateContactInfo(profile.getBusinessInfo(), true);

               populateContactInfo(profile.getHomeInfo(), false);

               EmployerInfo employerInfo = profile.getEmployerInfo();
               if (employerInfo != null)
               {
                  infos.put(INFO_USER_DEPARTMENT, employerInfo.getDepartment());
                  infos.put(INFO_USER_EMPLOYER, employerInfo.getEmployer());
                  infos.put(INFO_USER_JOB_TITLE, employerInfo.getJobtitle());
View Full Code Here

         XMLGregorianCalendar bdate = v1UserProfile.getBdate();
         String gender = v1UserProfile.getGender();
         EmployerInfo employerInfo = toV2EmployerInfo(v1UserProfile.getEmployerInfo());
         Contact homeInfo = toV2Context(v1UserProfile.getHomeInfo());
         Contact businessInfo = toV2Context(v1UserProfile.getBusinessInfo());
         UserProfile userProfile = WSRPTypeFactory.createUserProfile(name, bdate, gender, employerInfo, homeInfo, businessInfo);

         return userProfile;
      }
      else
      {
View Full Code Here

      return sessionParams;
   }

   public static UserProfile createUserProfile(PersonName name, XMLGregorianCalendar bdate, String gender, EmployerInfo employerInfo, Contact homeInfo, Contact businessInfo)
   {
      UserProfile userProfile = new UserProfile();
      userProfile.setName(name);
      userProfile.setBdate(bdate);
      userProfile.setGender(gender);
      userProfile.setEmployerInfo(employerInfo);
      userProfile.setHomeInfo(homeInfo);
      userProfile.setBusinessInfo(businessInfo);

      return userProfile;
   }
View Full Code Here

      return sessionParams;
   }

   public static UserProfile createUserProfile(PersonName name, XMLGregorianCalendar bdate, String gender, EmployerInfo employerInfo, Contact homeInfo, Contact businessInfo)
   {
      UserProfile userProfile = new UserProfile();
      userProfile.setName(name);
      userProfile.setBdate(bdate);
      userProfile.setGender(gender);
      userProfile.setEmployerInfo(employerInfo);
      userProfile.setHomeInfo(homeInfo);
      userProfile.setBusinessInfo(businessInfo);

      return userProfile;
   }
View Full Code Here

      String jobTitle = userInfos.get(INFO_USER_JOB_TITLE);
      EmployerInfo employerInfo = WSRPTypeFactory.createEmployerInfo(employer, department, jobTitle);

      Contact homeInfo = createContactFrom(userInfos, false);
      Contact businessInfo = createContactFrom(userInfos, true);
      UserProfile userProfile = WSRPTypeFactory.createUserProfile(name, bdate, userInfos.get(INFO_USER_GENDER), employerInfo, homeInfo, businessInfo);

      return userProfile;
   }
View Full Code Here

      {
         this.desiredLocales = desiredLocales;
         this.locale = WSRPUtils.getLocale(preferredLocale);
         if (userContext != null)
         {
            UserProfile profile = userContext.getProfile();
            if (profile != null)
            {
               infos = new HashMap<String, String>();
               XMLGregorianCalendar bdate = profile.getBdate();
               if (bdate != null)
               {
                  infos.put(INFO_USER_BDATE, bdate.toString());
               }

               infos.put(INFO_USER_GENDER, profile.getGender());

               PersonName name = profile.getName();
               if (name != null)
               {
                  infos.put(INFO_USER_NAME_FAMILY, name.getFamily());
                  infos.put(INFO_USER_NAME_GIVEN, name.getGiven());
                  infos.put(INFO_USER_NAME_MIDDLE, name.getMiddle());
                  infos.put(INFO_USER_NAME_NICKNAME, name.getNickname());
                  infos.put(INFO_USER_NAME_PREFIX, name.getPrefix());
                  infos.put(INFO_USER_NAME_SUFFIX, name.getSuffix());
               }

               populateContactInfo(profile.getBusinessInfo(), true);

               populateContactInfo(profile.getHomeInfo(), false);

               EmployerInfo employerInfo = profile.getEmployerInfo();
               if (employerInfo != null)
               {
                  infos.put(INFO_USER_DEPARTMENT, employerInfo.getDepartment());
                  infos.put(INFO_USER_EMPLOYER, employerInfo.getEmployer());
                  infos.put(INFO_USER_JOB_TITLE, employerInfo.getJobtitle());
View Full Code Here

      return sessionParams;
   }

   public static UserProfile createUserProfile(PersonName name, XMLGregorianCalendar bdate, String gender, EmployerInfo employerInfo, Contact homeInfo, Contact businessInfo)
   {
      UserProfile userProfile = new UserProfile();
      userProfile.setName(name);
      userProfile.setBdate(bdate);
      userProfile.setGender(gender);
      userProfile.setEmployerInfo(employerInfo);
      userProfile.setHomeInfo(homeInfo);
      userProfile.setBusinessInfo(businessInfo);

      return userProfile;
   }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfa.axis.v1_20.UserProfile

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.