Package com.google.enterprise.connector.sharepoint.state

Examples of com.google.enterprise.connector.sharepoint.state.WebState


    assertFalse(webCrawlInfo.isNoCrawl());
  }

  public final void testUpdateListCrawlInfo() throws Exception {
    GlobalState globalState = TestConfiguration.initState(sharepointClientContext);
    WebState ws = globalState.lookupWeb(TestConfiguration.Site1_URL, sharepointClientContext);
    assertNotNull(ws);

    Set<ListState> allListStates = ws.getAllListStateSet();
    assertNotNull(allListStates);
    assertTrue(allListStates.size() > 0);

    // isNoCrawl should initially be false.
    for (ListState listState : allListStates) {
View Full Code Here


    String siteUrl = TestConfiguration.sharepointUrl;
    int principalId = 123;
    String principalName = "group1";

    UserDataStoreDAO dao = createMock(UserDataStoreDAO.class);
    WebState webState = createMock(WebState.class);
    webState.addSPGroupToResolve(String.valueOf(principalId));
    replay(dao, webState);

    SharepointClientContext clientContext =
        TestConfiguration.initContext(new MockClientFactory());
    clientContext.setUserDataStoreDAO(dao);
View Full Code Here

  public void testTraverse() throws SharepointException {
    System.out.println("Testing [ testTraverse() ]...");
    final int iPageSizeHint = 100;
    this.sharepointClient.updateGlobalState(this.globalState);
    Set<WebState> webStates = this.globalState.getAllWebStateSet();
    WebState curr_webState = webStates.iterator().next();
    SPDocumentList rs = this.sharepointClient.traverse(this.globalState,
        curr_webState, iPageSizeHint, false);
    int numDocs = 0;
    try {
      System.out.println("Documents found - ");
View Full Code Here

   */
  public void testTraverseToCheckValidLists() throws SharepointException {
    SharepointClientContext spContext = TestConfiguration.initContext();
    spContext.setBatchHint(Integer.MAX_VALUE);
    GlobalState gs = TestConfiguration.initState(spContext);
    WebState ws = gs.lookupWeb(TestConfiguration.Site1_URL, spContext);
    SharepointClient spclient = new SharepointClient(clientFactory, spContext);

    // Traverse the lists for the given web state
    spclient.traverse(gs, ws, 50, true);

View Full Code Here

    SharepointClientContext spContext = TestConfiguration.initContext();
    spContext.setBatchHint(Integer.MAX_VALUE);
    spContext.setAclBatchSizeFactor(2);
    spContext.setFetchACLInBatches(true);
    GlobalState gs = TestConfiguration.initState(spContext);
    WebState ws = gs.lookupWeb(TestConfiguration.Site1_URL, spContext);
    SharepointClient spclient = new SharepointClient(clientFactory, spContext);

    SPDocument doc = new SPDocument("122", TestConfiguration.Site1_List1_URL,
        Calendar.getInstance(), ActionType.ADD);
View Full Code Here

    spContext.setPushAcls(false);

    SharepointClient spclient = new SharepointClient(clientFactory, spContext);

    GlobalState gs = TestConfiguration.initState(spContext);
    WebState ws = gs.lookupWeb(TestConfiguration.Site1_URL, spContext);

    // Test that when feeding ACLs is turned off, you still get true to
    // indicate docs need to be fed to GSA
    assertTrue(spclient.handleACLForDocuments(null, ws, gs, false));
View Full Code Here

    SharepointClientContext spContext = getSharePointClientContext();
    SharepointClient spClient =
        new SharepointClient(spContext.getClientFactory(), spContext);
    GlobalState globalState = new GlobalState(
        spContext.getClientFactory(),"temp",FeedType.CONTENT_FEED);
    WebState dummyWebState = globalState.makeWebState(
        spContext, "http://sharepoint.example.com/defaul.aspx");

    ListState list1 = new ListState("{GUID_LIST_1}", "List1", "GenericList",
        Calendar.getInstance(), "List",
        "http://sharepoint.example.com/List1/AllItems.aspx", dummyWebState);
    dummyWebState.AddOrUpdateListStateInWebState(
        list1, Util.calendarToJoda(Calendar.getInstance()));
    ListState list2 = new ListState("{GUID_LIST_2}", "List2", "GenericList",
        Calendar.getInstance(), "List",
        "http://sharepoint.example.com/List2/AllItems.aspx", dummyWebState);
    dummyWebState.AddOrUpdateListStateInWebState(
        list2, Util.calendarToJoda(Calendar.getInstance()));

    List<SPDocument> list1CrawlQueue = new ArrayList<SPDocument>();
    SPDocument correctDocument = new SPDocument(
        "LIST_ITEM_1", "http://sharepoint.example.com/List1/DispForm.aspx?ID=1",
View Full Code Here

    SharepointClientContext spContext = getSharePointClientContext();
    SharepointClient spClient =
        new SharepointClient(spContext.getClientFactory(), spContext);
    GlobalState globalState = new GlobalState(
        spContext.getClientFactory(),"temp",FeedType.CONTENT_FEED);
    WebState dummyWebState = globalState.makeWebState(
        spContext, "http://sharepoint.example.com/defaul.aspx");

    ListState list1 = new ListState("{GUID_LIST_1}", "List1", "GenericList",
        Calendar.getInstance(), "List",
        "http://sharepoint.example.com/List1/AllItems.aspx", dummyWebState);
    dummyWebState.AddOrUpdateListStateInWebState(
        list1, Util.calendarToJoda(Calendar.getInstance()));
    ListState list2 = new ListState("{GUID_LIST_2}", "List2", "GenericList",
        Calendar.getInstance(), "List",
        "http://sharepoint.example.com/List2/AllItems.aspx", dummyWebState);
    dummyWebState.AddOrUpdateListStateInWebState(
        list2, Util.calendarToJoda(Calendar.getInstance()));

    List<SPDocument> list1CrawlQueue = new ArrayList<SPDocument>();
    SPDocument document0 = new SPDocument(
        "LIST_ITEM_1", "http://sharepoint.example.com/List1/DispForm.aspx?ID=1",
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.sharepoint.state.WebState

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.