atg.commerce.pricing
Class CalculatorInfo

java.lang.Object
  extended by atg.commerce.pricing.CalculatorInfo

public class CalculatorInfo
extends java.lang.Object

Holds details on calculator discounts. These details are used for example to create PMDL and to display the discount structure in the UI.


Nested Class Summary
 class CalculatorInfo.DiscountDetailInfo
          Internal class to contain info on DiscountDetail structures within a discount structure.
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CalculatorInfo.DiscountDetailInfo[] mDiscountDetailInfos
           
 
Constructor Summary
CalculatorInfo(java.lang.String pCalculatorType)
          Constructor.
 
Method Summary
 CalculatorInfo.DiscountDetailInfo createDiscountDetailInfo()
          Creates a new DiscountDetailInfo object for use.
 java.lang.String getCalculatorType()
          Getter for the calculatorType.
 DiscountAttributeInfo[] getDiscountAttributeInfos()
          Deprecated. @see #getDiscountDetailInfos()
 CalculatorInfo.DiscountDetailInfo[] getDiscountDetailInfos()
          Getter for the array of DiscountDetailInfo.
 DiscountAttributeInfo[] getDiscountStructureAttributeInfos()
          Getter for the DiscountStructureAttributeInfos.
 java.lang.String[] getDiscountTypes()
          Getter for the valid discount types for this calculator.
 void setCalculatorType(java.lang.String pCalculatorType)
           
 void setDiscountDetailAttributeInfos(DiscountAttributeInfo[] pDiscountDetailAttributeInfos)
           
 void setDiscountDetailInfos(CalculatorInfo.DiscountDetailInfo[] pDiscountDetailInfos)
          Setter for the array of DiscountDetailInfo
 void setDiscountStructureAttributeInfos(DiscountAttributeInfo[] pDiscountStructureAttributeInfos)
           
 void setDiscountTypes(java.lang.String[] pDiscountTypes)
           
 java.lang.String toString()
          String description of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mDiscountDetailInfos

protected CalculatorInfo.DiscountDetailInfo[] mDiscountDetailInfos
Constructor Detail

CalculatorInfo

public CalculatorInfo(java.lang.String pCalculatorType)
Constructor. Sets calculator type and the most common discount types.

Parameters:
pCalculatorType -
Method Detail

getCalculatorType

public java.lang.String getCalculatorType()
Getter for the calculatorType.

Returns:
String calculator type

setCalculatorType

public void setCalculatorType(java.lang.String pCalculatorType)

getDiscountStructureAttributeInfos

public DiscountAttributeInfo[] getDiscountStructureAttributeInfos()
Getter for the DiscountStructureAttributeInfos. This is an array of DiscountStructureAttributeInfo that describe each attribute the calculator needs in it's discount structure PMDL. If null then this calculator doesn't need any discount structure attributes and so for instance the UI does not need to display this table. Defaults to null.

Returns:
DiscountAttributeInfo[]

setDiscountStructureAttributeInfos

public void setDiscountStructureAttributeInfos(DiscountAttributeInfo[] pDiscountStructureAttributeInfos)

getDiscountAttributeInfos

public DiscountAttributeInfo[] getDiscountAttributeInfos()
Deprecated. @see #getDiscountDetailInfos()

Getter for the DiscountDetailAttributeInfos. This is an array of DiscountAttributeInfo that describe each attribute the calculator needs in it's discount detail PMDL. If null then this calculator doesn't need any discount details and so for instance the UI does not need to display the discount structure table. Defaults to null.

Returns:
DiscountAttributeInfo[]

setDiscountDetailAttributeInfos

public void setDiscountDetailAttributeInfos(DiscountAttributeInfo[] pDiscountDetailAttributeInfos)

getDiscountTypes

public java.lang.String[] getDiscountTypes()
Getter for the valid discount types for this calculator. e.g. percentOff, amountOff etc.

Returns:
Array of String discount types, null or empty would mean the calculator doesn't require this in the PMDL.

setDiscountTypes

public void setDiscountTypes(java.lang.String[] pDiscountTypes)

getDiscountDetailInfos

public CalculatorInfo.DiscountDetailInfo[] getDiscountDetailInfos()
Getter for the array of DiscountDetailInfo.

Returns:
Array of DiscountDetailInfo

setDiscountDetailInfos

public void setDiscountDetailInfos(CalculatorInfo.DiscountDetailInfo[] pDiscountDetailInfos)
Setter for the array of DiscountDetailInfo

Parameters:
pDiscountDetailInfos - Array of DiscountDetailInfo

createDiscountDetailInfo

public CalculatorInfo.DiscountDetailInfo createDiscountDetailInfo()
Creates a new DiscountDetailInfo object for use.

Returns:
DiscountDetailInfo

toString

public java.lang.String toString()
String description of this object

Overrides:
toString in class java.lang.Object