Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.ConnectorPersistentStore


    connector.setGoogleConnectorName("javatests");
    connector.setPolicyAclPattern(
        "^googleconnector://{0}.localhost/doc?docid={1}");

    connector.setGoogleConnectorName("notestest");
    connector.setDatabaseAccess(new ConnectorPersistentStore() {
        @Deprecated @Override
        public com.google.enterprise.connector.spi.LocalDocumentStore
            getLocalDocumentStore() {
          return null;
        }
View Full Code Here


    connector.setGoogleGlobalNamespace("GlobalNamespace");

    // Initialize this to prevent NotesConnector from creating one.
    connector.maintThread = new NotesMaintenanceThread();
    connector.setGoogleConnectorName("notestest");
    connector.setDatabaseAccess(new ConnectorPersistentStore() {
        @Deprecated @Override
        public com.google.enterprise.connector.spi.LocalDocumentStore
            getLocalDocumentStore() {
          return null;
        }
View Full Code Here

      throws InstantiatorException {
    try {
      if (connectorPersistentStoreFactory != null) {
        Connector connector = instanceInfo.getConnector();
        if (connector instanceof ConnectorPersistentStoreAware) {
          ConnectorPersistentStore pstore =
            connectorPersistentStoreFactory.newConnectorPersistentStore(
                 instanceInfo.getName(),
                 instanceInfo.getTypeInfo().getConnectorTypeName(),
                 instanceInfo.getTypeInfo().getConnectorType());
          LOGGER.config("Setting DatabasePersistentStore for connector " + name);
View Full Code Here

    // assume the JdbcDatabase is functional.
    jdbcDatabase.getDataSource().getConnection().close();

    final LocalDatabase localDatabase =
        new LocalDatabaseImpl(jdbcDatabase, connectorTypeName, connectorType);
    return new ConnectorPersistentStore() {
      @Override
      public com.google.enterprise.connector.spi.LocalDocumentStore getLocalDocumentStore() {
        return null;
      }
View Full Code Here

  public void testNewConnectorPersistentStore() throws Exception {
    JdbcDatabase database = new TestJdbcDatabase();
    ConnectorPersistentStoreFactory factory =
        new ConnectorPersistentStoreFactory(database);

    ConnectorPersistentStore cpStore =
        factory.newConnectorPersistentStore("test", "TestConnectorA", null);
    assertNotNull(cpStore);

    LocalDatabase localDb = cpStore.getLocalDatabase();
    assertNotNull(localDb);
    assertSame(database.getDataSource(), localDb.getDataSource());
    assertEquals(database.getDatabaseType(), localDb.getDatabaseType());

    assertNull(cpStore.getLocalDocumentStore());
  }
View Full Code Here

    JdbcDatabase database = new JdbcDatabase(new FakeDataSource("Fake"));
    ConnectorPersistentStoreFactory factory =
        new ConnectorPersistentStoreFactory(database);

    try {
      ConnectorPersistentStore cpStore =
          factory.newConnectorPersistentStore("test", "TestConnectorA", null);
      fail("Expected a SQLException, but got none.");
    } catch (SQLException expected) {
      assertEquals("Fake JDBC DataSource has not been configured.",
                   expected.getMessage());
View Full Code Here

  static private Session initSession(SharepointConnector connector) throws Exception {
    TestJdbcDatabase database = new TestJdbcDatabase();
    ConnectorPersistentStoreFactory factory =
        new ConnectorPersistentStoreFactory(database);
    ConnectorPersistentStore store =
        factory.newConnectorPersistentStore("test", "Sharepoint", null);
    connector.setUserGroupMembershipRowMapper(
        TestConfiguration.getUserGroupMembershipRowMapper());
    connector.setQueryProvider(
        TestConfiguration.getUserDataStoreQueryProvider());
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.ConnectorPersistentStore

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.