KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > wsrp > consumer > Request


1 /*
2  * Copyright 2005 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.portal.wsrp.consumer;
17
18 import oasis.names.tc.wsrp.v1.types.NamedString;
19
20 /**
21  * Defines a request from the end-user to the swing consumer as result
22  * of an interaction (e.g. click on hyperlink) of the end-user with the
23  * representation of a remote portlet.<br/>
24  *
25  * Due to the two phase protocol of WSRP this request carries information
26  * which need to be passed back to the producer in order to process the
27  * interaction at the producer-side.<br/>
28  *
29  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
30  * @author <a HREF="mailto:malessandrini@s-und-n.de">Michel Alessandrini</a>
31  *
32  * @version $Id: Request.java 264755 2005-08-30 10:29:21Z cziegeler $
33  **/

34 public interface Request {
35
36     /**
37      * Set the interaction state of a portlet which should be passed
38      * to the producer.
39      *
40      * @param state the interaction state of a portlet
41      **/

42     void setInteractionState(String JavaDoc state);
43
44     /**
45      * Get the interaction state of the portlet.
46      *
47      * @return interaction state of a portlet carried in a request
48      **/

49     String JavaDoc getInteractionState();
50
51     /**
52      * Add any parameters to the request. These parameters should
53      * be carried in the form parameters field of WSRP.
54      *
55      * @param name The key which identifies the parameter
56      * @param value The value of the parameter
57      **/

58     void addFormParameter(String JavaDoc name, String JavaDoc value);
59
60     /**
61      * Get all form parameters from the request. The returned
62      * <code>NamedString</code> array contains all parameter key/value pairs
63      * and can directly be passed to the form parameter field in WSRP.
64      *
65      * @return Array with all set parameters
66      **/

67     NamedString[] getFormParameters();
68 }
69
Popular Tags