Package com.google.enterprise.connector.manager

Examples of com.google.enterprise.connector.manager.Context


    return instantiator;
  }

  private Instantiator createRealInstantiator() {
    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(APPLICATION_CONTEXT,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    SpringInstantiator si = (SpringInstantiator) context.getRequiredBean(
        "Instantiator", SpringInstantiator.class);
    si.init();

    // Instantiate a couple of connectors.
    addConnector(si, "connectorA", "TestConnectorA",
View Full Code Here


  @Override
  protected void setUp() {
    // Create a stand alone context with real ProductionManager.
    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(Context.DEFAULT_JUNIT_CONTEXT_LOCATION,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    context.setFeeding(false);
    context.start();
    manager = context.getManager();
    instantiator = context.getInstantiator();
  }
View Full Code Here

    ConnectorTestUtils.deleteAllFiles(baseDirectory);
    // Then recreate it empty.
    assertTrue(baseDirectory.mkdirs());

    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(APPLICATION_CONTEXT,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    SpringInstantiator si = (SpringInstantiator) context.getRequiredBean(
        "Instantiator", SpringInstantiator.class);
    si.init();

    typeInfo = getTypeMap().getTypeInfo("TestConnectorA");
    Assert.assertNotNull(typeInfo);
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    refreshContext();
    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(APPLICATION_CONTEXT,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    getTypeMap().init();
  }
View Full Code Here

    getTypeMap().init();
  }

  private void refreshContext() throws Exception {
    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(APPLICATION_CONTEXT,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    getTypeMap().init();
  }
View Full Code Here

    return (ConnectorCoordinatorMap) Context.getInstance().getRequiredBean(
        "ConnectorCoordinatorMap", ConnectorCoordinatorMap.class);
  }

  private void addConnector(String name, String color) throws Exception {
    Context context = Context.getInstance();
    ConnectorCoordinatorMap ccm = getCoordinatorMap();
    ConnectorCoordinator coordinator = ccm.getOrAdd(name);
    String typeName = "TestConnectorA";
    Map<String, String> configMap = new HashMap<String, String>(CONFIG_MAP);
    configMap.put("Color", color);
View Full Code Here

  }

  // Tests the correct construction of List<ImportExportConnector> from
  // an existing installation.
  public final void testGetConnectors() throws Exception {
    Context context = Context.getInstance();
    ConnectorCoordinatorMap ccm = getCoordinatorMap();

    addConnector("connector-01", "red");
    addConnector("connector-02", "blue");
View Full Code Here

  // Test that the exported XML is in the legacy ImportExport
  // format for the GSA: Stringified Schedules, no traversal state,
  // plain-text passwords.
  public final void testExportFormat() throws Exception {
    Context context = Context.getInstance();
    ConnectorCoordinatorMap ccm = getCoordinatorMap();

    addConnector("connector-01", "red");

    ImportExportConnectorList connectors = ImportExport.getConnectors();
View Full Code Here

  }

  // Tests that an import into a barren installation creates new
  // connectors in the import set.
  public final void testSetConnectors() throws Exception {
    Context context = Context.getInstance();
    ConnectorCoordinatorMap ccm = getCoordinatorMap();

    addConnector("connector-01", "red");
    addConnector("connector-02", "blue");
View Full Code Here

  // Tests that imported connectors over an existing installation
  // modifies the configuration, but leaves unimported data (like
  // the checkoint) in place.
  public final void testUpdateConnectors() throws Exception {
    Context context = Context.getInstance();
    ConnectorCoordinatorMap ccm = getCoordinatorMap();

    addConnector("connector-01", "red");
    addConnector("connector-02", "blue");
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.manager.Context

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.