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.util.Map;
20  import java.util.Set;
21  
22  import org.apache.jetspeed.om.folder.Folder;
23  import org.apache.jetspeed.om.page.Page;
24  import org.apache.jetspeed.page.document.NodeNotFoundException;
25  import org.apache.jetspeed.page.document.NodeSet;
26  
27  /***
28   * This describes the request context for the portal-site component.
29   * 
30   * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
31   * @version $Id: PortalSiteRequestContext.java 516448 2007-03-09 16:25:47Z ate $
32   */
33  public interface PortalSiteRequestContext
34  {
35      /***
36       * getSessionContext - get component session context
37       *
38       * @return component session context
39       */
40      PortalSiteSessionContext getSessionContext();
41  
42      /***
43       * getLocators - get profile locators by locator names
44       *  
45       * @return request profile locators
46       */
47      Map getLocators();
48  
49      /***
50       * getManagedPage - get request profiled concrete page instance
51       *                  as managed by the page manager
52       *  
53       * @return page
54       * @throws NodeNotFoundException if page not found
55       * @throws SecurityException if page view access not granted
56       */
57      Page getManagedPage() throws NodeNotFoundException;
58  
59      /***
60       * getPage - get request profiled page proxy
61       *  
62       * @return page proxy
63       * @throws NodeNotFoundException if page not found
64       * @throws SecurityException if page view access not granted
65       */
66      Page getPage() throws NodeNotFoundException;
67  
68      /***
69       * getFolder - get folder proxy relative to request profiled page
70       *  
71       * @return page folder proxy
72       * @throws NodeNotFoundException if page not found
73       * @throws SecurityException if page view access not granted
74       */
75      Folder getFolder() throws NodeNotFoundException;
76  
77      /***
78       * getSiblingPages - get node set of sibling page proxies relative
79       *                   to request profiled page, (includes profiled
80       *                   page proxy)
81       *  
82       * @return sibling page proxies
83       * @throws NodeNotFoundException if page not found
84       * @throws SecurityException if page view access not granted
85       */
86      NodeSet getSiblingPages() throws NodeNotFoundException;
87  
88      /***
89       * getParentFolder - get parent folder proxy relative to request
90       *                   profiled page
91       *  
92       * @return parent folder proxy or null
93       * @throws NodeNotFoundException if page not found
94       * @throws SecurityException if page view access not granted
95       */
96      Folder getParentFolder() throws NodeNotFoundException;
97  
98      /***
99       * getSiblingFolders - get node set of sibling folder proxies relative
100      *                     to request profiled page, (includes profiled
101      *                     page folder proxy)
102      *  
103      * @return sibling folder proxies
104      * @throws NodeNotFoundException if page not found
105      * @throws SecurityException if page view access not granted
106      */
107     NodeSet getSiblingFolders() throws NodeNotFoundException;
108 
109     /***
110      * getRootFolder - get root profiled folder proxy
111      *  
112      * @return parent folder proxy
113      * @throws NodeNotFoundException if page not found
114      * @throws SecurityException if page view access not granted
115      */
116     Folder getRootFolder() throws NodeNotFoundException;
117 
118     /***
119      * getRootLinks - get node set of link proxies relative to
120      *                profiled root folder
121      *  
122      * @return root link proxies
123      * @throws NodeNotFoundException if page not found
124      * @throws SecurityException if page view access not granted
125      */
126     NodeSet getRootLinks() throws NodeNotFoundException;
127 
128     /***
129      * getStandardMenuNames - get set of available standard menu names
130      *  
131      * @return menu names set
132      */
133     Set getStandardMenuNames();
134 
135     /***
136      * getCustomMenuNames - get set of custom menu names available as
137      *                      defined for the request profiled page and folder
138      *  
139      * @return menu names set
140      * @throws NodeNotFoundException if page not found
141      * @throws SecurityException if page view access not granted
142      */
143     Set getCustomMenuNames() throws NodeNotFoundException;
144 
145     /***
146      * getMenu - get instantiated menu available for the request
147      *           profiled page and folder
148      *  
149      * @param name menu definition name
150      * @return menu instance
151      * @throws NodeNotFoundException if page not found
152      * @throws SecurityException if page view access not granted
153      */
154     Menu getMenu(String name) throws NodeNotFoundException;
155 }