Package com.google.enterprise.connector.sharepoint.generated.sp2010.userprofileservice

Examples of com.google.enterprise.connector.sharepoint.generated.sp2010.userprofileservice.GetUserProfileByIndexResult


  public void setTimeout(final int timeout) {
  }

  @Override
  public GetUserProfileByIndexResult getUserProfileByIndex(int index) {
    return new GetUserProfileByIndexResult();
  }
View Full Code Here


   *
   * @return if the endpoint being used is an SPS site
   * @throws SharepointException
   */
  public boolean isSPS() throws SharepointException {
    final GetUserProfileByIndexResult result = getUserProfileByIndex(0);
    return result != null;
  }
View Full Code Here

    final Set<String> personalSitesSet = new TreeSet<String>();
    final Collator collator = Util.getCollator();

    int index = 0;
    while (index >= 0) {
      final GetUserProfileByIndexResult result = getUserProfileByIndex(index);

      if ((result == null) || (result.getUserProfile() == null)) {
        break;
      }

      final PropertyData[] data = result.getUserProfile();
      if (data == null) {
        break;
      }

      for (PropertyData element : data) {
        final String name = element.getName();
        if (collator.equals(personalSpaceTag, name)) {
          final String propVal = element.getValue();// e.g.
          // /personal/administrator/
          if (propVal == null) {
            continue;
          }
          String strURL = Util.getWebApp(sharepointClientContext.getSiteURL())
              + propVal;

          if (strURL.endsWith(SPConstants.SLASH)) {
            strURL = strURL.substring(0, strURL.lastIndexOf(SPConstants.SLASH));
          }
          if (sharepointClientContext.isIncludedUrl(strURL, LOGGER)) {
            personalSitesSet.add(strURL);
            LOGGER.log(Level.CONFIG, "Personal Site: " + strURL);
          }
        }
      }
      final String next = result.getNextValue();
      index = Integer.parseInt(next);
    }
    if (personalSitesSet.size() > 0) {
      LOGGER.info("Discovered " + personalSitesSet.size()
          + " personal sites to crawl.");
View Full Code Here

    // generate as many as "number" colleagues, picking them from the list of
    // names ignoring self
    for (int n = 0; (number > 0) && (n < names.length); n++) {
      if (!names[n].equalsIgnoreCase(key)) {
        ContactData contact = new ContactData();
        contact.setAccountName(EXAMPLE_DOMAIN_PREFIX + names[n]);
        contact.setEmail(names[n] + EXAMPLE_COM);
        colleagues[number - 1] = contact;
        number--;
      }
    }
    return colleagues;
View Full Code Here

    // Create a sparse map of indexes: 2, 4, 6, etc. As with SharePoint,
    // asking for a missing entry returns the next higher one. We skip
    // index 0 just to be mean.
    int arrayIndex = getArrayIndex(index);

    GetUserProfileByIndexResult profile = new GetUserProfileByIndexResult();
    profile.setUserProfile(getProfileData(arrayIndex));
    profile.setNextValue(Integer.toString(getNextValue(arrayIndex)));
    return profile;
  }
View Full Code Here

  }

  /** @param index a zero-based index into the private data arrays */
  private PropertyData[] getProfileData(int index) {
    return new PropertyData[] {
        new PropertyData(false, false,
            SharepointSocialConstants.PROPNAME_RESPONSIBILITY, Privacy.Public,
            makeValue(1)),
        new PropertyData(false, false,
            SharepointSocialConstants.PROPNAME_PASTPROJECTS, Privacy.Public,
            makeValue(3)),
        new PropertyData(false, false,
            SharepointSocialConstants.PROPNAME_SKILL, Privacy.Public,
            makeValue(2)),
        new PropertyData(false, false,
            SharepointSocialConstants.SHAREPOINT_USERKEYDEFAULT,
            Privacy.Public, makeValue(EXAMPLE_DOMAIN_PREFIX + names[index])),
        new PropertyData(false, false,
            SharepointSocialConstants.SHAREPOINT_USERCONTENTDEFAULT,
            Privacy.Public, makeValue(names[index])),
        new PropertyData(false, false, "UserName", Privacy.Public,
            makeValue(names[index])),
        new PropertyData(false, false, "FirstName", Privacy.Public,
            makeValue(firstNames[index])),
        new PropertyData(false, false, "LastName", Privacy.Public,
            makeValue(lastNames[index])),
        new PropertyData(false, false, "Title", Privacy.Public,
            makeValue(titles[index])) };
  }
View Full Code Here

  private void verifyCalendarProperty(String timeZone, PropertyData[] props,
      String propName, String expectedValue, String expectedValueForGet) {
    TimeZone.setDefault(TimeZone.getTimeZone(timeZone));

    PropertyData prop = getProperty(props, propName);
    assertNotNull(prop);
    Calendar cal = (Calendar) prop.getValues()[0].getValue();
    assertNotNull(cal);
    ArrayList<String> values =
        SharepointUserProfileConnection.readProfileProperty(prop);
    assertNotNull(values);
    assertEquals(1, values.size());
View Full Code Here

  MockUserProfileGenerator() {
    random = new Random();
  }

  ValueData[] makeValue(String val) {
    return new ValueData[] { new ValueData(val) };
  }
View Full Code Here

  ValueData[] makeValue(String val) {
    return new ValueData[] { new ValueData(val) };
  }

  ValueData[] makeValue(String val1, String val2) {
    return new ValueData[] { new ValueData(val1), new ValueData(val2) };
  }
View Full Code Here

    return new ValueData[] { new ValueData(val1), new ValueData(val2) };
  }

  ValueData[] makeValue(int howMany) {
    ValueData[] v = new ValueData[howMany + 1];
    v[0] = new ValueData("engineering");
    for (int i = 0; i < howMany; i++) {
      int next = random.nextInt(skills.length);
      v[i + 1] = new ValueData(skills[next]);
    }
    return v;
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.sharepoint.generated.sp2010.userprofileservice.GetUserProfileByIndexResult

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.