Package com.google.enterprise.connector.spi

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


    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();
    assertNull(next);
  }
View Full Code Here


    insertDTreeAcl(21, Client.RIGHT_OWNER, Client.PERM_FULL);
    insertDTreeAcl(21, Client.RIGHT_GROUP, Client.PERM_SEECONTENTS);
    insertDTreeAcl(21, Client.RIGHT_WORLD, Client.PERM_SEE);

    DocumentList list = getObjectUnderTest(21, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of("user1", "user3"),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of("group1", "group2"),
View Full Code Here

    insertDTreeAcl(22, 1003, Client.PERM_MODIFY);
    insertDTreeAcl(22, 2001, Client.PERM_SEECONTENTS);
    insertDTreeAcl(22, 2002, Client.PERM_FULL);

    DocumentList list = getObjectUnderTest(22, 1, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of("group1", "group2"),
View Full Code Here

      SQLException {
    insertDTreeAcl(23, 1001, Client.PERM_FULL);
    insertDTreeAcl(23, Client.RIGHT_WORLD, Client.PERM_SEE);

    DocumentList list = getObjectUnderTest(23, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of("user1"),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of(),
View Full Code Here

      SQLException {
    insertDTreeAcl(23, 1001, Client.PERM_MODIFY);
    insertDTreeAcl(23, Client.RIGHT_WORLD, Client.PERM_SEECONTENTS);

    DocumentList list = getObjectUnderTest(23, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of("Public Access"),
View Full Code Here

    insertDTreeAcl(24, Client.RIGHT_OWNER, Client.PERM_FULL);
    insertDTreeAcl(24, 2001, Client.PERM_SEE);
    insertDTreeAcl(24, 2002, Client.PERM_MODIFY);

    DocumentList list = getObjectUnderTest(24, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of("user1"),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of(),
View Full Code Here

  public void testAcl_userDefaultGroup() throws RepositoryException,
      SQLException {
    insertDTreeAcl(25, Client.RIGHT_GROUP, Client.PERM_SEECONTENTS);

    DocumentList list = getObjectUnderTest(25, 1, 1003);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of("group2"),
View Full Code Here

    insertDTreeAcl(26, 1001, Client.PERM_SEE);
    insertDTreeAcl(26, 2001, Client.PERM_MODIFY);
    insertDTreeAcl(26, Client.RIGHT_WORLD, Client.PERM_SEE);

    DocumentList list = getObjectUnderTest(26, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of(),
View Full Code Here

        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLGROUPS));
  }

  public void testAcl_noAclEntries() throws RepositoryException, SQLException {
    DocumentList list = getObjectUnderTest(27, 0, 1002);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of(),
View Full Code Here

  public void testAcl_emptyUserName() throws RepositoryException, SQLException {
    insertDTreeAcl(28, 1666, Client.PERM_SEECONTENTS);

    DocumentList list = getObjectUnderTest(28, 0, 1001);
    Document doc = list.nextDocument();

    assertNotNull(doc);
    assertEquals(ImmutableSet.of(),
        getPrincipalsNames(doc, SpiConstants.PROPNAME_ACLUSERS));
    assertEquals(ImmutableSet.of(),
View Full Code Here

TOP

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

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.