Novell exteNd Messaging Platform 5.2

com.sssw.jms.api.security
Interface JMQPrincipalManager


public interface JMQPrincipalManager

Interface for pluggable principal management in JMS.

Since:
jBroker MQ 2.1

Field Summary
static String GROUP_ADMIN
          Name of the built-in Group of administrators
static String GROUP_WORLD
          Name of the built-in Group containing everyone
static String USER_ANONYMOUS
          Name of the built-in anonymous user
 
Method Summary
 void addPrincipalToGroup(String principal, String groupName)
          Add a principal to the group.
 void createGroup(String groupName)
          Create a Group with the given name
 void createUser(String username, String password)
          Create a User with the given name and password.
 void deleteGroup(String groupName)
          Delete the Group with the given name
 void deleteUser(String username)
          Delete the User with the given name and password
 Principal getPrincipal(String principalName)
          Get the principal with the given name.
 void init(Properties props)
          Initialize the principal manager.
 boolean isGroup(String principal)
          Determine if the given principal is a Group
 String[] listAllGroups()
          List the names of all the Groups
 String[] listAllUsers()
          List all the users
 String[] listGroupMembers(String groupName)
          List all the Group member names
 void removePrincipalFromGroup(String principal, String groupName)
          Remove a principal from the group.
 void updatePassword(String username, String password)
          Update the password for the given user.
 

Field Detail

USER_ANONYMOUS

public static final String USER_ANONYMOUS
Name of the built-in anonymous user

See Also:
Constant Field Values

GROUP_ADMIN

public static final String GROUP_ADMIN
Name of the built-in Group of administrators

See Also:
Constant Field Values

GROUP_WORLD

public static final String GROUP_WORLD
Name of the built-in Group containing everyone

See Also:
Constant Field Values
Method Detail

init

public void init(Properties props)
Initialize the principal manager. This method is called after the class has been instantiated.

Parameters:
props - the properties passed to the JMS server. By default this is the content of the lib/msgsvc.properties file.

getPrincipal

public Principal getPrincipal(String principalName)
                       throws JMSException
Get the principal with the given name. Note that the principal could be an ordinary User or a Group

Returns:
the principal with principalName
Throws:
JMSException - the provider could not execute this method
See Also:
Principal

createUser

public void createUser(String username,
                       String password)
                throws JMSException
Create a User with the given name and password. Note that the password does not go over the wire in the clear

Parameters:
username - name of new user
password - password for new user
Throws:
JMSException - the provider could not execute this method

deleteUser

public void deleteUser(String username)
                throws JMSException
Delete the User with the given name and password

Parameters:
username - name of user to delete
Throws:
JMSException - the provider could not execute this method

updatePassword

public void updatePassword(String username,
                           String password)
                    throws JMSException
Update the password for the given user. Note that the password does not go over the wire in the clear

Parameters:
username - name of user to update
password - new password for user
Throws:
JMSException - the provider could not execute this method

listAllUsers

public String[] listAllUsers()
                      throws JMSException
List all the users

Returns:
a string array with all user names
Throws:
JMSException - the provider could not execute this method

createGroup

public void createGroup(String groupName)
                 throws JMSException
Create a Group with the given name

Throws:
JMSException - the provider could not execute this method

deleteGroup

public void deleteGroup(String groupName)
                 throws JMSException
Delete the Group with the given name

Throws:
JMSException - the provider could not execute this method

isGroup

public boolean isGroup(String principal)
                throws JMSException
Determine if the given principal is a Group

Returns:
TRUE if principal represents a group, FALSE if user represents a user
Throws:
JMSException - the provider could not execute this method

addPrincipalToGroup

public void addPrincipalToGroup(String principal,
                                String groupName)
                         throws JMSException
Add a principal to the group. Note that the principal could be an ordinary User or a Group

Parameters:
principal - the principal to add to a group
groupName - name of group principal should be added to
Throws:
JMSException - the provider could not execute this method

removePrincipalFromGroup

public void removePrincipalFromGroup(String principal,
                                     String groupName)
                              throws JMSException
Remove a principal from the group. Note that the principal could be an ordinary User or a Group

Parameters:
principal - the principal to remove to a group
groupName - name of group principal should be removed from
Throws:
JMSException - the provider could not execute this method

listGroupMembers

public String[] listGroupMembers(String groupName)
                          throws JMSException
List all the Group member names

Parameters:
groupName - name of group to retrieve members for
Returns:
a string array with all members of groupName
Throws:
JMSException - the provider could not execute this method

listAllGroups

public String[] listAllGroups()
                       throws JMSException
List the names of all the Groups

Returns:
a string array with all group names
Throws:
JMSException - the provider could not execute this method

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.