// update fragment preferences and page in page manager
fragment.setSecurityConstraints(null);
if ((constraints != null) && !constraints.isEmpty())
{
SecurityConstraints fragmentConstraints = fragment.newSecurityConstraints();
String constraintsOwner = constraints.getOwner();
if (constraintsOwner != null)
{
fragmentConstraints.setOwner(constraintsOwner);
}
List constraintsConstraints = constraints.getSecurityConstraints();
if ((constraintsConstraints != null) && !constraintsConstraints.isEmpty())
{
List fragmentConstraintsConstraints = new ArrayList(constraintsConstraints.size());
Iterator constraintsIter = constraintsConstraints.iterator();
while (constraintsIter.hasNext())
{
SecurityConstraint constraint = (SecurityConstraint)constraintsIter.next();
SecurityConstraint fragmentConstraintsConstraint = fragment.newSecurityConstraint();
fragmentConstraintsConstraint.setGroups(constraint.getGroups());
fragmentConstraintsConstraint.setPermissions(constraint.getPermissions());
fragmentConstraintsConstraint.setRoles(constraint.getRoles());
fragmentConstraintsConstraint.setUsers(constraint.getUsers());
fragmentConstraintsConstraints.add(fragmentConstraintsConstraint);
}
fragmentConstraints.setSecurityConstraints(fragmentConstraintsConstraints);
}
List constraintsConstraintsRefs = constraints.getSecurityConstraintsRefs();
if ((constraintsConstraintsRefs != null) && !constraintsConstraintsRefs.isEmpty())
{
List fragmentConstraintsConstraintsRefs = new ArrayList(constraintsConstraintsRefs.size());
Iterator constraintsRefsIter = constraintsConstraintsRefs.iterator();
while (constraintsRefsIter.hasNext())
{
fragmentConstraintsConstraintsRefs.add((String)constraintsRefsIter.next());
}
fragmentConstraints.setSecurityConstraintsRefs(fragmentConstraintsConstraintsRefs);
}
fragment.setSecurityConstraints(fragmentConstraints);
}
updatePage(pageOrTemplate);