List of usage examples for com.liferay.portal.kernel.portlet PortalPreferences getValues
public String[] getValues(String namespace, String key);
From source file:com.liferay.journal.web.internal.portlet.JournalPortlet.java
License:Open Source License
public void removeAddMenuFavItem(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { String ddmStructureKey = ParamUtil.getString(actionRequest, "ddmStructureKey"); PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(actionRequest); String key = JournalPortletUtil.getAddMenuFavItemKey(actionRequest, actionResponse); String[] addMenuFavItems = portalPreferences.getValues(JournalPortletKeys.JOURNAL, key); portalPreferences.setValues(JournalPortletKeys.JOURNAL, key, ArrayUtil.remove(addMenuFavItems, ddmStructureKey)); SessionMessages.add(actionRequest,//from w ww. j av a 2 s . c om _portal.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_REFRESH_PORTLET, JournalPortletKeys.JOURNAL); }