| PortletWindowSession.java |
1 /*
2 * Copyright 2000-2001,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
17 package org.apache.wsrp4j.consumer;
18
19 import oasis.names.tc.wsrp.v1.types.MarkupContext;
20
21 /**
22 * The portlet window session is a session which is unique for
23 * every window of a portlet instance.
24 *
25 **/
26 public interface PortletWindowSession {
27 /**
28 * Get the ID of the portlets window this session belongs to.
29 *
30 * @return The ID of the portlet window.
31 **/
32 public String getWindowID();
33
34 /**
35 * Set the ID of the portlets window this sessions belongs to.
36 *
37 * @param windowID The ID of the portlet window.
38 **/
39 public void setWindowID(String windowID);
40
41 /**
42 * Get the markup context which has been cached. This might be useful
43 * to retrieve the markup which was returned <code>performBlockingInteraction</code>
44 * calls in order to save an additional <code>getMarkup</code> call.
45 *
46 * @return The cached markup context or null in case the cache is empty.
47 **/
48 public MarkupContext getCachedMarkup();
49
50 /**
51 * Update the cache which holds the markup context. This might be useful
52 * to store the markup which was returned by <code>performBlockingInteraction</code>
53 * calls in order to save an additional <code>getMarkup</code> call.
54 * Updateing the cache with a null value clears the markup cache.
55 *
56 * @param markupContext The markup context or null in case the cache should be cleared.
57 **/
58 public void updateMarkupCache(MarkupContext markupContext);
59
60 /**
61 * Get the portlet session this window session belongs to.
62 *
63 * @return The <code>PortletSession</code> this window session belongs to.
64 **/
65 public PortletSession getPortletSession();
66 }