SAP CC 1.0
API 4.2 (Core)

com.highdeal.pnr.hci
Class OfferModel

java.lang.Object
  extended by com.highdeal.pnr.hci.OfferModel
All Implemented Interfaces:
XMLMarshallable

public class OfferModel
extends java.lang.Object
implements XMLMarshallable

This class represents an offer model.


XML Schema 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="subscriptionReflectMapping" minOccurs="0" maxOccurs="1"/>
       <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>

Constructor Summary
OfferModel()
          Builds an empty OfferModel.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 ChargeConditionModel addCharge(ChargeComponentModel charge)
           
 void addChild(java.lang.String name, XMLMarshallable child)
          Adds a child to the objects, the child represents the marshallable object to be added into the content tree.
 OfferConditionModel addSubOffer(OfferModel offer)
           
 boolean doesChargeDependenciesContainsCycle()
           
 java.util.Vector<AdditionalInfoModel> getAdditionalInfos()
          Returns the list of AdditionalInfoModel.
 java.util.Vector<ChargeConditionModel> getChargeConditions()
          Returns the list of ChargeConditionModel.
 java.util.Vector<ChargeDependencyModel> getChargeDependencies()
          Returns the list of ChargeDependencyModel.
 java.lang.String getCode()
          Returns the code of this offer.
 OfferContextModel getContext()
          Returns the offer context of this offer.
 ChronologyModel getContextChronology()
          Returns the offer context chronology of this offer.
 java.util.Vector<CounterDescriptionModel> getCounterDescriptions()
          Returns the list of the associated counter descriptions.
 java.util.Date getEffective()
          Returns the effective date of this offer.
 java.util.Date getExpiration()
          Returns the expiration date of this offer.
 java.lang.String getLongDescription()
          Returns the long description of this offer.
 java.util.Vector<OfferConditionModel> getOfferConditions()
          Returns the list of OfferConditionModel.
 java.lang.String getOwner()
          Returns the owner of this offer.
 java.lang.String getReference()
          Returns the reference of this offer.
 java.lang.String getShortDescription()
          Returns the short description of this offer.
 SubscriptionReflectMappingModel getSubscriptionReflectMapping()
          Returns the associated subscription refelct mapping.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, and of its children.
 java.util.Vector<ChargeConditionModel> retrieveAllChargeConditions()
          Returns the charge conditions of this offer and all the charge conditions of its offer conditions.
 java.util.Vector<ChargeConditionModel> retrieveInvalidChargeSubCodes()
          Checks that the sub codes of the charge conditions are unique.
 java.util.Vector<OfferConditionModel> retrieveInvalidOfferConditionSubCodes()
          Checks that the sub codes of the offer conditions are uniques.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the tag beeing processed.
 void setCode(java.lang.String code)
          Sets the code for this offer.
 void setContext(OfferContextModel context)
          Sets the offer context of this offer.
 void setEffective(java.util.Date effective)
          Sets the effective date of this offer.
 void setExpiration(java.util.Date expiration)
          Sets the expiration date of this offer.
 void setLongDescription(java.lang.String description)
          Sets the long description of this offer.
 void setOwner(java.lang.String owner)
          Sets the owner of this offer.
 void setReference(java.lang.String reference)
          Sets the reference of this offer.
 void setShortDescription(java.lang.String description)
          Sets the short description of this offer.
 void setSubscriptionReflectMapping(SubscriptionReflectMappingModel subsReflectMapping)
          Sets the subscription reflect mapping of this offer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfferModel

public OfferModel()
Builds an empty OfferModel.

Method Detail

getCode

public java.lang.String getCode()
Returns the code of this offer.

Returns:
This offer code.
See Also:
setCode(String)

setCode

public void setCode(java.lang.String code)
Sets the code for this offer.

Parameters:
code - the code for this offer
See Also:
getCode()

getReference

public java.lang.String getReference()
Returns the reference of this offer.

Returns:
This offer reference.
See Also:
setReference(String)

setReference

public void setReference(java.lang.String reference)
Sets the reference of this offer.

Parameters:
reference - the reference of this offer
See Also:
getReference()

getOwner

public java.lang.String getOwner()
Returns the owner of this offer.

Returns:
This offer owner.
See Also:
setOwner(String)

setOwner

public void setOwner(java.lang.String owner)
Sets the owner of this offer.

Parameters:
owner - the owner of this offer
See Also:
getOwner()

getShortDescription

public java.lang.String getShortDescription()
Returns the short description of this offer.

Returns:
This offer short description.
See Also:
setShortDescription(String)

