com.ls.util.xml
Class XMLToJavaConversionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.ls.util.xml.XMLConversionException
                    |
                    +--com.ls.util.xml.XMLToJavaConversionException
All Implemented Interfaces:
Serializable

public class XMLToJavaConversionException
extends XMLConversionException

Base class for all Exceptions occuring when converting from or to XML. It contains an error message and an error code specifying the type of exception. It is used e.g. by the JavaXMLConverter class.

Version:
$Revision: 1.0 $
Author:
Last modified by $Author: TBerk $
See Also:
Serialized Form

Field Summary
static int CLASS_CREATION_EXCEPTION
          error type 101 : indicates that a classname is part of the xml string that is not in the CLASSPATH
static int FIELD_SETTING_EXCEPTION
          error type 103 : unable to change an attribute of a java object
static int INVALID_DATE_FORMAT_EXCEPTION
          error type 104 : a date (treated as simple data type) does not conform to the defined date format
static int INVALID_XML_FORMAT_EXCEPTION
          error type 105 : indicates that the xml string could not be parsed by the xml parser used
static int NO_CLASS_PACKAGE_MAPPING_EXCEPTION
          error type 100 : used if a call to xmlToJava is performed without calling setClassPackageMapping()
 
Fields inherited from class com.ls.util.xml.XMLConversionException
FIELD_RETRIEVE_EXCEPTION, INTROSPECTION_EXCEPTION, INVALID_OBJECT_EXCEPTION, PROGRAMMING_EXCEPTION, TRANSIENTIDSET_EXCEPTION, UNSPECIFIED_EXCEPTION
 
Constructor Summary
XMLToJavaConversionException(String errorMessage, int errorCode, String xmlString)
          Constructor to specify the error message, the error code and the xml string thats conversion caused the exception
 
Method Summary
 String getXMLString()
          Returns the xml string(max. 5000 character) thats conversion caused the exception.
 void setXMLString(String xmlString)
          Allows to specify the xml string that caused the exception.
 String toString()
          Returns a string representation of this exception.
 
Methods inherited from class com.ls.util.xml.XMLConversionException
getErrorCode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_CLASS_PACKAGE_MAPPING_EXCEPTION

public static final int NO_CLASS_PACKAGE_MAPPING_EXCEPTION
error type 100 : used if a call to xmlToJava is performed without calling setClassPackageMapping()

CLASS_CREATION_EXCEPTION

public static final int CLASS_CREATION_EXCEPTION
error type 101 : indicates that a classname is part of the xml string that is not in the CLASSPATH

FIELD_SETTING_EXCEPTION

public static final int FIELD_SETTING_EXCEPTION
error type 103 : unable to change an attribute of a java object

INVALID_DATE_FORMAT_EXCEPTION

public static final int INVALID_DATE_FORMAT_EXCEPTION
error type 104 : a date (treated as simple data type) does not conform to the defined date format

INVALID_XML_FORMAT_EXCEPTION

public static final int INVALID_XML_FORMAT_EXCEPTION
error type 105 : indicates that the xml string could not be parsed by the xml parser used
Constructor Detail

XMLToJavaConversionException

public XMLToJavaConversionException(String errorMessage,
                                    int errorCode,
                                    String xmlString)
Constructor to specify the error message, the error code and the xml string thats conversion caused the exception
Parameters:
errorMessage - the precise error message in text
errorCode - the error code for further processing
xmlString - xml string thats conversion caused the exception
Method Detail

getXMLString

public String getXMLString()
Returns the xml string(max. 5000 character) thats conversion caused the exception.
Returns:
the xml string thats conversion caused the exception.

setXMLString

public void setXMLString(String xmlString)
Allows to specify the xml string that caused the exception.
Parameters:
xmlString - the xml string thats conversion caused the exception.

toString

public String toString()
Returns a string representation of this exception.
Overrides:
toString in class XMLConversionException
Returns:
a string representation of this exception