info.magnolia.cms.security
Class DelegatingUserManager

java.lang.Object
  extended by info.magnolia.cms.security.DelegatingUserManager
All Implemented Interfaces:
UserManager

public class DelegatingUserManager
extends java.lang.Object
implements UserManager

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Field Summary
 
Fields inherited from interface info.magnolia.cms.security.UserManager
ANONYMOUS_USER, SYSTEM_PSWD, SYSTEM_USER
 
Constructor Summary
DelegatingUserManager(java.util.Map<java.lang.String,UserManager> delegates)
           
 
Method Summary
 void changePassword(User user, java.lang.String newPassword)
           
 User createUser(java.lang.String name, java.lang.String pw)
          Creates a user without security restrictions
 java.util.Collection<User> getAllUsers()
          Get all users.
 User getAnonymousUser()
          Get Anonymous user, this user must always exist in magnolia repository.
 User getSystemUser()
          Get system user, this user must always exist in magnolia repository.
 User getUser(java.lang.String name)
          Find a specific user.
 User getUser(javax.security.auth.Subject subject)
          Initialize new user using JAAS authenticated/authorized subject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingUserManager

public DelegatingUserManager(java.util.Map<java.lang.String,UserManager> delegates)
Parameters:
delegates -
Method Detail

createUser

public User createUser(java.lang.String name,
                       java.lang.String pw)
                throws java.lang.UnsupportedOperationException
Description copied from interface: UserManager
Creates a user without security restrictions

Specified by:
createUser in interface UserManager
Parameters:
name - user name
pw - password
Returns:
the new user object
Throws:
java.lang.UnsupportedOperationException

changePassword

public void changePassword(User user,
                           java.lang.String newPassword)
                    throws java.lang.UnsupportedOperationException
Specified by:
changePassword in interface UserManager
Throws:
java.lang.UnsupportedOperationException

getAnonymousUser

public User getAnonymousUser()
Description copied from interface: UserManager
Get Anonymous user, this user must always exist in magnolia repository.

Specified by:
getAnonymousUser in interface UserManager
Returns:
anonymous user

getSystemUser

public User getSystemUser()
Description copied from interface: UserManager
Get system user, this user must always exist in magnolia repository.

Specified by:
getSystemUser in interface UserManager
Returns:
system user

getUser

public User getUser(java.lang.String name)
             throws java.lang.UnsupportedOperationException
Description copied from interface: UserManager
Find a specific user. Not all implementations will support this method.

Specified by:
getUser in interface UserManager
Parameters:
name - the name of the user
Returns:
the user object
Throws:
java.lang.UnsupportedOperationException

getUser

public User getUser(javax.security.auth.Subject subject)
             throws java.lang.UnsupportedOperationException
Description copied from interface: UserManager
Initialize new user using JAAS authenticated/authorized subject

Specified by:
getUser in interface UserManager
Throws:
java.lang.UnsupportedOperationException

getAllUsers

public java.util.Collection<User> getAllUsers()
                                       throws java.lang.UnsupportedOperationException
Description copied from interface: UserManager
Get all users.

Specified by:
getAllUsers in interface UserManager
Returns:
collection of User objects
Throws:
java.lang.UnsupportedOperationException


Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.