Class AbstractParameterModel

java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.hci.AbstractParameterModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMapping, XMLMarshallable

public abstract class AbstractParameterModel extends HCIModelAdapter implements XMLMapping
This Java class represents a configurable parameter description.

It is composed of:

  • A name which identifies the parameter.
  • A description allowing a better understanding about the parameter (optional).
  • A value which can be a String, a Date or a Number.
  • An additionalInfo which can be a String, a Date or a Number.
  • Field Details

  • Constructor Details

    • AbstractParameterModel

      public AbstractParameterModel(ValueType... types)
  • Method Details

    • hasValue

      public boolean hasValue()
      Whether the parameter has a value.
      Returns:
      whether the parameter has a value
    • getName

      public String getName()
      Gets the name of the parameter description defined by the user.
      Returns:
      The name of the parameter description defined by the user
    • setName

      public void setName(String name)
      Sets the name of the parameter description defined by the user.
      Parameters:
      name - The name of the parameter description defined by the user
    • getDescription

      public String getDescription()
      Gets the description allowing a better understanding about the parameter of the Charging Contract Item.
      Returns:
      The description allowing a better understanding about the parameter of the Charging Contract Item
    • setDescription

      public void setDescription(String description)
      Sets the description allowing a better understanding about the parameter of the Charging Contract Item.
      Parameters:
      description - The description allowing a better understanding about the parameter of the Charging Contract Item
    • getType

      public ValueType getType()
      Gets the type of the value. When the type is null, then the value is null. When the value is null, then the type isn't necessary null.
      Returns:
      The type of the value
    • getValue

      public Object getValue(ValueType aType)
      Gets a typed value.
      Parameters:
      aType - The type of the value
      Returns:
      the typed value or null if the given parameter type is not supported.
    • setValue

      public void setValue(ValueType aType, Object aValue)
      Sets a typed value.
      Parameters:
      aType - The type of the value
      aValue - The value
    • getAdditionalInfoList

      public List<AdditionalInfoModel> getAdditionalInfoList()
      Gets the list of Additional Informations.
      Returns:
      The list of Additional Informations
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      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.
      Specified by:
      addChild in interface XMLMarshallable
      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.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • marshalAttributes

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

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

      public Class<?> getClass(String nsUri, String tag, XMLAttributes atts)
      Description copied from interface: XMLMapping
      Returns the Java class for a specified XML tag and its attributes in a namespace.
      Specified by:
      getClass in interface XMLMapping
      Parameters:
      nsUri - The unique resource identifier of the namespace of the XML tag
      tag - The local part of the XML tag
      atts - The attributes of the XML tag
      Returns:
      A Java class with a default constructor