01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: * newRequestContext - create a new request context instance with fallback and history
33: *
34: * @param requestProfileLocators request profile locators
35: * @return new request context instance
36: */
37: PortalSiteRequestContext newRequestContext(
38: 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(
49: Map requestProfileLocators, boolean requestFallback);
50:
51: /**
52: * newRequestContext - create a new request context instance
53: *
54: * @param requestProfileLocators request profile locators
55: * @param requestFallback flag specifying whether to fallback to root folder
56: * if locators do not select a page or access is forbidden
57: * @param useHistory flag indicating whether to use visited page
58: * history to select default page per site folder
59: * @return new request context instance
60: */
61: PortalSiteRequestContext newRequestContext(
62: Map requestProfileLocators, boolean requestFallback,
63: boolean useHistory);
64:
65: /**
66: * getPageManager - return PageManager component instance
67: *
68: * @return PageManager instance
69: */
70: PageManager getPageManager();
71:
72: /**
73: * isValid - return flag indicating whether this context instance
74: * is valid or if it is stale after being persisted and
75: * reloaded as session state
76: *
77: * @return valid context status
78: */
79: boolean isValid();
80:
81: /**
82: * set which pipeline this context is stored for
83: *
84: * @param pipeline
85: */
86: void setPipeline(String pipeline);
87:
88: /**
89: * get which pipeline this context is stored for
90: */
91: String getPipeline();
92: }
|