Package com.highdeal.hci
Class InvalidModificationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.hci.InvalidModificationException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Generic exception thrown when there is an attempt to modify something
in an invalid way.
For troubleshooting during the implementation of SAP CC, see the Error Code Reference documentation in the SDK or in (SAP Help Portal).
- See Also:
-
- Error Code Reference
- Serialized Form
XML API for HCI
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>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int0: Reason code when the target object does not exist in the connected SAP CC systemstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.InvalidModificationException(int reason, String message) Constructs an exception with a reason and a message.InvalidModificationException(int reason, String message, IError error) Constructs an exception with a reason and a message. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the list of offer codes, referencing the entity to be deleted.intbooleanReturnstruein case of deletion of subscribed offer, elsefalse.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidvoidsetMessage(String message) Sets the message of the exception.voidsetOfferSubscribed(boolean isOfferSubscribed) Sets the offer as subscribed offer in case of offer deletion.voidsetReason(int reason) Sets the reason of the exception.Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReferenceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
DOES_NOT_EXIST
public static final int DOES_NOT_EXIST0: Reason code when the target object does not exist in the connected SAP CC system- See Also:
-
ALREADY_EXIST
public static final int ALREADY_EXIST- See Also:
-
INVALID
public static final int INVALID- See Also:
-
CANNOT_INITIALIZE
public static final int CANNOT_INITIALIZE- See Also:
-
OWNER_IS_NOT_MODIFIABLE
public static final int OWNER_IS_NOT_MODIFIABLE- See Also:
-
UNRESOLVED_PRE_RATING
public static final int UNRESOLVED_PRE_RATING- See Also:
-
STILL_REFERENCED
public static final int STILL_REFERENCED- See Also:
-
CHARGING_DICTIONARY_IS_NOT_MODIFIABLE
public static final int CHARGING_DICTIONARY_IS_NOT_MODIFIABLE- See Also:
-
PRODUCTS_ARE_NOT_MODIFIABLE
public static final int PRODUCTS_ARE_NOT_MODIFIABLE- See Also:
-
MANAGED_BY_COCKPIT_IS_NOT_MODIFIABLE
public static final int MANAGED_BY_COCKPIT_IS_NOT_MODIFIABLE- See Also:
-
-
Constructor Details
-
InvalidModificationException
public InvalidModificationException()Constructs an empty exception. -
InvalidModificationException
Constructs an exception with a reason and a message.- Parameters:
reason- The reason of the exceptionmessage- The message
-
InvalidModificationException
Constructs an exception with a reason and a message.- Parameters:
reason- The reason of the exceptionmessage- The messageerror- Theerrorassociated to this exception
-
-
Method Details
-
getReason
public int getReason() -
setReason
public void setReason(int reason) Sets the reason of the exception.- Parameters:
reason- The reason of the invalid modification
-
getMessage
- Overrides:
getMessagein classThrowable
-
setMessage
Sets the message of the exception.- Parameters:
message- The message for the exception
-
getIError
- Returns:
- The error contained in this exception
-
setError
- Parameters:
error- The error contained in this exception
-
isOfferSubscribed
public boolean isOfferSubscribed()Returnstruein case of deletion of subscribed offer, elsefalse.- Returns:
truein case of deletion of subscribed offer
-
setOfferSubscribed
public void setOfferSubscribed(boolean isOfferSubscribed) Sets the offer as subscribed offer in case of offer deletion.- Parameters:
isOfferSubscribed-trueif the offer has been subscribed,falseotherwise
-
getOfferCodes
Returns the list of offer codes, referencing the entity to be deleted.- Returns:
- The list of offer codes, referencing the entity to be deleted
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-