Class PricingMacroModel

java.lang.Object
com.highdeal.pnr.hci.PricingMacroModel
All Implemented Interfaces:
ITagNameProvider, XMLMarshallable, ContextualNode, ICatalogObject, com.highdeal.pnr.hci.IManageableByCockpit

public class PricingMacroModel extends Object implements ContextualNode, XMLMarshallable, ICatalogObject, ITagNameProvider, com.highdeal.pnr.hci.IManageableByCockpit
This class represents a pricing macro.

The currency used in a pricing macro always corresponds to the currency used by the calling charge component.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="pricingMacro">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="inProperty" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="outProperty" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="component" minOccurs="0" maxOccurs="1"/>
       <xs:element ref="rootChronology" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
     <xs:attribute name="description" type="xs:string"/>
     <xs:attribute name="owner" type="xs:string" use="required"/>
     <xs:attribute name="currency" type="xs:string" use="optional"/> <!-- deprecated -->
     <xs:attribute name="code" type="xs:string" use="required"/>
     <xs:attribute name="reference" type="xs:string"/>
     <xs:attribute name="managedByCockpit" type="xs:boolean" use="optional" default="false" />
   </xs:complexType>
 </xs:element>
 <xs:element name="rootChronology">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

  • Field Details

    • TAG_NAME

      public static final String TAG_NAME
      The value of that constant is the XML tag name of the Pricing Macro.
      See Also:
  • Constructor Details

    • PricingMacroModel

      public PricingMacroModel()
      Builds an empty PricingMacroModel.
    • PricingMacroModel

      @Deprecated public PricingMacroModel(String code, String description, String currencyCode)
      Deprecated.
      Deprecated since version 3.0 of SAP CC
      Builds a PricingMacroModel
      Parameters:
      code - The code of the pricing macro
      description - The description of the pricing macro
      currencyCode - The currency code of the pricing macro
  • Method Details

    • getReference

      public String getReference()
      Gets the reference.
      Returns:
      the reference.
    • setReference

      public void setReference(String r)
      Sets the reference.
      Parameters:
      r - the reference.
    • getCode

      public String getCode()
      Gets the code.
      Returns:
      the code.
    • setCode

      public void setCode(String c)
      Sets the code.
      Parameters:
      c - the code.
    • isManagedByCockpit

      public boolean isManagedByCockpit()
      Description copied from interface: com.highdeal.pnr.hci.IManageableByCockpit
      Returns true if this object is compatible with the Cockpit.
      Specified by:
      isManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpit
      Returns:
      true if this object is compatible with the Cockpit.
    • setIsManagedByCockpit

      public void setIsManagedByCockpit(boolean isManagedByCockpit)
      Description copied from interface: com.highdeal.pnr.hci.IManageableByCockpit
      Sets whether this object is compatible with the Cockpit.
      Specified by:
      setIsManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpit
      Parameters:
      isManagedByCockpit - true if this object is compatible with the Cockpit
    • getRoot

      public RateComponentModel getRoot()
      Gets the root.
      Returns:
      the root.
    • setRoot

      public void setRoot(RateComponentModel r)
      Sets the root.
      Parameters:
      r - the root.
    • getDescription

      public String getDescription()
      Gets the description
      Returns:
      The description
    • setDescription

      public void setDescription(String d)
      Sets the description
      Parameters:
      d - The description
    • getCurrencyCode

      @Deprecated public String getCurrencyCode()
      Deprecated.
      Deprecated since version 3.0 of SAP CC
      Gets the currency code
      Returns:
      null
    • setCurrencyCode

      @Deprecated public void setCurrencyCode(String currencyCode)
      Deprecated.
      Deprecated since version 3.0 of SAP CC
      Sets the currency code
      Parameters:
      currencyCode - the currency code
    • getOwner

      public String getOwner()
      Description copied from interface: ICatalogObject
      Returns the catalog owner of the object.
      Specified by:
      getOwner in interface ICatalogObject
      Returns:
      The catalog owner of the object
    • setOwner

      public void setOwner(String p)
      Sets the owner
      Parameters:
      p - the owner
    • getInProperties

      public Vector<InMacroPropertyModel> getInProperties()
      Gets the in properties.
      Returns:
      a Vector of InMacroPropertyModel.
    • getInProperty

      public InMacroPropertyModel getInProperty(String name)
      Gets the in property with the specified name.
      Parameters:
      name - name of the in property to fetch
      Returns:
      the in property that has the given name (null if not found)
    • setInProperties

      public void setInProperties(Vector<InMacroPropertyModel> inProperties)
      Sets the in properties.
      Parameters:
      inProperties - a Vector of InMacroPropertyModel.
    • getOutProperties

      public Vector<OutMacroPropertyModel> getOutProperties()
      Gets the out properties.
      Returns:
      a Vector of OutMacroPropertyModel.
    • setOutProperties

      public void setOutProperties(Vector<OutMacroPropertyModel> outProperties)
      Sets the out properties.
      Parameters:
      outProperties - a Vector of {link OutMacroPropertyModel OutMacroPropertyModel}.
    • getRootChronology

      public ChronologyModel getRootChronology()
      Gets the root chronology.
      Returns:
      the root chronology.
    • setParent

      public void setParent(ContextualNode node)
      Description copied from interface: ContextualNode
      Sets the parent node
      Specified by:
      setParent in interface ContextualNode
      Parameters:
      node - The parent node
    • setContext

      public void setContext(RatingContextDescription contextDescription)
      Sets the context.
      Parameters:
      contextDescription - the context.
    • getContext

      public RatingContextDescription getContext(ContextualNode child)
      Description copied from interface: ContextualNode
      Gets the context description for the specified child; The context description contains all the context properties.
      Specified by:
      getContext in interface ContextualNode
      Parameters:
      child - The child node
      Returns:
      The context description
    • inheritedContext

      public RatingContextDescription inheritedContext()
      Description copied from interface: ContextualNode
      Gets the inherited context; The context description contains all the context properties.
      Specified by:
      inheritedContext in interface ContextualNode
      Returns:
      The inherited context
    • checkValidity

      public boolean checkValidity()
      Returns true if the pricing macro is valid.
      Returns:
      true if the pricing macro is valid, false otherwise.
    • 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
    • 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
    • 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
    • marshal

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