Sonic Management API

com.sonicsw.security.pass.mf
Interface IManagement


public interface IManagement

The Management SPI is used to retrieve the user and group from any third party security store. Implementing this SPI results in viewing the read-only users and groups present on the external security store.

The management SPI can be categorized into two:

Core Interfaces

com.sonicsw.security.pass.mf.IManagement

com.sonicsw.security.pass.client.IPasswordUser

com.sonicsw.security.pass.mf.IGroup

Additional Interfaces

com.sonicsw.security.pass.mf.IEvent

com.sonicsw.security.pass.mf.IEventDisconnected

com.sonicsw.security.pass.mf.IEventGroupsAdded

com.sonicsw.security.pass.mf.IEventGroupsDeleted

com.sonicsw.security.pass.mf.IEventGroupsModified

com.sonicsw.security.pass.mf.IEventUsersAdded

com.sonicsw.security.pass.mf.IEventUsersDeleted

com.sonicsw.security.pass.mf.IEventUsersModified

com.sonicsw.security.pass.mf.INotificationListener

The basic functionality is achieved by implementing the core interfaces.

Configuring Management SPI & using it in external Authentication Domain

To use this functionality, users have to create a Management SPI configuration, which contains the Management SPI name, its classname and its classpath using Sonic Management Console (SMC).

While configuring an external Authentication Domain, users have to select a preconfigured Management SPI name and provide attributes which are to be added as name-value pairs using the Attribute Setting group box. These attributes are passed to the SPI implementation as a HashMap.


Method Summary
 void connect(java.util.HashMap configuration)
          This method is used to connect to an external store.
 void deleteNotificationListener()
          This method removes/unregisters the event notifications listeners.
 void disconnect()
          This is used to disconnect the connection to the external data store
 IGroup getGroup(java.lang.String id)
          This method is used to retrieve a group that matches the id.
 IGroup[] getGroups()
          This method is used to retrieve a list of groups that exist in the external security store.
 IPasswordUser getUser(java.lang.String id)
          This method is returns a user that matches the id
 IPasswordUser[] getUsers()
          This method returns the list of uses existing in the external domain.
 boolean setNotificationListener(INotificationListener listener)
          This method is used to register event notifications listeners.
 

Method Detail

connect

void connect(java.util.HashMap configuration)
             throws InvalidConfigurationException,
                    ConnectionException
This method is used to connect to an external store. This method can be called more than once. Examples are:

connecting after the disconnect() method was called

or

the IManagement object was disconnected because the connection to external source failed

or IManagement received an IEvenetDisconnected event

Parameters:
configuration - This is a name and value pair of configuration attributes that is required by the implementation and configured via SMC.

Throws:
InvalidConfigurationException - thrown if the connection failed because of bad connection
ConnectionException - thrown if connect() fails.

deleteNotificationListener

void deleteNotificationListener()
This method removes/unregisters the event notifications listeners.


disconnect

void disconnect()
This is used to disconnect the connection to the external data store


getGroup

IGroup getGroup(java.lang.String id)
                throws ConnectionException
This method is used to retrieve a group that matches the id.

Parameters:
id - id of a group

Returns:
the group matching the id.

Throws:
ConnectionException

getGroups

IGroup[] getGroups()
                   throws ConnectionException
This method is used to retrieve a list of groups that exist in the external security store.

Returns:
list of groups

Throws:
ConnectionException

getUser

IPasswordUser getUser(java.lang.String id)
                      throws ConnectionException
This method is returns a user that matches the id

Parameters:
id - id of a user

Returns:
the users credentials

Throws:
ConnectionException

getUsers

IPasswordUser[] getUsers()
                         throws ConnectionException
This method returns the list of uses existing in the external domain.

Returns:
list of users

Throws:
ConnectionException

setNotificationListener

boolean setNotificationListener(INotificationListener listener)
This method is used to register event notifications listeners. It is called before connect(HashMap) method is called. If disconnect() is called for any reason, then the next connect(HashMap) call must restore listener - no additional setNotificationListener call is needed. Setting of a single listener must be implemented - a second attempt to call setNotificationListener may fail.

If this method is not be implemented, users should return false. Corollary, true is to be returned if setNotificationListener is implemented.

Parameters:
listener - the listener

Returns:
true if setNotificationListener is implemented.

See Also:
connect(HashMap), disconnect()

Sonic Management API

Copyright © 2001-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 12-Aug-2011.