Package org.jboss.metadata.web.spec

Examples of org.jboss.metadata.web.spec.MultipartConfigMetaData


            wrapper.setAsyncSupported(value.isAsyncSupported());
            wrapper.setEnabled(value.isEnabled());
            // Multipart configuration
            if (value.getMultipartConfig() != null)
            {
               MultipartConfigMetaData multipartConfigMetaData = value.getMultipartConfig();
               Multipart multipartConfig = new Multipart();
               multipartConfig.setLocation(multipartConfigMetaData.getLocation());
               multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
               multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
               multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
               wrapper.setMultipartConfig(multipartConfig);
             }
            context.addChild(wrapper);
         }
      }
View Full Code Here


                      wrapper.setRunAs(annotation.getRunAs().getRoleName());
                   }
                   // Merge @MultipartConfig
                   if (annotation.getMultipartConfig() != null && wrapper.getMultipartConfig() == null)
                   {
                      MultipartConfigMetaData multipartConfigMetaData = annotation.getMultipartConfig();
                      Multipart multipartConfig = new Multipart();
                      multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                      multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                      multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                      multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                      wrapper.setMultipartConfig(multipartConfig);
                   }
                   // Merge @ServletSecurity
                   if (annotation.getServletSecurity() != null && wrapper.getServletSecurity() == null)
                   {
View Full Code Here

                }
                wrapper.setAsyncSupported(value.isAsyncSupported());
                wrapper.setEnabled(value.isEnabled());
                // Multipart configuration
                if (value.getMultipartConfig() != null) {
                    MultipartConfigMetaData multipartConfigMetaData = value.getMultipartConfig();
                    Multipart multipartConfig = new Multipart();
                    multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                    multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                    multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                    multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                    wrapper.setMultipartConfig(multipartConfig);
                }
                context.addChild(wrapper);
            }
        }
View Full Code Here

                        if (annotation.getRunAs() != null && wrapper.getRunAs() == null) {
                            wrapper.setRunAs(annotation.getRunAs().getRoleName());
                        }
                        // Merge @MultipartConfig
                        if (annotation.getMultipartConfig() != null && wrapper.getMultipartConfig() == null) {
                            MultipartConfigMetaData multipartConfigMetaData = annotation.getMultipartConfig();
                            Multipart multipartConfig = new Multipart();
                            multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                            multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                            multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                            multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                            wrapper.setMultipartConfig(multipartConfig);
                        }
                        // Merge @ServletSecurity
                        if (annotation.getServletSecurity() != null && wrapper.getServletSecurity() == null) {
                            ServletSecurityMetaData servletSecurityAnnotation = annotation.getServletSecurity();
View Full Code Here

                }
                wrapper.setAsyncSupported(value.isAsyncSupported());
                wrapper.setEnabled(value.isEnabled());
                // Multipart configuration
                if (value.getMultipartConfig() != null) {
                    MultipartConfigMetaData multipartConfigMetaData = value.getMultipartConfig();
                    Multipart multipartConfig = new Multipart();
                    multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                    multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                    multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                    multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                    wrapper.setMultipartConfig(multipartConfig);
                }
                context.addChild(wrapper);
            }
        }
View Full Code Here

                        if (annotation.getRunAs() != null && wrapper.getRunAs() == null) {
                            wrapper.setRunAs(annotation.getRunAs().getRoleName());
                        }
                        // Merge @MultipartConfig
                        if (annotation.getMultipartConfig() != null && wrapper.getMultipartConfig() == null) {
                            MultipartConfigMetaData multipartConfigMetaData = annotation.getMultipartConfig();
                            Multipart multipartConfig = new Multipart();
                            multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                            multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                            multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                            multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                            wrapper.setMultipartConfig(multipartConfig);
                        }
                        // Merge @ServletSecurity
                        if (annotation.getServletSecurity() != null && wrapper.getServletSecurity() == null) {
                            ServletSecurityMetaData servletSecurityAnnotation = annotation.getServletSecurity();
View Full Code Here

                }
                wrapper.setAsyncSupported(value.isAsyncSupported());
                wrapper.setEnabled(value.isEnabled());
                // Multipart configuration
                if (value.getMultipartConfig() != null) {
                    MultipartConfigMetaData multipartConfigMetaData = value.getMultipartConfig();
                    Multipart multipartConfig = new Multipart();
                    multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                    multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                    multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                    multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                    wrapper.setMultipartConfig(multipartConfig);
                }
                context.addChild(wrapper);
            }
        }
View Full Code Here

                        if (annotation.getRunAs() != null && wrapper.getRunAs() == null) {
                            wrapper.setRunAs(annotation.getRunAs().getRoleName());
                        }
                        // Merge @MultipartConfig
                        if (annotation.getMultipartConfig() != null && wrapper.getMultipartConfig() == null) {
                            MultipartConfigMetaData multipartConfigMetaData = annotation.getMultipartConfig();
                            Multipart multipartConfig = new Multipart();
                            multipartConfig.setLocation(multipartConfigMetaData.getLocation());
                            multipartConfig.setMaxRequestSize(multipartConfigMetaData.getMaxRequestSize());
                            multipartConfig.setMaxFileSize(multipartConfigMetaData.getMaxFileSize());
                            multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
                            wrapper.setMultipartConfig(multipartConfig);
                        }
                        // Merge @ServletSecurity
                        if (annotation.getServletSecurity() != null && wrapper.getServletSecurity() == null) {
                            ServletSecurityMetaData servletSecurityAnnotation = annotation.getServletSecurity();
View Full Code Here

                if (annotationMD == null) {
                    annotationMD = new AnnotationMetaData();
                    annotationMD.setClassName(classInfo.toString());
                    annotations.add(annotationMD);
                }
                MultipartConfigMetaData multipartConfig = new MultipartConfigMetaData();
                AnnotationValue locationValue = annotation.value("location");
                if (locationValue != null && locationValue.asString().length() > 0) {
                    multipartConfig.setLocation(locationValue.asString());
                }
                AnnotationValue maxFileSizeValue = annotation.value("maxFileSize");
                if (maxFileSizeValue != null && maxFileSizeValue.asLong() != -1L) {
                    multipartConfig.setMaxFileSize(maxFileSizeValue.asLong());
                }
                AnnotationValue maxRequestSizeValue = annotation.value("maxRequestSize");
                if (maxRequestSizeValue != null && maxRequestSizeValue.asLong() != -1L) {
                    multipartConfig.setMaxRequestSize(maxRequestSizeValue.asLong());
                }
                AnnotationValue fileSizeThresholdValue = annotation.value("fileSizeThreshold");
                if (fileSizeThresholdValue != null && fileSizeThresholdValue.asInt() != 0) {
                    multipartConfig.setFileSizeThreshold(fileSizeThresholdValue.asInt());
                }
                annotationMD.setMultipartConfig(multipartConfig);
            }
        }
        // @ServletSecurity
View Full Code Here

            }
        }
        if(jsf != null) {
            if(jsf.getMultipartConfig() == null) {
                //WFLY-2329 File upload doesn't work
                jsf.setMultipartConfig(new MultipartConfigMetaData());
            }
        }

    }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.spec.MultipartConfigMetaData

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.