Package javax.portlet

Examples of javax.portlet.ActionRequest


            Thread.currentThread().setContextClassLoader(paClassLoader);

            if (method == ContainerConstants.METHOD_ACTION)
            {
                ActionRequest actionRequest = (ActionRequest) portletRequest;
                ActionResponse actionResponse = (ActionResponse) portletResponse;

                portletInstance.processAction(actionRequest, actionResponse);
            }
            else if (method == ContainerConstants.METHOD_RENDER)
View Full Code Here


        // add the cocoon header timestamp
        res.setProperty("X-Cocoon-Version", Constants.VERSION);

        // get the request (wrapped if contains multipart-form data)
        ActionRequest request;
        try {
            if (this.enableUploads) {
                request = requestFactory.getServletRequest(req);
            } else {
                request = req;
View Full Code Here

     * @see org.apache.pluto.factory.ActionRequestFactory#getActionRequest(org.apache.pluto.om.window.PortletWindow, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public ActionRequest getActionRequest(PortletWindow       portletWindow,
                                          HttpServletRequest  servletRequest,
                                          HttpServletResponse servletResponse) {
        ActionRequest actionRequest = new ActionRequestImpl(portletWindow, servletRequest, this.portalService.getComponentManager().getProfileManager().getUser());
        return actionRequest;
    }
View Full Code Here

     * methods that allow easier connection to those objects since the servlet
     * API doesn't provide those methods directly.
     */
    public ActionRequest getServletRequest(ActionRequest request)
    throws IOException, MultipartException {
        ActionRequest req = request;
        String contentType = request.getContentType();

        if ((contentType != null) && (contentType.toLowerCase().indexOf("multipart/form-data") > -1)) {
            if (request.getContentLength() > maxUploadSize) {
                throw new IOException("Content length exceeds maximum upload size.");
View Full Code Here

        // add the cocoon header timestamp
        res.setProperty("X-Cocoon-Version", Constants.VERSION);

        // get the request (wrapped if contains multipart-form data)
        ActionRequest request;
        try {
            if (this.enableUploads) {
                request = requestFactory.getServletRequest(req);
            } else {
                request = req;
            }
        } catch (Exception e) {
            if (getLogger().isErrorEnabled()) {
                getLogger().error("Problem with Cocoon portlet", e);
            }

            manageException(req, res, null, null,
                            "Problem in creating the Request", null, null, e);
            return;
        }

        // Get the cocoon engine instance
        getCocoon(request.getParameter(Constants.RELOAD_PARAM));

        // Check if cocoon was initialized
        if (this.cocoon == null) {
            manageException(request, res, null, null,
                            "Initialization Problem",
View Full Code Here

        portlet.init(config);

        verify();

        ActionRequest request = newActionRequest();
        ActionResponse response = newActionResponse();

        registry.setupThread();
       
        actionRequestServicer.service(request, response);
View Full Code Here

        portlet.init(config);

        verify();

        ActionRequest request = newActionRequest();
        ActionResponse response = newActionResponse();

        registry.setupThread();
       
        actionRequestServicer.service(request, response);
View Full Code Here

    }

    public void testActionBridgeSuccess() throws Exception
    {
        ActionRequest request = newMock(ActionRequest.class);
        ActionResponse response = newMock(ActionResponse.class);

        PortletRequestGlobals prg = newMock(PortletRequestGlobals.class);
        WebRequestServicerFixture wrs = new WebRequestServicerFixture();

        prg.store(request, response);
       
        request.removeAttribute("FOO");
        expect(response.encodeURL("FOO")).andReturn(null);

        replay();

        ActionRequestServicerToWebRequestServicerBridge bridge =
View Full Code Here

        verify();
    }

    public void testActionBridgeFailure() throws Exception
    {
        ActionRequest request = newMock(ActionRequest.class);
        ActionResponse response = newMock(ActionResponse.class);
        PortletRequestGlobals prg = newMock(PortletRequestGlobals.class);
       
        WebRequestServicer servicer = newMock(WebRequestServicer.class);
       
View Full Code Here

  }

  public void setRequestCharacterEncoding(String encoding)
      throws UnsupportedEncodingException {
    try {
      ActionRequest actionRequest = (ActionRequest) getPortletRequest();
      actionRequest.setCharacterEncoding(encoding);
    } catch (IllegalStateException e) {
      // TODO: handle exception
    }
  }
View Full Code Here

TOP

Related Classes of javax.portlet.ActionRequest

Copyright © 2018 www.massapicom. 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.