KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > acting > Action


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.acting;
17
18 import org.apache.avalon.framework.component.Component;
19 import org.apache.avalon.framework.parameters.Parameters;
20 import org.apache.cocoon.environment.Redirector;
21 import org.apache.cocoon.environment.SourceResolver;
22
23 import java.util.Map JavaDoc;
24
25 /**
26  *
27  * @author <a HREF="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
28  * @version CVS $Id: Action.java 30932 2004-07-29 17:35:38Z vgritsenko $
29  */

30 public interface Action extends Component {
31
32     String JavaDoc ROLE = Action.class.getName();
33
34     /**
35      * Controls the processing against some values of the
36      * <code>Dictionary</code> objectModel and returns a
37      * <code>Map</code> object with values used in subsequent
38      * sitemap substitution patterns.
39      *
40      * NOTE: This interface is designed so that implentations can be <code>ThreadSafe<code>.
41      * When an action is ThreadSafe, only one instance serves all requests : this
42      * reduces memory usage and avoids pooling.
43      *
44      * @param resolver The <code>SourceResolver</code> in charge
45      * @param objectModel The <code>Map</code> with object of the
46      * calling environment which can be used
47      * to select values this controller may need
48      * (ie Request, Response).
49      * @param source A source <code>String</code> to the Action
50      * @param parameters The <code>Parameters</code> for this invocation
51      * @return Map The returned <code>Map</code> object with
52      * sitemap substitution values which can be used
53      * in subsequent elements attributes like SRC=
54      * using a xpath like expression: SRC="mydir/{myval}/foo"
55      * If the return value is null the processing inside
56      * the <map:act> element of the sitemap will
57      * be skipped.
58      * @exception Exception Indicates something is totally wrong
59      */

60     Map JavaDoc act(Redirector redirector, SourceResolver resolver, Map JavaDoc objectModel, String JavaDoc source, Parameters parameters)
61             throws Exception JavaDoc;
62 }
63
Popular Tags