Package org.jboss.metadata.web.spec

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


            // Drop the order as there is no fragment in the webapp
            orderings.clear();
        }

        // Generate web fragments parsing order
        AbsoluteOrderingMetaData absoluteOrderingMetaData = null;
        if (!isComplete && specMetaData instanceof Web30MetaData) {
            absoluteOrderingMetaData = ((Web30MetaData) specMetaData).getAbsoluteOrdering();
        }
        if (absoluteOrderingMetaData != null) {
            // Absolute ordering from web.xml, any relative fragment ordering is
            // ignored
            int otherPos = -1;
            int i = 0;
            for (OrderingElementMetaData orderingElementMetaData : absoluteOrderingMetaData.getOrdering()) {
                if (orderingElementMetaData.isOthers()) {
                    if (otherPos >= 0) {
                        throw new DeploymentUnitProcessingException("Duplicate others in absolute ordering");
                    }
                    otherPos = i;
View Full Code Here


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

    public static AbsoluteOrderingMetaData parse(XMLStreamReader reader) throws XMLStreamException {
        AbsoluteOrderingMetaData ordering = new AbsoluteOrderingMetaData();

        // Handle elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case NAME:
                    List<OrderingElementMetaData> order = ordering.getOrdering();
                    if (order == null) {
                        order = new ArrayList<OrderingElementMetaData>();
                        ordering.setOrdering(order);
                    }
                    NameMetaData name = new NameMetaData();
                    name.setName(reader.getElementText());
                    order.add(name);
                    break;
                case OTHERS:
                    List<OrderingElementMetaData> order2 = ordering.getOrdering();
                    if (order2 == null) {
                        order2 = new ArrayList<OrderingElementMetaData>();
                        ordering.setOrdering(order2);
                    }
                    OthersMetaData others = new OthersMetaData();
                    order2.add(others);
                    requireNoContent(reader);
                    break;
View Full Code Here

TOP

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

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.