org.objectweb.jonas.security.realm.factory
Interface JResourceMemoryMBean

All Superinterfaces:
JResourceMBean
All Known Implementing Classes:
JResourceMemory

public interface JResourceMemoryMBean
extends JResourceMBean

Define the methods for the MBean

Author:
Florent Benoit

Method Summary
 void addGroup(java.lang.String groupname)
          Add a group with a given name
 void addRole(java.lang.String rolename)
          Add a role with a given name
 void addUser(java.lang.String username, java.lang.String password)
          Add a user with a given principal and credential
 java.lang.String[] listGroups()
          Get the groups
 java.lang.String[] listRoles()
          Get the roles
 void removeGroup(java.lang.String groupname)
          Remove a group with a given name
 void removeRole(java.lang.String rolename)
          Remove a role with a given name
 void removeUser(java.lang.String username)
          Remove a user with a given principal and credential
 
Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResourceMBean
getName, saveConfig
 

Method Detail

addUser

public void addUser(java.lang.String username,
                    java.lang.String password)
             throws java.lang.Exception
Add a user with a given principal and credential

Parameters:
username - the name of the user
password - password of the user
Throws:
java.lang.Exception - if the user already exists

addGroup

public void addGroup(java.lang.String groupname)
              throws java.lang.Exception
Add a group with a given name

Parameters:
groupname - the name of the group
Throws:
java.lang.Exception - if the group already exists

addRole

public void addRole(java.lang.String rolename)
             throws java.lang.Exception
Add a role with a given name

Parameters:
rolename - the name of the role
Throws:
java.lang.Exception - if the role already exists

removeUser

public void removeUser(java.lang.String username)
                throws java.lang.Exception
Remove a user with a given principal and credential

Parameters:
username - the name of the user
Throws:
java.lang.Exception - if the user was not found

removeGroup

public void removeGroup(java.lang.String groupname)
                 throws java.lang.Exception
Remove a group with a given name

Parameters:
groupname - the name of the group
Throws:
java.lang.Exception - if the group was not found

removeRole

public void removeRole(java.lang.String rolename)
                throws java.lang.Exception
Remove a role with a given name

Parameters:
rolename - the name of the role
Throws:
java.lang.Exception - if the role was not found

listRoles

public java.lang.String[] listRoles()
Get the roles

Returns:
the array of the roles

listGroups

public java.lang.String[] listGroups()
Get the groups

Returns:
the array of the groups