001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.portalsite;
018:
019: import java.util.Map;
020: import java.util.Set;
021:
022: import org.apache.jetspeed.om.folder.Folder;
023: import org.apache.jetspeed.om.page.Page;
024: import org.apache.jetspeed.page.document.NodeNotFoundException;
025: import org.apache.jetspeed.page.document.NodeSet;
026:
027: /**
028: * This describes the request context for the portal-site component.
029: *
030: * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
031: * @version $Id: PortalSiteRequestContext.java 516448 2007-03-09 16:25:47Z ate $
032: */
033: public interface PortalSiteRequestContext {
034: /**
035: * getSessionContext - get component session context
036: *
037: * @return component session context
038: */
039: PortalSiteSessionContext getSessionContext();
040:
041: /**
042: * getLocators - get profile locators by locator names
043: *
044: * @return request profile locators
045: */
046: Map getLocators();
047:
048: /**
049: * getManagedPage - get request profiled concrete page instance
050: * as managed by the page manager
051: *
052: * @return page
053: * @throws NodeNotFoundException if page not found
054: * @throws SecurityException if page view access not granted
055: */
056: Page getManagedPage() throws NodeNotFoundException;
057:
058: /**
059: * getPage - get request profiled page proxy
060: *
061: * @return page proxy
062: * @throws NodeNotFoundException if page not found
063: * @throws SecurityException if page view access not granted
064: */
065: Page getPage() throws NodeNotFoundException;
066:
067: /**
068: * getFolder - get folder proxy relative to request profiled page
069: *
070: * @return page folder proxy
071: * @throws NodeNotFoundException if page not found
072: * @throws SecurityException if page view access not granted
073: */
074: Folder getFolder() throws NodeNotFoundException;
075:
076: /**
077: * getSiblingPages - get node set of sibling page proxies relative
078: * to request profiled page, (includes profiled
079: * page proxy)
080: *
081: * @return sibling page proxies
082: * @throws NodeNotFoundException if page not found
083: * @throws SecurityException if page view access not granted
084: */
085: NodeSet getSiblingPages() throws NodeNotFoundException;
086:
087: /**
088: * getParentFolder - get parent folder proxy relative to request
089: * profiled page
090: *
091: * @return parent folder proxy or null
092: * @throws NodeNotFoundException if page not found
093: * @throws SecurityException if page view access not granted
094: */
095: Folder getParentFolder() throws NodeNotFoundException;
096:
097: /**
098: * getSiblingFolders - get node set of sibling folder proxies relative
099: * to request profiled page, (includes profiled
100: * page folder proxy)
101: *
102: * @return sibling folder proxies
103: * @throws NodeNotFoundException if page not found
104: * @throws SecurityException if page view access not granted
105: */
106: NodeSet getSiblingFolders() throws NodeNotFoundException;
107:
108: /**
109: * getRootFolder - get root profiled folder proxy
110: *
111: * @return parent folder proxy
112: * @throws NodeNotFoundException if page not found
113: * @throws SecurityException if page view access not granted
114: */
115: Folder getRootFolder() throws NodeNotFoundException;
116:
117: /**
118: * getRootLinks - get node set of link proxies relative to
119: * profiled root folder
120: *
121: * @return root link proxies
122: * @throws NodeNotFoundException if page not found
123: * @throws SecurityException if page view access not granted
124: */
125: NodeSet getRootLinks() throws NodeNotFoundException;
126:
127: /**
128: * getStandardMenuNames - get set of available standard menu names
129: *
130: * @return menu names set
131: */
132: Set getStandardMenuNames();
133:
134: /**
135: * getCustomMenuNames - get set of custom menu names available as
136: * defined for the request profiled page and folder
137: *
138: * @return menu names set
139: * @throws NodeNotFoundException if page not found
140: * @throws SecurityException if page view access not granted
141: */
142: Set getCustomMenuNames() throws NodeNotFoundException;
143:
144: /**
145: * getMenu - get instantiated menu available for the request
146: * profiled page and folder
147: *
148: * @param name menu definition name
149: * @return menu instance
150: * @throws NodeNotFoundException if page not found
151: * @throws SecurityException if page view access not granted
152: */
153: Menu getMenu(String name) throws NodeNotFoundException;
154: }
|