net.sf.mmapps.modules.cloudprovider.impl
Class ConfiguredUsernameAndPasswordCloudProvider

java.lang.Object
  extended by net.sf.mmapps.modules.cloudprovider.impl.DefaultCloudProvider
      extended by net.sf.mmapps.modules.cloudprovider.impl.ConfiguredUsernameAndPasswordCloudProvider
All Implemented Interfaces:
CloudProvider, Configurable
Direct Known Subclasses:
AdminPropertiesCloudProvider, UserNodeCloudProvider

public class ConfiguredUsernameAndPasswordCloudProvider
extends DefaultCloudProvider

This CloudProvider logs in to mmbase using a username / password combination. Most MMBase security implementation provide a possibility to login to MMBase using a username and password This provider implementation will login into MMBase using the name/password method. If no configuration is provided The default admin/admin2k combination of username and password will be used. To override the user name and password you must define the username and password in the configuration file using the "username" and "password" property

Version:
$Id: ConfiguredUsernameAndPasswordCloudProvider.java,v 1.7 2005/07/31 12:38:26 keesj Exp $
Author:
Kees Jongenburger

Field Summary
static java.lang.String AUTHENTICATION_METHOD_NAME
          The MMBase authentication method used
static java.lang.String PASSWORD_PROPERTY_NAME
          The name of the property used to determine the password.
static java.lang.String USERNAME_PROPERTY_NAME
          The name of the property used to determine the user name.
 
Fields inherited from class net.sf.mmapps.modules.cloudprovider.impl.DefaultCloudProvider
cloudcontextname, CLOUDCONTEXTNAME_PROPERTY_NAME, cloudname, CLOUDNAME_PROPERTY_NAME, DEFAULT_CLOUD_NAME
 
Constructor Summary
ConfiguredUsernameAndPasswordCloudProvider()
           
 
Method Summary
 org.mmbase.bridge.Cloud getAdminCloud()
          This method should return a cloud that can be used for administration purposes.
 org.mmbase.bridge.Cloud getCloud()
          This is the default method to get an MMBase cloud instance.
protected  void setPassword(java.lang.String password)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Allows the user name and password property to be set
protected  void setUsername(java.lang.String userName)
           
 
Methods inherited from class net.sf.mmapps.modules.cloudprovider.impl.DefaultCloudProvider
getAnonymousCloud
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME_PROPERTY_NAME

public static final java.lang.String USERNAME_PROPERTY_NAME
The name of the property used to determine the user name.

See Also:
Constant Field Values

PASSWORD_PROPERTY_NAME

public static final java.lang.String PASSWORD_PROPERTY_NAME
The name of the property used to determine the password.

See Also:
Constant Field Values

AUTHENTICATION_METHOD_NAME

public static final java.lang.String AUTHENTICATION_METHOD_NAME
The MMBase authentication method used

See Also:
Constant Field Values
Constructor Detail

ConfiguredUsernameAndPasswordCloudProvider

public ConfiguredUsernameAndPasswordCloudProvider()
Method Detail

getAdminCloud

public org.mmbase.bridge.Cloud getAdminCloud()
Description copied from interface: CloudProvider
This method should return a cloud that can be used for administration purposes. Possible tasks that could be done with the returned instance are changing the context of a node or creating system nodes.

Specified by:
getAdminCloud in interface CloudProvider
Overrides:
getAdminCloud in class DefaultCloudProvider
Returns:
a cloud instance using the configured user name and password
See Also:
CloudProvider.getAdminCloud()

getCloud

public org.mmbase.bridge.Cloud getCloud()
Description copied from interface: CloudProvider
This is the default method to get an MMBase cloud instance. What type of cloud instance is returned depends on the configuration of the CloudProvider. It should be assumed that the returned cloud instance is suited for the task is will be used.

Specified by:
getCloud in interface CloudProvider
Overrides:
getCloud in class DefaultCloudProvider
Returns:
the same as [@link ConfiguredUsernameAndPasswordCloudProvider#getAdminCloud()]
See Also:
CloudProvider.getCloud()

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Allows the user name and password property to be set

Specified by:
setProperty in interface Configurable
Overrides:
setProperty in class DefaultCloudProvider
Parameters:
name - name of property
value - value of property
See Also:
DefaultCloudProvider.setProperty(String, String)

setUsername

protected void setUsername(java.lang.String userName)

setPassword

protected void setPassword(java.lang.String password)


Copyright © 2003-2005 mmapps. All Rights Reserved.