org.xins.client
Class UnacceptableMessageException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.xins.common.service.CallException
              extended byorg.xins.client.XINSCallException
                  extended byorg.xins.client.UnacceptableMessageException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnacceptableRequestException

public class UnacceptableMessageException
extends XINSCallException

Exception that indicates that a request for an API call is considered unacceptable on the application-level. For example, a mandatory input parameter may be missing.

Since:
XINS 2.0
Version:
$Revision: 1.6 $ $Date: 2008/07/04 10:22:49 $
Author:
Ernst de Haan, Anthony Goubard
See Also:
Serialized Form

Constructor Summary
UnacceptableMessageException(XINSCallResult result)
          Constructs a new UnacceptableMessageException using the specified XINSCallResult.
 
Method Summary
 void addAttributeCombo(String type, List attributes, String elementName)
          Adds an invalid combination of attributes.
 void addInvalidValueForType(String parameter, String type)
          Deprecated. since XINS 2.0, use addInvalidValueForType(String, String, String).
 void addInvalidValueForType(String parameter, String value, String type)
          Adds an invalid value for a specified type.
 void addInvalidValueForType(String parameter, String value, String type, String element)
          Adds an invalid value for a specified type.
 void addMissingParameter(String parameter)
          Adds to the response that a paramater that is missing.
 void addMissingParameter(String parameter, String element)
          Adds to the response a parameter that is missing in an element.
 void addParamCombo(String type, List parameters)
          Adds an invalid combination of parameters.
 String getMessage()
          Returns the message for this exception.
 
Methods inherited from class org.xins.common.service.CallException
getDetail, getDuration, getNext, getRequest, getTarget, isFailOverAllowed
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

UnacceptableMessageException

public UnacceptableMessageException(XINSCallResult result)
Constructs a new UnacceptableMessageException using the specified XINSCallResult. This constructor is used by the generated CAPI.

Parameters:
result - the XINSCallResult that is considered unacceptable, cannot be null.
Method Detail

getMessage

public String getMessage()
Returns the message for this exception.

Overrides:
getMessage in class CallException
Returns:
the exception message, can be null.

addMissingParameter

public void addMissingParameter(String parameter)
Adds to the response that a paramater that is missing.

Parameters:
parameter - the missing parameter.

addMissingParameter

public void addMissingParameter(String parameter,
                                String element)
Adds to the response a parameter that is missing in an element.

Parameters:
parameter - the missing parameter.
element - the element in which the parameter is missing.

addInvalidValueForType

public void addInvalidValueForType(String parameter,
                                   String type)
Deprecated. since XINS 2.0, use addInvalidValueForType(String, String, String).

Adds an invalid value for a specified type.

Parameters:
parameter - the name of the parameter passed by the user.
type - the type which this parameter should be compliant with.

addInvalidValueForType

public void addInvalidValueForType(String parameter,
                                   String value,
                                   String type)
Adds an invalid value for a specified type.

Parameters:
parameter - the name of the parameter passed by the user.
value - the value of the parameter passed by the user.
type - the type which this parameter should be compliant with.
Since:
XINS 2.0

addInvalidValueForType

public void addInvalidValueForType(String parameter,
                                   String value,
                                   String type,
                                   String element)
Adds an invalid value for a specified type.

Parameters:
parameter - the parameter passed by the user.
value - the value of the parameter passed by the user.
type - the type which this parameter should be compliant with.
element - the element in which the parameter is missing.
Since:
XINS 2.0

addParamCombo

public void addParamCombo(String type,
                          List parameters)
Adds an invalid combination of parameters.

Parameters:
type - the type of the combination.
parameters - list of the parameters in the combination passed as a list of String objects.

addAttributeCombo

public void addAttributeCombo(String type,
                              List attributes,
                              String elementName)
Adds an invalid combination of attributes.

Parameters:
type - the type of the combination.
attributes - list of the attributes in the combination passed as a list of String objects.
elementName - the name of the element to which these attributes belong.
Since:
XINS 1.4.0


See http://www.xins.org/.