Examples of MatchResultSubstitution


Examples of com.alibaba.citrus.util.internal.regex.MatchResultSubstitution

    private boolean findBestMatch() throws ResourceNotFoundException {
        if (resourcesMatcher.matches(resourceName)) {
            ResourceMapping resourceMapping = resourcesMatcher.bestMatchPettern;

            lastMatchedPattern = resourceMapping;
            lastSubstitution = new MatchResultSubstitution(resourcesMatcher.bestMatchResult);

            // �ݹ����resource alias��ֱ��һ��resource mapping��ƥ��Ϊֹ
            if (resourceMapping instanceof ResourceAlias) {
                ResourceAlias alias = (ResourceAlias) resourceMapping;
View Full Code Here

Examples of com.alibaba.citrus.util.internal.regex.MatchResultSubstitution

    public Resource getResource() throws ResourceNotFoundException {
        if (filtersMatcher.matches(resourceName)) {
            ResourceFilterMapping filterMapping = filtersMatcher.bestMatchPettern;

            lastMatchedPattern = filterMapping;
            lastSubstitution = new MatchResultSubstitution(filtersMatcher.bestMatchResult);

            log.debug("Resource \"{}\" matched resource-filters pattern: \"{}\"", resourceName,
                    filterMapping.getPatternName());

            ResourceFilterChain root = this; // as ResourceFilterChain
View Full Code Here

Examples of com.alibaba.citrus.util.internal.regex.MatchResultSubstitution

            Matcher matcher = this.pattern.matcher(name);

            assertTrue(matcher.find());

            this.subs = new MatchResultSubstitution(matcher);
        }
View Full Code Here

Examples of com.alibaba.citrus.util.internal.regex.MatchResultSubstitution

                    continue;
                }
            }

            // ��rule��condition��ƥ�������滻����
            MatchResultSubstitution resultSubs = getMatchResultSubstitution(ruleMatchResult, conditionMatchResult);

            // �滻path
            log.debug("Rule conditions have been satisfied, starting substitution to uri");

            path = subs.substitute(path, resultSubs);
View Full Code Here

Examples of com.alibaba.citrus.util.internal.regex.MatchResultSubstitution

        return path.matches("^\\w+:.*");
    }

    public static MatchResultSubstitution getMatchResultSubstitution(MatchResult ruleMatchResult,
                                                                     MatchResult conditionMatchResult) {
        return new MatchResultSubstitution("$%", ruleMatchResult, conditionMatchResult);
    }
View Full Code Here

Examples of com.alibaba.citrus.util.regex.MatchResultSubstitution

            Matcher matcher = this.pattern.matcher(name);

            assertTrue(matcher.find());

            this.subs = new MatchResultSubstitution(matcher);
        }
View Full Code Here

Examples of com.alibaba.citrus.util.regex.MatchResultSubstitution

            Matcher matcher = this.pattern.matcher(name);

            assertTrue(matcher.find());

            this.subs = new MatchResultSubstitution(matcher);
        }
View Full Code Here

Examples of com.alibaba.citrus.util.regex.MatchResultSubstitution

        return path.matches("^\\w+:.*");
    }

    public static MatchResultSubstitution getMatchResultSubstitution(MatchResult ruleMatchResult,
                                                                     MatchResult conditionMatchResult) {
        return new MatchResultSubstitution("$%", ruleMatchResult, conditionMatchResult);
    }
View Full Code Here

Examples of com.alibaba.citrus.util.regex.MatchResultSubstitution

            return match(itemName, matcher);
        }

        private boolean match(String itemName, Matcher matcher) {
            MatchResultSubstitution subs = new MatchResultSubstitution(matcher);

            String type = trimToNull(subs.substitute(typeName));
            String name;

            if (type == null) {
                return false;
            }

            if (moduleName == null) {
                int startIndex = subs.getMatch().end() + 1;

                if (itemName.length() > startIndex) {
                    name = itemName.substring(startIndex);
                } else {
                    return false;
                }
            } else {
                name = subs.substitute(moduleName);
            }

            name = getName(name, itemName);

            if (items.containsKey(itemName)) {
View Full Code Here

Examples of com.alibaba.citrus.util.regex.MatchResultSubstitution

            if (negative != matched) {
                log(patternStrings[i]);

                String var = defaultIfNull(this.var, DEFAULT_VAR);
                Substitution subst = new MatchResultSubstitution(negative ? EMPTY_MATCH_RESULT : matcher);

                states.setAttribute(var, subst);

                return true;
            }
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.