Examples of IObjectSet


Examples of com.google.enterprise.connector.filenet4.filewrap.IObjectSet

  }

  private DocumentList getDocumentList(String[][] entries,
      List<AccessPermission>... perms) throws Exception {
    MockObjectStore objectStore = getObjectStore(entries, perms);
    IObjectSet objectSet = getObjectSet(objectStore);
    assertNotNull(objectStore);
    assertEquals(entries.length, objectSet.getSize());
    return new FileDocumentList(objectSet, new EmptyObjectSet(),
        new EmptyObjectSet(), objectStore, connector, null);
  }
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IObjectSet

   * Test method for
   * 'com.google.enterprise.connector.file.filejavawrap.FnObjectFactory.getSearch(IObjectStore)'
   */
  public void testGetSearch() throws RepositoryException {
    ISearch is = iof.getSearch(ios);
    IObjectSet test = is.execute(
        "SELECT TOP 50 d.Id, d.DateLastModified FROM Document AS d WHERE d.Id='"
        + TestConnection.docId1 + "' and VersionStatus=1 "
        + "and ContentSize IS NOT NULL  AND (ISCLASS(d, Document) "
        + "OR ISCLASS(d, WorkflowDefinition))  ORDER BY DateLastModified,Id");
    assertEquals(1, test.getSize());
    Iterator<? extends IBaseObject> it = test.getIterator();
    while (it.hasNext()) {
      IBaseObject ibo = it.next();
      assertEquals("{" + TestConnection.docId1 + "}", ibo.get_Id().toString());
    }
  }
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IObjectSet

    assertEquals(10, counter);
  }

  public void testEmptyObjectStoreMock() throws Exception {
    IObjectStore os = createNiceMock(IObjectStore.class);
    IObjectSet objectSet = createNiceMock(IObjectSet.class);

    IObjectFactory factory = createMock(IObjectFactory.class);
    ISearch search = createMock(ISearch.class);
    expect(factory.getSearch(os)).andReturn(search);
    expect(search.execute(isA(String.class))).andReturn(objectSet).times(2);
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IObjectSet

    // to add
    String query = buildQueryString(checkPoint);

    ISearch search = fileObjectFactory.getSearch(objectStore);
    LOGGER.log(Level.INFO, "Query to Add document: " + query);
    IObjectSet objectSet = search.execute(query);
    LOGGER.log(Level.INFO, "Number of documents sent to GSA: "
        + objectSet.getSize());

    // to delete for deleted documents
    String queryStringToDelete = buildQueryToDelete(checkPoint);
    LOGGER.log(Level.INFO, "Query to get deleted documents (Documents deleted from repository): "
            + queryStringToDelete);
    IObjectSet objectSetToDelete = search.execute(queryStringToDelete);
    LOGGER.log(Level.INFO, "Number of documents whose index will be deleted from GSA (Documents deleted form Repository): "
        + objectSetToDelete.getSize());

    // to delete for additional delete clause
    IObjectSet objectSetToDeleteDocs;
    if (Strings.isNullOrEmpty(connector.getDeleteAdditionalWhereClause())) {
      objectSetToDeleteDocs = new EmptyObjectSet();
    } else {
      String queryStringToDeleteDocs = buildQueryStringToDeleteDocs(checkPoint,
          connector.getDeleteAdditionalWhereClause());

      LOGGER.log(Level.INFO, "Query to get documents satisfying the delete where clause: "
              + queryStringToDeleteDocs);
      objectSetToDeleteDocs = search.execute(queryStringToDeleteDocs);
      LOGGER.log(Level.INFO, "Number of documents whose index will be deleted from GSA (Documents satisfying the delete where clause): "
              + objectSetToDeleteDocs.getSize());
    }
    if ((objectSet.getSize() > 0)
        || (objectSetToDeleteDocs.getSize() > 0)
        || (objectSetToDelete.getSize() > 0)) {
      return new FileDocumentList(objectSet, objectSetToDeleteDocs,
          objectSetToDelete, objectStore, connector, checkPoint);
    } else {
      return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.