KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > PortalService


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.portal;
17
18 import java.util.Iterator JavaDoc;
19 import java.util.List JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.apache.avalon.framework.component.Component;
23 import org.apache.cocoon.portal.layout.Layout;
24
25 /**
26  * This is the central component in the portal. It holds the configuration
27  * of the portal, the current name etc.
28  * The main use of this component is to get the {@link PortalComponentManager}
29  * to get all the other portal components.
30  * This component is a singleton.
31  *
32  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
33  * @author <a HREF="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
34  *
35  * @version CVS $Id: PortalService.java 330865 2005-11-04 18:54:05Z rgoers $
36  */

37 public interface PortalService extends Component {
38
39     /** The role to lookup this component. */
40     String JavaDoc ROLE = PortalService.class.getName();
41     
42     /**
43      * The name of the portal - as defined in the portal configuration.
44      */

45     String JavaDoc getPortalName();
46     
47     void setPortalName(String JavaDoc value);
48     
49     /**
50      * Return the value of an attribute
51      * @param key The key of the attribute
52      * @return The value of the attribute or null.
53      */

54     Object JavaDoc getAttribute(String JavaDoc key);
55     
56     /**
57      * Set an attribute
58      * @param key The key of the attribute
59      * @param value The new value
60      */

61     void setAttribute(String JavaDoc key, Object JavaDoc value);
62     
63     /**
64      * Remove an attribute
65      * @param key The key of the attribute
66      */

67     void removeAttribute(String JavaDoc key);
68     
69     /**
70      * Return the names of all attributes
71      */

72     Iterator JavaDoc getAttributeNames();
73     
74     /**
75      * Return the value of a temporary attribute
76      * @param key The key of the attribute
77      * @return The value of the attribute or null.
78      */

79     Object JavaDoc getTemporaryAttribute(String JavaDoc key);
80     
81     /**
82      * Set a temporary attribute
83      * @param key The key of the attribute
84      * @param value The new value
85      */

86     void setTemporaryAttribute(String JavaDoc key, Object JavaDoc value);
87     
88     /**
89      * Remove a temporary attribute
90      * @param key The key of the attribute
91      */

92     void removeTemporaryAttribute(String JavaDoc key);
93     
94     /**
95      * Return the names of all temporary attributes
96      */

97     Iterator JavaDoc getTemporaryAttributeNames();
98
99     /**
100      * Return the component manager for the current portal
101      */

102     PortalComponentManager getComponentManager();
103
104     /**
105      * FIXME this is for the full-screen function
106      * @param layoutKey TODO
107      */

108     void setEntryLayout(String JavaDoc layoutKey, Layout object);
109     Layout getEntryLayout(String JavaDoc layoutKey);
110     
111     /**
112      * Change the default layout key for most functions
113      */

114     void setDefaultLayoutKey(String JavaDoc layoutKey);
115     
116     /**
117      * Get the default layout key
118      */

119     String JavaDoc getDefaultLayoutKey();
120     
121     /**
122      * Return all skins
123      */

124     List JavaDoc getSkinDescriptions();
125
126     /**
127      * Return the current object model.
128      * @since 2.1.8
129      */

130     Map JavaDoc getObjectModel();
131
132     /**
133      * Indicates whether aspects which are sensitive to rendering state should render
134      * @param renderable true if all aspects should render
135      */

136     void setRenderable(Boolean JavaDoc renderable);
137
138     /**
139      * Returns true if all aspects should render, false if only "static" aspects should
140      * render.
141      */

142     Boolean JavaDoc isRenderable();
143 }
144
Popular Tags