Examples of ActionRequestImpl


Examples of com.liferay.portlet.ActionRequestImpl

    String[] publishInode = req.getParameterValues("publishInode");

    if (publishInode == null)
      return;

    ActionRequestImpl reqImpl = (ActionRequestImpl) req;

    for (int i = 0; i < publishInode.length; i++) {
      HTMLPage htmlpage = (HTMLPage) InodeFactory.getInode(publishInode[i], HTMLPage.class);

      if (InodeUtils.isSet(htmlpage.getInode())) {
        // calls the asset factory edit
        try {
          PublishFactory.publishAsset(htmlpage, reqImpl.getHttpServletRequest());
          ActivityLogger.logInfo(PublishFactory.class, "Publishing HTMLpage action", "User " + user + " publishing page " + htmlpage.getTitle(), HostUtil.hostNameUtil(req, _getUser(req)));
          SessionMessages.add(reqImpl.getHttpServletRequest(), "message", "message.htmlpage_list.published");
        } catch (WebAssetException wax) {
          Logger.error(this, wax.getMessage(), wax);
          SessionMessages.add(reqImpl.getHttpServletRequest(), "error", "message.webasset.published.failed");
        }
      }
    }

  }
View Full Code Here

Examples of com.liferay.portlet.ActionRequestImpl

        List<UserProxy> userProxies = null;
        if (!UserManagerListBuilderFactory.isFullCommand(req)) {
            String userIds = req.getParameter("users");
            userProxies = UserManagerListBuilderFactory.getUserProxiesFromList(userIds);
        } else {
            ActionRequestImpl reqImpl = (ActionRequestImpl) req;
            HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
            UserManagerListSearchForm userManagerListSearchForm = (UserManagerListSearchForm) httpReq.getSession().getAttribute(
                    WebKeys.USERMANAGERLISTFORM);
            if (userManagerListSearchForm == null)
                userProxies = new ArrayList<UserProxy>();
            else
View Full Code Here

Examples of com.liferay.portlet.ActionRequestImpl

    String cmd = req.getParameter(Constants.CMD);
    String referer = req.getParameter("referer");

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    if ((referer != null) && (referer.length() != 0)) {
      referer = URLDecoder.decode(referer, "UTF-8");
    }
View Full Code Here

Examples of org.apache.pluto.core.impl.ActionRequestImpl

    // org.apache.pluto.factory.ActionRequestFactory implementation -------------------------------
    public ActionRequest getActionRequest(PortletWindow portletWindow,
                                          javax.servlet.http.HttpServletRequest servletRequest,
                                          javax.servlet.http.HttpServletResponse servletResponse)
    {
        ActionRequest actionRequest = new ActionRequestImpl(portletWindow, servletRequest);
        return actionRequest;
    }
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

        InternalPortletWindow internalPortletWindow =
              new PortletWindowImpl(servletContext, portletWindow);
      debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());
     
        ActionRequestImpl actionRequest = new ActionRequestImpl(
            this, internalPortletWindow, request);
        ActionResponseImpl actionResponse = new ActionResponseImpl(
            this, internalPortletWindow, request, response);
       
        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
        invoker.action(actionRequest, actionResponse);
        debugWithName("Portlet action processed for: "
            + portletWindow.getPortletName());
       
        // After processing action, send a redirect URL for rendering.
        String location = actionResponse.getRedirectLocation();

        if (location == null) {
         
          // Create portlet URL provider to encode redirect URL.
          debugWithName("No redirect location specified.");
            PortletURLProvider redirectURL = requiredContainerServices
                .getPortalCallbackService()
                .getPortletURLProvider(request, internalPortletWindow);
           
            // Encode portlet mode if it is changed.
            if (actionResponse.getChangedPortletMode() != null) {
                redirectURL.setPortletMode(
                    actionResponse.getChangedPortletMode());
            }
           
            // Encode window state if it is changed.
            if (actionResponse.getChangedWindowState() != null) {
                redirectURL.setWindowState(
                    actionResponse.getChangedWindowState());
            }
           
            // Encode render parameters retrieved from action response.
            Map renderParameters = actionResponse.getRenderParameters();
            redirectURL.clearParameters();
            redirectURL.setParameters(renderParameters);
           
            // Encode redirect URL as a render URL.
            redirectURL.setAction(false);
           
            // Set secure of the redirect URL if necessary.
            if (actionRequest.isSecure()) {
                redirectURL.setSecure();
            }
           
            // Encode the redirect URL to a string.
            location = actionResponse.encodeRedirectURL(redirectURL.toString());
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

               
            }
           
            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                      (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                      (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

        InternalPortletWindow internalPortletWindow =
              new PortletWindowImpl(servletContext, portletWindow);
      debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());
     
        ActionRequestImpl actionRequest = new ActionRequestImpl(
            this, internalPortletWindow, request);
        ActionResponseImpl actionResponse = new ActionResponseImpl(
            this, internalPortletWindow, request, response);
       
        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
        invoker.action(actionRequest, actionResponse);
        debugWithName("Portlet action processed for: "
            + portletWindow.getPortletName());
       
        // After processing action, send a redirect URL for rendering.
        String location = actionResponse.getRedirectLocation();

        if (location == null) {
         
          // Create portlet URL provider to encode redirect URL.
          debugWithName("No redirect location specified.");
            PortletURLProvider redirectURL = requiredContainerServices
                .getPortalCallbackService()
                .getPortletURLProvider(request, internalPortletWindow);
           
            // Encode portlet mode if it is changed.
            if (actionResponse.getChangedPortletMode() != null) {
                redirectURL.setPortletMode(
                    actionResponse.getChangedPortletMode());
            }
           
            // Encode window state if it is changed.
            if (actionResponse.getChangedWindowState() != null) {
                redirectURL.setWindowState(
                    actionResponse.getChangedWindowState());
            }
           
            // Encode render parameters retrieved from action response.
            Map renderParameters = actionResponse.getRenderParameters();
            redirectURL.clearParameters();
            redirectURL.setParameters(renderParameters);
           
            // Encode redirect URL as a render URL.
            redirectURL.setAction(false);
           
            // Set secure of the redirect URL if necessary.
            if (actionRequest.isSecure()) {
                redirectURL.setSecure();
            }
           
            // Encode the redirect URL to a string.
            location = actionResponse.encodeRedirectURL(redirectURL.toString());
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

    public InternalActionRequest createActionRequest(PortletContainer container,
                                                     HttpServletRequest request,
                                                     HttpServletResponse response,
                                                     InternalPortletWindow internalPortletWindow) {
        return new ActionRequestImpl(container, internalPortletWindow, request);
    }
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

            }

            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                    (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                    (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }
View Full Code Here

Examples of org.apache.pluto.internal.impl.ActionRequestImpl

            }

            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                    (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                    (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.