コード例 #1
0
  @Override
  public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
      throws IOException, PortletException {

    super.processAction(actionRequest, actionResponse);

    MultiSessionMessages.add(
        actionRequest, PortalUtil.getPortletId(actionRequest) + "requestProcessed");
  }
コード例 #2
0
  public void resetPrototype(ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    SitesUtil.resetPrototype(themeDisplay.getLayout());

    MultiSessionMessages.add(
        actionRequest, PortalUtil.getPortletId(actionRequest) + "requestProcessed");
  }
コード例 #3
0
  public void resetCustomizationView(ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    if (!LayoutPermissionUtil.contains(
        themeDisplay.getPermissionChecker(), themeDisplay.getLayout(), ActionKeys.CUSTOMIZE)) {

      throw new PrincipalException();
    }

    LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet();

    if ((layoutTypePortlet != null)
        && layoutTypePortlet.isCustomizable()
        && layoutTypePortlet.isCustomizedView()) {

      layoutTypePortlet.resetUserPreferences();
    }

    MultiSessionMessages.add(
        actionRequest, PortalUtil.getPortletId(actionRequest) + "requestProcessed");
  }