KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > matching > Matcher


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.matching;
17
18 import org.apache.avalon.framework.component.Component;
19 import org.apache.avalon.framework.parameters.Parameters;
20 import org.apache.cocoon.sitemap.PatternException;
21
22 import java.util.Map JavaDoc;
23
24 /**
25  *
26  * @author <a HREF="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
27  * @version CVS $Id: Matcher.java 30932 2004-07-29 17:35:38Z vgritsenko $
28  */

29 public interface Matcher extends Component {
30
31     String JavaDoc ROLE = Matcher.class.getName();
32
33     /**
34      * Matches the pattern against some <code>Request</code> values
35      * and returns a <code>Map</code> object with replacements
36      * for wildcards contained in the pattern.
37      * @param pattern The pattern to match against. Depending on the
38      * implementation the pattern can contain wildcards
39      * or regular expressions.
40      * @param objectModel The <code>Map</code> with object of the
41      * calling environment which can be used
42      * to select values this matchers matches against.
43      * @return Map The returned <code>Map</code> object with
44      * replacements for wildcards/regular-expressions
45      * contained in the pattern.
46      * If the return value is null there was no match.
47      */

48     Map JavaDoc match (String JavaDoc pattern, Map JavaDoc objectModel, Parameters parameters) throws PatternException;
49 }
50
51
52
53
Popular Tags