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

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


            .getConnectorNameFromDirectoryUrl(googleConnectorWorkDir);
        connectorNamesDAO = new ConnectorNamesDAO(localDatabseImpl
            .getDataSource(), queryProvider);
        // Add current connector instance name to the database table.
        connectorNamesDAO.addConnectorInstanceName(connectorName);
        new AclHelper(sharepointClientContext, null).checkConnectivity();
      } catch (Exception e) {
        throw new RepositoryException(
            "Crawling cannot proceed because ACL web service cannot be contacted and hence, "
                + "ACLs cannot be retrieved while crawling. You may still make the connector crawl "
                + "by setting the ACL flag as false in connectorInstance.xml. ",
View Full Code Here


    this.sharepointClientContext = TestConfiguration.initContext();
    assertNotNull(this.sharepointClientContext);
    sharepointClientContext.setPushAcls(true);
    sharepointClientContext.setBatchHint(2);
    siteData = new SiteDataHelper(sharepointClientContext);
    aclHelper = new AclHelper(sharepointClientContext,
        TestConfiguration.sharepointUrl);
    globalState = TestConfiguration.initState(sharepointClientContext);
  }
View Full Code Here

    testDocs.add(spdocument2);

    SPDocumentList docList = new SPDocumentList(testDocs, globalState);
    assertNotNull(docList);

    aclHelper = new AclHelper(sharepointClientContext, webState.getWebUrl());
    aclHelper.fetchAclForDocuments(docList, webState);
    for (SPDocument document : docList.getDocuments()) {
      assertNotNull(document);
      assertNotNull(document.getAclUsers());
      assertNotNull(document.getAclGroups());
View Full Code Here

    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());
View Full Code Here

    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());

    // Load Document for Root Web Home Page.
    SPDocument webDoc = siteData.getSiteData(webState);
    assertNotNull(webDoc);
    docsToPass.add(webDoc);

    // Load Documents scenarios for ACLs

    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID401, "401"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID402, "402"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID403, "403"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID404, "404"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID405, "405"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID406, "406"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID407, "407"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID408, "408"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID409, "409"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID410, "410"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID411, "411"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID412, "412"));
    docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID413, "413"));

    SPDocumentList docList = new SPDocumentList(docsToPass, globalState);
    assertNotNull(docList)
    System.out.println("\n...Processing doclist..." + docList);

    aclHelper.fetchAclForDocuments(docList, webState);
    for (SPDocument document : docList.getDocuments()) {
      assertNotNull(document);      
      if (document.getUrl().
          equalsIgnoreCase(TestConfiguration.SearchDocID401)) {
        // Search Doc ID 401 - List item with Inheriting permissions.
View Full Code Here

  public void testGetAclChangesSinceToken() throws Exception {
    WebState webstate = globalState.lookupWeb(TestConfiguration.Site1_URL, sharepointClientContext);
    String changeToken = "1;1;1648c1de-0093-4fb8-a888-f032f5a2da4c;634103077352630000;2263";
    webstate.setNextAclChangeToken(changeToken);
    webstate.commitAclChangeToken();
    aclHelper = new AclHelper(this.sharepointClientContext,
        webstate.getWebUrl());
    aclHelper.fetchAclChangesSinceTokenAndUpdateState(webstate);
    assertNotSame("Change Token is not updated", changeToken, webstate.getNextAclChangeToken());
  }
View Full Code Here

    ListState listState = globalState.lookupList(TestConfiguration.Site1_URL, TestConfiguration.Site1_List1_GUID);
    assertNotNull(listState);
    listState.startAclCrawl();
    ListsHelper listHelper = new ListsHelper(sharepointClientContext);
    assertNotNull(listHelper);
    aclHelper = new AclHelper(this.sharepointClientContext,
        listState.getParentWebState().getWebUrl());
    List<SPDocument> docs = aclHelper.getListItemsForAclChangeAndUpdateState(
        listState, listHelper);
    assertNotNull(docs);
  }
View Full Code Here

    assertNotNull(docs);
  }

  public void testResolveSPGroup() throws Exception {
    String[] groupIds = { "1", "[GSSiteCollectionAdministrator]", "5" };
    aclHelper = new AclHelper(this.sharepointClientContext,
        TestConfiguration.sharepointUrl);
    GssResolveSPGroupResult result = aclHelper.resolveSPGroup(groupIds);
    assertNotNull(result);
    assertNotNull(result.getPrinicpals());
    assertEquals(result.getPrinicpals().length, groupIds.length);
View Full Code Here

    assertNotNull(result.getPrinicpals());
    assertEquals(result.getPrinicpals().length, groupIds.length);
  }

  public void testCheckConnectivity() throws Exception {
    aclHelper = new AclHelper(sharepointClientContext,
        TestConfiguration.sharepointUrl);
    try {
      aclHelper.checkConnectivity();
    } catch (Exception e) {
      fail();
View Full Code Here

TOP

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

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.