Package org.jboss.seam.web

Examples of org.jboss.seam.web.MultipartRequest$Param


            JSONArray jsonArray = jsonObject.getJSONArray("params");
            for(int i=0; i<jsonArray.length(); i++) {
                try {
                    String paramName    = jsonArray.getJSONObject(i).getString("name");
                    String paramDefault = jsonArray.getJSONObject(i).getString("default");
                    Param param = request.addNewParam();
                    param.setName(paramName);
                    param.setDefault(paramDefault);
                    param.setStyle(ParamStyle.Enum.forString("query"));
                    param.setType("xs:string");
                } catch (JSONException ex) {
                    Logger.getLogger(WADLGenerator.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        } catch (JSONException ex) {
View Full Code Here


            public void doFilter(ServletRequest request, ServletResponse response)
                    throws IOException, ServletException
            {
                assert request instanceof MultipartRequest;
                MultipartRequest multipartRequest = (MultipartRequest) request;
                assert multipartRequest.getParameterMap().containsKey("foo");
        // Test passthrough parameters
                assert multipartRequest.getParameterValues("foo").length == 1;
                assert "bar".equals(multipartRequest.getParameterValues("foo")[0]);
               
                // TODO Test a multipart request
            }
           
        };
View Full Code Here

         request = unwrapMultipartRequest(request);
      }

      if (request instanceof MultipartRequest)
      {
         MultipartRequest multipartRequest = (MultipartRequest) request;

         String clientId = component.getClientId(context);
         fileUpload.setLocalInputStream(multipartRequest.getFileInputStream(clientId));
         fileUpload.setLocalContentType(multipartRequest.getFileContentType(clientId));
         fileUpload.setLocalFileName(multipartRequest.getFileName(clientId));
         fileUpload.setLocalFileSize(multipartRequest.getFileSize(clientId));
      }
   }
View Full Code Here

            public void doFilter(ServletRequest request, ServletResponse response)
                    throws IOException, ServletException
            {
                assert request instanceof MultipartRequest;
                MultipartRequest multipartRequest = (MultipartRequest) request;
                assert multipartRequest.getParameterMap().containsKey("foo");
        // Test passthrough parameters
                assert multipartRequest.getParameterValues("foo").length == 1;
                assert "bar".equals(multipartRequest.getParameterValues("foo")[0]);
               
                // TODO Test a multipart request
            }
           
        };
View Full Code Here

         request = unwrapMultipartRequest(request);
      }

      if (request instanceof MultipartRequest)
      {
         MultipartRequest req = (MultipartRequest) request;
        
         String clientId = getClientId(context);        
         String contentType = req.getFileContentType(clientId);
         String fileName = req.getFileName(clientId);
         int fileSize = req.getFileSize(clientId);
                 
         ValueBinding dataBinding = getValueBinding("data");
         if (dataBinding != null)
         {
            Class cls = dataBinding.getType(context);
            if (cls.isAssignableFrom(InputStream.class))
            {
               dataBinding.setValue(context, req.getFileInputStream(clientId));
            }
            else if (cls.isAssignableFrom(byte[].class))
            {
               dataBinding.setValue(context, req.getFileBytes(clientId));
            }
         }
        
         ValueBinding vb = getValueBinding("contentType");
         if (vb != null)
View Full Code Here

TOP

Related Classes of org.jboss.seam.web.MultipartRequest$Param

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.