Package com.highdeal.contract.hci
Class ChargingContractItemSharedCounterModel
java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.contract.hci.ChargingContractItemSharedCounterModel
- All Implemented Interfaces:
ITagNameProvider,IXMLMarshallable,XMLMarshallable
- Direct Known Subclasses:
ChargingContractItemPooledCounterModel
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
namewhich identifies the counter inside the associated Charge Plan Model. - A
namespacewhich 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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.getName()Gets thenamewhich identifies only one counter inside the Charging Contract Item.Gets thenamespacewhich defines a group of counters among Charging Contract Items.Gets the XML tag name of the HCI model.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets thenamewhich identifies only one counter inside the Charging Contract Item.voidsetNamespace(String namespace) Sets thenamespacewhich defines a group of counters among Charging Contract Items.Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
-
Field Details
-
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
Gets thenamewhich identifies only one counter inside the Charging Contract Item.- Returns:
- the
namewhich identifies only one counter inside the Charging Contract Item.
-
setName
Sets thenamewhich identifies only one counter inside the Charging Contract Item.- Parameters:
name- thenamewhich identifies only one counter inside the Charging Contract Item.
-
getNamespace
Gets thenamespacewhich defines a group of counters among Charging Contract Items. An empty namespace defines the default group of counters.- Returns:
- the
namespacewhich defines a group of counters among Charging Contract Items.
-
setNamespace
Sets thenamespacewhich defines a group of counters among Charging Contract Items. An empty namespace defines the default group of counters.- Parameters:
namespace- thenamespacewhich defines a group of counters among Charging Contract Items.
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Returns:
- The XML tag name
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Parameters:
output- TheXML outputto marshal the object attributes into
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Parameters:
output- TheXML outputto marshal the child objects into
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-