public class SubscriptionModel extends java.lang.Object implements XMLMarshallable
Java class represents a subscription in customer master data owned by a service provider;
A subscription represents a business agreement between an end customer and the service provider.
It includes subscribed pricing information, customer information, and the associated subscriber account that holds this subscription.
It is the result of an service offer that is subscribed to by an end customer of the service provider as part of
a commercial agreement.
When a subscription is created, all the mandatory charges of the related offer
are automatically activated. Charges and suboffers of the related subscription can then be activated according to
the subscriber contract.
A subscription may contain several sub-subscriptions, which represents subscriptions to suboffers of the root offer.
offer condition
directly contained by the offer of this subscription.
charge activation items contained within this subscription must be associated to a
charge condition directly contained by the offer of this subscription.
A subscription includes both a subscription context and a chronology of subscription contexts.
A subscription can be:
Offline subscription is always charged in a batch mode
and belongs to a unique batch rating group to schedule and optimize the sessions of offline charging.
During the charging process, the SAP CC system generates counter snapshots (backups of the subscription counters) that
enable the rerating services.
Hybrid subscription can be charged both in realtime and in batch modes according to the
marketable service that is consumed by an end customer. Even if hybrid subscriptions belong to a batch rating group, they are not elligible to the rerating services.
Online subscription is charged in realtime mode and is not compatible with the rerating services
A subscription includes parameters at different levels:
parameterSet himself stored
in a chronology managed into subscriptionContext.
charge activation level are stored in a chronology managed into
parameterSet stored
in each chargeActivation.
Modifying a parameter in a subscription, whatever its level, represents the same operation as:
parameters redefined each level)Modify Subscription operation parameter sets and translation tables exceptions
that must be applied at a specified date Notes
parameter was already redefined (the subscription did not follow the standard parameters values), it is necessary to
retrieve the parameter and change its value.
parameter was not already defined, it is necessary to create a parameter with the new value
and insert it at the right place.
CreateSubscriptionOp,
ModifySubscriptionOp,
ImportSubscriberDataOp,
ExportSubscriberDataOpThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="subscription">
<xs:complexType>
<xs:sequence>
<xs:element ref="subscriptionContext" minOccurs="0" maxOccurs="1"/>
<xs:element ref="subscription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="chargeActivation" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="additionalInformation" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="counter" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="subscriptionContextChronology" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="code" type="xs:string"/> <!-- mandatory for a root subscription -->
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="offerCode" type="xs:string"/> <!-- required for a root subscription -->
<xs:attribute name="offerConditionCode" type="xs:string"/> <!-- mandatory for a root subscription -->
<xs:attribute name="subscriberAccountCode" type="xs:string" use="required"/>
<xs:attribute name="subscriberAccountServiceProvider" type="xs:string" use="required"/>
<xs:attribute name="reratingLockCode" type="xs:string"/>
<xs:attribute name="reratingLastCode" type="xs:string"/>
<xs:attribute name="reratingLastStatus" type="ReratingLastStatusType"/>
<xs:attribute name="reratingSuggestedDate" type="xs:dateTime"/>
<xs:attribute name="type" type="SubscriptionTypeType"/>
<xs:attribute name="batchRatingGroupCode" type="xs:string"/>
<xs:attribute name="effective" type="xs:dateTime"/> <!-- mandatory for a root subscription -->
<xs:attribute name="expiration" type="xs:dateTime"/>
<xs:attribute name="priceFreezeEffective" type="xs:dateTime"/>
<xs:attribute name="priceFreezeExpiration" type="xs:dateTime"/>
<xs:attribute name="commitmentExpiration" type="xs:dateTime"/>
<xs:attribute name="suspensionDate" type="xs:dateTime"/>
<xs:attribute name="resumptionDate" type="xs:dateTime"/>
<xs:attribute name="cancellationDate" type="xs:dateTime"/>
<xs:attribute name="lastSnapshotDate" type="xs:dateTime"/>
<xs:attribute name="overrideDependencies" type="xs:boolean" use="optional"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="SubscriptionTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="online"/>
<xs:enumeration value="hybrid"/>
<xs:enumeration value="offline"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ReratingLastStatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="alreadyLockedFailure"/>
<xs:enumeration value="counterRestorationFailure"/>
<xs:enumeration value="billingFailure"/>
<xs:enumeration value="bartRestorationFailure"/>
<xs:enumeration value="exportFailure"/>
<xs:enumeration value="unlockFailure"/>
<xs:enumeration value="exportAndUnlockFailure"/>
<xs:enumeration value="restorationSuccess"/>
<xs:enumeration value="reratingSuccess"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="subscriptionContextChronology">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
| Modifier and Type | Class and Description |
|---|---|
static class |
SubscriptionModel.SubscriptionType |
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTIVE_STATUS
Status for active subscription.
|
static int |
CLOSED_STATUS
Status for closed subscription.
|
static int |
LOCKED_STATUS
Status for locked subscription.
|
static java.lang.String |
NAME
The XML tag name of this data model: "subscription"
|
| Constructor and Description |
|---|
SubscriptionModel()
Builds an empty SubscriptionModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChargeActivation(ChargeActivationModel activation) |
void |
addChargeActivation(ChargeActivationModel activation,
boolean generateSubCode) |
void |
addChild(java.lang.String name,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
addSubscription(SubscriptionModel sub) |
java.util.Vector<AdditionalInfoModel> |
getAdditionalInfos()
Returns the list of AdditionalInfoModel.
|
java.lang.String |
getBatchRatingGroupCode()
Returns the batch rating group code that subscription has registered to;
If batch rating group code is
null, this subscription is online. |
java.util.Date |
getCancellationDate()
Returns the cancellation date of this subscription.
|
java.util.Vector<ChargeActivationModel> |
getChargeActivations()
Returns the list of ChargeActivationModel.
|
java.lang.String |
getCode()
Returns the identification code of this subscription.
|
java.util.Date |
getCommitmentExpiration()
Returns the commitment expiration date of this subscription.
|
SubscriptionContextModel |
getContext()
Returns the subscription context.
|
ChronologyModel |
getContextChronology()
Returns the offer context chronology of this subscription.
|
java.util.Vector<CounterModel> |
getCounters()
Returns the list of
CounterModel. |
java.util.Date |
getEffective()
Returns the effective date of this subscription.
|
java.util.Date |
getExpiration()
Returns the expiration date of this subscription.
|
java.util.Date |
getLastSnapshotDate()
Returns the last snapshot date of this subscription.
|
java.lang.String |
getOfferCode()
Returns the code of the subscribed offer.
|
java.lang.String |
getOfferConditionCode()
Returns the code of the offer condition of the subscribed offer.
|
SubscriptionModel |
getParent()
Returns the subscription parent.
|
java.util.Date |
getPriceFreezeEffective()
Returns the price freeze effective date of this subscription.
|
java.util.Date |
getPriceFreezeExpiration()
Returns the price freeze expiration date of this subscription.
|
java.lang.String |
getReference()
Returns the reference of this subscription.
|
java.lang.String |
getReratingLastCode()
Returns the last rerating code of this subscription; This code corresponds to
the last rerating operation identifier that has been launched on this subscription.
|
ReratingStatus |
getReratingLastStatus()
Returns the rerating status of the subscription; This field maintains the last rerating state of the
subscription.
|
java.lang.String |
getReratingLockCode()
Gets the code of the rerating operation that has locked this subscription; This code can be set for
offline subscription only. |
java.util.Date |
getReratingSuggestedDate()
Returns the suggested rerating date.
|
java.util.Date |
getResumptionDate()
Returns the resumption date of this subscription.
|
java.lang.String |
getSubscriberAccountCode()
Returns the code of the subscriber account for this subscription.
|
java.lang.String |
getSubscriberAccountServiceProvider()
Returns the service provider of the subscriber account for this subscription.
|
java.util.Vector<SubscriptionModel> |
getSubscriptions()
Returns the subscriptions.
|
java.util.Date |
getSuspensionDate()
Returns the suspension date of this subscription.
|
SubscriptionModel.SubscriptionType |
getType()
|
boolean |
isOverrideDependencies()
Returns whether the subscription overrides the charge dependencies of the offer.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
removeSubscription(SubscriptionModel sub) |
java.util.Vector<ChargeActivationModel> |
retrieveAllCharges()
Returns the charge activations of this subscription and all the charge activations of
its sub-subcriptions.
|
java.util.Vector<SubscriptionModel> |
retrieveAllSubscriptions()
Returns all the subscriptions which has this subscription as ancestor.
|
java.util.Vector<ChargeActivationModel> |
retrieveInvalidChargeSubCodes()
Returns all the invalid charge activation subcodes.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setBatchRatingGroupCode(java.lang.String batchRatingGroupCode)
Sets the batch rating group code that subscription must registered to;
Batch rating group code must be set to
null if subscription is online. |
void |
setCancellationDate(java.util.Date cancellationDate)
Sets the cancellation date of this subscription.
|
void |
setCode(java.lang.String code)
Sets the identification code for this subscription.
|
void |
setCommitmentExpiration(java.util.Date commitmentExpiration)
Sets the commitment expiration date of this subscription.
|
void |
setContext(SubscriptionContextModel context)
Sets the context of this subscription.
|
void |
setEffective(java.util.Date effective)
Sets the effective date of this subscription.
|
void |
setExpiration(java.util.Date expiration)
Sets the expiration date of this subscription.
|
void |
setLastSnapshotDate(java.util.Date lastSnapshotDate)
Sets the last snapshot date of this subscription.
|
void |
setOfferCode(java.lang.String offerCode)
Sets the code of the subscribed offer.
|
void |
setOfferConditionCode(java.lang.String offerConditionCode)
Sets the code of the offer condition of the subscribed offer.
|
void |
setOverrideDependencies(boolean override)
Sets whether the subscription overrides the charge dependencies of the offer.
|
void |
setParent(SubscriptionModel parent)
Sets the parent for this subscription.
|
void |
setPriceFreezeEffective(java.util.Date priceFreezeEffective)
Sets the price freeze effective date of this subscription.
|
void |
setPriceFreezeExpiration(java.util.Date priceFreezeExpiration)
Sets the price freeze expiration date of this subscription.
|
void |
setReference(java.lang.String reference)
Sets the reference of this subscription.
|
void |
setReratingLastCode(java.lang.String reratingLastCode)
Sets the last rerating code of this subscription; This code corresponds to
the last rerating operation identifier that has been launched on this subscription.
|
void |
setReratingLastStatus(ReratingStatus reratingLastStatus)
Sets the rerating status of the subscription, which must be a value among
ReratingStatus.ALREADY_LOCKED_FAILURE, ReratingStatus.COUNTER_RESTORATION_FAILURE
or ReratingStatus.BILLING_FAILURE for
failure types or ReratingStatus.RESTORATION_SUCCESS or
ReratingStatus.RERATING_SUCCESS for success types. |
void |
setReratingLockCode(java.lang.String reratingLockCode)
Sets the code of the rerating operation that has locked this subscription; Changing this code has not effect
on the subscription.
|
void |
setReratingSuggestedDate(java.util.Date reratingSuggestedDate)
Sets the suggested rerating date.
|
void |
setResumptionDate(java.util.Date resumptionDate)
Sets the resumption date of this subscription.
|
void |
setSubscriberAccountCode(java.lang.String subscriberAccountCode)
Sets the identification code of the subscriber account belonging this subscription.
|
void |
setSubscriberAccountServiceProvider(java.lang.String subscriberAccountServiceProvider)
Sets the service provider of the subscriber account for this subscription.
|
void |
setSuspensionDate(java.util.Date suspensionDate)
Sets the suspension date of this subscription.
|
void |
setType(SubscriptionModel.SubscriptionType type)
|
public static final int ACTIVE_STATUS
public static final int LOCKED_STATUS
public static final int CLOSED_STATUS
public static final java.lang.String NAME
public SubscriptionModel getParent()
setParent(SubscriptionModel)public void setParent(SubscriptionModel parent)
parent - The parent of the subscriptiongetParent()public java.lang.String getCode()
setCode(String)public void setCode(java.lang.String code)
code - The identification code of subscriptiongetCode()public java.lang.String getReference()
setReference(String)public void setReference(java.lang.String reference)
reference - The reference of subscriptiongetReference()public java.lang.String getSubscriberAccountCode()
public void setSubscriberAccountCode(java.lang.String subscriberAccountCode)
subscriberAccountCode - The identification code of the subscriber account for this subscriptionpublic java.lang.String getSubscriberAccountServiceProvider()
public void setSubscriberAccountServiceProvider(java.lang.String subscriberAccountServiceProvider)
subscriberAccountServiceProvider - The subscriber account service provider for this subscriptionpublic java.lang.String getOfferCode()
setOfferCode(String)public void setOfferCode(java.lang.String offerCode)
offerCode - The codegetOfferCode()public java.lang.String getOfferConditionCode()
setOfferConditionCode(String)public void setOfferConditionCode(java.lang.String offerConditionCode)
offerConditionCode - The code of the offer conditiongetOfferConditionCode()public java.lang.String getReratingLockCode()
offline subscription only. The lock code corresponds to
the rerating operation identifier.public void setReratingLockCode(java.lang.String reratingLockCode)
UnlockSubscriptionOp instead.reratingLockCode - The code of the rerating operation that has locked this subscriptionpublic java.lang.String getBatchRatingGroupCode()
null, this subscription is online.public void setBatchRatingGroupCode(java.lang.String batchRatingGroupCode)
null if subscription is online.batchRatingGroupCode - The batch rating group codepublic SubscriptionModel.SubscriptionType getType()
public void setType(SubscriptionModel.SubscriptionType type)
public ReratingStatus getReratingLastStatus()
ReratingStatus.ALREADY_LOCKED_FAILURE,
ReratingStatus.COUNTER_RESTORATION_FAILURE or ReratingStatus.BILLING_FAILURE for
failure types or ReratingStatus.RESTORATION_SUCCESS or
ReratingStatus.RERATING_SUCCESS for success types.in order to get the associated rerating operation code,
setReratingLastStatus(ReratingStatus)public void setReratingLastStatus(ReratingStatus reratingLastStatus)
ReratingStatus.ALREADY_LOCKED_FAILURE, ReratingStatus.COUNTER_RESTORATION_FAILURE
or ReratingStatus.BILLING_FAILURE for
failure types or ReratingStatus.RESTORATION_SUCCESS or
ReratingStatus.RERATING_SUCCESS for success types.reratingLastStatus - The rerating state of the subscriptiongetReratingLastStatus()public java.util.Date getReratingSuggestedDate()
public void setReratingSuggestedDate(java.util.Date reratingSuggestedDate)
reratingSuggestedDate - The suggested rerating datepublic java.util.Date getEffective()
setEffective(Date)public void setEffective(java.util.Date effective)
effective - The effective date of the subscriptiongetEffective()public java.util.Date getExpiration()
setExpiration(Date)public void setExpiration(java.util.Date expiration)
expiration - The expiration date of the subscriptiongetExpiration()public java.util.Date getLastSnapshotDate()
setLastSnapshotDate(Date)public void setLastSnapshotDate(java.util.Date lastSnapshotDate)
lastSnapshotDate - The snapshot date of the subscriptiongetLastSnapshotDate()public java.lang.String getReratingLastCode()
setReratingLastCode(String),
in order to get the associated rerating statuspublic void setReratingLastCode(java.lang.String reratingLastCode)
reratingLastCode - The last rerating operation code of the subscriptiongetReratingLastCode()public java.util.Date getPriceFreezeEffective()
setPriceFreezeEffective(Date)public void setPriceFreezeEffective(java.util.Date priceFreezeEffective)
priceFreezeEffective - The price freeze effective date of the subscriptiongetPriceFreezeEffective()public java.util.Date getPriceFreezeExpiration()
setPriceFreezeExpiration(Date)public void setPriceFreezeExpiration(java.util.Date priceFreezeExpiration)
priceFreezeExpiration - The priceFreeze expiration date of the subscriptiongetPriceFreezeExpiration()public java.util.Date getCommitmentExpiration()
setCommitmentExpiration(Date)public void setCommitmentExpiration(java.util.Date commitmentExpiration)
commitmentExpiration - The commitmentExpiration date of the subscriptiongetCommitmentExpiration()public java.util.Date getSuspensionDate()
setSuspensionDate(Date)public void setSuspensionDate(java.util.Date suspensionDate)
suspensionDate - The suspension date of the subscriptiongetSuspensionDate()public java.util.Date getResumptionDate()
setResumptionDate(Date)public void setResumptionDate(java.util.Date resumptionDate)
resumptionDate - The resumption date of the subscriptiongetResumptionDate()public java.util.Date getCancellationDate()
setCancellationDate(Date)public void setCancellationDate(java.util.Date cancellationDate)
cancellationDate - he cancellation date of the subscriptiongetCancellationDate()public boolean isOverrideDependencies()
true if the subscription overrides the charge dependencies of the offer, false otherwisepublic void setOverrideDependencies(boolean override)
override - true if the subscription overrides the charge dependencies of the offer, false otherwisepublic java.util.Vector<SubscriptionModel> getSubscriptions()
subscriptionspublic java.util.Vector<ChargeActivationModel> getChargeActivations()
charge activationspublic java.util.Vector<AdditionalInfoModel> getAdditionalInfos()
additional information itemspublic java.util.Vector<CounterModel> getCounters()
CounterModel.counterspublic ChronologyModel getContextChronology()
subscription contexts in a chronologypublic void setContext(SubscriptionContextModel context)
context - The context of this subscriptionpublic SubscriptionContextModel getContext()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic void removeSubscription(SubscriptionModel sub)
public void addSubscription(SubscriptionModel sub)
public void addChargeActivation(ChargeActivationModel activation)
public void addChargeActivation(ChargeActivationModel activation, boolean generateSubCode)
public java.util.Vector<ChargeActivationModel> retrieveAllCharges()
charge activationspublic java.util.Vector<SubscriptionModel> retrieveAllSubscriptions()
subscriptionspublic java.util.Vector<ChargeActivationModel> retrieveInvalidChargeSubCodes()
charge activations