public void updateFragmentProperties(BaseFragmentElement fragment, String scope) throws NodeException, PageNotUpdatedException
{
try
{
// validate fragment element
BaseFragmentElementImpl baseFragmentElementImpl = (BaseFragmentElementImpl)fragment;
if (baseFragmentElementImpl.getIdentity() == 0)
{
throw new PageNotUpdatedException("Properties for transient fragment cannot be updated");
}
// update lists only if not global or all scope
if ((scope != null) && !scope.equals(ALL_PROPERTY_SCOPE))
{
// check access
boolean checkEditAccess = !scope.equals(USER_PROPERTY_SCOPE);
baseFragmentElementImpl.checkAccess(checkEditAccess ? JetspeedActions.EDIT : JetspeedActions.VIEW);
// update fragment properties
updateFragmentPropertyList(baseFragmentElementImpl, scope, null);
}
else
{
// update entire page
BaseFragmentsElementImpl baseFragmentsElementImpl = ((baseFragmentElementImpl != null) ? baseFragmentElementImpl.getBaseFragmentsElement() : null);
if (baseFragmentsElementImpl != null)
{
updateFragmentsElement(baseFragmentsElementImpl, new boolean[]{false});
}
else