View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.portalsite;
18  
19  import java.io.Serializable;
20  import java.util.Map;
21  
22  import org.apache.jetspeed.page.PageManager;
23  
24  /***
25   * This describes the session context for the portal-site component.
26   * 
27   * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
28   * @version $Id: PortalSiteSessionContext.java 553375 2007-07-05 05:37:00Z taylor $
29   */
30  public interface PortalSiteSessionContext extends Serializable
31  {
32      /***
33       * newRequestContext - create a new request context instance with fallback and history
34       *
35       * @param requestProfileLocators request profile locators
36       * @return new request context instance
37       */
38      PortalSiteRequestContext newRequestContext(Map requestProfileLocators);
39  
40      /***
41       * newRequestContext - create a new request context instance with history
42       *
43       * @param requestProfileLocators request profile locators
44       * @param requestFallback flag specifying whether to fallback to root folder
45       *                        if locators do not select a page or access is forbidden
46       * @return new request context instance
47       */
48      PortalSiteRequestContext newRequestContext(Map requestProfileLocators, boolean requestFallback);
49  
50      /***
51       * newRequestContext - create a new request context instance
52       *
53       * @param requestProfileLocators request profile locators
54       * @param requestFallback flag specifying whether to fallback to root folder
55       *                        if locators do not select a page or access is forbidden
56       * @param useHistory flag indicating whether to use visited page
57       *                   history to select default page per site folder
58       * @return new request context instance
59       */
60      PortalSiteRequestContext newRequestContext(Map requestProfileLocators, boolean requestFallback, boolean useHistory);
61  
62      /***
63       * getPageManager - return PageManager component instance
64       *
65       * @return PageManager instance
66       */
67      PageManager getPageManager();
68  
69      /***
70       * isValid - return flag indicating whether this context instance
71       *           is valid or if it is stale after being persisted and
72       *           reloaded as session state
73       *
74       * @return valid context status
75       */
76      boolean isValid();
77      
78      /***
79       * set which pipeline this context is stored for 
80       * 
81       * @param pipeline
82       */
83      void setPipeline(String pipeline);
84      
85      /***
86       * get which pipeline this context is stored for
87       */
88      String getPipeline();
89  }
90