com.sage.orion.sdata.servlet
Class MalformedPayloadException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sage.orion.sdata.servlet.MalformedPayloadException
All Implemented Interfaces:
java.io.Serializable

public class MalformedPayloadException
extends java.lang.RuntimeException

Class for a malformed Payload Exception.

Author:
cliwa01
See Also:
Serialized Form

Constructor Summary
MalformedPayloadException()
          Constructor.
MalformedPayloadException(java.lang.String message)
          Constructs an instance of the MalformedPayloadException class corresponding to the given message.
MalformedPayloadException(java.lang.Throwable e)
          Constructor.
 
Method Summary
static MalformedPayloadException badChild(java.lang.String child, java.lang.String resource)
          returns a MalformedPayloadException corresponding to the given bad child resource
static MalformedPayloadException badProperty(java.lang.String property, java.lang.String resource)
          returns a MalformedPayloadException corresponding to the given bad property
 SDataDiagnosis getDiagnosis()
          returns a corresponding diagnosis, if feasible
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MalformedPayloadException

public MalformedPayloadException()
Constructor. This constructs a MalformedPayloadException that has no messages. It is intended to be used in cases where corresponding error information is being passed through a different route and we want to avoid duplication.


MalformedPayloadException

public MalformedPayloadException(java.lang.Throwable e)
Constructor.

Parameters:
e -

MalformedPayloadException

public MalformedPayloadException(java.lang.String message)
Constructs an instance of the MalformedPayloadException class corresponding to the given message.

The exception has a generic application code associated with it.

Use badChild(String, String) or badProperty(String, String) to construct more specific instances.

Parameters:
message - the message which will be returned by Throwable.getMessage().
Method Detail

badProperty

public static MalformedPayloadException badProperty(java.lang.String property,
                                                    java.lang.String resource)
returns a MalformedPayloadException corresponding to the given bad property

Parameters:
property - the name of the property that is not valid
resource - the name of the resource that it was a property under
Returns:
a MalformedPayloadException corresponding to a bad property name

badChild

public static MalformedPayloadException badChild(java.lang.String child,
                                                 java.lang.String resource)
returns a MalformedPayloadException corresponding to the given bad child resource

Parameters:
child - the name of the child resource that is not valid
resource - the name of the resource that it was a child resource under
Returns:
a MalformedPayloadException corresponding to a bad child resource name

getDiagnosis

public SDataDiagnosis getDiagnosis()
returns a corresponding diagnosis, if feasible

Returns:
a corresponding diagnosis, or null


Copyright © 2011 Sage Software, Inc. All rights reserved.