public void startChildInfo(NodeInfo childInfo, List<PropInfo> propInfos) throws RepositoryException {
checkInitialized();
String ntName = childInfo.getPrimaryTypeName();
if (NT_REP_GRANT_ACE.equals(ntName) || NT_REP_DENY_ACE.equals(ntName)) {
if (entry != null) {
throw new ConstraintViolationException("Invalid child node sequence: ACEs may not be nested.");
}
entry = new MutableEntry(NT_REP_GRANT_ACE.equals(ntName));
for (PropInfo prop : propInfos) {
String name = prop.getName();
if (REP_PRINCIPAL_NAME.equals(name)) {
entry.setPrincipal(prop.getTextValue());
} else if (REP_PRIVILEGES.equals(name)) {
entry.setPrivilegeNames(prop.getTextValues());
} else {
entry.addRestriction(prop);
}
}
childStatus = CHILD_STATUS_ACE;
} else if (NT_REP_RESTRICTIONS.equals(ntName)) {
if (entry == null) {
throw new ConstraintViolationException("Invalid child node sequence: Restriction must be associated with an ACE");
}
entry.addRestrictions(propInfos);
childStatus = CHILD_STATUS_RESTRICTION;
} else {
throw new ConstraintViolationException("Invalid child node with type " + ntName);
}
}