List of usage examples for com.liferay.portal.kernel.portlet PortletProviderUtil getPortletURL
public static PortletURL getPortletURL(PortletRequest portletRequest, String className, PortletProvider.Action action) throws PortalException
From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java
License:Open Source License
public String getAssetCategoriesSelectorURL() throws Exception { PortletURL portletURL = PortletProviderUtil.getPortletURL(_request, AssetCategory.class.getName(), PortletProvider.Action.BROWSE); portletURL.setParameter("vocabularyIds", String.valueOf(getVocabularyId())); portletURL.setParameter("eventName", _renderResponse.getNamespace() + "selectCategory"); portletURL.setParameter("singleSelect", Boolean.TRUE.toString()); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL.toString(); }
From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java
License:Open Source License
public String getSelectCategoryURL() throws Exception { if (_selectCategoryURL != null) { return _selectCategoryURL; }//from w w w .j av a 2 s . co m ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY); List<AssetVocabulary> vocabularies = AssetVocabularyServiceUtil .getGroupVocabularies(themeDisplay.getScopeGroupId()); PortletURL selectCategoryURL = PortletProviderUtil.getPortletURL(_request, AssetCategory.class.getName(), PortletProvider.Action.BROWSE); selectCategoryURL.setParameter("allowedSelectVocabularies", Boolean.TRUE.toString()); selectCategoryURL.setParameter("eventName", _renderResponse.getNamespace() + "selectCategory"); selectCategoryURL.setParameter("singleSelect", Boolean.TRUE.toString()); selectCategoryURL.setParameter("vocabularyIds", ListUtil.toString(vocabularies, AssetVocabulary.VOCABULARY_ID_ACCESSOR)); selectCategoryURL.setWindowState(LiferayWindowState.POP_UP); _selectCategoryURL = selectCategoryURL.toString(); return _selectCategoryURL; }
From source file:com.liferay.asset.publisher.web.display.context.AssetPublisherDisplayContext.java
License:Open Source License
public String getCategorySelectorURL() { try {//from w ww . j a v a2 s. c om PortletURL portletURL = PortletProviderUtil.getPortletURL(_request, AssetCategory.class.getName(), PortletProvider.Action.BROWSE); if (portletURL == null) { return null; } portletURL.setParameter("eventName", _portletResponse.getNamespace() + "selectCategory"); portletURL.setParameter("selectedCategories", "{selectedCategories}"); portletURL.setParameter("singleSelect", "{singleSelect}"); portletURL.setParameter("vocabularyIds", "{vocabularyIds}"); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL.toString(); } catch (Exception e) { } return null; }
From source file:com.liferay.asset.publisher.web.display.context.AssetPublisherDisplayContext.java
License:Open Source License
public String getTagSelectorURL() { try {/* w ww . j ava 2 s . c o m*/ PortletURL portletURL = PortletProviderUtil.getPortletURL(_request, AssetTag.class.getName(), PortletProvider.Action.BROWSE); if (portletURL == null) { return null; } portletURL.setParameter("eventName", _portletResponse.getNamespace() + "selectTag"); portletURL.setParameter("groupIds", StringUtil.merge(getGroupIds())); portletURL.setParameter("selectedTags", "{selectedTags}"); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL.toString(); } catch (Exception e) { } return null; }
From source file:com.liferay.asset.taglib.internal.display.context.InputAssetLinksDisplayContext.java
License:Open Source License
private PortletURL _getAssetBrowserPortletURL(AssetRendererFactory<?> assetRendererFactory) throws Exception { PortletURL portletURL = PortletProviderUtil.getPortletURL(_request, assetRendererFactory.getClassName(), PortletProvider.Action.BROWSE); if (portletURL == null) { return portletURL; }//ww w . j av a 2 s .c om long groupId = _getAssetBrowserGroupId(assetRendererFactory); portletURL.setParameter("groupId", String.valueOf(groupId)); portletURL.setParameter("selectedGroupId", String.valueOf(groupId)); if (_assetEntryId > 0) { portletURL.setParameter("refererAssetEntryId", String.valueOf(_assetEntryId)); } portletURL.setParameter("typeSelection", assetRendererFactory.getClassName()); portletURL.setParameter("eventName", getEventName()); portletURL.setPortletMode(PortletMode.VIEW); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL; }
From source file:com.liferay.asset.taglib.servlet.taglib.AssetCategoriesSelectorTag.java
License:Open Source License
protected PortletURL getPortletURL() { try {/*from w w w . java2 s. c o m*/ PortletURL portletURL = PortletProviderUtil.getPortletURL(request, AssetCategory.class.getName(), PortletProvider.Action.BROWSE); if (portletURL == null) { return null; } portletURL.setParameter("eventName", getEventName()); portletURL.setParameter("selectedCategories", "{selectedCategories}"); portletURL.setParameter("singleSelect", "{singleSelect}"); portletURL.setParameter("vocabularyIds", "{vocabularyIds}"); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL; } catch (Exception e) { } return null; }
From source file:com.liferay.asset.taglib.servlet.taglib.AssetTagsSelectorTag.java
License:Open Source License
protected PortletURL getPortletURL() { try {/* w w w .j av a2 s. com*/ PortletURL portletURL = PortletProviderUtil.getPortletURL(request, AssetTag.class.getName(), PortletProvider.Action.BROWSE); if (portletURL == null) { return null; } portletURL.setParameter("eventName", getEventName()); portletURL.setParameter("selectedTags", "{selectedTags}"); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL; } catch (Exception e) { } return null; }
From source file:com.liferay.journal.util.impl.JournalUtil.java
License:Open Source License
public static String getJournalControlPanelLink(PortletRequest portletRequest, long folderId) throws PortalException { PortletURL portletURL = PortletProviderUtil.getPortletURL(portletRequest, JournalArticle.class.getName(), PortletProvider.Action.EDIT); portletURL.setParameter("folderId", String.valueOf(folderId)); return portletURL.toString(); }
From source file:com.liferay.portlet.configuration.web.internal.portlet.configuration.icon.ConfigurationTemplatesPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { try {//from ww w . ja v a 2 s .c o m String redirect = ParamUtil.getString(portletRequest, "redirect"); String returnToFullPageURL = ParamUtil.getString(portletRequest, "returnToFullPageURL"); PortletURL portletURL = PortletProviderUtil.getPortletURL(portletRequest, PortletConfigurationApplicationType.PortletConfiguration.CLASS_NAME, PortletProvider.Action.VIEW); portletURL.setParameter("mvcPath", "/edit_configuration_templates.jsp"); portletURL.setParameter("redirect", redirect); portletURL.setParameter("returnToFullPageURL", returnToFullPageURL); portletURL.setParameter("portletConfiguration", Boolean.TRUE.toString()); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); portletURL.setParameter("portletResource", portletDisplay.getId()); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL.toString(); } catch (Exception e) { } return StringPool.BLANK; }
From source file:com.liferay.portlet.configuration.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) { try {/* w w w.j a va 2s. c o m*/ String returnToFullPageURL = ParamUtil.getString(portletRequest, "returnToFullPageURL"); PortletURL portletURL = PortletProviderUtil.getPortletURL(portletRequest, PortletConfigurationApplicationType.PortletConfiguration.CLASS_NAME, PortletProvider.Action.VIEW); portletURL.setParameter("mvcPath", "/edit_permissions.jsp"); portletURL.setParameter("returnToFullPageURL", returnToFullPageURL); portletURL.setParameter("portletConfiguration", Boolean.TRUE.toString()); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); portletURL.setParameter("portletResource", portletDisplay.getId()); portletURL.setParameter("resourcePrimKey", PortletPermissionUtil.getPrimaryKey(themeDisplay.getPlid(), portletDisplay.getId())); portletURL.setWindowState(LiferayWindowState.POP_UP); return portletURL.toString(); } catch (Exception e) { } return StringPool.BLANK; }