public class RatingSessionModel extends java.lang.Object implements XMLMarshallable
CDRModel) and sends them to the SAP Convergent Charging rating engine using batch
service.
RunRatingSessionOp operation.
On client side User should define the following parameters:
RatingSessionModel.SelectionMode: The way to selects CDRs
RatingSessionModel.SelectionMode.NORMAL: All CDRs from the same subscription ID are fetch in the same time. This mode
should be used for B2C subscriptions.
RatingSessionModel.SelectionMode.WINDOWED: CDRs from the same subscription ID are fetch windowed. This mode should be
used for B2B subscriptions.
RatingSessionModel.RatingMode: The way to rate CDRs
RatingSessionModel.RatingMode.FIRSTFAIL: Once a rating error happens, latter CDRs from this same
subscriptions will not be rated.
RatingSessionModel.RatingMode.MOST: Even if rating errors happen, all CDRs will be rated.
RatingSessionModel.RatingMode.TRY: CDRs are rated but no commit will be done on SAP Convergent Charging BART or Core side. This rating
mode could be used to test current configuration.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="rating">
<xs:complexType>
<xs:attribute name="sessionID" type="xs:string"/>
<xs:attribute name="batchRatingGroupId" type="xs:string"/>
<xs:attribute name="subscriptionID" type="xs:string"/>
<xs:attribute name="startDate" type="xs:dateTime"/>
<xs:attribute name="duration" type="xs:string"/>
<xs:attribute name="mode" type="RatingSessionModeType"/>
<xs:attribute name="maxConsumptionDate" type="xs:dateTime"/>
<xs:attribute name="nbCDRRated" type="xs:string"/>
<xs:attribute name="nbCDRError" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="status" type="RatingSessionStatusType"/>
</xs:complexType>
</xs:element><xs:simpleType name="RatingSessionStatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="inProgress"/>
<xs:enumeration value="ended"/>
<xs:enumeration value="stopped"/>
<xs:enumeration value="cleaned"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="RatingSessionModeType">
<xs:restriction base="xs:string">
<xs:enumeration value="subscription-firstFail"/>
<xs:enumeration value="subscription-most"/>
<xs:enumeration value="subscription-try"/>
<xs:enumeration value="subscription-windowed-firstFail"/>
<xs:enumeration value="subscription-windowed-most"/>
<xs:enumeration value="subscription-windowed-try"/>
<xs:enumeration value="day-most"/>
<xs:enumeration value="day-subscription-firstFail"/>
<xs:enumeration value="azimut"/> <!-- deprecated -->
</xs:restriction>
</xs:simpleType>
| Modifier and Type | Class and Description |
|---|---|
static class |
RatingSessionModel.Mode |
static class |
RatingSessionModel.RatingMode |
static class |
RatingSessionModel.SelectionMode |
| Modifier and Type | Field and Description |
|---|---|
static int |
CLEANED_STATUS
This status indicates that the rating session has been badly stopped and cleaned at the server restart.
|
static int |
ENDED_STATUS
This status indicates that the rating session is ended.
|
static int |
IN_PROGRESS_STATUS
This status indicates that the rating session is running.
|
static int |
RATING_CDRS_STATUS
This status indicates that the rating session is running and rating the selected subscriptions.
|
static int |
SELECTING_SUBS_STATUS
This status indicates that the rating session is running and selecting the subscriptions.
|
static int |
STOPPED_STATUS
This status indicates that the rating session has been stopped manually.
|
static java.lang.String |
TAG_NAME |
| Constructor and Description |
|---|
RatingSessionModel()
Builds an empty rating session model
|
RatingSessionModel(java.lang.Integer batchRatingGroupId,
java.util.Date maxConsumptionDate,
java.lang.String description,
RatingSessionModel.Mode mode)
Build a rating session with batch rating group Id, max consumption date and description.
|
RatingSessionModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
java.util.Date startDate,
java.lang.Long duration,
RatingSessionModel.Mode mode,
java.util.Date maxConsumptionDate,
java.lang.Long nbCDRRated,
java.lang.Long nbCDRError,
java.lang.String description,
int status)
Build a rating session with full information.
|
RatingSessionModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
java.lang.Long cdrSubscriptionID,
java.util.Date startDate,
java.lang.Long duration,
RatingSessionModel.Mode mode,
java.util.Date maxConsumptionDate,
java.lang.Long nbCDRRated,
java.lang.Long nbCDRError,
java.lang.String description,
int status)
Build a rating session with full information.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
_getOID()
Gets the identifier of the rating session.
|
void |
_setDuration(java.lang.Long d)
Sets the rating session duration.
|
void |
_setNbCDRError(java.lang.Long nbError)
Sets the number of erroneous CDRs.
|
void |
_setNbCDRRated(java.lang.Long nbRated)
Sets the number of rated CDRs
|
void |
_setOID(java.lang.Long oid)
Sets the identifier of the rating session.
|
void |
_setStartDate(java.util.Date sd)
Sets the start date of the rating session.
|
void |
_setStatus(int statusType)
Sets the status of the rating session.
|
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. |
java.lang.Integer |
getBatchRatingGroupId()
Gets the batch rating group identifier of the rating session.
|
java.lang.Long |
getCDRSubscriptionID()
Gets the CDR subscription Id.
|
java.lang.String |
getDescription()
Gets the description of the rating session.
|
java.lang.Long |
getDuration()
Gets the rating session duration.
|
java.util.Date |
getMaxConsumptionDate()
Gets the max consumption date of the rating session.
|
RatingSessionModel.Mode |
getMode()
Gets the mode of the rating session.
|
java.lang.Long |
getNbCDRError()
Gets the number of erroneous CDRs.
|
java.lang.Long |
getNbCDRRated()
Gets the number of rated CDRs.
|
java.util.Date |
getStartDate()
Gets the start date of the rating session.
|
int |
getStatus()
Gets the status of the rating session.
|
java.lang.String |
getStatusStringRepresentation()
Return a String representation of rating mode
|
void |
innerMarshall(XMLOutputter output)
This method is used by subclasses only.
|
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 |
setBatchRatingGroupId(java.lang.Integer batchRatingGroupId)
Sets the batch rating group identifier of the rating session.
|
void |
setCDRSubscriptionID(java.lang.Long subscriptionID)
Sets the CDR subscription Id.
|
void |
setDescription(java.lang.String description)
Sets the description of the rating session.
|
void |
setMaxConsumptionDate(java.util.Date consumptionDate)
Sets the max consumption of the rating session.
|
void |
setMode(RatingSessionModel.Mode mode)
Sets the mode of the rating session.
|
java.lang.String |
toString() |
public static final java.lang.String TAG_NAME
public static final int IN_PROGRESS_STATUS
public static final int ENDED_STATUS
public static final int STOPPED_STATUS
public static final int CLEANED_STATUS
public static final int SELECTING_SUBS_STATUS
public static final int RATING_CDRS_STATUS
public RatingSessionModel()
public RatingSessionModel(java.lang.Integer batchRatingGroupId,
java.util.Date maxConsumptionDate,
java.lang.String description,
RatingSessionModel.Mode mode)
public RatingSessionModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
java.util.Date startDate,
java.lang.Long duration,
RatingSessionModel.Mode mode,
java.util.Date maxConsumptionDate,
java.lang.Long nbCDRRated,
java.lang.Long nbCDRError,
java.lang.String description,
int status)
public RatingSessionModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
java.lang.Long cdrSubscriptionID,
java.util.Date startDate,
java.lang.Long duration,
RatingSessionModel.Mode mode,
java.util.Date maxConsumptionDate,
java.lang.Long nbCDRRated,
java.lang.Long nbCDRError,
java.lang.String description,
int status)
public java.lang.Long getDuration()
public void _setDuration(java.lang.Long d)
d - the durationpublic java.lang.Long getNbCDRRated()
public void _setNbCDRRated(java.lang.Long nbRated)
nbRated - the number of rated CDRspublic java.lang.Long getNbCDRError()
public void _setNbCDRError(java.lang.Long nbError)
nbError - the number of erroneous CDRspublic java.lang.Long _getOID()
public void _setOID(java.lang.Long oid)
oid - the identifierpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - the descriptionpublic java.util.Date getStartDate()
public void _setStartDate(java.util.Date sd)
sd - the start datepublic java.util.Date getMaxConsumptionDate()
public void setMaxConsumptionDate(java.util.Date consumptionDate)
consumptionDate - the max consumption datepublic RatingSessionModel.Mode getMode()
public void setMode(RatingSessionModel.Mode mode)
mode - the mode of the rating sessionpublic int getStatus()
public void _setStatus(int statusType)
statusType - the new statuspublic java.lang.Integer getBatchRatingGroupId()
public void setBatchRatingGroupId(java.lang.Integer batchRatingGroupId)
batchRatingGroupId - the batch rating group identifierpublic java.lang.Long getCDRSubscriptionID()
public void setCDRSubscriptionID(java.lang.Long subscriptionID)
subscriptionID - the subscription Idpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - 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 innerMarshall(XMLOutputter output)
public java.lang.String getStatusStringRepresentation()