Class RunRatingSessionJobModel

java.lang.Object
com.highdeal.bart.hci.SchedulableJobModel
com.highdeal.bart.hci.RunRatingSessionJobModel
All Implemented Interfaces:
XMLMarshallable, Comparable<SchedulableJobModel>

public class RunRatingSessionJobModel extends SchedulableJobModel
Run rating session job model is a extends of abstract class SchedulableJobModel.

A run rating session job model is used to launch a rating session periodically.

A run rating session job model is similar to an SchedulableJobModel except for those parameters:
  • The delay: Each time the job is launched, the delay is remove from the current date. All CDRs which have an consumption date older to this delay are rated.
  • The batch rating group Id

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="runRatingSessionJob">
   <xs:complexType>
     <xs:attribute name="pollingPeriod" type="xs:string"/>
     <xs:attribute name="recurrence" type="xs:string"/>
     <xs:attribute name="batchRatingGroupId" type="xs:string"/>
     <xs:attribute name="mode" type="xs:string"/>
     <xs:attribute name="delay" type="xs:string"/>
     <xs:attribute name="status" type="RunRatingSessionJobStatusType"/>
     <xs:attribute name="description" type="xs:string"/>
     <xs:attribute name="jobID" type="xs:long"/>
   </xs:complexType>
 </xs:element>
<xs:simpleType name="RunRatingSessionJobStatusType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="active"/>
     <xs:enumeration value="inactive"/>
   </xs:restriction>
 </xs:simpleType>

  • Field Details

  • Constructor Details

    • RunRatingSessionJobModel

      public RunRatingSessionJobModel()
      Builds an empty job model
    • RunRatingSessionJobModel

      public RunRatingSessionJobModel(Integer batchRatingGroupId, Long delay, RatingSessionModel.Mode mode, Long pollingPeriod, String recurrence, int status, String description)
      Public constructor
      Parameters:
      batchRatingGroupId -
      delay -
      pollingPeriod -
      recurrence -
      status -
  • Method Details

    • setBatchRatingGroupId

      public void setBatchRatingGroupId(Integer batchRatingGroupId)
      Sets the batch rating group Id.
      Parameters:
      batchRatingGroupId - the batch rating group Id
    • getBatchRatingGroupId

      public Integer getBatchRatingGroupId()
      Gets the batch rating group Id.
      Returns:
      the batch rating group Id.
    • setDelay

      public void setDelay(Long delay)
      Sets the delay compared to system date.
      Parameters:
      delay - number of seconds
    • getDelay

      public Long getDelay()
      Gets the delay compared to system date.
      Returns:
      the delay compared to system date.
    • setMode

      public void setMode(RatingSessionModel.Mode mode)
      Parameters:
      mode - RatingSessionModel.Mode
    • getMode

      public RatingSessionModel.Mode getMode()
      Returns:
      RatingSessionModel.Mode.
    • getJobClassName

      public String getJobClassName()
      Gets the class name of this job.
      Specified by:
      getJobClassName in class SchedulableJobModel
      Returns:
      the class name of job.
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(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.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • marshal

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