Package org.jboss.metadata.web.spec

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


/* 155 */                 info.isMissingAuthConstraint = true;
/*     */             }
/*     */           }
/*     */       }
/*     */     }
/*     */     SecurityConstraintMetaData sc;
/*     */     TransportGuaranteeType transport;
/* 163 */     for (PatternInfo info : patternMap.values())
/*     */     {
/* 165 */       String qurl = info.getQualifiedPattern();
/* 166 */       if (info.isOverriden == true)
View Full Code Here


* @author Remy Maucherat
*/
public class SecurityConstraintMetaDataParser extends MetaDataElementParser {

    public static SecurityConstraintMetaData parse(XMLStreamReader reader) throws XMLStreamException {
        SecurityConstraintMetaData securityConstraint = new SecurityConstraintMetaData();

        // Handle attributes
        final int count = reader.getAttributeCount();
        for (int i = 0; i < count; i ++) {
            final String value = reader.getAttributeValue(i);
            if (reader.getAttributeNamespace(i) != null) {
                continue;
            }
            final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ID: {
                    securityConstraint.setId(value);
                    break;
                }
                default: throw unexpectedAttribute(reader, i);
            }
        }

        // Handle elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case DISPLAY_NAME:
                    securityConstraint.setDisplayName(reader.getElementText());
                    break;
                case WEB_RESOURCE_COLLECTION:
                    WebResourceCollectionsMetaData resourceCollections = securityConstraint.getResourceCollections();
                    if (resourceCollections == null) {
                        resourceCollections = new WebResourceCollectionsMetaData();
                        securityConstraint.setResourceCollections(resourceCollections);
                    }
                    resourceCollections.add(WebResourceCollectionMetaDataParser.parse(reader));
                    break;
                case AUTH_CONSTRAINT:
                    securityConstraint.setAuthConstraint(AuthConstraintMetaDataParser.parse(reader));
                    break;
                case USER_DATA_CONSTRAINT:
                    securityConstraint.setUserDataConstraint(UserDataConstraintMetaDataParser.parse(reader));
                    break;
                default: throw unexpectedElement(reader);
            }
        }

View Full Code Here

TOP

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

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.