01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.theme;
23:
24: import org.jboss.portal.common.util.ContentInfo;
25: import org.jboss.portal.common.util.MediaType;
26:
27: import java.util.Collection;
28:
29: /**
30: * Read Only information about the layout service.
31: *
32: * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
33: * @version $Revision: 8784 $
34: */
35: public interface LayoutServiceInfo {
36: /**
37: * Get the layout for the provided registration id.
38: *
39: * @param id the registration id of the layout to get
40: * @param defaultOnNull true, if the default layout (if any is defined) should be returned in case the requested
41: * layout is not found
42: * @return the requested layout , of the default layout, or null
43: */
44: PortalLayout getLayout(ServerRegistrationID id,
45: boolean defaultOnNull);
46:
47: /**
48: * Get the layout for the provided name.
49: *
50: * @param name the name of the layout to request
51: * @param defaultOnNull true, if the default layout (if any is defined) should be returned in case the requested
52: * layout is not found
53: * @return the requested layout , of the default layout, or null
54: */
55: PortalLayout getLayout(String name, boolean defaultOnNull);
56:
57: PortalLayout getLayoutById(String layoutIdString);
58:
59: /**
60: * Get the render set for the provided layout.
61: *
62: * @param renderSetName the name of the renderSet to find
63: * @param mediaType the mediatype for which to find the renderSet
64: * @return the registered renderSet for the provided name and media type, or null if no such renderSet is registered
65: */
66: PortalRenderSet getRenderSet(String renderSetName,
67: MediaType mediaType);
68:
69: /**
70: * Retrieves the render set for this Layout.
71: *
72: * @param id the registration id of the RenderSet to retrieve.
73: * @param mediaType the media type that must be supported by the RenderSet to be retrieved
74: * @return the registered RenderSet identified by the specified id and media type, <code>null</code> otherwise.
75: * @since 2.4
76: */
77: PortalRenderSet getRenderSet(ServerRegistrationID id,
78: MediaType mediaType);
79:
80: /**
81: * Get a Set of portal layouts
82: *
83: * @return a Set of portal layouts
84: */
85: Collection getLayouts();
86:
87: /**
88: * Retrieves the set of the ServerRegistrationID for registred render set
89: *
90: * @return the set of the ServerRegistrationID for registred render set
91: */
92: Collection getRenderSets();
93:
94: PortalRenderSet getRenderSet(LayoutInfo info,
95: ContentInfo streamInfo, String renderSetName);
96: }
|