protected void addPublicSite( long companyId, long defaultUserId, List<LayoutSetPrototype> layoutSetPrototypes) throws Exception { ResourceBundle resourceBundle = ResourceBundle.getBundle("content.Language", LocaleUtil.getDefault()); LayoutSet layoutSet = DefaultLayoutSetPrototypesUtil.addLayoutSetPrototype( companyId, defaultUserId, LanguageUtil.get(resourceBundle, "layout-set-prototype-community-site-title"), LanguageUtil.get(resourceBundle, "layout-set-prototype-community-site-description"), layoutSetPrototypes); if (layoutSet == null) { return; } // Home layout Layout layout = DefaultLayoutPrototypesUtil.addLayout(layoutSet, "home", "/home", "2_columns_iii"); String portletId = PortletProviderUtil.getPortletId(MBMessage.class.getName(), PortletProvider.Action.EDIT); DefaultLayoutPrototypesUtil.addPortletId(layout, portletId, "column-1"); DefaultLayoutPrototypesUtil.addPortletId( layout, UserStatisticsPortletKeys.USER_STATISTICS, "column-2"); // Wiki layout DefaultLayoutPrototypesUtil.addLayout(layoutSet, "wiki", "/wiki", "2_columns_iii"); }
protected void addWikiPage( long companyId, long defaultUserId, List<LayoutPrototype> layoutPrototypes) throws Exception { ResourceBundleLoader resourceBundleLoader = new AggregateResourceBundleLoader( ResourceBundleUtil.getResourceBundleLoader("content.Language", getClassLoader()), LanguageResources.RESOURCE_BUNDLE_LOADER); Map<Locale, String> nameMap = ResourceBundleUtil.getLocalizationMap(resourceBundleLoader, "layout-prototype-wiki-title"); Map<Locale, String> descriptionMap = ResourceBundleUtil.getLocalizationMap( resourceBundleLoader, "layout-prototype-wiki-description"); Layout layout = DefaultLayoutPrototypesUtil.addLayoutPrototype( companyId, defaultUserId, nameMap, descriptionMap, "2_columns_iii", layoutPrototypes); if (layout == null) { return; } DefaultLayoutPrototypesUtil.addPortletId(layout, WikiPortletKeys.WIKI, "column-1"); }