Class ChargingContractItemSharedCounterModel

java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.contract.hci.ChargingContractItemSharedCounterModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMarshallable
Direct Known Subclasses:
ChargingContractItemPooledCounterModel

public class ChargingContractItemSharedCounterModel extends HCIModelAdapter
The ChargingContractItemSharedCounterModel enables to flag a counter that comes from the associated ChargePlanModel as shared. It means that the counter will be grouped with other shared or pooled counters from different ChargingContractItemModel. Counters are grouped according to the concatenation of their "namespace + name" (namespace could be empty). The real shared counter that represent all counters within the same groups in the Charging Contract Item is named:
  • namespace + "." + name (if namespace is not empty)
  • name (if namespace is empty)

It is composed of:

  • A name which identifies the counter inside the associated Charge Plan Model.
  • A namespace which is a string and enables to group counters with the same name in different contexts.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:complexType name="ChargingContractItemSharedCounterType">
   <xs:attribute name="name" type="xs:string" use="required" />
   <xs:attribute name="namespace" type="xs:string" />
 </xs:complexType>

  • Field Details

    • TAG_NAME

      public static final String TAG_NAME
      The value XML tag name of the Charging Contract Item Shared Counter Model
      See Also:
  • Constructor Details

    • ChargingContractItemSharedCounterModel

      public ChargingContractItemSharedCounterModel()
  • Method Details

    • getName

      public String getName()
      Gets the name which identifies only one counter inside the Charging Contract Item.
      Returns:
      the name which identifies only one counter inside the Charging Contract Item.
    • setName

      public void setName(String name)
      Sets the name which identifies only one counter inside the Charging Contract Item.
      Parameters:
      name - the name which identifies only one counter inside the Charging Contract Item.
    • getNamespace

      public String getNamespace()
      Gets the namespace which defines a group of counters among Charging Contract Items. An empty namespace defines the default group of counters.
      Returns:
      the namespace which defines a group of counters among Charging Contract Items.
    • setNamespace

      public void setNamespace(String namespace)
      Sets the namespace which defines a group of counters among Charging Contract Items. An empty namespace defines the default group of counters.
      Parameters:
      namespace - the namespace which defines a group of counters among Charging Contract Items.
    • getTagName

      public String getTagName()
      Description copied from interface: ITagNameProvider
      Gets the XML tag name of the HCI model.
      Returns:
      The XML tag name
    • marshalAttributes

      public void marshalAttributes(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the attributes of an object.
      Parameters:
      output - The XML output to marshal the object attributes into
    • marshalChildren

      public void marshalChildren(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the child objects of an object.
      Parameters:
      output - The XML output to marshal the child objects into
    • 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
    • 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
    • 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