KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > CloudContext


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10
11 package org.mmbase.bridge;
12 import java.util.Map JavaDoc;
13 import org.mmbase.security.AuthenticationData;
14
15 /**
16  * The collection of clouds and modules within a Java Virtual Machine.
17  *
18  * @author Rob Vermeulen
19  * @author Pierre van Rooden
20  * @author Jaco de Groot
21  * @version $Id: CloudContext.java,v 1.28 2006/02/14 22:28:06 michiel Exp $
22  */

23 public interface CloudContext {
24
25
26     /**
27      * Returns all modules available in this context.
28      *
29      * @return all available modules
30      */

31     public ModuleList getModules();
32
33     /**
34      * Returns the module with the specified name.
35      *
36      * @param name the name of the module to be returned
37      * @return the requested module
38      * @throws NotFoundException if the specified module could not be found
39      */

40     public Module getModule(String JavaDoc name) throws NotFoundException;
41
42     /**
43      * Returns whether the module with the specified name is available.
44      *
45      * @param name the name of the module
46      * @return <code>true</code> if the module is available
47      */

48     public boolean hasModule(String JavaDoc name);
49
50     /**
51
52      * Returns the cloud with the specified name.
53      *
54      * @param name The name of the cloud to be returned, this is always "mmbase".
55      * @return The requested cloud
56      * @throws NotFoundException if the specified cloud could not be found
57      * @throws SecurityException if no anonymous user can be created
58      */

59     public Cloud getCloud(String JavaDoc name);
60
61     /**
62      * Returns the cloud with the specified name, with authentication
63      *
64      * @param name The name of the cloud to be returned, always "mmbase".
65      * @param authenticationType The type of authentication, which should be
66      * used by the authentication implementation.
67      * @param loginInfo the user related login information.
68      * @return the requested cloud
69      * @throws NotFoundException if the specified cloud could not be found
70      */

71     public Cloud getCloud(String JavaDoc name, String JavaDoc authenticationType, Map JavaDoc loginInfo) throws NotFoundException;
72
73     /**
74      * Returns the cloud with the specified name, based on an existing User object (e.g. of another {@link Cloud#getUser}
75      * @param name The name of the cloud to be returned, always "mmbase".
76      * @param user The user object for which this cloud object must be created.
77      * @return the requested cloud
78      * @since MMBase-1.8
79      */

80     public Cloud getCloud(String JavaDoc name, org.mmbase.security.UserContext user) throws NotFoundException;
81
82     /**
83      * Returns the names of all the clouds known to the system
84      *
85      * @return A StringList of all clouds names known to our Context
86      */

87     public StringList getCloudNames();
88
89     /**
90      * Returns the default character encoding, which can be used as a default.
91      *
92      * @return A string with the character encoding
93      * @since MMBase-1.6
94      *
95      */

96     public String JavaDoc getDefaultCharacterEncoding();
97
98
99     /**
100      * Returns the default locale setting.
101      *
102      * @return A Locale object
103      * @since MMBase-1.6
104      */

105     public java.util.Locale JavaDoc getDefaultLocale();
106
107
108     /**
109      * Returns the default time zone.
110      * @since MMBase-1.8
111      */

112     public java.util.TimeZone JavaDoc getDefaultTimeZone();
113
114     /**
115      * Returns a new, empty field list
116      *
117      * @return The empty list
118      * @since MMBase-1.6
119      */

120     public FieldList createFieldList();
121
122     /**
123      * Returns a new, empty node list.
124      * Note that it is generally better to use {@link Cloud#createNodeList} or {@link NodeManager#createNodeList}.
125      *
126      * @return The empty list
127      * @since MMBase-1.6
128      */

129     public NodeList createNodeList();
130
131     /**
132      * Returns a new, empty relation list
133      * Note that it is generally better to use {@link Cloud#createRelationList} or {@link NodeManager#createRelationList}.
134      *
135      * @return The empty list
136      * @since MMBase-1.6
137      */

138     public RelationList createRelationList();
139
140     /**
141      * Returns a new, empty node manager list
142      * Note that it is generally better to use {@link Cloud#createNodeManagerList}.
143      *
144      * @return The empty list
145      * @since MMBase-1.6
146      */

147     public NodeManagerList createNodeManagerList();
148
149     /**
150      * Returns a new, empty relation manager list
151      * Note that it is generally better to use {@link Cloud#createRelationManagerList}.
152      *
153      * @return The empty list
154      * @since MMBase-1.6
155      */

156     public RelationManagerList createRelationManagerList();
157
158     /**
159      * Returns a new, empty module list
160      *
161      * @return The empty list
162      * @since MMBase-1.6
163      */

164     public ModuleList createModuleList();
165
166     /**
167      * Returns a new, empty string list
168      *
169      * @return The empty list
170      * @since MMBase-1.6
171      */

172     public StringList createStringList();
173
174
175     /**
176      * Acquired information about the currently configuration Authentication implementation.
177      * @since MMBase-1.8
178      */

179     public AuthenticationData getAuthentication();
180
181
182     /**
183      * @since MMBase-1.8
184      */

185     public boolean isUp();
186     /**
187      * @since MMBase-1.8
188      */

189     public void assertUp();
190  }
191
Popular Tags