setShortDescription

public void setShortDescription(java.lang.String description)
Sets the short description of this offer.

Parameters:
description - the short description of this offer
See Also:
getShortDescription()

getLongDescription

public java.lang.String getLongDescription()
Returns the long description of this offer.

Returns:
This offer long description.
See Also:
setLongDescription(String)

setLongDescription

public void setLongDescription(java.lang.String description)
Sets the long description of this offer.

Parameters:
description - the long description of this offer
See Also:
getLongDescription()

getEffective

public java.util.Date getEffective()
Returns the effective date of this offer.

Returns:
This offer effective date.
See Also:
setEffective(Date)

setEffective

public void setEffective(java.util.Date effective)
Sets the effective date of this offer.

Parameters:
effective - the effective date of this offer
See Also:
getEffective()

getExpiration

public java.util.Date getExpiration()
Returns the expiration date of this offer.

Returns:
This offer expiration date.
See Also:
setExpiration(Date)

setExpiration

public void setExpiration(java.util.Date expiration)
Sets the expiration date of this offer.

Parameters:
expiration - the expiration date of this offer
See Also:
getExpiration()

getOfferConditions

public java.util.Vector<OfferConditionModel> getOfferConditions()
Returns the list of OfferConditionModel.

Returns:
a list of OfferConditionModel that represents the associated offer conditions.

getChargeConditions

public java.util.Vector<ChargeConditionModel> getChargeConditions()
Returns the list of ChargeConditionModel.

Returns:
a list of ChargeConditionModel that represents the associated charge conditions.

getAdditionalInfos

public java.util.Vector<AdditionalInfoModel> getAdditionalInfos()
Returns the list of AdditionalInfoModel.

Returns:
a list of AdditionalInfoModel that represents the associated additional info.

getCounterDescriptions

public java.util.Vector<CounterDescriptionModel> getCounterDescriptions()
Returns the list of the associated counter descriptions.

Returns:
a list of CounterDescriptionModel that represents the associated counter descriptions.

getSubscriptionReflectMapping

public SubscriptionReflectMappingModel getSubscriptionReflectMapping()
Returns the associated subscription refelct mapping.

Returns:
the subscriptionReflectMapping that represents the subscription reflect to export.

setSubscriptionReflectMapping

public void setSubscriptionReflectMapping(SubscriptionReflectMappingModel subsReflectMapping)
Sets the subscription reflect mapping of this offer.

Parameters:
subsReflectMapping - the subscriptionreflect mapping of this offer.

getContextChronology

public ChronologyModel getContextChronology()
Returns the offer context chronology of this offer.

Returns:
all the offerContext in a Chronology.

setContext

public void setContext(OfferContextModel context)
Sets the offer context of this offer.

Parameters:
context - the offer context of this offer.

getContext

public OfferContextModel getContext()
Returns the offer context of this offer.

Returns:
the offer context of this offer.

getChargeDependencies

public java.util.Vector<ChargeDependencyModel> getChargeDependencies()
Returns the list of ChargeDependencyModel.

Returns:
a list of ChargeDependencyModel that represents the associated charge dependencies.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XML attributes of the current tag.

addChild

public void addChild(java.lang.String name,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
name - the name of tag for the child.
child - the child to be added.

addCharacterData

public void addCharacterData(java.lang.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.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XML output to marshall the object into.

addSubOffer

public OfferConditionModel addSubOffer(OfferModel offer)

addCharge

public ChargeConditionModel addCharge(ChargeComponentModel charge)

doesChargeDependenciesContainsCycle

public boolean doesChargeDependenciesContainsCycle()

retrieveAllChargeConditions

public java.util.Vector<ChargeConditionModel> retrieveAllChargeConditions()
Returns the charge conditions of this offer and all the charge conditions of its offer conditions.

Returns:
a list of ChargeConditionModel.

retrieveInvalidOfferConditionSubCodes

public java.util.Vector<OfferConditionModel> retrieveInvalidOfferConditionSubCodes()
Checks that the sub codes of the offer conditions are uniques.

Returns:
the list of string that represents the duplicated sub codes if exists. The list is empty if it doesn't exist duplicated sub code.

retrieveInvalidChargeSubCodes

public java.util.Vector<ChargeConditionModel> retrieveInvalidChargeSubCodes()
Checks that the sub codes of the charge conditions are unique. The check scope includes the chargeConditions of this offer and all the charge conditions of the offerConditions of this offer.

Returns:
the list of string that represents the duplicated sub codes if exists. The list is empty if it doesn't exist duplicated sub code.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.