Examples of RegexOperationSelectorModel


Examples of org.switchyard.config.model.selector.RegexOperationSelectorModel

        } else if (_model instanceof XPathOperationSelectorModel) {
            XPathOperationSelectorModel xpathModel = XPathOperationSelectorModel.class.cast(_model);
            operationQName = xpathMatch(xpathModel.getExpression(), extractDomDocument(content));
        } else if (_model instanceof RegexOperationSelectorModel) {
            RegexOperationSelectorModel regexModel = RegexOperationSelectorModel.class.cast(_model);
            operationQName = regexMatch(regexModel.getExpression(), extractString(content));
        } else {
            throw CommonCommonMessages.MESSAGES.unsupportedOperationSelectorConfiguration(_model.toString());
        }
       
        if (_defaultNamespace != null && operationQName.getNamespaceURI().equals(XMLConstants.NULL_NS_URI)) {
View Full Code Here

Examples of org.switchyard.config.model.selector.RegexOperationSelectorModel

    @Test
    public void testRegex() throws Exception {
        String expression = "[a-zA-Z]*Operation";
        String content = "xxx yyy zzz regexOperation aaa bbb ccc";

        RegexOperationSelectorModel model = new V1RegexOperationSelectorModel(SwitchYardNamespace.DEFAULT.uri());
        model.setExpression(expression);
        OperationSelector<String> selector = new MyOperationSelector(model);
        QName operationQName = selector.selectOperation(content);
        Assert.assertEquals("regexOperation", operationQName.getLocalPart());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.