Package com.google.enterprise.connector.pusher

Examples of com.google.enterprise.connector.pusher.GsaFeedConnection


      return;
    }

    DocPusher push = null;
    try {
      push = new DocPusher(new GsaFeedConnection(null, "gogol", 19900, -1),
          "dctm", new FileSizeLimitInfo(), new DocumentFilterChain());

    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here


    protected void setUp() throws Exception {
        conn = LivelinkConnectorFactory.getConnector("connector.");
        sess = (LivelinkSession) conn.login();
        client = sess.getFactory().createClient();
        pusher = new DocPusher(
            new GsaFeedConnection(null, feedServer, feedPort, -1),
            "livelink", new FileSizeLimitInfo(), new DocumentFilterChain());

        // Iinitialize the Context for DocPusher.take.
        // FIXME: This code is duplicated in LivelinkQueryTraverserTest..
        String cmDir = System.getProperty("connector-manager.dir");
View Full Code Here

    // since they usually require communicating with the GSA.
    if (traversalContext instanceof SimpleTraversalContext) {
      SimpleTraversalContext simpleContext =
          (SimpleTraversalContext) traversalContext;
      Properties props = getConnectorManagerProperties();
      GsaFeedConnection feeder = getGsaFeedConnection();
      initTraversalContext(simpleContext, props, feeder);
    }
    return traversalContext;
  }
View Full Code Here

    assertEquals("Manager is locked", Boolean.TRUE.toString(), isManagerLocked);
  }

  /** The field default is true, to make the code safer to use. */
  public void testDefaultFieldValidateCertificate() throws Exception {
    GsaFeedConnection feeder = new GsaFeedConnection("", "fubar", 25, -1);
    assertTrue(feeder.getValidateCertificate());
  }
View Full Code Here

   * The property default is false, so that the code will run without
   * certificates, and so that we can change this default to true when
   * the installer installs the GSA certificate.
   */
  public void testDefaultPropertyValidateCertificate() throws Exception {
    GsaFeedConnection feeder = new GsaFeedConnection("", "fubar", 25, -1);
    context.setConnectorManagerConfig("", "shme", 14,
        Context.GSA_FEED_SECURE_PORT_INVALID, feeder, null);
    assertFalse(feeder.getValidateCertificate());
  }
View Full Code Here

  }

  public void testSetPropertyValidateCertificate() throws Exception {
    updateProperty(Context.GSA_FEED_VALIDATE_CERTIFICATE_PROPERTY_KEY,
        "true", "Updating validateCertificate");
    GsaFeedConnection feeder = new GsaFeedConnection("", "fubar", 25, -1);
    context.setConnectorManagerConfig("", "shme", 14,
        Context.GSA_FEED_SECURE_PORT_INVALID, feeder, null);
    assertTrue(feeder.getValidateCertificate());
  }
View Full Code Here

    assertNull(ctxSecurePort, ctxSecurePort);
  }

  private void setAndGetSecurePort(int setPort, int expectedPort)
      throws MalformedURLException, InstantiatorException {
    GsaFeedConnection feeder = new GsaFeedConnection("", "fubar", 25, -1);
    context.setConnectorManagerConfig("", "shme", 14, setPort, feeder, null);
    Properties managerProps = context.getConnectorManagerConfig();
    String ctxSecurePort = managerProps.getProperty(
        Context.GSA_FEED_SECURE_PORT_PROPERTY_KEY);
    assertNotNull(ctxSecurePort);
    assertEquals("Correct secure port from context",
        expectedPort, Integer.parseInt(ctxSecurePort));
    assertEquals(expectedPort, feeder.getFeedUrl().getPort());
  }
View Full Code Here

    Properties props = loadProperties(propFile);
    props.putAll(extraProps);
    storeProperties(props, propFile, "Extra Props");

    // Make the call.
    GsaFeedConnection feeder = new GsaFeedConnection("", "fubar", 25, -1);
    context.setConnectorManagerConfig(gsa.protocolAttribute, "shme",
        gsa.portAttribute, gsa.securePortAttribute, feeder, null);

    // Check the feed URL.
    assertEquals(expectedProtocol, feeder.getFeedUrl().getProtocol());
    assertEquals(expectedPort, feeder.getFeedUrl().getPort());

    // Check for overwritten protocol and secure port properties.
    Properties managerProps = context.getConnectorManagerConfig();
    assertProperty(!Strings.isNullOrEmpty(gsa.protocolAttribute),
        gsa.protocolAttribute, Context.GSA_FEED_PROTOCOL_PROPERTY_KEY,
View Full Code Here

  private void testInitTraversalContext(boolean gsaSupportsInheritedAcls,
      Boolean feedDisableInheritedAcls, boolean expectedSupportsInheritedAcls,
      boolean expectedSupportsDenyAcls) {
    SimpleTraversalContext simpleContext = new SimpleTraversalContext();
    GsaFeedConnection feeder = createMock(GsaFeedConnection.class);
    expect(feeder.supportsInheritedAcls())
        .andReturn(gsaSupportsInheritedAcls)
        .anyTimes();
    replay(feeder);
    Properties props = new Properties();
    if (feedDisableInheritedAcls != null) {
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.pusher.GsaFeedConnection

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.