org.aselect.server.udb
Interface IUDBConnector

All Known Implementing Classes:
FlatFileConnector, JDBCConnector, JNDIConnector, SASDBConnector

public interface IUDBConnector

Interface to a A-Select UDB connector.

Description:
Resolves a user profile by retrieving information from the user database.

Concurrency issues:
-

Author:
Alfa & Ariss

Method Summary
 java.lang.String getUserAttributes(java.lang.String sUserId, java.lang.String sAuthSPId)
          Retrieves the user attributes for the given user and AuthSP.
 java.util.Hashtable getUserProfile(java.lang.String sUserId)
          Returns the user profile stored in user database.
 void init(java.lang.Object oConfigSection)
          Initializes the the IUDBConnector.
 boolean isUserEnabled(java.lang.String sUserId)
          Check if the user is enabled for A-Select.
 

Method Detail

init

void init(java.lang.Object oConfigSection)
          throws ASelectUDBException
Initializes the the IUDBConnector.

Description:
This usually entails: Concurrency issues:
-

Preconditions:
- oConfigSection may not be null

Postconditions:
-

Parameters:
oConfigSection - containing the configuration section for this component
Throws:
ASelectUDBException - if the component could not be initialized by missing config parameters or could not open a connection

getUserProfile

java.util.Hashtable getUserProfile(java.lang.String sUserId)
Returns the user profile stored in user database.

Description:
Returns a hashtable with the user's profile. The information returned is as follows:
Item Value
result_code Specifies an Errors.NO_ERROR for success or an relevant A-Select Error.
user_authsps Hashtable containing the AuthSP's that the user is registered for.
The hashtable contains an entry for each AuthSP and the value of the user attributes belonging to it.


Concurrency issues:
-

Preconditions:
- sUserId may not be null.

Postconditions:
-

Parameters:
sUserId - containing the user id by which the user is known in the user database
Returns:
a Hashtable containing the user information (authsp information and result code)

isUserEnabled

boolean isUserEnabled(java.lang.String sUserId)
                      throws ASelectUDBException
Check if the user is enabled for A-Select.

Description:
Returns the value for A-Select enabled for the given user.

Concurrency issues:
-

Preconditions:
sUserId != null

Postconditions:
-

Parameters:
sUserId - the user to check.
Returns:
true if user is A-Select enabled, otherwise false.
Throws:
ASelectUDBException - If retrieving information from UDB fails.

getUserAttributes

java.lang.String getUserAttributes(java.lang.String sUserId,
                                   java.lang.String sAuthSPId)
                                   throws ASelectUDBException
Retrieves the user attributes for the given user and AuthSP.

Description:
Retrieves the user attributes for the given user and AuthSP.

Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
sUserId - The user ID.
sAuthSPId - The AuthSP ID
Returns:
The user attributes.
Throws:
ASelectUDBException - If retrieving information from UDB fails.


Copyright © 2008 SURFnet BV. All Rights Reserved.