SIP Servlet Engine© Documentations
 
  Top >   SIP Servlet Programming >   SPI (Service Provider Interface) >   Role Management Interface
 
 

Role Management Interface

The role management interface is used to manage roles granted to SIP Servlet Engine subscribers.

The structure of the role management interface is as follows:

RoleMapInfo Interface

This interface defines the minimum role information managed by SIP Servlet Engine.

getName()
Gets the name of the role.
getDescription()
Gets the description of the role.

RoleReader Interface

This interface is used to review role information.

If you want to use the SIP authentication function to assign a role, you must at least define a class that implements this interface.

getAllRoles()
Gets the Set which contains information about all registered role. This Set must include RoleMapInfo.
getMembersRole(SipURI subscriber)
Gets the Set which contains role information assigned to the registered user. This Set must include RoleMapInfo.
isUserInRole(SipURI subscriber, String role)
Returns true if the specified SipURI user has the specified role. Otherwise, It returns false. If the SipURI user specified in subscriber is not registered, InvalidSbuscriberException must be thrown.

RoleEditor Interface

This interface is used to edit role information.

You must define a class that implements the RoleEditor interface to run a demo application properly.

createRole(String role, String desc)
Creates a new role with the specified role name and description. If an existing roll is attempted to be added, IllegalOperationException must be thrown.
removeRole(String role)
Removes the specified role. If the role does not exist, IllegalOperationException must be thrown.
addMemberToRole(SipURI subscriber, String role)
Adds the specified SipURI user to the specified role. If the user is not registered, InvalidSubscriberException must be thrown.
removeMemberFromRole(SipURI subscriber, String role)
Removes the specified SipURI user from the specified role. If the user is not registered, InvalidSubscriberException must be thrown.

Last Modified:Tue Dec 28 02:30:38 PM JST 2004