org.jboss.messaging.core.security.impl
Class JBMSecurityManagerImpl

java.lang.Object
  extended by org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl
All Implemented Interfaces:
JBMSecurityManager, JBMUpdateableSecurityManager

public class JBMSecurityManagerImpl
extends java.lang.Object
implements JBMUpdateableSecurityManager

A basic implementation of the JBMUpdateableSecurityManager. This can be used within an appserver and be deployed by SecurityManagerDeployer or used standalone or embedded.

Author:
Andy Taylor

Constructor Summary
JBMSecurityManagerImpl(boolean addGuestRole)
           
 
Method Summary
 void addRole(java.lang.String user, java.lang.String role)
          adds a new role for a user.
 void addUser(java.lang.String user, java.lang.String password)
          adds a new user
 void removeRole(java.lang.String user, java.lang.String role)
          removes a role from a user
 void removeUser(java.lang.String user)
          removes a user and any roles they may have.
 boolean validateUser(java.lang.String user, java.lang.String password)
          is this a valid user.
 boolean validateUserAndRole(java.lang.String user, java.lang.String password, java.util.HashSet<Role> roles, CheckType checkType)
          is this a valid user and do they have the correct role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBMSecurityManagerImpl

public JBMSecurityManagerImpl(boolean addGuestRole)
Method Detail

validateUser

public boolean validateUser(java.lang.String user,
                            java.lang.String password)
Description copied from interface: JBMSecurityManager
is this a valid user.

Specified by:
validateUser in interface JBMSecurityManager
Parameters:
user - the user
password - the users password
Returns:
true if a valid user

validateUserAndRole

public boolean validateUserAndRole(java.lang.String user,
                                   java.lang.String password,
                                   java.util.HashSet<Role> roles,
                                   CheckType checkType)
Description copied from interface: JBMSecurityManager
is this a valid user and do they have the correct role

Specified by:
validateUserAndRole in interface JBMSecurityManager
Parameters:
user - the user
password - the users password
roles - the roles the user has
checkType - the type of check to perform
Returns:
true if the user is valid and they have the correct roles

addUser

public void addUser(java.lang.String user,
                    java.lang.String password)
Description copied from interface: JBMUpdateableSecurityManager
adds a new user

Specified by:
addUser in interface JBMUpdateableSecurityManager
Parameters:
user - the user to add
password - theusers password

removeUser

public void removeUser(java.lang.String user)
Description copied from interface: JBMUpdateableSecurityManager
removes a user and any roles they may have.

Specified by:
removeUser in interface JBMUpdateableSecurityManager
Parameters:
user - the user to remove

addRole

public void addRole(java.lang.String user,
                    java.lang.String role)
Description copied from interface: JBMUpdateableSecurityManager
adds a new role for a user.

Specified by:
addRole in interface JBMUpdateableSecurityManager
Parameters:
user - the user
role - the role to add

removeRole

public void removeRole(java.lang.String user,
                       java.lang.String role)
Description copied from interface: JBMUpdateableSecurityManager
removes a role from a user

Specified by:
removeRole in interface JBMUpdateableSecurityManager
Parameters:
user - the user
role - the role to remove


Copyright © 2006 JBoss Inc. All Rights Reserved.