if ("rep:GrantACE".equals(child.getPrimaryNodeType().getName())) {
MutableElement p = new MutableElement(this);
p.getMetaDefinitions().add(new CaoMetaDefinition(p.getMetadata(), CaoPolicy.PRINCIPAL, TYPE.ELEMENT, null, 0));
p.getMetaDefinitions().add(new CaoMetaDefinition(p.getMetadata(), RULE, TYPE.STRING, null, 256,CaoPolicy.CATEGORY_RIGHT));
CaoWritableElement pw = p.getWritableNode();
String principal = child.getProperty("rep:principalName").getString();
if (child.hasProperty("rep:glob"))
principal+= " at " + child.getProperty("rep:glob").getString();
pw.setString(CaoPolicy.PRINCIPAL,principal);
Property priv = child.getProperty("rep:privileges");
if (priv.isMultiple()) {
StringBuffer sb = new StringBuffer();
for (Value val : priv.getValues()) {
sb.append("[").append(val.getString()).append("]");
}
pw.setString(RULE,sb.toString());
} else {
pw.setString(RULE,priv.getString());
}
pw.save();
list.add(p);
}
}
}