Examples of PreparableMatcher


Examples of org.apache.cocoon.matching.PreparableMatcher

    public void compose(ComponentManager manager) throws ComponentException {
        this.manager = manager;
        setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));

        // Prepare the pattern, and keep matcher if ThreadSafe
        PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);

        if (matcher instanceof ThreadSafe) {
            this.threadSafeMatcher = matcher;
        }

        try {
            this.preparedPattern = matcher.preparePattern(this.pattern);

        } catch(PatternException pe) {
            String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
            throw new ComponentException(msg, pe);
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

            // Avoid select() and try/catch block (faster !)
            result = this.threadSafeMatcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

        } else {
            // Get matcher from selector
            PreparableMatcher matcher = (PreparableMatcher)this.selector.select(this.componentName);
            try {
                result = matcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

            } finally {
                this.selector.release(matcher);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

    public void compose(ComponentManager manager) throws ComponentException {

        setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));

        // Prepare the pattern, and keep matcher if ThreadSafe
        PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);

        if (matcher instanceof ThreadSafe) {
            this.threadSafeMatcher = matcher;
        }

        try {
            this.preparedPattern = matcher.preparePattern(MapStackResolver.unescape(this.pattern));

        } catch(PatternException pe) {
            String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
            getLogger().error(msg, pe);
            throw new ComponentException(msg, pe);
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

            // Avoid select() and try/catch block (faster !)
            result = this.threadSafeMatcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

        } else {
            // Get matcher from selector
            PreparableMatcher matcher = (PreparableMatcher)this.selector.select(this.componentName);
            try {
                result = matcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

            } finally {
                this.selector.release(matcher);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

    public void compose(ComponentManager manager) throws ComponentException {
        this.manager = manager;
        setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));

        // Prepare the pattern, and keep matcher if ThreadSafe
        PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);

        if (matcher instanceof ThreadSafe) {
            this.threadSafeMatcher = matcher;
        }

        try {
            this.preparedPattern = matcher.preparePattern(this.pattern);

        } catch(PatternException pe) {
            String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
            throw new ComponentException(null, msg, pe);
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

            // Avoid select() and try/catch block (faster !)
            result = this.threadSafeMatcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

        } else {
            // Get matcher from selector
            PreparableMatcher matcher = (PreparableMatcher)this.selector.select(this.componentName);
            try {
                result = matcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

            } finally {
                this.selector.release(matcher);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

    public void compose(ComponentManager manager) throws ComponentException {
        this.manager = manager;
        setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));

        // Prepare the pattern, and keep matcher if ThreadSafe
        PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);

        if (matcher instanceof ThreadSafe) {
            this.threadSafeMatcher = matcher;
        }

        try {
            this.preparedPattern = matcher.preparePattern(this.pattern);

        } catch(PatternException pe) {
            String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
            throw new ComponentException(null, msg, pe);
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

            // Avoid select() and try/catch block (faster !)
            result = this.threadSafeMatcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

        } else {
            // Get matcher from selector
            PreparableMatcher matcher = (PreparableMatcher)this.selector.select(this.componentName);
            try {
                result = matcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

            } finally {
                this.selector.release(matcher);
            }
        }
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

    public void compose(ComponentManager manager) throws ComponentException {
        this.manager = manager;
        setSelector((ComponentSelector)manager.lookup(Matcher.ROLE + "Selector"));

        // Prepare the pattern, and keep matcher if ThreadSafe
        PreparableMatcher matcher = (PreparableMatcher)selector.select(componentName);

        if (matcher instanceof ThreadSafe) {
            this.threadSafeMatcher = matcher;
        }

        try {
            this.preparedPattern = matcher.preparePattern(this.pattern);

        } catch(PatternException pe) {
            String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + this.getLocation();
            throw new ComponentException(msg, pe);
View Full Code Here

Examples of org.apache.cocoon.matching.PreparableMatcher

            // Avoid select() and try/catch block (faster !)
            result = this.threadSafeMatcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

        } else {
            // Get matcher from selector
            PreparableMatcher matcher = (PreparableMatcher)this.selector.select(this.componentName);
            try {
                result = matcher.preparedMatch(preparedPattern, objectModel, resolvedParams);

            } finally {
                this.selector.release(matcher);
            }
        }
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.