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(java.lang.String userDN, java.lang.String account)
          Saves in the DB the new mapping between the userDN and the account.
 boolean removeMapping(java.lang.String userDN)
          Removes the mapping for the given user.
 java.lang.String retrieveMapping(java.lang.String userDN)
          Retrieves a user mapping from the database.
 java.util.List retrieveMappings()
          Retrieves user mappings from the database.
 

Method Detail

createMapping

void createMapping(java.lang.String userDN,
                   java.lang.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(java.lang.String userDN)
Removes the mapping for the given user.

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

retrieveMapping

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

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

retrieveMappings

java.util.List retrieveMappings()
Retrieves user mappings from the database.

Returns:
all the mappings


Copyright © 2004-2008. All Rights Reserved.