org.ow2.jonas.security.internal.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(String groupname)
          Add a group with a given name
 void addRole(String rolename)
          Add a role with a given name
 void addUser(String username, String password)
          Add a user with a given principal and credential
 String[] listGroups()
          Get the groups
 String[] listRoles()
          Get the roles
 void removeGroup(String groupname)
          Remove a group with a given name
 void removeRole(String rolename)
          Remove a role with a given name
 void removeUser(String username)
          Remove a user with a given principal and credential
 
Methods inherited from interface org.ow2.jonas.security.internal.realm.factory.JResourceMBean
getName, saveConfig
 

Method Detail

addUser

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

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

addGroup

void addGroup(String groupname)
              throws Exception
Add a group with a given name

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

addRole

void addRole(String rolename)
             throws Exception
Add a role with a given name

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

removeUser

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

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

removeGroup

void removeGroup(String groupname)
                 throws Exception
Remove a group with a given name

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

removeRole

void removeRole(String rolename)
                throws Exception
Remove a role with a given name

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

listRoles

String[] listRoles()
Get the roles

Returns:
the array of the roles

listGroups

String[] listGroups()
Get the groups

Returns:
the array of the groups


Copyright © 2010 OW2 Consortium. All Rights Reserved.