Package com.google.enterprise.connector.otex.client

Examples of com.google.enterprise.connector.otex.client.ClientFactory.createClient()


  private GroupAdaptor getGroupsAdaptor()
      throws RepositoryException {
    LivelinkConnector connector = getConnector();
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    return new GroupAdaptor(connector, client);
  }

  private void addUser(int userId, String name) throws SQLException {
    jdbcFixture.executeUpdate("insert into KUAF(ID, Name, Type, UserData)"
View Full Code Here


  /** Continue the setup after initializing the connector. */
  protected void afterInit() throws RepositoryException {
    Session sess = conn.login();
    lam = (LivelinkAuthorizationManager) sess.getAuthorizationManager();
    ClientFactory clientFactory = conn.getClientFactory();
    client = clientFactory.createClient();
  }

  public void testGetDocids() throws RepositoryException {
    final String docid = "hello, world";
    Iterator<String> it = Collections.nCopies(1001, docid).iterator();
View Full Code Here

    connector.setIncludedCategories(includedCategories);
    connector.setExcludedCategories("none");
    connector.login();

    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    return new CategoryHandler(connector, client);
  }

  /**
   * Calls the method under test, {@link CategoryHandler#getAttributeValue}.
View Full Code Here

   *     the file sizes (DataSize) for the returned documents
   */
  private DocumentList getObjectUnderTest(LivelinkConnector connector,
      Object... docInfo) throws RepositoryException {
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();

    return getObjectUnderTest(connector, client, docInfo);
  }

  /**
 
View Full Code Here

   */
  private DocumentList getObjectUnderTest(ContentHandler contentHandler)
      throws RepositoryException {
    LivelinkConnector connector = getConnector();
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();

    return getObjectUnderTest(connector, client, contentHandler, null,
        MockConstants.IO_OBJECT_ID, 0, USER_ID);
  }

View Full Code Here

   */
  private DocumentList getObjectUnderTest(TraversalContext traversalContext,
      long dataSize) throws RepositoryException {
    LivelinkConnector connector = getConnector();
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    ContentHandler contentHandler = new FileContentHandler();

    return getObjectUnderTest(connector, client, contentHandler,
        traversalContext, MockConstants.HARMLESS_OBJECT_ID, dataSize, USER_ID);
  }
View Full Code Here

  /** Tests that the checkpoint must not be null. */
  public void testNullConstructorArgs_checkpoint() throws RepositoryException {
    LivelinkConnector connector = getConnector();
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();

    DocumentList list = new LivelinkDocumentList(connector,
        client, null, null, null, null, null, null, null);
    try {
      Document next = list.nextDocument();
View Full Code Here

  /** Tests that all the other constructs arguments can be null. */
  public void testNullConstructorArgs_others() throws RepositoryException {
    LivelinkConnector connector = getConnector();
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    Checkpoint checkpoint = new Checkpoint();

    DocumentList list = new LivelinkDocumentList(connector,
        client, null, null, null, null, null, checkpoint, null);
    Document next = list.nextDocument();
View Full Code Here

  public void testNullConstructorArgs_publicContentUsername()
      throws RepositoryException {
    LivelinkConnector connector =
        getConnector("publicContentUsername", "anonymous");
    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    Checkpoint checkpoint = new Checkpoint();

    DocumentList list = new LivelinkDocumentList(connector,
        client, null, null, null, null, null, checkpoint, null);
    Document next = list.nextDocument();
View Full Code Here

        "com.google.enterprise.connector.otex.client.mock.MockClientFactory");
    connector.setGoogleFeedHost("localhost");
    connector.setGroupFeedSchedule("0 1 * * *");

    ClientFactory clientFactory = connector.getClientFactory();
    Client client = clientFactory.createClient();
    return new GroupLister(connector, new GroupAdaptor(connector, client));
  }

  private Thread startListerThread() {
    Thread t = new Thread() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.