Package com.google.enterprise.connector.spiimpl

Examples of com.google.enterprise.connector.spiimpl.PrincipalValue


    assertEquals(Sets.newHashSet(grantees), propValues);
  }

  private Set<String> getPropertyValues(Property prop) throws Exception {
    Set<String> values = Sets.newHashSet();
    PrincipalValue v;
    while ((v = (PrincipalValue) prop.nextValue()) != null) {
      values.add(v.getPrincipal().getName());
    }
    return values;
  }
View Full Code Here


  }

  private Set<String> getPrincipalsNames(Document doc, String propertyName)
      throws RepositoryException {
    Set<String> names = new HashSet<String>();;
    PrincipalValue prValue;
    Property property = doc.findProperty(propertyName);
    while ((prValue = (PrincipalValue) property.nextValue()) != null) {
      names.add(prValue.getPrincipal().getName());
    }
    return names;
  }
View Full Code Here

  }

  private Principal getAclPrincipal(Document doc, String prop, String name)
      throws RepositoryException {
    Principal aclPrincipal = null;
    PrincipalValue prValue;
    Property property = doc.findProperty(prop);
    while ((prValue = (PrincipalValue) property.nextValue()) != null) {
      if (prValue.getPrincipal().getName().equalsIgnoreCase(name)) {
        aclPrincipal = prValue.getPrincipal();
        break;
      }
    }
    return aclPrincipal;
  }
View Full Code Here

          Principal newPrincipal = new Principal(principal.getPrincipalType(),
              principal.getNamespace(), getPrincipalName(principal, name),
                  caseSensitivityType);

          newValues.add(new PrincipalValue(newPrincipal));
        } else {
          Principal newPrincipal = new Principal(principal.getPrincipalType(),
                  principal.getNamespace(), getPrincipalName(principal, name),
                  principal.getCaseSensitivityType());
          newValues.add(new PrincipalValue(newPrincipal));
        }
      }
      return new SimpleProperty(newValues);
    } else {
      return source.findProperty(name);
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spiimpl.PrincipalValue

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.