Package org.jboss.metadata.annotation.creator.web

Examples of org.jboss.metadata.annotation.creator.web.ServletSecurityProcessor


            }
        }
        // @ServletSecurity
        final List<AnnotationTarget> servletSecurityAnnotationTargets = index.getAnnotationTargets(servletSecurity);
        if (servletSecurityAnnotationTargets != null && servletSecurityAnnotationTargets.size() > 0) {
            ServletSecurityProcessor processor = new ServletSecurityProcessor(finder);
            AnnotationsMetaData annotations = metaData.getAnnotations();
            if (annotations == null) {
               annotations = new AnnotationsMetaData();
               metaData.setAnnotations(annotations);
            }
            for (final AnnotationTarget target : servletSecurityAnnotationTargets) {
                if (!(target instanceof ClassInfo)) {
                    throw new DeploymentUnitProcessingException("@ServletSecurity is only allowed at class level " + target);
                }
                ClassInfo classInfo = ClassInfo.class.cast(target);
                Class<?> type = null;
                try {
                    type = classLoader.loadClass(classInfo.name().toString());
                } catch (Exception e) {
                    throw new DeploymentUnitProcessingException("Could not process @ServletSecurity on " + target);
                }
                if (type != null) {
                    processor.process(annotations, type);
                }
            }
        }
        return metaData;
    }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.annotation.creator.web.ServletSecurityProcessor

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.