org.aselect.server.udb.flatfile
Class FlatFileConnector

java.lang.Object
  extended by org.aselect.server.udb.flatfile.FlatFileConnector
All Implemented Interfaces:
IUDBConnector

public class FlatFileConnector
extends java.lang.Object
implements IUDBConnector

FlatFile database connector.

Description:
Database connector that uses the file 'workingdir/conf/udb/flatfile_udb.conf' as physical storage.


Concurrency issues:
-

Author:
Alfa & Ariss

Constructor Summary
FlatFileConnector()
           
 
Method Summary
 java.lang.String getUserAttributes(java.lang.String sUserId, java.lang.String sAuthSPId)
          Retrieve the A-Select user attributes.
 java.util.Hashtable getUserProfile(java.lang.String sUserId)
          Returns a hashtable with the user's record.
 void init(java.lang.Object oConfigSection)
          Initializes managers and loads the A-Select user db flatfile into a Properties object.
 boolean isUserEnabled(java.lang.String sUserId)
          Check if user is A-Select enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileConnector

public FlatFileConnector()
Method Detail

init

public void init(java.lang.Object oConfigSection)
          throws ASelectUDBException
Initializes managers and loads the A-Select user db flatfile into a Properties object.

Specified by:
init in interface IUDBConnector
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
See Also:
IUDBConnector.init(java.lang.Object)

getUserProfile

public java.util.Hashtable getUserProfile(java.lang.String sUserId)
Returns a hashtable with the user's record.

Description:
The returned hashtable contains a result_code and user_authsps which is a hashtable containing the AuthSP's that the user is registered for. Within this hashtable each AuthSP has an entry with the value of the user attributes that specific AuthSP.

Specified by:
getUserProfile in interface IUDBConnector
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)
See Also:
IUDBConnector.getUserProfile(java.lang.String)

isUserEnabled

public boolean isUserEnabled(java.lang.String sUserId)
Check if user is A-Select enabled.

Specified by:
isUserEnabled in interface IUDBConnector
Parameters:
sUserId - the user to check.
Returns:
true if user is A-Select enabled, otherwise false.
See Also:
IUDBConnector.isUserEnabled(java.lang.String)

getUserAttributes

public java.lang.String getUserAttributes(java.lang.String sUserId,
                                          java.lang.String sAuthSPId)
Retrieve the A-Select user attributes.

Specified by:
getUserAttributes in interface IUDBConnector
Parameters:
sUserId - The user ID.
sAuthSPId - The AuthSP ID
Returns:
The user attributes.
See Also:
IUDBConnector.getUserAttributes(java.lang.String, java.lang.String)


Copyright © 2008 SURFnet BV. All Rights Reserved.