@@ -0,0 +1,2277 @@
+/*%0A * Copyright 2006-2011 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.consol.citrus.config.xml;%0A%0Aimport org.springframework.beans.factory.config.BeanDefinition;%0Aimport org.springframework.beans.factory.support.BeanDefinitionBuilder;%0Aimport org.springframework.beans.factory.xml.BeanDefinitionParser;%0Aimport org.springframework.beans.factory.xml.ParserContext;%0Aimport org.w3c.dom.Element;%0A%0Aimport com.consol.citrus.config.util.BeanDefinitionParserUtils;%0Aimport com.consol.citrus.container.Selection;%0A%0A/**%0A * Bean definition parser for selection container in test case.%0A *%0A * @author Matthias Beil%0A * @since CITRUS 1.2%0A */%0Apublic class SelectionParser implements BeanDefinitionParser %7B%0A%0A    /**%0A     * @see org.springframework.beans.factory.xml.BeanDefinitionParser#parse(org.w3c.dom.Element,%0A     *      org.springframework.beans.factory.xml.ParserContext)%0A     */%0A    public BeanDefinition parse(final Element element, final ParserContext parserContext) %7B%0A%0A        // create new bean builder%0A        final BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(Selection.class);%0A%0A        // see if there is a description%0A        DescriptionElementParser.doParse(element, builder);%0A%0A        // add the local name of this element as the name%0A        builder.addPropertyValue(%22name%22, element.getLocalName());%0A%0A        // set condition, which is mandatory%0A        BeanDefinitionParserUtils.setPropertyValue(builder, element.getAttribute(%22condition%22), %22condition%22);%0A%0A        // get all internal actions%0A        ActionContainerParser.doParse(element, parserContext, builder);%0A%0A        // finally return the complete builder with its bean definition%0A        return builder.getBeanDefinition();%0A    %7D%0A%0A%7D%0A

Add selection functionality