Package com.google.enterprise.connector.spi

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


   */
  public void setupConnector(String connectorName, String resourceName) {
    MockRepositoryEventList mrel = new MockRepositoryEventList(resourceName);
    MockRepository mockRepository = new MockRepository(mrel);
    Repository repository = new MockJcrRepository(mockRepository);
    Connector connector = new JcrConnector(repository);
    addConnector(connectorName, connector);
  }
View Full Code Here


  @SuppressWarnings("unchecked")
  private void setDatabaseAccess(InstanceInfo instanceInfo)
      throws InstantiatorException {
    try {
      if (connectorPersistentStoreFactory != null) {
        Connector connector = instanceInfo.getConnector();
        if (connector instanceof ConnectorPersistentStoreAware) {
          ConnectorPersistentStore pstore =
            connectorPersistentStoreFactory.newConnectorPersistentStore(
                 instanceInfo.getName(),
                 instanceInfo.getTypeInfo().getConnectorTypeName(),
View Full Code Here

  protected Connector fromConfigurationTest(String connectorName,
      String connectorDir, TypeInfo typeInfo, Configuration configuration,
      Class<? extends Exception> expectedException, String expectedMessage)
      throws Exception {
    try {
      Connector connector =
          newInstance(connectorName, connectorDir, typeInfo, configuration);
      assertNull("Expected exception but got none", expectedException);
      assertNotNull(connector);
      return connector;
    } catch (Exception e) {
View Full Code Here

       NoBeansFoundException.class, null);
  }

  /** Test custom connectorInstance.xml. */
  public final void testCustomInstancePrototype() throws Exception {
    Connector connector = fromDirectoryTest("fred",
        "testdata/connectorInstanceTests/custom1",
        "testdata/connectorTypeTests/positive/connectorType.xml",
        null, null);

    assertTrue("Connector should be of type CustomProtoTestConnector",
View Full Code Here

        FactoryCreationFailureException.class, null);
  }

  /** Test overspecified properties. */
  public final void testOverspecifiedProperties() throws Exception {
    Connector connector = fromDirectoryTest("fred",
        "testdata/connectorInstanceTests/overspecifiedProperties",
        "testdata/connectorTypeTests/positive/connectorType.xml",
        null, null);

    assertTrue("Connector should be of type CustomProtoTestConnector",
View Full Code Here

  /**
   * Testing case where Connector wants to specify some default properties that
   * can be overridden.
   */
  public final void testDefaultProperties() throws Exception {
    Connector connector = fromDirectoryTest("fred",
        "testdata/connectorInstanceTests/default",
        "testdata/connectorTypeTests/default/connectorType.xml",
        null, null);

    assertTrue("Connector should be of type SimpleTestConnector",
View Full Code Here

      cfg.postProcessBeanFactory(factory);
    } catch (BeansException e) {
      throw new PropertyProcessingFailureException(e, prototype, name);
    }

    Connector connector = null;
    try {
      connector = (Connector) context.getBean(factory, null, Connector.class);
    } catch (BeansException e) {
      throw new BeanInstantiationFailureException(e, prototype, name,
          Connector.class.getName());
View Full Code Here

  public void testTraversal() throws RepositoryLoginException, RepositoryException {
    MockRepositoryEventList mrel =
      new MockRepositoryEventList("MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    javax.jcr.Repository jcrRepo = new MockJcrRepository(r);
    Connector repo = new JcrConnector(jcrRepo);
    Session session = repo.login();
    TraversalManager qtm = session.getTraversalManager();
    QueryTraversalUtil.runTraversal(qtm, 2);
  }
View Full Code Here

TOP

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

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.