public void editLayoutSet(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); long layoutSetId = ParamUtil.getLong(actionRequest, "layoutSetId"); long liveGroupId = ParamUtil.getLong(actionRequest, "liveGroupId"); long stagingGroupId = ParamUtil.getLong(actionRequest, "stagingGroupId"); boolean privateLayout = ParamUtil.getBoolean(actionRequest, "privateLayout"); LayoutSet layoutSet = layoutSetLocalService.getLayoutSet(layoutSetId); updateLogo(actionRequest, liveGroupId, stagingGroupId, privateLayout); updateLookAndFeel( actionRequest, themeDisplay.getCompanyId(), liveGroupId, stagingGroupId, privateLayout, layoutSet.getSettingsProperties()); updateMergePages(actionRequest, liveGroupId); updateRobots(actionRequest, liveGroupId, privateLayout); updateSettings( actionRequest, liveGroupId, stagingGroupId, privateLayout, layoutSet.getSettingsProperties()); }
protected void updateLayoutSetPrototype(Layout layout, Date modifiedDate) { if (layout == null) { return; } Group group = null; try { group = layout.getGroup(); if (!group.isLayoutSetPrototype()) { return; } } catch (PortalException pe) { return; } try { LayoutSetPrototype layoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototype(group.getClassPK()); layoutSetPrototype.setModifiedDate(modifiedDate); LayoutSetPrototypeLocalServiceUtil.updateLayoutSetPrototype(layoutSetPrototype); LayoutSet layoutSet = layoutSetPrototype.getLayoutSet(); layoutSet.setModifiedDate(layout.getModifiedDate()); UnicodeProperties settingsProperties = layoutSet.getSettingsProperties(); settingsProperties.remove(Sites.MERGE_FAIL_COUNT); LayoutSetLocalServiceUtil.updateLayoutSet(layoutSet); } catch (Exception e) { _log.error(e, e); } }