List of usage examples for com.liferay.portal.kernel.language LanguageUtil get
public static String get(ResourceBundle resourceBundle, String key)
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.CheckinFileEntryPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "checkin"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.CheckoutFileEntryPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "checkout"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.DeleteExpiredTemporaryFileEntriesPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());//from ww w .j av a2 s .c o m return LanguageUtil.get(resourceBundle, "delete-expired-temporary-files"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.DeleteFileEntryPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { String key = "delete"; try {/*from w w w . j av a 2s . c o m*/ ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); FileEntry fileEntry = ActionUtil.getFileEntry(portletRequest); if (isTrashEnabled(themeDisplay.getScopeGroupId(), fileEntry.getRepositoryId())) { key = "move-to-the-recycle-bin"; } return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), key); } catch (PortalException pe) { throw new RuntimeException(pe); } }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.DeleteFolderPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); Folder folder = null;// w w w. j a v a 2s. c om try { folder = ActionUtil.getFolder(portletRequest); } catch (PortalException pe) { throw new RuntimeException(pe); } String key = "delete"; if (isTrashEnabled(themeDisplay.getScopeGroupId(), folder.getRepositoryId())) { key = "move-to-the-recycle-bin"; } return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), key); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.DocumentTypesPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());//from w w w.j av a 2 s . com return LanguageUtil.get(resourceBundle, "document-types"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.DownloadFileEntryPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "download"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.MetadataSetsPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());//from www . j av a 2 s. co m return LanguageUtil.get(resourceBundle, "metadata-sets"); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.OpenInMSOfficeFileEntryPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); ResourceBundle resourceBundle = _resourceBundleLoader.loadResourceBundle(themeDisplay.getLanguageId()); return LanguageUtil.get(resourceBundle, "open-in-ms-office"); }
From source file:com.liferay.document.library.web.internal.portlet.toolbar.contributor.DLPortletToolbarContributor.java
License:Open Source License
public MenuItem getFileEntryTypeMenuItem(PortletRequest portletRequest, Folder folder, List<DLFileEntryType> fileEntryTypes, DLFileEntryType fileEntryType, ThemeDisplay themeDisplay) throws PortalException { URLMenuItem urlMenuItem = new URLMenuItem(); String label = LanguageUtil.get(_portal.getHttpServletRequest(portletRequest), fileEntryType .getUnambiguousName(fileEntryTypes, themeDisplay.getScopeGroupId(), themeDisplay.getLocale())); urlMenuItem.setLabel(label);/*from w w w .j av a 2s . c o m*/ PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); PortletURL portletURL = PortletURLFactoryUtil.create(portletRequest, portletDisplay.getId(), PortletRequest.RENDER_PHASE); portletURL.setParameter("mvcRenderCommandName", "/document_library/edit_file_entry"); portletURL.setParameter(Constants.CMD, Constants.ADD); portletURL.setParameter("redirect", _portal.getCurrentURL(portletRequest)); portletURL.setParameter("repositoryId", String.valueOf(_getRepositoryId(themeDisplay, folder))); portletURL.setParameter("folderId", String.valueOf(_getFolderId(folder))); portletURL.setParameter("fileEntryTypeId", String.valueOf(fileEntryType.getFileEntryTypeId())); urlMenuItem.setURL(portletURL.toString()); return urlMenuItem; }