Examples of MultipartConfig


Examples of com.liferay.faces.util.config.MultiPartConfig

    return strippedFileName;
  }

  protected MultiPartConfig getFacesServletMultiPartConfig(ExternalContext externalContext) {

    MultiPartConfig facesServletMultiPartConfig = null;

    String appConfigAttrName = ApplicationConfig.class.getName();
    Map<String, Object> applicationMap = externalContext.getApplicationMap();
    ApplicationConfig applicationConfig = (ApplicationConfig) applicationMap.get(appConfigAttrName);
    WebConfig webConfig = applicationConfig.getWebConfig();
View Full Code Here

Examples of com.sun.enterprise.deployment.web.MultipartConfig

        }
        if (descriptor.isAsyncSupported() == null) {
            descriptor.setAsyncSupported(false);
        }

        MultipartConfig multipartConfig = descriptor.getMultipartConfig();
        if (multipartConfig != null) {
            if (multipartConfig.getMaxFileSize() == null) {
                multipartConfig.setMaxFileSize(new Long(-1));
            }
            if (multipartConfig.getMaxRequestSize() == null) {
                multipartConfig.setMaxRequestSize(new Long(-1));
            }
            if (multipartConfig.getFileSizeThreshold() == null) {
                multipartConfig.setFileSizeThreshold(new Integer(0));
            }
        }

        computeRuntimeDefault(descriptor);
    }
View Full Code Here

Examples of com.sun.jersey.multipart.MultiPartConfig

    public Injectable<MultiPartConfig> getInjectable(ComponentContext ic, Context a, Type t) {
        if (MultiPartConfig.class != t) {
            return null;
        }
        final MultiPartConfig mpc = new MultiPartConfig();
        return new Injectable<MultiPartConfig>() {
            public MultiPartConfig getValue() {
                return mpc;
            }
        };
View Full Code Here

Examples of com.sun.jersey.multipart.MultiPartConfig

        headers.add("mime-version", "1.0");
        headers.add("content-length", "160");
        headers.add("accept", "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2");
        headers.add("content-type", "multipart/form-data;boundary=\"Boundary_1_531119742_1349960036122\"");

        final MultiPartReaderClientSide multiPartReader = new MultiPartReaderClientSide(null, new MultiPartConfig());

        final ByteArrayInputStream stream = new ByteArrayInputStream(requestBody.getBytes());
        final MultiPart multiPart = multiPartReader.readFrom(
                MultiPart.class,
                FormDataMultiPart.class,
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }
     
      if (servletClass != null) {
        MultipartConfig config
          = (MultipartConfig) servletClass.getAnnotation(MultipartConfig.class);

        if (config != null)
          _multipartConfigElement = new MultipartConfigElement(config);
      }
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

                throw new ServletException
                    (sm.getString("standardWrapper.instantiate", servletClass), e);
            }

            if (multipartConfigElement == null) {
                MultipartConfig annotation =
                        servlet.getClass().getAnnotation(MultipartConfig.class);
                if (annotation != null) {
                    multipartConfigElement =
                            new MultipartConfigElement(annotation);
                }
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

                            .setTransportGuaranteeType(constraint.transportGuarantee() == ServletSecurity.TransportGuarantee.CONFIDENTIAL ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE)
                            .addRolesAllowed(constraint.rolesAllowed());
                }
                servletInfo.setServletSecurityInfo(servletSecurityInfo);
            }
            final MultipartConfig multipartConfig = servletInfo.getServletClass().getAnnotation(MultipartConfig.class);
            if(multipartConfig != null) {
                servletInfo.setMultipartConfig(new MultipartConfigElement(multipartConfig.location(), multipartConfig.maxFileSize(), multipartConfig.maxRequestSize(), multipartConfig.fileSizeThreshold()));
            }
            final RunAs runAs = servletInfo.getServletClass().getAnnotation(RunAs.class);
            if(runAs != null) {
                servletInfo.setRunAs(runAs.value());
            }
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

                throw new ServletException
                    (sm.getString("standardWrapper.instantiate", servletClass), e);
            }

            if (multipartConfigElement == null) {
                MultipartConfig annotation =
                        servlet.getClass().getAnnotation(MultipartConfig.class);
                if (annotation != null) {
                    multipartConfigElement =
                            new MultipartConfigElement(annotation);
                }
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

                    if (!webServlet.largeIcon().isEmpty()) {
                        icon.setLargeIcon(webServlet.largeIcon());
                    }
                    newServlet.getIconMap().put(null, icon);
                }
                MultipartConfig multipartConfig = cls.getAnnotation(MultipartConfig.class);
                if (multipartConfig != null) {
                    org.apache.openejb.jee.MultipartConfig mpc = new org.apache.openejb.jee.MultipartConfig();
                    mpc.setFileSizeThreshold(multipartConfig.fileSizeThreshold());
                    mpc.setLocation(multipartConfig.location());
                    mpc.setMaxFileSize(multipartConfig.maxFileSize());
                    mpc.setMaxRequestSize(multipartConfig.maxRequestSize());
                    newServlet.setMultipartConfig(mpc);
                }
                webApp.getServlet().add(newServlet);
                ServletMergeHandler.addServlet(newServlet, mergeContext);
            }
View Full Code Here

Examples of javax.servlet.annotation.MultipartConfig

                            .setTransportGuaranteeType(constraint.transportGuarantee() == ServletSecurity.TransportGuarantee.CONFIDENTIAL ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE)
                            .addRolesAllowed(constraint.rolesAllowed());
                }
                servletInfo.setServletSecurityInfo(servletSecurityInfo);
            }
            final MultipartConfig multipartConfig = servletInfo.getServletClass().getAnnotation(MultipartConfig.class);
            if(multipartConfig != null) {
                servletInfo.setMultipartConfig(new MultipartConfigElement(multipartConfig.location(), multipartConfig.maxFileSize(), multipartConfig.maxRequestSize(), multipartConfig.fileSizeThreshold()));
            }
            final RunAs runAs = servletInfo.getServletClass().getAnnotation(RunAs.class);
            if(runAs != null) {
                servletInfo.setRunAs(runAs.value());
            }
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.