org.pdfsam.emp4j.messages.interfaces
Class AbstractMessagesSource

java.lang.Object
  extended by org.pdfsam.emp4j.messages.interfaces.AbstractMessagesSource
All Implemented Interfaces:
java.io.Serializable, InquirableMessagesSource
Direct Known Subclasses:
XmlMessagesSource

public abstract class AbstractMessagesSource
extends java.lang.Object
implements InquirableMessagesSource, java.io.Serializable

Abstract message source

Author:
Andrea Vacondio
See Also:
Serialized Form

Constructor Summary
AbstractMessagesSource(org.dom4j.Node configurationNode)
           
 
Method Summary
abstract  java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode)
           
 java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode, java.lang.String[] args)
           
abstract  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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMessagesSource

public AbstractMessagesSource(org.dom4j.Node configurationNode)
Method Detail

getExceptionMessage

public abstract java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey,
                                                     int exceptionErrorCode)
                                              throws java.lang.Exception
Specified by:
getExceptionMessage in interface InquirableMessagesSource
Parameters:
exceptionTypeKey - Exception type key
exceptionErrorCode - Exception error code
Returns:
the exception message
Throws:
java.lang.Exception

getLocalizedExceptionMessage

public abstract java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey,
                                                              int exceptionErrorCode)
                                                       throws java.lang.Exception
Specified by:
getLocalizedExceptionMessage in interface InquirableMessagesSource
Parameters:
exceptionTypeKey - Exception type key
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
Specified by:
getLocalizedExceptionMessage in interface InquirableMessagesSource
Parameters:
exceptionTypeKey - Exception type key
exceptionErrorCode - Exception error code
args - Strings to be substituted to the message
Returns:
the localized 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
Specified by:
getExceptionMessage in interface InquirableMessagesSource
Parameters:
exceptionTypeKey - Exception type key
exceptionErrorCode - Exception error code
args - Strings to be substituted to the message
Returns:
the exception message
Throws:
java.lang.Exception