StringReader reader = new StringReader(xml);
Document document = saxBuilder.build(reader);
Element root = document.getRootElement();
String name = root.getAttribute("name").getValue();
PageSecurity pageSecurity = pageManager.getPageSecurity();
SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
int defsSize = 0;
if (def == null)
{
def = pageManager.newSecurityConstraintsDef();
def.setName(name);
added = true;
}
int xmlSize = root.getChildren("security-constraint").size();
if (added == false)
{
defsSize = def.getSecurityConstraints().size();
}
int min = (xmlSize < defsSize) ? xmlSize : defsSize;
List xmlConstraints = root.getChildren("security-constraint");
List constraints = def.getSecurityConstraints();
Element owner = root.getChild("owner");
if (owner != null)
{
}
for (int ix = 0; ix < min; ix++)