List of usage examples for com.liferay.portal.kernel.bean BeanParamUtil getString
public static String getString(Object bean, PortletRequest portletRequest, String param, String defaultValue)
From source file:com.liferay.wiki.web.internal.portlet.toolbar.item.WikiPortletToolbarContributor.java
License:Open Source License
private WikiNode _getNode(ThemeDisplay themeDisplay, PortletRequest portletRequest) { WikiNode node = (WikiNode) portletRequest.getAttribute(WikiWebKeys.WIKI_NODE); if (node != null) { return node; }//www . ja va2s .c om String initialNodeName = StringPool.BLANK; try { WikiGroupServiceOverriddenConfiguration wikiGroupServiceOverriddenConfiguration = ConfigurationProviderUtil .getConfiguration(WikiGroupServiceOverriddenConfiguration.class, new GroupServiceSettingsLocator(themeDisplay.getScopeGroupId(), WikiConstants.SERVICE_NAME)); initialNodeName = wikiGroupServiceOverriddenConfiguration.initialNodeName(); } catch (ConfigurationException ce) { _log.error("Unable to get initial node name for group " + themeDisplay.getScopeGroupId()); } String name = BeanParamUtil.getString(node, portletRequest, "name", initialNodeName); if (Validator.isNotNull(name)) { try { node = _wikiNodeService.getNode(themeDisplay.getScopeGroupId(), name); } catch (NoSuchNodeException nsne) { node = null; } catch (PortalException pe) { _log.error(pe, pe); } } return node; }