List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay getRequest
@JSON(include = false)
public HttpServletRequest getRequest()
From source file:com.liferay.asset.categories.admin.web.internal.portlet.configuration.icon.AssetCategoryPermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { long categoryId = ParamUtil.getLong(portletRequest, "categoryId", 0); if (categoryId <= 0) { return StringPool.BLANK; }/*from w w w . ja v a 2 s . com*/ String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); AssetCategory assetCategory = _assetCategoryLocalService.fetchCategory(categoryId); try { url = PermissionsURLTag.doTag(StringPool.BLANK, AssetCategory.class.getName(), assetCategory.getTitle(themeDisplay.getLocale()), null, String.valueOf(assetCategory.getCategoryId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.asset.categories.admin.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {/*w w w.ja v a2 s. com*/ url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.asset.categories", themeDisplay.getScopeGroupName(), null, String.valueOf(themeDisplay.getSiteGroupId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.blogs.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {/*from w w w .j a v a2 s . co m*/ url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.blogs", themeDisplay.getScopeGroupName(), null, String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.bookmarks.web.internal.portlet.configuration.icon.FolderPermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; try {/*from w w w. j a v a 2 s .c o m*/ BookmarksFolder folder = ActionUtil.getFolder(portletRequest); String modelResource = BookmarksFolder.class.getName(); String modelResourceDescription = folder.getName(); String resourcePrimKey = String.valueOf(folder.getFolderId()); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); url = PermissionsURLTag.doTag(StringPool.BLANK, modelResource, modelResourceDescription, null, resourcePrimKey, LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.bookmarks.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {//w w w . ja v a 2 s.co m String modelResource = "com.liferay.bookmarks"; String modelResourceDescription = themeDisplay.getScopeGroupName(); String resourcePrimKey = String.valueOf(themeDisplay.getScopeGroupId()); url = PermissionsURLTag.doTag(StringPool.BLANK, modelResource, modelResourceDescription, null, resourcePrimKey, LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.FileEntryPermissionPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {//from w ww . j a v a 2 s .c om FileEntry fileEntry = ActionUtil.getFileEntry(portletRequest); url = PermissionsURLTag.doTag(null, DLFileEntryConstants.getClassName(), HtmlUtil.unescape(fileEntry.getTitle()), null, String.valueOf(fileEntry.getFileEntryId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.FolderPermissionPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {// www . j av a 2 s . co m Folder folder = ActionUtil.getFolder(portletRequest); if (folder != null) { url = PermissionsURLTag.doTag(null, DLFolderConstants.getClassName(), HtmlUtil.unescape(folder.getName()), null, String.valueOf(folder.getFolderId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } else { url = PermissionsURLTag.doTag(null, "com.liferay.document.library", HtmlUtil.unescape(themeDisplay.getScopeGroupName()), null, String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } } catch (Exception e) { } return url; }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {//ww w. j a v a2 s . c om url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.document.library", themeDisplay.getScopeGroupName(), null, String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.RepositoryPermissionPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { String url = StringPool.BLANK; ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); try {// w ww .j a v a 2 s . c om Repository repository = ActionUtil.getRepository(portletRequest); url = PermissionsURLTag.doTag(null, DLFolderConstants.getClassName(), HtmlUtil.unescape(repository.getName()), null, String.valueOf(repository.getDlFolderId()), LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest()); } catch (Exception e) { } return url; }
From source file:com.liferay.dynamic.data.lists.form.web.internal.display.context.DDLFormDisplayContext.java
License:Open Source License
protected String getSubmitLabel(DDLRecordSet recordSet) { ThemeDisplay themeDisplay = getThemeDisplay(); boolean workflowEnabled = hasWorkflowEnabled(recordSet, themeDisplay); if (workflowEnabled) { return LanguageUtil.get(themeDisplay.getRequest(), "submit-for-publication"); } else {// ww w .ja v a2 s . c om return LanguageUtil.get(themeDisplay.getRequest(), "submit"); } }