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.driver;
18  
19  import oasis.names.tc.wsrp.v1.types.MarkupContext;
20  
21  import org.apache.wsrp4j.consumer.PortletSession;
22  import org.apache.wsrp4j.consumer.PortletWindowSession;
23  
24  public class GenericPortletWindowSessionImpl implements PortletWindowSession {
25      // the markup context we store between performBlockingInteraction and getMarkup calls
26      private transient MarkupContext markupCtx = null;
27  
28      // the window ID identifying this session
29      private String windowID = null;
30  
31      // the refering PortletSession     
32      private PortletSession pSession = null;
33  
34      public GenericPortletWindowSessionImpl(String windowID,
35              PortletSession pSession) {
36          this.windowID = windowID;
37          this.pSession = pSession;
38      }
39  
40      public PortletSession getPortletSession() {
41          return this.pSession;
42      }
43  
44      public String getWindowID() {
45          return windowID;
46      }
47  
48      public void setWindowID(String windowID) {
49          this.windowID = windowID;
50      }
51  
52      public MarkupContext getCachedMarkup() {
53          return markupCtx;
54      }
55  
56      public void updateMarkupCache(MarkupContext markupContext) {
57          markupCtx = markupContext;
58      }
59  }