com.highdeal.pnr.hci
Class ModifySubscriptionOp

java.lang.Object
  extended by com.highdeal.pnr.hci.ModifySubscriptionOp
All Implemented Interfaces:
MessageOperation, XMLMarshallable

public class ModifySubscriptionOp
extends java.lang.Object
implements MessageOperation

This operation allows to modify an existing subscription by providing a complete changed subscription master data to the SAP CC system.

The system compares the new subscription against the old one (stored in the database). During the modification, root subscription, all sub-subscriptions and included charge activations are compared thanks to:

If at least the reference or the code, matches between old and new version of the object, the old version is modified. If none of them matches, the old version of the object is removed and is replaced by its new version.

Example

If the same counter is part of both subscriptions, then it will be modified according to its value from new subscription. If a counter is only part of new subscription then it will be created. Finally, if a counter is part of the old subscription but not present in the new one then it will be removed.

When a subscription (or a charge activation) contains some counters, inconsistencies may occur since counters are also modified through the charging process ("lost update" problem).

A safe way to modify a subscription without modifying its counters (partially or completely) is to use the ignoreCounters. This parameter has 3 different values:

Note

Counter removal is only possible with the option ignoreCounters set to ANY_COUNTERS.

Limitations

This operation is not compliant with the rerating services.

This operation may conflict with the prerating services (deprecated since version 1.0). This may lead to inconsistency if the modification is done in the past since the post-rating could have a result that differs from the one of the related prerating. To prevent from that, the user is warned when he/she tries to modify a subscription containing unresolved preratings. But if you consider the modification as safe regarding prerating, you can force it (see ignorePrerating).

Subscription modifications that are not safe are: Charge activation modifications that are not safe are: The modifications of the subscription structure that are not safe are:

Note

When you using the create or modify operations, only the directly held subscription context is taken into account. The SAP CC system ignores the data set in the context chronology.

Operation Result

ModifySubscriptionResult

Operation Failure Exceptions

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="modifySubscription">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="subscription" minOccurs="1" maxOccurs="1"/>
     </xs:sequence>
     <xs:attribute name="modificationDate" type="xs:dateTime"/>
     <xs:attribute name="ignorePreRating" type="xs:boolean" default="false"/>
     <xs:attribute name="ignorePendingSession" type="xs:boolean" default="false"/>
     <xs:attribute name="ignoreCounters" type="IgnoreCountersType" default="any"/>
   </xs:complexType>
 </xs:element>

 <xs:simpleType name="IgnoreCountersType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="any"/>
     <xs:enumeration value="unspecified"/>
     <xs:enumeration value="all"/>
   </xs:restriction>
 </xs:simpleType>

Operation Availability

You can send this operation request in HCI messages to the following final target types of instances in the connected SAP CC system:

EditionFinal Target Instances
raterupdaterguiderbulkLoadertaxerdispatcher
chargeNoYesNoNoNoNo

Field Summary
static int ALL_COUNTERS
           
static int ANY_COUNTERS
           
static java.lang.String OPERATION_NAME
           
static int UNSPECIFIED_COUNTERS
           
 
Constructor Summary
ModifySubscriptionOp()
          Builds an empty operation
 
Method Summary
 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.
 int getIgnoreCounters()
          Gets the ignoreCounters attribute
 java.util.Date getModificationDate()
          Gets the modification date
 java.lang.String getName()
          Returns the XML name of the operation: "modifySubscription"
 SubscriptionModel getSubscription()
          Gets the new subscription definition
 boolean isIgnorePendingSession()
          Gets the ignorePendingSession attribute
 boolean isIgnorePreRating()
          Gets the ignorePreRating attribute
 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 setIgnoreCounters(int ignoreCounters)
          Sets the ignoreCounters attribute
 void setIgnorePendingSession(boolean ignorePendingSession)
          Sets the ignorePendingSession attribute
 void setIgnorePreRating(boolean ignorePreRating)
          Sets the ignorePreRating attribute
 void setModificationDate(java.util.Date modificationDate)
          Sets the modification date
 void setSubscription(SubscriptionModel s)
          Sets the new subscription definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPERATION_NAME

public static final java.lang.String OPERATION_NAME
See Also:
Constant Field Values

ANY_COUNTERS

public static final int ANY_COUNTERS
See Also:
Constant Field Values

UNSPECIFIED_COUNTERS

public static final int UNSPECIFIED_COUNTERS
See Also:
Constant Field Values

ALL_COUNTERS

public static final int ALL_COUNTERS
See Also:
Constant Field Values
Constructor Detail

ModifySubscriptionOp

public ModifySubscriptionOp()
Builds an empty operation

Method Detail

getModificationDate

public java.util.Date getModificationDate()
Gets the modification date

Returns:
The date of the modification

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the modification date

Parameters:
modificationDate - The modification date

getName

public java.lang.String getName()
Returns the XML name of the operation: "modifySubscription"

Specified by:
getName in interface MessageOperation
Returns:
"modifySubscription"

getSubscription

public SubscriptionModel getSubscription()
Gets the new subscription definition

Returns:
The new subscription definition

setSubscription

public void setSubscription(SubscriptionModel s)
Sets the new subscription definition

Parameters:
s - The new subscription definition

isIgnorePreRating

public boolean isIgnorePreRating()
Gets the ignorePreRating attribute

Returns:
The ignorePreRating value

setIgnorePreRating

public void setIgnorePreRating(boolean ignorePreRating)
Sets the ignorePreRating attribute

Parameters:
ignorePreRating -

isIgnorePendingSession

public boolean isIgnorePendingSession()
Gets the ignorePendingSession attribute

Returns:
The ignorePendingSession value

setIgnorePendingSession

public void setIgnorePendingSession(boolean ignorePendingSession)
Sets the ignorePendingSession attribute

Parameters:
ignorePendingSession -

getIgnoreCounters

public int getIgnoreCounters()
Gets the ignoreCounters attribute

Returns:
The ignoreCounters value

setIgnoreCounters

public void setIgnoreCounters(int ignoreCounters)
Sets the ignoreCounters attribute

Parameters:
ignoreCounters -

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)