org.mmbase.bridge.remote.proxy
Class UriRemoteCloudContext_Proxy

java.lang.Object
  extended by org.mmbase.bridge.remote.proxy.MappedObject_Proxy<org.mmbase.bridge.remote.RemoteCloudContext>
      extended by org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy
          extended by org.mmbase.bridge.remote.proxy.UriRemoteCloudContext_Proxy
All Implemented Interfaces:
CloudContext, MappedObject

public class UriRemoteCloudContext_Proxy
extends org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy

Override the getCloud-methods, to make sure the returned objects have a correct getCloudContext, namely this object again. This makes is possible to check whether a Cloud is remote, by checking the URI of its cloud-context.

Version:
$Id: UriRemoteCloudContext_Proxy.java 35423 2009-05-25 19:56:45Z michiel $
Author:
Michiel Meeuwissen

Constructor Summary
UriRemoteCloudContext_Proxy(org.mmbase.bridge.remote.RemoteCloudContext remoteObject, String uri)
           
 
Method Summary
 Cloud getCloud(String name)
          Returns the cloud with the specified name.
 Cloud getCloud(String name, String authenticationType, Map<String,?> 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.
protected  org.mmbase.bridge.remote.RemoteCloud getRemote(Cloud cloud)
           
 String getUri()
          The String which was usesd, and could be used again to acquire this cloud context using ContextProvider.getCloudContext(String).
 
Methods inherited from class org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy
assertUp, createFieldList, createModuleList, createNodeList, createNodeManagerList, createRelationList, createRelationManagerList, createStringList, getActionRepository, getAuthentication, getCloudNames, getDefaultCharacterEncoding, getDefaultLocale, getDefaultTimeZone, getModule, getModules, getWrappedObject, hasModule, isUp
 
Methods inherited from class org.mmbase.bridge.remote.proxy.MappedObject_Proxy
equals, getMapperCode, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.CloudContext
getSearchQueryHandler
 

Constructor Detail

UriRemoteCloudContext_Proxy

public UriRemoteCloudContext_Proxy(org.mmbase.bridge.remote.RemoteCloudContext remoteObject,
                                   String uri)
Method Detail

getUri

public String getUri()
Description copied from interface: CloudContext
The String which was usesd, and could be used again to acquire this cloud context using ContextProvider.getCloudContext(String).

Specified by:
getUri in interface CloudContext
Overrides:
getUri in class org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy

getRemote

protected org.mmbase.bridge.remote.RemoteCloud getRemote(Cloud cloud)

getCloud

public Cloud getCloud(String name)
Description copied from interface: CloudContext
Returns the cloud with the specified name. The available cloud names are returned by CloudContext.getCloudNames().

Specified by:
getCloud in interface CloudContext
Overrides:
getCloud in class org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy
Parameters:
name - The name of the cloud to be returned, this is very often "mmbase".
Returns:
The requested cloud

getCloud

public Cloud getCloud(String name,
                      String authenticationType,
                      Map<String,?> loginInfo)
               throws NotFoundException
Description copied from interface: CloudContext
Returns the cloud with the specified name, with authentication

Specified by:
getCloud in interface CloudContext
Overrides:
getCloud in class org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy
Parameters:
name - The name of the cloud to be returned. See CloudContext.getCloudNames()
authenticationType - The type of authentication, which should be used by the authentication implementation.. This is one of the strings returned by CloudContext.getAuthentication().AuthenticationData.getTypes(). Typically, 'anonymous', 'class' and 'name/password' are supported.
loginInfo - The required user information and credentials. What exactly is required, depends on the Authentication implementation, and the value of the authenticationType parameter. If no credentials are needed null can be specified (This for example is the case with authenticationType 'class'). It is possible to create this Map using #getAuthentcation.AuthenticationData.createParameters(String).Parameters.toMap(java.util.Map). That e.g. makes it possible to know beforehand what keys can be used in the loginInfo Map, given a certain authenticationType.
Returns:
the requested cloud
Throws:
NotFoundException - if the specified cloud could not be found

getCloud

public Cloud getCloud(String name,
                      UserContext user)
               throws NotFoundException
Description copied from interface: CloudContext
Returns the cloud with the specified name, based on an existing User object. This user object may originate from a call to Cloud.getUser() or directly from Authentication.login(java.lang.String, java.util.Map, java.lang.Object[])). The security implementation may depend on implementation details of this UserContext.

Specified by:
getCloud in interface CloudContext
Overrides:
getCloud in class org.mmbase.bridge.remote.proxy.RemoteCloudContext_Proxy
Parameters:
name - The name of the cloud to be returned. See CloudContext.getCloudNames().
user - The user object for which this cloud object must be created. Many security implementation require this object to be created by themselves.
Returns:
the requested cloud
Throws:
NotFoundException - thrown when cloud not found


MMBase 2.0-SNAPSHOT - null