public final class NamingExceptionUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static Map<Class<? extends NamingException>,ResultCode[]> |
EXCEPTIONS_TO_RESULT_CODES
Map of naming exceptions to ldap result codes.
|
private static Pattern |
PATTERN
Pattern to find error code in exception messages.
|
private static Map<ResultCode,Class<? extends NamingException>> |
RESULT_CODES_TO_EXCEPTION
Map of ldap result codes to naming exceptions.
|
Modifier | Constructor and Description |
---|---|
private |
NamingExceptionUtils()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static Class<? extends NamingException> |
getNamingException(ResultCode code)
Returns the naming exception that maps to the supplied result code.
|
static ResultCode |
getResultCode(Class<? extends NamingException> clazz)
Returns the result code that map to the supplied naming exception.
|
static ResultCode |
getResultCode(String message)
Returns the result code contained in the supplied naming exception message.
|
static ResultCode[] |
getResultCodes(Class<? extends NamingException> clazz)
Returns the result codes that map to the supplied naming exception.
|
static boolean |
matches(Class<? extends NamingException> clazz,
ResultCode code)
Returns whether the supplied naming exception maps to the supplied result code.
|
private static final Map<Class<? extends NamingException>,ResultCode[]> EXCEPTIONS_TO_RESULT_CODES
private static final Map<ResultCode,Class<? extends NamingException>> RESULT_CODES_TO_EXCEPTION
private static final Pattern PATTERN
public static ResultCode[] getResultCodes(Class<? extends NamingException> clazz)
clazz
- naming exceptionpublic static ResultCode getResultCode(Class<? extends NamingException> clazz)
clazz
- naming exceptionpublic static ResultCode getResultCode(String message)
message
- naming exception messagepublic static boolean matches(Class<? extends NamingException> clazz, ResultCode code)
clazz
- naming exceptioncode
- ldap result codepublic static Class<? extends NamingException> getNamingException(ResultCode code)
code
- ldap result codeCopyright © 2003-2019 Virginia Tech. All Rights Reserved.