Package com.google.enterprise.connector.otex.client

Examples of com.google.enterprise.connector.otex.client.ClientValue


  public void testTraversal() throws RepositoryException {
    int objectId = getId();

    // Extract the LastModifiedDate of the DocID from Livelink
    // to forge a checkpoint.
    ClientValue docInfo = client.GetObjectInfo(0, objectId);
    Checkpoint checkpoint = new Checkpoint();
    checkpoint.setInsertCheckpoint(docInfo.toDate("ModifyDate"),
        objectId - 1);

    // Now push that one document
    TraversalManager mgr = sess.getTraversalManager();
    mgr.setBatchHint(1);
View Full Code Here


    public void testTraversal() throws Exception {
        int objectId = getId();

        // Extract the LastModifiedDate of the DocID from Livelink
        // to forge a checkpoint.
        ClientValue docInfo = client.GetObjectInfo(0, objectId);
        Checkpoint checkpoint = new Checkpoint();
        checkpoint.setInsertCheckpoint(docInfo.toDate("ModifyDate"),
                                       objectId - 1);

        // Now push that one document.
        TraversalManager mgr = sess.getTraversalManager();
        mgr.setBatchHint(1);
View Full Code Here

  public void testGetMissingEnterpriseWorkspaceAncestors_success()
      throws RepositoryException {
    connector.login();
    Client client = connector.getClientFactory().createClient();
    ClientValue results = connector.getMissingEnterpriseWorkspaceAncestors(
        client, 2000, -2000);
    if (results.size() > 0) {
      fail("Found " + results.size() + " results; first one is "
          + results.toString(0, "DataID"));
    }
  }
View Full Code Here

    jdbcFixture.executeUpdate(
        "delete from DTreeAncestors where DataID = 4104 and AncestorID = 2000");

    connector.login();
    Client client = connector.getClientFactory().createClient();
    ClientValue results = connector.getMissingEnterpriseWorkspaceAncestors(
        client, 2000, -2000);
    assertEquals(1, results.size());
    assertEquals(4104, results.toInteger(0, "DataID"));
  }
View Full Code Here

   * test.
   */
  public void testGetAttributeValue_all() throws RepositoryException {
    // We should not need attrInfo in this configuration.
    CategoryHandler categoryHandler = getObjectUnderTest("all");
    ClientValue attrInfo = null;

    assertNull(categoryHandler.searchableCache);
    getAttributeValue(categoryHandler, attrInfo);
    assertNull(categoryHandler.searchableCache);
  }
View Full Code Here

   * NullPointerException.
   */
  public void testGetAttributeValue_null() throws RepositoryException {
    // We should need attrInfo in this configuration.
    CategoryHandler categoryHandler = getObjectUnderTest("all,searchable");
    ClientValue attrInfo = null;

    try {
      getAttributeValue(categoryHandler, attrInfo);
      fail("Expected a NullPointerException");
    } catch (NullPointerException e) {
View Full Code Here

   */
  public void testGetAttributeValue_empty()
      throws RepositoryException {
    CategoryHandler categoryHandler = getObjectUnderTest("all,searchable");
    ClientValueFactory valueFactory = new MockClientValueFactory();
    ClientValue attrInfo = valueFactory.createAssoc();

    assertNull(categoryHandler.searchableCache);
    getAttributeValue(categoryHandler, attrInfo);
    assertNotNull(categoryHandler.searchableCache);
    assertTrue(categoryHandler.searchableCache.toString(),
View Full Code Here

   */
  public void testGetAttributeValue_search()
      throws RepositoryException {
    CategoryHandler categoryHandler = getObjectUnderTest("all,searchable");
    ClientValueFactory valueFactory = new MockClientValueFactory();
    ClientValue attrInfo = valueFactory.createAssoc();
    attrInfo.add("Search", true);

    assertNull(categoryHandler.searchableCache);
    getAttributeValue(categoryHandler, attrInfo);
    assertNull(categoryHandler.searchableCache);
  }
View Full Code Here

      Object dataSize = docInfo[3 * i + 1];
      Object userId = docInfo[3 * i + 2];
      values[i] = new Object[] {
        new Date(), objectId, 2000, 144, "text/plain", dataSize, userId, null };
    }
    ClientValue recArray = new MockClientValue(FIELDS, values);

    Field[] fields = new Field[FIELDS.length];
    for (int i = 0; i < fields.length; i++) {
      fields[i] = new Field(FIELDS[i], FIELDS[i]);
    }
View Full Code Here

  /**
   *  Forge a delete checkpoint from the last event in the audit log.
   */
  private void forgeInitialDeleteCheckpoint(Checkpoint checkpoint) {
    try {
      ClientValue results = getLastAuditEvent();
      if (results.size() > 0) {
        checkpoint.setDeleteCheckpoint(
            dateFormat.parse(results.toString(0, "AuditDate")),
            results.toValue(0, "EventID"));
      } else {
        LOGGER.fine("Unable to establish initial Deleted Items " +
            "Checkpoint: No query results.");
        checkpoint.setDeleteCheckpoint(new Date(), null);
      }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.otex.client.ClientValue

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.