Package com.google.enterprise.connector.spi

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


  public void testAcl_missingGroup() throws RepositoryException, SQLException {
    insertDTreeAcl(29, 2666, Client.PERM_SEECONTENTS);

    DocumentList list = getObjectUnderTest(29, 0, 1002);
    Document doc = list.nextDocument();

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


    insertDTreeAcl(31, 1002, Client.PERM_SEECONTENTS);
    setUserData(1001, "ExternalAuthentication=true");
    setUserData(1002, "ExternalAuthentication=false");

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

    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, GLOBAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
View Full Code Here

    insertDTreeAcl(32, 2002, Client.PERM_SEECONTENTS);
    setUserData(2001, "ExternalAuthentication=true");
    setUserData(2002, "ExternalAuthentication=false");

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

    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, GLOBAL_NAMESPACE, "group1",
            EVERYTHING_CASE_SENSITIVE),
View Full Code Here

      SQLException {
    insertDTreeAcl(33, 1001, Client.PERM_SEECONTENTS);
    setUserData(1001, "invaliddata=");

    DocumentList list = getObjectUnderTest(33, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, LOCAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc,
View Full Code Here

      SQLException {
    insertDTreeAcl(34, 1001, Client.PERM_SEECONTENTS);
    setUserData(1001, null);

    DocumentList list = getObjectUnderTest(34, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, LOCAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLUSERS, "user1"));
View Full Code Here

  public void testPublicAccess_Namespace()
      throws RepositoryException, SQLException {
    insertDTreeAcl(35, Client.RIGHT_WORLD, Client.PERM_SEECONTENTS);

    DocumentList list = getObjectUnderTest(35, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, LOCAL_NAMESPACE, "Public Access",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLGROUPS, "Public Access"));
View Full Code Here

      throws RepositoryException, SQLException {
    insertDTreeAcl(36, Client.RIGHT_OWNER, Client.PERM_SEECONTENTS);
    setUserData(1001, "ExternalAuthentication=false,ldap=vizdom.com");

    DocumentList list = getObjectUnderTest(36, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, GLOBAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLUSERS, "user1"));
View Full Code Here

    insertDTreeAcl(37, Client.RIGHT_GROUP, Client.PERM_SEECONTENTS);
    setUserData(1001, "ExternalAuthentication=true");
    setUserData(2001, null);

    DocumentList list = getObjectUnderTest(37, 1, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, LOCAL_NAMESPACE, "group1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLGROUPS, "group1"));
View Full Code Here

      throws RepositoryException, SQLException {
    insertDTreeAcl(38, 1001, Client.PERM_SEECONTENTS);
    setUserData(1001, "LDAP=vizdom");

    DocumentList list = getObjectUnderTest(38, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, GLOBAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLUSERS, "user1"));
View Full Code Here

      throws RepositoryException, SQLException {
    insertDTreeAcl(38, 1001, Client.PERM_SEECONTENTS);
    setUserData(1001, "ntlm=");

    DocumentList list = getObjectUnderTest(38, 0, 1001);
    Document doc = list.nextDocument();
    assertNotNull(doc);
    assertEquals(
        new Principal(UNKNOWN, GLOBAL_NAMESPACE, "user1",
            EVERYTHING_CASE_SENSITIVE),
        getAclPrincipal(doc, SpiConstants.PROPNAME_ACLUSERS, "user1"));
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.