01: /*
02: * (C) Copyright 2000 - 2006 Nabh Information Systems, Inc.
03: *
04: * This program is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU General Public License
06: * as published by the Free Software Foundation; either version 2
07: * of the License, or (at your option) any later version.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: *
18: */
19: package com.nabhinc.portal.model;
20:
21: import java.util.Iterator;
22: import java.util.List;
23:
24: import javax.servlet.http.HttpServletRequest;
25:
26: import com.nabhinc.portal.core.SessionCache;
27:
28: /**
29: *
30: *
31: * @author Padmanabh Dabke
32: * (c) 2006 Nabh Information Systems, Inc. All Rights Reserved.
33: */
34: public interface CompositeRenderable extends Renderable {
35:
36: /**
37: * Get local ID of the selected window. Applicable only
38: * to the desktop mode.
39: * @return ID of the selected window. null if no selection.
40: */
41: String getSelectedPortletWindowId();
42:
43: /**
44: * Set local ID of the selected window. Applicable only
45: * to the desktop mode.
46: * @param wId ID of the selected window. null if no selection.
47: */
48: void setSelectedPortletWindowId(String wId);
49:
50: /**
51: * Allows a shallow iteration over renderables directly
52: * belonging to this composite.
53: * @return
54: */
55: Iterator<Renderable> getComponents();
56:
57: /**
58: * Allows the Renderable to set up renderable attribute.
59: * Normally it just sets up CURRENT_RENDERABLE_ATTRIBUTE to
60: * the associated layout.
61: */
62: void setRenderAttributes(HttpServletRequest request,
63: SessionCache sCache);
64:
65: /**
66: * Get a list of PortletWindows belonging to this object.
67: */
68: List<PortletWindow> getPortletWindowList();
69:
70: /**
71: * Add a new renderable to this composite.
72: * @param r Renderable to be added.
73: * @param optionLabel Option label (makes sense only for navigational layout
74: */
75: void addContent(Renderable r, String optionLabel);
76:
77: /**
78: * Get default portlet window that can be used as the target for action/render
79: * request when the window id cannot be explicitly specified.
80: * @return Default portlet window
81: */
82: PortletWindow getDefaultPortletWindow();
83:
84: /**
85: * This is method is invoked in the desktop mode. The renderable should find
86: * a sensible place for the newly added window.
87: */
88: void addPortletWindow(PortletWindow pWindow);
89:
90: /**
91: * Returns default template used for rendering component portlet windows
92: * @return Portlet template
93: */
94: String getComponentTemplate();
95: }
|