1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.ldaptemplate;
18
19 import javax.naming.NamingException;
20
21 import org.springframework.dao.DataAccessException;
22
23 /***
24 * Interface to be implemented by classes that can translate between
25 * NamingExceptions and DataAccessExceptions.
26 *
27 * @author Mattias Arthursson
28 *
29 */
30 public interface NamingExceptionTranslator {
31 /***
32 * Translate the given NamingException into a generic data access exception.
33 * @param namingException
34 * the offending NamingException.
35 *
36 * @return the DataAccessException to throw.
37 */
38 public DataAccessException translate(NamingException namingException);
39 }