}
BasePageElement page = (BasePageElement)pageOrTemplate;
BaseConcretePageElement concretePage = ((page instanceof BaseConcretePageElement) ? (BaseConcretePageElement)page : null);
// check for edit permission
page.checkAccess(JetspeedActions.EDIT);
// update default decorator and page in page manager
boolean update = false;
decoratorName = (!Utils.isNull(decoratorName) ? decoratorName : null);
if (((decoratorName != null) && !decoratorName.equals(page.getDefaultDecorator(fragmentType)) ||