Examples of ITime


Examples of com.google.enterprise.connector.dctm.dfcwrap.ITime

    ISession session = sessionManager.getSession(DmInitialize.DM_DOCBASE);
    IId id = dctmClientX.getId(DmInitialize.DM_ID1);

    ISysObject object = (ISysObject) session.getObject(id);

    ITime lastModifDate = object.getTime("r_modify_date");

    DctmSysobjectDocument dctmSpm = new DctmSysobjectDocument(
        traversalManager, session, DmInitialize.DM_ID1, null, lastModifDate,
        SpiConstants.ActionType.ADD, null);
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.ITime

  public void testFindProperty() throws RepositoryException {
    ISession session = sessionManager.getSession(DmInitialize.DM_DOCBASE);
    IId id = dctmClientX.getId(DmInitialize.DM_ID2);
    ISysObject object = (ISysObject) session.getObject(id);
    ITime lastModifDate = object.getTime("r_modify_date");

    DctmSysobjectDocument dctmSpm = new DctmSysobjectDocument(
        traversalManager, session, DmInitialize.DM_ID2, null, lastModifDate,
        SpiConstants.ActionType.ADD, null);
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.ITime

          }
        } else if (isOpen(collectionAclToModify)
            && collectionAclToModify.next()) {
          logger.fine("Looking through the collection of ACLs to modify");
          String eventId = "";
          ITime aclModifyDate = null;
          eventId = collectionAclToModify.getString("r_object_id");
          aclModifyDate = collectionAclToModify.getTime("time_stamp_utc");
          logger.fine("audit event r_object_id is " + eventId
              + ", modifyDate is " + aclModifyDate.getDate());
          checkpoint.setAclModifyCheckpoint(aclModifyDate.getDate(), eventId);

          String chronicleId = collectionAclToModify.getString("chronicle_id");
          if (aclModifiedIds.contains(chronicleId)) {
            logger.fine("Skipping redundant modify of: "
                + chronicleId);
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.ITime

      while (retDoc == null) {
        if (isOpen(collectionToAdd) && collectionToAdd.next()) {
          logger.fine("Looking through the collection of documents to add");

          String objId = "";
          ITime modifyDate = null;
          try {
            objId = collectionToAdd.getString("r_object_id");
            modifyDate = collectionToAdd.getTime("r_modify_date");
            logger.fine("r_object_id is " + objId + "  modifyDate is "
                        + modifyDate.getDate());
          } catch (RepositoryException e) {
            logger.severe("impossible to get the r_object_id of the document");
            return null;
          }
          checkpoint.setInsertCheckpoint(modifyDate.getDate(), objId);

          dctmSysobjectDocument = new DctmSysobjectDocument(traversalManager,
              session, objId, collectionToAdd.getString("i_chronicle_id"),
              modifyDate, SpiConstants.ActionType.ADD, checkpoint);

          logger.fine("Creation of a new dctmSysobjectDocument to add");
          retDoc = dctmSysobjectDocument;
        } else if (isOpen(collectionToDel) && collectionToDel.next()) {
          logger.fine("Looking through the collection of documents to remove");

          String eventId = "";
          ITime deleteDate = null;
          try {
            eventId = collectionToDel.getString("r_object_id");
            deleteDate = collectionToDel.getTime("time_stamp_utc");
            logger.fine("delete event r_object_id is " + eventId
                        + "  deleteDate is " + deleteDate.getDate());
          } catch (RepositoryException e) {
            logger.warning("impossible to get the r_object_id of the delete event");
            return null;
          }
          checkpoint.setDeleteCheckpoint(deleteDate.getDate(), eventId);

          String chronicleId = collectionToDel.getString("chronicle_id");

          // Deleting multiple versions can post multiple dm_destroy and
          // dm_prune events with the same chronicle_id.  We only want to
          // send a single delete request to the GSA.
          if (deletedIds.contains(chronicleId)) {
            logger.fine("Skipping redundant delete of version: " + chronicleId);
            continue; // Already deleted this chronicle_id in this batch.
          }

          // If we are deleting the last version of a document, remove it
          // from the index.  If we may be deleting the latest version of
          // the document, force the new latest version to be re-indexed.
          ICollection versions = null;
          try {
            versions = getCurrentVersion(chronicleId);
            if (versions != null && versions.next()) {
              ITime lastModify = versions.getTime("r_modify_date");
              if (lastModify.getDate().before(deleteDate.getDate())) {
                // We may have deleted the latest version, so refeed the
                // current latest version.
                dctmSysobjectDocument = new DctmSysobjectDocument(
                    traversalManager, session,
                    versions.getString("r_object_id"), chronicleId,
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.ITime

    }
  }

  public void testGetTime() {
    try {
      ITime time = object.getTime("timestamp");
      assertNotNull(time);
    } catch (RepositoryException e) {
      // TODO: Why is this exception ignored?
    }
  }
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.