Examples of replaceItemValue()


Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

    expect(embObj.getFileSize()).andReturn(1);

    NotesDocument docAttach = createNiceMock(NotesDocument.class);
    expect(cdb.createDocument()).andReturn(docAttach);
    Capture<String> captureContentPath = new Capture<String>();
    expect(docAttach.replaceItemValue(eq(NCCONST.ITM_CONTENTPATH),
        capture(captureContentPath))).andReturn(null);
    replay(ncs, ns, cdb, crawlQ, docCrawl, docSrc, docAttach, embObj);

    NotesCrawlerThread crawler = new NotesCrawlerThread(nc, ncs);
    crawler.connectQueue();
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      String repid = doc.getItemValueString(NCCONST.NCITM_REPLICAID);
     
      Vector<String> attachmentNames = new Vector<String>();
      attachmentNames.add("attachment1.doc");
      attachmentNames.add("attachment2.doc");
      doc.replaceItemValue(NCCONST.ITM_GMETAATTACHMENTDOCIDS, attachmentNames);
     
      notesDocManager.addIndexedDocument(doc, conn);
      Set<String> fileNames =
          notesDocManager.getAttachmentIds(conn, unid, repid);
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      throws RepositoryException {
    LOGGER.log(Level.FINEST, "Send deletion request to GSA for {0}",
        googleDocId);
    NotesDocument deleteReq = cdb.createDocument();
    deleteReq.appendItemValue(NCCONST.ITMFORM, NCCONST.FORMCRAWLREQUEST);
    deleteReq.replaceItemValue(NCCONST.ITM_ACTION,
        ActionType.DELETE.toString());
    deleteReq.replaceItemValue(NCCONST.ITM_DOCID, googleDocId);
    deleteReq.replaceItemValue(NCCONST.NCITM_STATE, NCCONST.STATEFETCHED);
    deleteReq.save(true);
    deleteReq.recycle();
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

        googleDocId);
    NotesDocument deleteReq = cdb.createDocument();
    deleteReq.appendItemValue(NCCONST.ITMFORM, NCCONST.FORMCRAWLREQUEST);
    deleteReq.replaceItemValue(NCCONST.ITM_ACTION,
        ActionType.DELETE.toString());
    deleteReq.replaceItemValue(NCCONST.ITM_DOCID, googleDocId);
    deleteReq.replaceItemValue(NCCONST.NCITM_STATE, NCCONST.STATEFETCHED);
    deleteReq.save(true);
    deleteReq.recycle();
  }
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

    NotesDocument deleteReq = cdb.createDocument();
    deleteReq.appendItemValue(NCCONST.ITMFORM, NCCONST.FORMCRAWLREQUEST);
    deleteReq.replaceItemValue(NCCONST.ITM_ACTION,
        ActionType.DELETE.toString());
    deleteReq.replaceItemValue(NCCONST.ITM_DOCID, googleDocId);
    deleteReq.replaceItemValue(NCCONST.NCITM_STATE, NCCONST.STATEFETCHED);
    deleteReq.save(true);
    deleteReq.recycle();
  }

  /**
 
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      attachDoc = cdb.createDocument();
      crawlDoc.copyAllItems(attachDoc, true);

      // Store the filename of this attachment in the attachment crawl doc.
      attachDoc.replaceItemValue(NCCONST.ITM_GMETAATTACHMENTFILENAME,
          AttachmentName);
      attachDoc.save();

      // Compute display URL
      String encodedAttachmentName = null;
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

        eo.recycle();
        return null;
      }
      AttachmentURL = String.format(NCCONST.SITM_ATTACHMENTDISPLAYURL,
          getHTTPURL(crawlDoc), encodedAttachmentName);
      attachDoc.replaceItemValue(NCCONST.ITM_DISPLAYURL, AttachmentURL);
      LOGGER.log(Level.FINEST, "Attachment display url: {0}", AttachmentURL);

      // Compute docid
      String attachNameHash = Util.hash(AttachmentName);
      if (attachNameHash == null) {
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      if (attachNameHash == null) {
        return null;
      }
      String docURL = String.format(NCCONST.SITM_ATTACHMENTDOCID,
          getHTTPURL(crawlDoc), attachNameHash);
      attachDoc.replaceItemValue(NCCONST.ITM_DOCID, docURL);
      LOGGER.log(Level.FINEST, "Attachment document docid: {0}", docURL);
     
      // Only if we have a supported mime type and file size is not exceeding
      // the limit do we send the content, or only metadata and file name will
      // be sent.
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      // Only if we have a supported mime type and file size is not exceeding
      // the limit do we send the content, or only metadata and file name will
      // be sent.
      if ((0 != MimeType.length()) &&
          eo.getFileSize() <= ncs.getMaxFileSize()) {
        attachDoc.replaceItemValue(NCCONST.ITM_MIMETYPE, MimeType);
        String attachmentPath = getAttachmentFilePath(crawlDoc, attachNameHash);
        eo.extractFile(attachmentPath);
        attachDoc.replaceItemValue(NCCONST.ITM_CONTENTPATH, attachmentPath);
      } else {
        // Not a supported attachment so sending meta data only
View Full Code Here

Examples of com.google.enterprise.connector.notes.client.NotesDocument.replaceItemValue()

      if ((0 != MimeType.length()) &&
          eo.getFileSize() <= ncs.getMaxFileSize()) {
        attachDoc.replaceItemValue(NCCONST.ITM_MIMETYPE, MimeType);
        String attachmentPath = getAttachmentFilePath(crawlDoc, attachNameHash);
        eo.extractFile(attachmentPath);
        attachDoc.replaceItemValue(NCCONST.ITM_CONTENTPATH, attachmentPath);
      } else {
        // Not a supported attachment so sending meta data only
        // with the filename as content
        attachDoc.replaceItemValue(NCCONST.ITM_CONTENT, AttachmentName);
        attachDoc.replaceItemValue(NCCONST.ITM_MIMETYPE,
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.