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

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

public class JBMSecurityManagerImpl
extends java.lang.Object
implements JBMSecurityManager

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

Author:
Andy Taylor

Constructor Summary
JBMSecurityManagerImpl()
           
 
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
 boolean isStarted()
           
 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.
 void setDefaultUser(java.lang.String username)
           
 void start()
           
 void stop()
           
 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.Set<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()
Method Detail

start

public void start()
Specified by:
start in interface MessagingComponent

stop

public void stop()
Specified by:
stop in interface MessagingComponent

isStarted

public boolean isStarted()
Specified by:
isStarted in interface MessagingComponent

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.Set<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: JBMSecurityManager
adds a new user

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

removeUser

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

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

addRole

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

Specified by:
addRole in interface JBMSecurityManager
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: JBMSecurityManager
removes a role from a user

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

setDefaultUser

public void setDefaultUser(java.lang.String username)
Specified by:
setDefaultUser in interface JBMSecurityManager


Copyright © 2006 JBoss Inc. All Rights Reserved.