gov.bnl.gums.db
Interface ManualAccountMapperDB

All Known Implementing Classes:
HibernateAccountMapperDB, LDAPAccountMapperDB

public interface ManualAccountMapperDB

The persistant layer for the ManualAccontMapper. Store a set of mappings to be used by the ManualAccountMapper itself. This interface allows the mapping to be stored in different ways (i.e. LDAP, database, file, ...).

The persistance layer shouldn't be doing any kind of caching, which will be handled by the ManualAccontMapper itself.

Author:
Gabriele Carcassi, Jay Packard

Method Summary
 void createMapping(String userDN, String account)
          Saves in the DB the new mapping between the userDN and the account.
 boolean removeMapping(String userDN)
          Removes the mapping for the given user.
 Map retrieveAccountMap()
          Retrieves user to account map.
 String retrieveMapping(String userDN)
          Retrieves a user mapping from the database.
 Map retrieveReverseAccountMap()
          Retrieves account to user map.
 

Method Detail

createMapping

void createMapping(String userDN,
                   String account)
Saves in the DB the new mapping between the userDN and the account. If a mapping for the given user is already present, an exception should be thrown.

Parameters:
userDN - a certificate DN
account - a UNIX account name

removeMapping

boolean removeMapping(String userDN)
Removes the mapping for the given user.

Parameters:
userDN - a certificate DN
Returns:
true if a mapping was deleted

retrieveMapping

String retrieveMapping(String userDN)
Retrieves a user mapping from the database.

Parameters:
userDN - a certificate DN
Returns:
the UNIX account provided by the mapping

retrieveAccountMap

Map retrieveAccountMap()
Retrieves user to account map.

Returns:
a Map object

retrieveReverseAccountMap

Map retrieveReverseAccountMap()
Retrieves account to user map.

Returns:
a Map object


Copyright © 2004-2009. All Rights Reserved.