org.pdfsam.emp4j.messages.sources
Class XmlMessagesSource

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

public class XmlMessagesSource
extends AbstractMessagesSource

Implementation of the MessageSourceInterface. It gets exception messages from an xml source

Author:
Andrea Vacondio
See Also:
Serialized Form

Constructor Summary
XmlMessagesSource(org.dom4j.Node node)
           
 
Method Summary
 java.lang.String getExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode)
           
 java.lang.String getLocalizedExceptionMessage(java.lang.Object exceptionTypeKey, int exceptionErrorCode)
           
 
Methods inherited from class org.pdfsam.emp4j.messages.interfaces.AbstractMessagesSource
getExceptionMessage, getLocalizedExceptionMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMessagesSource

public XmlMessagesSource(org.dom4j.Node node)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getLocalizedExceptionMessage

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

getExceptionMessage

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