org.mmbase.bridge
Interface CloudContext

All Known Implementing Classes:
BasicCloudContext

public interface CloudContext

The collection of clouds and modules within a Java Virtual Machine.

Version:
$Id: CloudContext.java,v 1.28 2006/02/14 22:28:06 michiel Exp $
Author:
Rob Vermeulen, Pierre van Rooden, Jaco de Groot

Method Summary
 void assertUp()
           
 FieldList createFieldList()
          Returns a new, empty field list
 ModuleList createModuleList()
          Returns a new, empty module list
 NodeList createNodeList()
          Returns a new, empty node list.
 NodeManagerList createNodeManagerList()
          Returns a new, empty node manager list Note that it is generally better to use Cloud.createNodeManagerList().
 RelationList createRelationList()
          Returns a new, empty relation list Note that it is generally better to use Cloud.createRelationList() or NodeManager.createRelationList().
 RelationManagerList createRelationManagerList()
          Returns a new, empty relation manager list Note that it is generally better to use Cloud.createRelationManagerList().
 StringList createStringList()
          Returns a new, empty string list
 AuthenticationData getAuthentication()
          Acquired information about the currently configuration Authentication implementation.
 Cloud getCloud(String name)
          Returns the cloud with the specified name.
 Cloud getCloud(String name, String authenticationType, Map loginInfo)
          Returns the cloud with the specified name, with authentication
 Cloud getCloud(String name, UserContext user)
          Returns the cloud with the specified name, based on an existing User object (e.g.
 StringList getCloudNames()
          Returns the names of all the clouds known to the system
 String getDefaultCharacterEncoding()
          Returns the default character encoding, which can be used as a default.
 Locale getDefaultLocale()
          Returns the default locale setting.
 TimeZone getDefaultTimeZone()
          Returns the default time zone.
 Module getModule(String name)
          Returns the module with the specified name.
 ModuleList getModules()
          Returns all modules available in this context.
 boolean hasModule(String name)
          Returns whether the module with the specified name is available.
 boolean isUp()
           
 

Method Detail

getModules

public ModuleList getModules()
Returns all modules available in this context.

Returns:
all available modules

getModule

public Module getModule(String name)
                 throws NotFoundException
Returns the module with the specified name.

Parameters:
name - the name of the module to be returned
Returns:
the requested module
Throws:
NotFoundException - if the specified module could not be found

hasModule

public boolean hasModule(String name)
Returns whether the module with the specified name is available.

Parameters:
name - the name of the module
Returns:
true if the module is available

getCloud

public Cloud getCloud(String name)
Returns the cloud with the specified name.

Parameters:
name - The name of the cloud to be returned, this is always "mmbase".
Returns:
The requested cloud
Throws:
NotFoundException - if the specified cloud could not be found
SecurityException - if no anonymous user can be created

getCloud

public Cloud getCloud(String name,
                      String authenticationType,
                      Map loginInfo)
               throws NotFoundException
Returns the cloud with the specified name, with authentication

Parameters:
name - The name of the cloud to be returned, always "mmbase".
authenticationType - The type of authentication, which should be used by the authentication implementation.
loginInfo - the user related login information.
Returns:
the requested cloud
Throws:
NotFoundException - if the specified cloud could not be found

getCloud

public Cloud getCloud(String name,
                      UserContext user)
               throws NotFoundException
Returns the cloud with the specified name, based on an existing User object (e.g. of another Cloud.getUser()

Parameters:
name - The name of the cloud to be returned, always "mmbase".
user - The user object for which this cloud object must be created.
Returns:
the requested cloud
Throws:
NotFoundException
Since:
MMBase-1.8

getCloudNames

public StringList getCloudNames()
Returns the names of all the clouds known to the system

Returns:
A StringList of all clouds names known to our Context

getDefaultCharacterEncoding

public String getDefaultCharacterEncoding()
Returns the default character encoding, which can be used as a default.

Returns:
A string with the character encoding
Since:
MMBase-1.6

getDefaultLocale

public Locale getDefaultLocale()
Returns the default locale setting.

Returns:
A Locale object
Since:
MMBase-1.6

getDefaultTimeZone

public TimeZone getDefaultTimeZone()
Returns the default time zone.

Since:
MMBase-1.8

createFieldList

public FieldList createFieldList()
Returns a new, empty field list

Returns:
The empty list
Since:
MMBase-1.6

createNodeList

public NodeList createNodeList()
Returns a new, empty node list. Note that it is generally better to use Cloud.createNodeList() or NodeManager.createNodeList().

Returns:
The empty list
Since:
MMBase-1.6

createRelationList

public RelationList createRelationList()
Returns a new, empty relation list Note that it is generally better to use Cloud.createRelationList() or NodeManager.createRelationList().

Returns:
The empty list
Since:
MMBase-1.6

createNodeManagerList

public NodeManagerList createNodeManagerList()
Returns a new, empty node manager list Note that it is generally better to use Cloud.createNodeManagerList().

Returns:
The empty list
Since:
MMBase-1.6

createRelationManagerList

public RelationManagerList createRelationManagerList()
Returns a new, empty relation manager list Note that it is generally better to use Cloud.createRelationManagerList().

Returns:
The empty list
Since:
MMBase-1.6

createModuleList

public ModuleList createModuleList()
Returns a new, empty module list

Returns:
The empty list
Since:
MMBase-1.6

createStringList

public StringList createStringList()
Returns a new, empty string list

Returns:
The empty list
Since:
MMBase-1.6

getAuthentication

public AuthenticationData getAuthentication()
Acquired information about the currently configuration Authentication implementation.

Since:
MMBase-1.8

isUp

public boolean isUp()
Since:
MMBase-1.8

assertUp

public void assertUp()
Since:
MMBase-1.8


MMBase build 1.8.1.20060716