List of usage examples for com.liferay.portal.kernel.model LayoutTypePortlet resetUserPreferences
public void resetUserPreferences();
From source file:com.liferay.layout.admin.web.internal.portlet.action.ResetCustomizationViewMVCActionCommand.java
License:Open Source License
@Override protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); if (!LayoutPermissionUtil.contains(themeDisplay.getPermissionChecker(), themeDisplay.getLayout(), ActionKeys.CUSTOMIZE)) {/*from w w w . j a v a2 s .c o m*/ throw new PrincipalException(); } LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); if ((layoutTypePortlet != null) && layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView()) { layoutTypePortlet.resetUserPreferences(); } MultiSessionMessages.add(actionRequest, _portal.getPortletId(actionRequest) + "requestProcessed"); Layout layout = themeDisplay.getLayout(); actionResponse.sendRedirect(layout.getRegularURL(_portal.getHttpServletRequest(actionRequest))); }