Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.Property.nextValue()


      LOGGER.finest("PROPERTY: " + name + " = \"...content...\"");
    } else {
      Property property = document.findProperty(name);
      if (property != null) {
        ValueImpl value = null;
        while ((value = (ValueImpl) property.nextValue()) != null) {
          LOGGER.finest("PROPERTY: " + name + " = \"" + value.toString()
                        + "\"");
        }
      }
    }
View Full Code Here


    Document input = ConnectorTestUtils.createSimpleDocument(props);

    Document output = createFilter(input,
        CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE, null, false);
    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value = prop.nextValue();

    Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
    assertEquals(principal.getName(), newPrincipal.getName());
    assertEquals(CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE,
        newPrincipal.getCaseSensitivityType());
View Full Code Here

    Document input = ConnectorTestUtils.createSimpleDocument(props);

    Document output = createFilter(input,
        CaseSensitivityType.EVERYTHING_CASE_SENSITIVE, null, false);
    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value = prop.nextValue();

    Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
    assertEquals(principal.getName(), newPrincipal.getName());
    assertTrue(newPrincipal.getCaseSensitivityType().equals(
        CaseSensitivityType.EVERYTHING_CASE_SENSITIVE));
View Full Code Here

    AclPropertyFilter factory = new AclPropertyFilter();
    Document output = factory.newDocumentFilter(input);

    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value = prop.nextValue();

    Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
    assertEquals(principal.getName(), newPrincipal.getName());
    assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
        newPrincipal.getCaseSensitivityType());
View Full Code Here

    AclPropertyFilter factory = new AclPropertyFilter();
    Document output = factory.newDocumentFilter(input);

    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value = prop.nextValue();

    Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
    assertEquals(principal.getName(), newPrincipal.getName());
    assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
        newPrincipal.getCaseSensitivityType());
View Full Code Here

    assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
        newPrincipal.getCaseSensitivityType());

    Property propInheritFrom =
        output.findProperty(SpiConstants.PROPNAME_ACLINHERITFROM);
    Value valueInheritfrom = propInheritFrom.nextValue();
    assertEquals("parentId", valueInheritfrom.toString());
  }

  public void testAclFilterFindPropertyWithStringValues() throws Exception {
    Map<String, Object> props = ConnectorTestUtils
View Full Code Here

    Document input = ConnectorTestUtils.createSimpleDocument(props);
    Document output = createFilter(input,
        CaseSensitivityType.EVERYTHING_CASE_SENSITIVE, null, false);
    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value;
    while ((value = prop.nextValue()) != null) {
      if (value instanceof PrincipalValue) {
        Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
        assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
            newPrincipal.getCaseSensitivityType());
      }
View Full Code Here

  }

  public Principal getPrincipal(Document output, String name)
      throws Exception {
    Property prop = output.findProperty(name);
    Value value = prop.nextValue();
    return ((PrincipalValue) value).getPrincipal();
  }

  public Principal createFilterAndGetPrinicpal(Document input,
      CaseSensitivityType caseSensitivity, String newUserDomain,
View Full Code Here

    AclPropertyFilter factory = new AclPropertyFilter();
    Document output = factory.newDocumentFilter(input);

    Property prop = output.findProperty(SpiConstants.PROPNAME_ACLUSERS);
    Value value = prop.nextValue();
    Principal newPrincipal = ((PrincipalValue) value).getPrincipal();
    assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
        newPrincipal.getCaseSensitivityType());
    assertEquals("Jane Doe", newPrincipal.getName());
View Full Code Here

        newPrincipal.getCaseSensitivityType());
    assertEquals("Jane Doe", newPrincipal.getName());

    Property denyprop =
        output.findProperty(SpiConstants.PROPNAME_ACLDENYUSERS);
    Value denyvalue = denyprop.nextValue();
    Principal denyPrincipal = ((PrincipalValue) denyvalue).getPrincipal();
    assertEquals(CaseSensitivityType.EVERYTHING_CASE_SENSITIVE,
        denyPrincipal.getCaseSensitivityType());
    assertEquals("John Doe", denyPrincipal.getName());
  }
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.