KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > webapps > session > acting > FormManagerAction


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.webapps.session.acting;
17
18 import java.util.Map JavaDoc;
19
20 import org.apache.avalon.framework.parameters.Parameters;
21 import org.apache.avalon.framework.service.ServiceException;
22 import org.apache.avalon.framework.thread.ThreadSafe;
23 import org.apache.cocoon.ProcessingException;
24 import org.apache.cocoon.acting.ServiceableAction;
25 import org.apache.cocoon.environment.Redirector;
26 import org.apache.cocoon.environment.SourceResolver;
27 import org.apache.cocoon.webapps.session.FormManager;
28
29 /**
30  * This action invokes the form manager to process incomming form values
31  *
32  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
33  * @version CVS $Id: FormManagerAction.java 30932 2004-07-29 17:35:38Z vgritsenko $
34 */

35 public final class FormManagerAction
36 extends ServiceableAction
37 implements ThreadSafe {
38
39     public Map JavaDoc act(Redirector redirector,
40                    SourceResolver resolver,
41                    Map JavaDoc objectModel,
42                    String JavaDoc source,
43                    Parameters par)
44     throws ProcessingException {
45         FormManager formManager = null;
46         try {
47             formManager = (FormManager)this.manager.lookup(FormManager.ROLE);
48             formManager.processInputFields();
49         } catch (ServiceException ce) {
50             throw new ProcessingException("Error during lookup of formManager component.", ce);
51         } finally {
52             this.manager.release( formManager );
53         }
54
55         return EMPTY_MAP;
56     }
57
58 }
59
Popular Tags