org.pdfsam.emp4j.providers
Class ExceptionMessageProvider

java.lang.Object
  extended by org.pdfsam.emp4j.providers.ExceptionMessageProvider
All Implemented Interfaces:
java.io.Serializable

public class ExceptionMessageProvider
extends java.lang.Object
implements java.io.Serializable

Exception messages provider. Singleton.

Author:
a.vacondio
See Also:
Serialized Form

Field Summary
static java.lang.String CONFIGURATION_PATH_DEFAULT
           
static java.lang.String CONFIGURATION_PATH_PARAM
           
 
Method Summary
 java.lang.Object clone()
          cannot clone a singleton
 java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode)
           
 java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode, java.lang.String[] args)
           
static ExceptionMessageProvider getInstance()
           
 java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode)
           
 java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode, java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_PATH_PARAM

public static final java.lang.String CONFIGURATION_PATH_PARAM
See Also:
Constant Field Values

CONFIGURATION_PATH_DEFAULT

public static final java.lang.String CONFIGURATION_PATH_DEFAULT
See Also:
Constant Field Values
Method Detail

getInstance

public static ExceptionMessageProvider getInstance()
                                            throws java.lang.Exception
Returns:
the ExceptionMessageProvider instance
Throws:
java.lang.Exception

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
cannot clone a singleton

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getExceptionMessage

public java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey,
                                            int exceptionErrorCode)
                                     throws java.lang.Exception
Parameters:
exceptionTypeKey - Exception type code
exceptionErrorCode - Exception error code
Returns:
the exception message
Throws:
java.lang.Exception

getExceptionMessage

public java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey,
                                            int exceptionErrorCode,
                                            java.lang.String[] args)
                                     throws java.lang.Exception
Parameters:
exceptionTypeKey - Exception type code
exceptionErrorCode - Exception error code
args - Strings to be substituted to the message
Returns:
the exception message
Throws:
java.lang.Exception

getLocalizedExceptionMessage

public java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey,
                                                     int exceptionErrorCode)
                                              throws java.lang.Exception
Parameters:
exceptionTypeKey - Exception type code
exceptionErrorCode - Exception error code
Returns:
the localized exception message
Throws:
java.lang.Exception

getLocalizedExceptionMessage

public java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey,
                                                     int exceptionErrorCode,
                                                     java.lang.String[] args)
                                              throws java.lang.Exception
Parameters:
exceptionTypeKey - Exception type code
exceptionErrorCode - Exception error code
args - Strings to be substituted to the message
Returns:
the localized exception message
Throws:
java.lang.Exception