Package com.highdeal.pnr.hci
Class OfferModel
java.lang.Object
com.highdeal.pnr.hci.OfferModel
- All Implemented Interfaces:
ITagNameProvider,XMLMarshallable,ICatalogObject
This
Java class represents an offer in master data of a service provider.- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="offer">
<xs:complexType>
<xs:sequence>
<xs:element ref="offerContext" minOccurs="0" maxOccurs="1"/>
<xs:element ref="offerCondition" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="chargeCondition" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="additionalInformation" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="chargeDependency" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="counterDescription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="offerContextChronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="owner" type="xs:string" use="required"/>
<xs:attribute name="shortDescription" type="xs:string"/>
<xs:attribute name="longDescription" type="xs:string"/>
<xs:attribute name="effective" type="xs:dateTime" use="required"/>
<xs:attribute name="expiration" type="xs:dateTime"/>
</xs:complexType>
</xs:element>
<xs:element name="offerContextChronology">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.addCharge(ChargeComponentModel charge) voidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.addSubOffer(OfferModel offer) booleanReturns the list of AdditionalInfoModel.Returns the list of ChargeConditionModel.Returns the list of ChargeDependencyModel.getCode()Returns the code of this offer.Returns the offer context of this offer.Returns the offer context chronology of this offer.Returns the list of the associated counter descriptions.Returns the effective date of this offer.Returns the expiration date of this offer.Returns the long description of this offer.Returns the list of OfferConditionModel.getOwner()Returns the owner of this offer.Returns the reference of this offer.Returns the short description of this offer.Gets the XML tag name of the HCI model.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.Returns the charge conditions of this offer and all the charge conditions of its offer conditions.Checks that the sub codes of the charge conditions are unique.Checks that the sub codes of the offer conditions are unique.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the code for this offer.voidsetContext(OfferContextModel context) Sets the offer context of this offer.voidsetEffective(Date effective) Sets the effective date of this offer.voidsetExpiration(Date expiration) Sets the expiration date of this offer.voidsetLongDescription(String description) Sets the long description of this offer.voidSets the owner of this offer.voidsetReference(String reference) Sets the reference of this offer.voidsetShortDescription(String description) Sets the short description of this offer.
-
Field Details
-
TAG_NAME
The value of that constant is the XML tag name of the Offer.- See Also:
-
-
Constructor Details
-
OfferModel
public OfferModel()Builds an empty OfferModel.
-
-
Method Details
-
getCode
Returns the code of this offer.- Returns:
- This offer code
- See Also:
-
setCode
Sets the code for this offer.- Parameters:
code- the code for this offer- See Also:
-
getReference
Returns the reference of this offer.- Returns:
- This offer reference
- See Also:
-
setReference
Sets the reference of this offer.- Parameters:
reference- The reference of this offer- See Also:
-
getOwner
Returns the owner of this offer.- Specified by:
getOwnerin interfaceICatalogObject- Returns:
- This offer owner
- See Also:
-
setOwner
Sets the owner of this offer.- Parameters:
owner- The owner of this offer- See Also:
-
getShortDescription
Returns the short description of this offer.- Returns:
- This offer short description
- See Also:
-
setShortDescription
Sets the short description of this offer.- Parameters:
description- The short description of this offer- See Also:
-
getLongDescription
Returns the long description of this offer.- Returns:
- This offer long description
- See Also:
-
setLongDescription
Sets the long description of this offer.- Parameters:
description- The long description of this offer- See Also:
-
getEffective
Returns the effective date of this offer.- Returns:
- This offer effective date
- See Also:
-
setEffective
Sets the effective date of this offer.- Parameters:
effective- The effective date of this offer- See Also:
-
getExpiration
Returns the expiration date of this offer.- Returns:
- This offer expiration date
- See Also:
-
setExpiration
Sets the expiration date of this offer.- Parameters:
expiration- The expiration date of this offer- See Also:
-
getOfferConditions
Returns the list of OfferConditionModel.- Returns:
- A list of
OfferConditionModelthat represents the associated offerconditions
-
getChargeConditions
Returns the list of ChargeConditionModel.- Returns:
- A list of
ChargeConditionModelthat represents the associated charge conditions
-
getAdditionalInfos
Returns the list of AdditionalInfoModel.- Returns:
- A list of
AdditionalInfoModelthat represents the associated additional info
-
getCounterDescriptions
Returns the list of the associated counter descriptions.- Returns:
- A list of
CounterDescriptionModelthat represents the associated counter descriptions
-
getContextChronology
Returns the offer context chronology of this offer.- Returns:
- All the
offerContextin a Chronology
-
setContext
Sets the offer context of this offer.- Parameters:
context- The offer context of this offer
-
getContext
Returns the offer context of this offer.- Returns:
- The offer context of this offer
-
getChargeDependencies
Returns the list of ChargeDependencyModel.- Returns:
- A list of
ChargeDependencyModelthat represents the associated charge dependencies
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Specified by:
getTagNamein interfaceITagNameProvider- Returns:
- The XML tag name
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
name- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
addSubOffer
-
addCharge
-
doesChargeDependenciesContainsCycle
public boolean doesChargeDependenciesContainsCycle() -
retrieveAllChargeConditions
Returns the charge conditions of this offer and all the charge conditions of its offer conditions.- Returns:
- A list of
ChargeConditionModel
-
retrieveInvalidOfferConditionSubCodes
Checks that the sub codes of the offer conditions are unique.- Returns:
- The list of
stringthat represents the duplicated sub codes if exists. The list is empty if it doesn't exist duplicated sub code.
-
retrieveInvalidChargeSubCodes
Checks that the sub codes of the charge conditions are unique. The check scope includes thechargeConditionsof this offer and all the charge conditions of theofferConditionsof this offer.- Returns:
- The list of
stringthat represents the duplicated sub codes if exists. The list is empty if it doesn't exist duplicated sub code.
-