XMLUtil.forEachChildElement(privilegeGroupsElement, "PrivilegeGroup",
m_helper.new ElementHandler("privilegeGroup")
{
public void handleElement(Element privilegeGroupElement, String sPrivilegeSetName)
{
final PrivilegeGroup privilegeGroup = new PrivilegeGroup(sPrivilegeSetName);
m_metadata.addPrivilege(privilegeGroup);
privilegeGroup.setCaption(XMLUtil.getStringAttr(privilegeGroupElement,
"caption", privilegeGroup.getCaption()));
XMLUtil.withFirstChildElement(privilegeGroupElement, "Privileges", false, new ElementHandler()
{
public void handleElement(Element privilegesElement)
{
XMLUtil.forEachChildElement(privilegesElement, "Privilege",
m_helper.new ElementHandler("privilege")
{
public void handleElement(Element privilegeElement, final String sPrivilegeName)
{
m_privilegeFixupList.add(new ContextFixup(m_helper)
{
public void fixup()
{
privilegeGroup.addPrivilege(m_metadata.getPrivilege(sPrivilegeName));
}
});
}
});
}