Package com.google.enterprise.connector.notes.client

Examples of com.google.enterprise.connector.notes.client.NotesSession


        (NotesConnectorSession) connector.login();
    SimpleTraversalContext context = new SimpleTraversalContext();
    context.setSupportsInheritedAcls(supportsInheritedAcls);
    ((NotesTraversalManager) connectorSession.getTraversalManager())
        .setTraversalContext(context);
    NotesSession session = connectorSession.createNotesSession();
    NotesDatabaseMock connectorDatabase =
        (NotesDatabaseMock) session.getDatabase(
        connectorSession.getServer(), connectorSession.getDatabase());

    NotesConnectorDocument document = new NotesConnectorDocument(
        connectorSession, session, connectorDatabase);
    document.setCrawlDoc("unid", crawlDoc);
View Full Code Here


      return;
    }
    NotesDocumentMock crawlDoc = getCrawlDatabaseAcl();
    NotesConnectorSession connectorSession =
        (NotesConnectorSession) connector.login();
    NotesSession session = connectorSession.createNotesSession();
    NotesDatabaseMock connectorDatabase =
        (NotesDatabaseMock) session.getDatabase(
        connectorSession.getServer(), connectorSession.getDatabase());

    NotesConnectorDocument document = new NotesConnectorDocument(
        connectorSession, session, connectorDatabase);
    document.setCrawlDoc("unid", crawlDoc);
View Full Code Here

      return;
    }
    NotesDocumentMock crawlDoc = getCrawlDatabaseAcl();
    NotesConnectorSession connectorSession =
        (NotesConnectorSession) connector.login();
    NotesSession session = connectorSession.createNotesSession();
    NotesDatabaseMock connectorDatabase =
        (NotesDatabaseMock) session.getDatabase(
        connectorSession.getServer(), connectorSession.getDatabase());
    NotesConnectorDocument document = new NotesConnectorDocument(
        connectorSession, session, connectorDatabase);
    document.setCrawlDoc("unid", crawlDoc);
View Full Code Here

        new NotesItemMock("name", NCCONST.ITM_GMETANOTESLINK,
            "type", NotesItem.TEXT, "values", "notes url"));

    NotesConnectorSession connectorSession =
        (NotesConnectorSession) connector.login();
    NotesSession session = connectorSession.createNotesSession();
    NotesDatabase configDb = session.getDatabase("testserver",
        "testconfig.nsf");
    NotesView crawlQueue = configDb.getView(NCCONST.VIEWCRAWLQ);
    assertEquals(1, crawlQueue.getEntryCount());
    NotesDocument docFromQueue = NotesCrawlerThread.getNextFromCrawlQueue(
        session, crawlQueue);
View Full Code Here

        + "this_is_a_very_long_file_name_this_is_a_very_long_file_name_"
        + "this_is_a_very_long_file_name_this_is_a_very_long_file_name.doc";

    NotesConnector nc = createNiceMock(NotesConnector.class);
    NotesConnectorSession ncs = createNiceMock(NotesConnectorSession.class);
    NotesSession ns = createMock(NotesSession.class);
    NotesDatabase cdb = createNiceMock(NotesDatabase.class);
    NotesView crawlQ = createNiceMock(NotesView.class);
    expect(ncs.getServer()).andReturn("domino1");
    expect(ncs.getDatabase()).andReturn("gsaconfig.nsf");
    expect(ncs.getSpoolDir()).andReturn("spooldir");
    expect(ncs.createNotesSession()).andReturn(ns);
    expect(ns.getDatabase(isA(String.class), isA(String.class))).andReturn(cdb);
    expect(cdb.getView(isA(String.class))).andReturn(crawlQ);
    expect(cdb.getReplicaID()).andReturn("REPLICA100");

    NotesDocument docCrawl = createNiceMock(NotesDocument.class);
    expect(docCrawl.getUniversalID()).andReturn("UNID100");
View Full Code Here

   *            a String representing the last document number processed.
   */
  private DocumentList traverse(String checkpoint) {
    final String METHOD = "traverse";
    List<String> unidList = new ArrayList<String>(batchHint);
    NotesSession ns = null;

    try {
      LOGGER.entering(CLASS_NAME, METHOD);
      if (ncs.getUserGroupManager().isCacheInitialized() == false) {
        LOGGER.log(Level.FINE, "Skip traversal until cache is initialized");
        return null;
      }

      LOGGER.logp(Level.FINE, CLASS_NAME, METHOD,
          "Resuming from checkpoint: " + checkpoint);

      ns = ncs.createNotesSession();
      NotesDatabase cdb = ns.getDatabase(ncs.getServer(), ncs.getDatabase());

      // Poll for changes
      // TODO:  Consider moving this to the housekeeping thread
      // Since it takes two polling cycles to get documents into the GSA
      // if the system is idle
View Full Code Here

  public void testDatabaseAcls() throws Exception {
    if (documents == null) {
      return;
    }

    NotesSession session = connectorSession.createNotesSession();
    try {
      NotesDatabase connectorDatabase = session.getDatabase(
          connectorSession.getServer(), connectorSession.getDatabase());
      NotesView databaseView = connectorDatabase.getView(
          NCCONST.VIEWDATABASES);
      NotesDocument databaseDocument = databaseView.getFirstDocument();
      while (databaseDocument != null) {
View Full Code Here

        "type", NotesItem.TEXT, "values", connector.getServer()));
    databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_DOMAIN,
        "type", NotesItem.TEXT, "values",
        connectorSession.getDomain(connector.getServer())));

    NotesSession session = connectorSession.createNotesSession();
    NotesDatabaseMock connectorDatabase =
        (NotesDatabaseMock) session.getDatabase(
        connectorSession.getServer(), connectorSession.getDatabase());

    /*
    // Add the test groups to the group cache.
    NotesDocumentMock connectorGroup = new NotesDocumentMock();
View Full Code Here

            " using " + ncs.getUsernameType() + " username type");
        ArrayList<String> userGroups = new ArrayList<String>(user.getGroups());
        LOGGER.logp(Level.FINE, CLASS_NAME, METHOD,
            "Groups for " + gsaName + " are: " + userGroups);

        NotesSession ns = null;
        try {
          ns = ncs.createNotesSession();
          NotesDatabase cdb =
              ns.getDatabase(ncs.getServer(), ncs.getDatabase());
          NotesView securityView = cdb.getView(NCCONST.VIEWSECURITY);
          for (String docId : docIds) {
            NotesViewNavigator secVN = null;
            NotesDocument dbdoc = null;
            try {
View Full Code Here

  // This method will reset any documents in the crawl queue that are
  // in the INCRAWL state back to NEW state
  public static void resetCrawlQueue(NotesConnectorSession ncs) {
    final String METHOD = "resetCrawlQueue";
    NotesSession ns = null;

    LOGGER.entering(CLASS_NAME, METHOD);
    try {
      ns = ncs.createNotesSession();
      NotesDatabase cdb = ns.getDatabase(
          ncs.getServer(), ncs.getDatabase());

      // Reset the last update date for each configured database
      NotesView incrawlView = cdb.getView(NCCONST.VIEWINCRAWL);
      incrawlView.refresh();
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.notes.client.NotesSession

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.