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 java.util.Collection;
25:
26: /**
27: * Read only part of the theme service interface.
28: *
29: * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
30: * @version $Revision: 8784 $
31: */
32: public interface ThemeServiceInfo {
33: /**
34: * Get a reference to a theme.
35: *
36: * @param themeID the registration id of the theme to retrieve
37: * @param defaultOnNull true, when the server should return the default theme, in case the requested is not found
38: * @return the requested theme, null, or the default theme if <code>defaultOnNull</code> was provided as true
39: * @throws IllegalArgumentException if the themeID is null
40: */
41: PortalTheme getTheme(ServerRegistrationID themeID,
42: boolean defaultOnNull);
43:
44: /**
45: * Get a reference to a theme.
46: *
47: * @param name the name of the theme to retrieve
48: * @param defaultOnNull true, when the server should return the default theme, in case the requested is not found
49: * @return the requested theme, null, or the default theme if <code>defaultOnNull</code> was provided as true
50: * @throws IllegalArgumentException if the themeID is null
51: */
52: PortalTheme getTheme(String name, boolean defaultOnNull);
53:
54: /**
55: * @param themeId
56: * @return
57: */
58: PortalTheme getThemeById(String themeId);
59:
60: /**
61: * Get a Collection of all registered themes.
62: *
63: * @return a Collection of all registered themes
64: */
65: Collection getThemes();
66:
67: /**
68: * Get a Collection of all the registered theme's names
69: *
70: * @return a collection of theme names
71: */
72: Collection getThemeNames();
73: }
|