public class InvalidModificationException extends OperationFailureException
For troubleshooting during the implementation of SAP CC, see the Error Code Reference documentation in the SDK or in (SAP Help Portal).
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="invalidModificationFault">
<xs:complexType>
<xs:sequence>
<xs:element ref="cause" minOccurs="0" maxOccurs="1"/> <!-- Due to legacy use of this exception, no error may be provided -->
<xs:element ref="causedBy" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="offerCode" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="code" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="reason" type="modificationExceptionReason"/>
<xs:attribute name="message" type="xs:string"/>
<xs:attribute name="isOfferSubscribed" type="xs:boolean" default="false"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="modificationExceptionReason">
<xs:restriction base="xs:string">
<xs:enumeration value="does_not_exist"/>
<xs:enumeration value="already_exist"/>
<xs:enumeration value="invalid"/>
<xs:enumeration value="still_referenced"/>
<xs:enumeration value="cannot_initialize"/>
<xs:enumeration value="owner_is_not_modifiable"/>
<xs:enumeration value="unresolved_pre_rating"/>
<xs:enumeration value="charging_dictionary_is_not_modifiable"/>
<xs:enumeration value="managed_by_cockpit_is_not_modifiable"/>
</xs:restriction>
</xs:simpleType>
| Modifier and Type | Field and Description |
|---|---|
static int |
ALREADY_EXIST |
static int |
CANNOT_INITIALIZE |
static int |
CHARGING_DICTIONARY_IS_NOT_MODIFIABLE |
static int |
DOES_NOT_EXIST
0: Reason code when the target object does not exist in the connected SAP CC system
|
static int |
INVALID |
static int |
MANAGED_BY_COCKPIT_IS_NOT_MODIFIABLE |
static int |
OWNER_IS_NOT_MODIFIABLE |
static int |
PRODUCTS_ARE_NOT_MODIFIABLE |
static int |
STILL_REFERENCED |
static int |
UNRESOLVED_PRE_RATING |
| Constructor and Description |
|---|
InvalidModificationException()
Constructs an empty exception.
|
InvalidModificationException(int reason,
java.lang.String message)
Constructs an exception with a reason and a message.
|
InvalidModificationException(int reason,
java.lang.String message,
IError error)
Constructs an exception with a reason and a message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
IError |
getIError()
Gets the
error contained in this Exception. |
java.lang.String |
getMessage() |
java.util.Vector<java.lang.String> |
getOfferCodes()
Returns the list of offer codes, referencing the entity to be deleted.
|
int |
getReason() |
boolean |
isOfferSubscribed()
Returns
true in case of deletion of subscribed offer,
else false. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setError(IError error)
Sets the
error contained in this Exception. |
void |
setMessage(java.lang.String message)
Sets the message of the exception.
|
void |
setOfferSubscribed(boolean isOfferSubscribed)
Sets the offer as subscribed offer in case of offer deletion.
|
void |
setReason(int reason)
Sets the reason of the exception.
|
getOperandReferencepublic static final int DOES_NOT_EXIST
public static final int ALREADY_EXIST
public static final int INVALID
public static final int CANNOT_INITIALIZE
public static final int OWNER_IS_NOT_MODIFIABLE
public static final int UNRESOLVED_PRE_RATING
public static final int STILL_REFERENCED
public static final int CHARGING_DICTIONARY_IS_NOT_MODIFIABLE
public static final int PRODUCTS_ARE_NOT_MODIFIABLE
public static final int MANAGED_BY_COCKPIT_IS_NOT_MODIFIABLE
public InvalidModificationException()
public InvalidModificationException(int reason,
java.lang.String message)
reason - The reason of the exceptionmessage - The messagepublic int getReason()
public void setReason(int reason)
reason - The reason of the invalid modificationpublic java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic void setMessage(java.lang.String message)
message - The message for the exceptionpublic IError getIError()
error contained in this Exception.public void setError(IError error)
error contained in this Exception.error - The error contained in this exceptionpublic boolean isOfferSubscribed()
true in case of deletion of subscribed offer,
else false.true in case of deletion of subscribed offerpublic void setOfferSubscribed(boolean isOfferSubscribed)
isOfferSubscribed - true if the offer has been subscribed, false otherwisepublic java.util.Vector<java.lang.String> getOfferCodes()
public void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object into