Package com.google.enterprise.connector.sharepoint.client

Examples of com.google.enterprise.connector.sharepoint.client.SharepointClientContext


   */
  @Before
  public void setUp() throws Exception {
    this.ldapConnectionSettings = TestConfiguration.getLdapConnetionSettings();
    ldapConnection = new LdapConnection(ldapConnectionSettings);
    sharepointClientContext = new SharepointClientContext(
        clientFactory, TestConfiguration.sharepointUrl, TestConfiguration.domain,
        TestConfiguration.kdcserver, TestConfiguration.username,
        TestConfiguration.password, TestConfiguration.googleConnectorWorkDir,
        TestConfiguration.googleGlobalNamespace,
        TestConfiguration.googleLocalNamespace,
View Full Code Here


   * @return Instance of client context
   * @throws SharepointException
   */
  public static SharepointClientContext initContext(
      ClientFactory clientFactory) throws SharepointException {
    final SharepointClientContext sharepointClientContext = new SharepointClientContext(
        clientFactory, TestConfiguration.sharepointUrl, TestConfiguration.domain,
        TestConfiguration.kdcserver, TestConfiguration.username,
        TestConfiguration.password, TestConfiguration.googleConnectorWorkDir,
        TestConfiguration.googleGlobalNamespace,
        TestConfiguration.googleLocalNamespace,
        TestConfiguration.includedURls, TestConfiguration.excludedURls,
        TestConfiguration.mySiteBaseURL, TestConfiguration.aliasMap,
        TestConfiguration.feedType, useSPSearchVisibility);

    sharepointClientContext.setIncluded_metadata(TestConfiguration.whiteList);
    sharepointClientContext.setExcluded_metadata(TestConfiguration.blackList);
    sharepointClientContext.setLdapConnectionSettings(TestConfiguration.getLdapConnetionSettings());
    sharepointClientContext.setPushAcls(TestConfiguration.pushAcls);
    sharepointClientContext.setLdapConnectionSettings(TestConfiguration.getLdapConnetionSettings());
    sharepointClientContext.setUseCacheToStoreLdapUserGroupsMembership(
        useCacheToStoreLdapUserGroupsMembership);
    sharepointClientContext.setInitialCacheSize(TestConfiguration.cacheSize);
    sharepointClientContext.setCacheRefreshInterval(TestConfiguration.refreshInterval);
    String socialOptionLc = TestConfiguration.getSocialOption().toLowerCase();
    if (socialOptionLc.equals("yes")) {
      sharepointClientContext.setSocialOption(SocialOption.YES);
    } else if (socialOptionLc.equals("no")) {
      sharepointClientContext.setSocialOption(SocialOption.NO);
    } else if (socialOptionLc.equals("only")) {
      sharepointClientContext.setSocialOption(SocialOption.ONLY);
    }
    sharepointClientContext.setTraversalContext(new SimpleTraversalContext());
    return sharepointClientContext;
  }
View Full Code Here

        + "], connectMethod = [" + connectMethod + "], searchBase = ["
        + searchBase + " ]" + "], feedUnPublishedDocuments = ["
        + feedUnPublishedDocuments + "], oldLdapBehavior = ["
        + oldLdapBehavior + "]");

    sharepointClientContext = new SharepointClientContext(clientFactory,
        sharepointUrl, domain, kdcserver, username, password,
        googleConnectorWorkDir, googleGlobalNamespace, googleLocalNamespace,
        includedURls, excludedURls, mySiteBaseURL, aliasMap,
        FeedType.getFeedType(authorizationAsfeedType), useSPSearchVisibility);
    sharepointClientContext.setFQDNConversion(FQDNConversion);
View Full Code Here

    /*
     * The incoming url might not always be exactly the web URL that is used
     * while creation of web state and is required by Web Services as such.
     * Hence, a second check is required.
     */
    final SharepointClientContext spContext = (SharepointClientContext) sharepointClientContext.clone();
    if (null == ws) {
      final String webAppURL = Util.getWebApp(key);
      WebsHelper webs = null;
      try {
        spContext.setSiteURL(webAppURL);
        webs = new WebsHelper(spContext);
      } catch (final Exception e) {
        LOGGER.log(Level.WARNING, "webs creation failed for URL [ " + key
            + " ]. ", e);
      }
View Full Code Here

  }

  public void testWebApplicationPolicyDocument() throws Exception {
    WebState webState = globalState.lookupWeb(TestConfiguration.Site4_URL,
        sharepointClientContext);
    SharepointClientContext spContext = (SharepointClientContext)sharepointClientContext.clone();
    SimpleTraversalContext context = new SimpleTraversalContext();
    context.setSupportsInheritedAcls(true);
    context.setSupportsDenyAcls(true);
    spContext.setTraversalContext(context);

    AclHelper aclHelper = new AclHelper(spContext, webState.getWebUrl());
    SPDocument webApppolicy = null;
    webApppolicy = aclHelper.getWebApplicationPolicy(webState,
        spContext.getFeedType().toString());
    assertNotNull(webApppolicy);
    assertEquals("Web app policy URL should be same as root site URL",
        TestConfiguration.Site4_URL, webApppolicy.getUrl());
    assertNotNull(webApppolicy.getAclGroups());
    assertFalse(webApppolicy.getAclGroups().isEmpty());
View Full Code Here

  public void testGetAclForUrlsUsingInheritance() throws Exception {
    // Get WebState for ACL Test Site
    WebState webState = globalState.lookupWeb(TestConfiguration.Site4_URL,
        sharepointClientContext);
    SharepointClientContext spContext = (SharepointClientContext)sharepointClientContext.clone();
    SimpleTraversalContext context = new SimpleTraversalContext();
    context.setSupportsInheritedAcls(true);
    spContext.setTraversalContext(context);
    assertNotNull(webState);
    List<SPDocument> docsToPass = new ArrayList<SPDocument>();
    //Get Web application policy document.
    AclHelper aclHelper = new AclHelper(spContext, webState.getWebUrl());
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.sharepoint.client.SharepointClientContext

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.