Package javax.portlet

Examples of javax.portlet.ClientDataRequest


        final HttpServletRequest servletRequest = (HttpServletRequest) request;
        if (servletRequest.getCharacterEncoding() == null) {
          servletRequest.setCharacterEncoding("UTF-8");
        }
      } else if (PortletUtils.isPortletApiAvailable() && request instanceof ClientDataRequest) {
        final ClientDataRequest portletRequest = (ClientDataRequest) request;
        if (portletRequest.getCharacterEncoding() == null) {
          portletRequest.setCharacterEncoding("UTF-8");
        }
      }
    } catch (final UnsupportedEncodingException e) {
      LOG.error("" + e, e);
    }
View Full Code Here


  public String getCharacterEncoding() {
    if (!(_portletRequest instanceof ClientDataRequest)) {
      return _httpServletRequest.getCharacterEncoding();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    return clientDataRequest.getCharacterEncoding();
  }
View Full Code Here

  public int getContentLength() {
    if (!(_portletRequest instanceof ClientDataRequest)) {
      return _httpServletRequest.getContentLength();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    return clientDataRequest.getContentLength();
  }
View Full Code Here

  public String getContentType() {
    if (!(_portletRequest instanceof ClientDataRequest)) {
      return _httpServletRequest.getContentType();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    return clientDataRequest.getContentType();
  }
View Full Code Here

    if (_servletInputStream == null) {
      if (!(_portletRequest instanceof ClientDataRequest)) {
        return _httpServletRequest.getInputStream();
      }

      ClientDataRequest clientDataRequest =
        (ClientDataRequest)_portletRequest;

      _servletInputStream = new ServletInputStreamAdapter(
        clientDataRequest);
    }
View Full Code Here

  public String getMethod() {
    if (!(_portletRequest instanceof ClientDataRequest)) {
      return _httpServletRequest.getMethod();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    return clientDataRequest.getMethod();
  }
View Full Code Here

  public BufferedReader getReader() throws IOException {
    if (!(_portletRequest instanceof ClientDataRequest)) {
      return _httpServletRequest.getReader();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    return clientDataRequest.getReader();
  }
View Full Code Here

    if (!(_portletRequest instanceof ClientDataRequest)) {
      throw new UnsupportedOperationException();
    }

    ClientDataRequest clientDataRequest =
      (ClientDataRequest)_portletRequest;

    clientDataRequest.setCharacterEncoding(encoding);
  }
View Full Code Here

  @Override
  public String getRequestCharacterEncoding() {

    if (portletRequest instanceof ClientDataRequest) {
      ClientDataRequest clientDataRequest = (ClientDataRequest) portletRequest;
      String requestCharacterEncoding = clientDataRequest.getCharacterEncoding();

      if (manageIncongruities) {

        try {
          incongruityContext.setRequestCharacterEncoding(requestCharacterEncoding);
View Full Code Here

    // Although the JSF API's ViewHandler.initView(FacesContext) method will call this method during the portlet
    // RENDER_PHASE, the RenderRequest does not implement the ClientDataRequest interface, which means it does not
    // have a setCharacterEncoding(String) method, therefore this should only be done in the case of a
    // ClientDataRequest.
    if (portletRequest instanceof ClientDataRequest) {
      ClientDataRequest clientDataRequest = (ClientDataRequest) portletRequest;

      try {
        clientDataRequest.setCharacterEncoding(encoding);
      }
      catch (IllegalStateException e) {
        // TestPage141: setRequestCharacterEncodingActionTest -- exception is to be ignored
      }
    }
View Full Code Here

TOP

Related Classes of javax.portlet.ClientDataRequest

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.