List of usage examples for com.liferay.portal.language LanguageResources RESOURCE_BUNDLE_LOADER
ResourceBundleLoader RESOURCE_BUNDLE_LOADER
To view the source code for com.liferay.portal.language LanguageResources RESOURCE_BUNDLE_LOADER.
Click Source Link
From source file:com.liferay.asset.publisher.layout.prototype.internal.instance.lifecycle.AddLayoutPrototypePortalInstanceLifecycleListener.java
License:Open Source License
protected void addWebContentPage(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-web-content-title"); Map<Locale, String> descriptionMap = ResourceBundleUtil.getLocalizationMap(resourceBundleLoader, "layout-prototype-web-content-description"); Layout layout = DefaultLayoutPrototypesUtil.addLayoutPrototype(companyId, defaultUserId, nameMap, descriptionMap, "2_columns_ii", layoutPrototypes); if (layout == null) { return;/* w w w . ja va 2s .co m*/ } DefaultLayoutPrototypesUtil.addPortletId(layout, AssetTagsNavigationPortletKeys.ASSET_TAGS_NAVIGATION, "column-1"); DefaultLayoutPrototypesUtil.addPortletId(layout, AssetCategoriesNavigationPortletKeys.ASSET_CATEGORIES_NAVIGATION, "column-1"); String portletId = DefaultLayoutPrototypesUtil.addPortletId(layout, AssetPublisherPortletKeys.ASSET_PUBLISHER, "column-2"); Map<String, String> preferences = new HashMap<>(); preferences.put("showOnlyLayoutAssets", Boolean.TRUE.toString()); DefaultLayoutPrototypesUtil.updatePortletSetup(layout, portletId, preferences); UnicodeProperties typeSettingsProperties = layout.getTypeSettingsProperties(); typeSettingsProperties.setProperty(LayoutTypePortletConstants.DEFAULT_ASSET_PUBLISHER_PORTLET_ID, portletId); _layoutLocalService.updateLayout(layout.getGroupId(), layout.isPrivateLayout(), layout.getLayoutId(), layout.getTypeSettings()); }
From source file:com.liferay.asset.publisher.layout.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java
License:Open Source License
@Override protected void doUpgrade() throws Exception { long[] companyIds = PortalInstances.getCompanyIdsBySQL(); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "name", _NAME, "layout-prototype-web-content-title", "Name", companyIds); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "description", _DESCRIPTION, "layout-prototype-web-content-description", "Description", companyIds); }
From source file:com.liferay.blogs.layout.prototype.internal.instance.lifecycle.AddLayoutPrototypePortalInstanceLifecycleListener.java
License:Open Source License
protected void addBlogPage(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> descriptionMap = ResourceBundleUtil.getLocalizationMap(resourceBundleLoader, "layout-prototype-blog-description"); Map<Locale, String> nameMap = ResourceBundleUtil.getLocalizationMap(resourceBundleLoader, "layout-prototype-blog-title"); Layout layout = DefaultLayoutPrototypesUtil.addLayoutPrototype(companyId, defaultUserId, nameMap, descriptionMap, "2_columns_iii", layoutPrototypes); if (layout == null) { return;//ww w.j a v a2 s . co m } DefaultLayoutPrototypesUtil.addPortletId(layout, BlogsPortletKeys.BLOGS, "column-1"); String portletId = DefaultLayoutPrototypesUtil.addPortletId(layout, AssetTagsNavigationPortletKeys.ASSET_TAGS_CLOUD, "column-2"); Map<String, String> preferences = new HashMap<>(); preferences.put("classNameId", String.valueOf(PortalUtil.getClassNameId(BlogsEntry.class))); preferences.put("showAssetCount", Boolean.TRUE.toString()); DefaultLayoutPrototypesUtil.updatePortletSetup(layout, portletId, preferences); DefaultLayoutPrototypesUtil.addPortletId(layout, RecentBloggersPortletKeys.RECENT_BLOGGERS, "column-2"); }
From source file:com.liferay.blogs.layout.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java
License:Open Source License
@Override protected void doUpgrade() throws Exception { long[] companyIds = PortalInstances.getCompanyIdsBySQL(); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "name", _NAME, "layout-prototype-blog-title", "Name", companyIds); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutPrototype", "description", _DESCRIPTION, "layout-prototype-blog-description", "Description", companyIds); }
From source file:com.liferay.calendar.internal.security.service.access.policy.CalendarSAPEntryActivator.java
License:Open Source License
protected void addSAPEntry(long companyId) throws PortalException { SAPEntry sapEntry = _sapEntryLocalService.fetchSAPEntry(companyId, _SAP_ENTRY_NAME); if (sapEntry != null) { return;/* w w w .j a v a2s. c om*/ } StringBundler sb = new StringBundler(5); sb.append(CalendarBookingService.class.getName()); sb.append("#search"); sb.append(StringPool.NEW_LINE); sb.append(CalendarBookingService.class.getName()); sb.append("#searchCount"); String allowedServiceSignatures = sb.toString(); ResourceBundleLoader resourceBundleLoader = new AggregateResourceBundleLoader( ResourceBundleUtil.getResourceBundleLoader("content.Language", CalendarSAPEntryActivator.class.getClassLoader()), LanguageResources.RESOURCE_BUNDLE_LOADER); Map<Locale, String> titleMap = ResourceBundleUtil.getLocalizationMap(resourceBundleLoader, "service-access-policy-entry-default-calendar-title"); _sapEntryLocalService.addSAPEntry(_userLocalService.getDefaultUserId(companyId), allowedServiceSignatures, true, true, _SAP_ENTRY_NAME, titleMap, new ServiceContext()); }
From source file:com.liferay.contacts.web.internal.notifications.ContactsCenterUserNotificationHandler.java
License:Open Source License
@Reference(target = "(bundle.symbolic.name=com.liferay.contacts.web)", unbind = "-") protected void setResourceBundleLoader(ResourceBundleLoader resourceBundleLoader) { _resourceBundleLoader = new AggregateResourceBundleLoader(resourceBundleLoader, LanguageResources.RESOURCE_BUNDLE_LOADER); }
From source file:com.liferay.document.library.item.selector.web.internal.BaseDLItemSelectorView.java
License:Open Source License
protected ResourceBundleLoader getResourceBundleLoader() { return LanguageResources.RESOURCE_BUNDLE_LOADER; }
From source file:com.liferay.document.library.layout.set.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java
License:Open Source License
@Override protected void doUpgrade() throws Exception { long[] companyIds = PortalInstances.getCompanyIdsBySQL(); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "name", _NAME, "layout-set-prototype-intranet-site-title", "Name", companyIds); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "description", _DESCRIPTION, "layout-set-prototype-intranet-site-description", "Description", companyIds); }
From source file:com.liferay.invitation.invite.members.web.internal.notifications.InviteMembersUserNotificationHandler.java
License:Open Source License
@Reference(target = "(bundle.symbolic.name=com.liferay.invitation.invite.members.web)", unbind = "-") protected void setResourceBundleLoader(ResourceBundleLoader resourceBundleLoader) { _resourceBundleLoader = new AggregateResourceBundleLoader(resourceBundleLoader, LanguageResources.RESOURCE_BUNDLE_LOADER); }
From source file:com.liferay.message.boards.layout.set.prototype.internal.upgrade.v1_0_0.UpgradeLocalizedColumn.java
License:Open Source License
@Override protected void doUpgrade() throws Exception { long[] companyIds = PortalInstances.getCompanyIdsBySQL(); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "name", _NAME, "layout-set-prototype-community-site-title", "Name", companyIds); upgradeLocalizedColumn(LanguageResources.RESOURCE_BUNDLE_LOADER, "LayoutSetPrototype", "description", _DESCRIPTION, "layout-set-prototype-community-site-description", "Description", companyIds); }