org.opensubsystems.core.error
Class OSSInvalidDataException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.opensubsystems.core.error.OSSException
              extended by org.opensubsystems.core.error.OSSMultiException
                  extended by org.opensubsystems.core.error.OSSInvalidDataException
All Implemented Interfaces:
java.io.Serializable

public class OSSInvalidDataException
extends OSSMultiException

Exception thrown when there was a problem with invalid data asked to be processed. Example of problems are overflow (length limit for String exceeded, range limit for int exceeded, ...) or in case of unique constrains problems (unique login name, unique file name, ...). This can occur when user enters some data, which do not satisfy the constraints set by business logic or persistence layer.

Version:
$Id: OSSInvalidDataException.java,v 1.8 2007/01/07 06:14:50 bastafidli Exp $
Author:
Peter Satury
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.6 2006/04/07 04:22:06 bastafidli

Field Summary
protected  Messages m_errorMessages
          Error messages for all invalid data errors
 
Fields inherited from class org.opensubsystems.core.error.OSSMultiException
m_lstExceptions
 
Constructor Summary
OSSInvalidDataException()
          Create new exception
OSSInvalidDataException(java.lang.String message)
          Create new exception
OSSInvalidDataException(java.lang.String message, java.lang.Throwable cause)
          Create new exception
OSSInvalidDataException(java.lang.Throwable cause)
          Create new exception
 
Method Summary
static OSSInvalidDataException addException(OSSInvalidDataException inputException, java.lang.Object messageCategory, java.lang.String strMessage)
          Adds message to an exiting exception or if that exception doesn't exists create a new one, add the message to it and return the newly created exception.
static OSSInvalidDataException addException(OSSInvalidDataException inputException, java.lang.Object messageCategory, java.lang.String strMessage, java.lang.Throwable thr)
          Adds message to an exiting exception or if that exception doesn't exists create a new one, add the message to it and return the newly created exception.
 Messages getErrorMessages()
           
 void setErrorMessages(Messages errorMessages)
           
 
Methods inherited from class org.opensubsystems.core.error.OSSMultiException
add, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_errorMessages

protected Messages m_errorMessages
Error messages for all invalid data errors

Constructor Detail

OSSInvalidDataException

public OSSInvalidDataException()
Create new exception


OSSInvalidDataException

public OSSInvalidDataException(java.lang.String message)
Create new exception

Parameters:
message - - message to display

OSSInvalidDataException

public OSSInvalidDataException(java.lang.String message,
                               java.lang.Throwable cause)
Create new exception

Parameters:
message - - message to display
cause - - cause for error

OSSInvalidDataException

public OSSInvalidDataException(java.lang.Throwable cause)
Create new exception

Parameters:
cause - - cause for error
Method Detail

getErrorMessages

public Messages getErrorMessages()
Returns:
Messages - error messages object

setErrorMessages

public void setErrorMessages(Messages errorMessages)
Parameters:
errorMessages - - Messages

addException

public static OSSInvalidDataException addException(OSSInvalidDataException inputException,
                                                   java.lang.Object messageCategory,
                                                   java.lang.String strMessage)
Adds message to an exiting exception or if that exception doesn't exists create a new one, add the message to it and return the newly created exception.

Parameters:
inputException - - exception to add message to or null if the exception doesn't exist
messageCategory - - message category to add the message to (see Messages class)
strMessage - - message to add
Returns:
OSSInvalidDataException - new created or modified exception

addException

public static OSSInvalidDataException addException(OSSInvalidDataException inputException,
                                                   java.lang.Object messageCategory,
                                                   java.lang.String strMessage,
                                                   java.lang.Throwable thr)
Adds message to an exiting exception or if that exception doesn't exists create a new one, add the message to it and return the newly created exception.

Parameters:
inputException - - exception to add message to or null if the exception doesn't exist
messageCategory - - message category to add the message to (see Messages class)
strMessage - - message to add
thr - - exception which cause the error
Returns:
OSSInvalidDataException - new created or modified exception


Copyright © 2003 - 2006 OpenSubsystems s.r.o.