com.ibm.commerce.tools.promotions
Class DiscountChooseListBean

com.ibm.commerce.tools.promotions.DiscountChooseListBean
All Implemented Interfaces:
ECPromotionsConstants, SimpleDynamicListBean

public class DiscountChooseListBean
implements SimpleDynamicListBean, ECPromotionsConstants

The bean representing an discount calculationcode list of a store. This bean maps to the table calcode.


Field Summary
protected  java.util.Vector calcode_Id
          Provide a vector of calcode ID.
protected  java.lang.String calcodeId
          Provide the string type of calcode ID.
protected  java.util.Vector code
          Provide a vector of code.
static java.lang.String COPYRIGHT
          The internal copyright field.
protected  java.util.Vector description
          Provide a vector of administration description.
protected  DiscountChooseListRow[] discountRowList
          Provide an object Array of DiscountChooseListRow for dynamic list.
protected  java.util.Vector endDate
          Provide a vector of discount end date.
protected  java.lang.String endIndex
          Provide the string type of end index to dynamic list page view.
protected  java.lang.String[][] heading
          Provide a String Array of table headings for dynamic list.
protected  java.lang.String orderBy
          Provide a string of orderBy which used for dynamic list records sorting function.
protected  java.util.Vector published
          Provide a vector of published.
protected  java.util.Vector startDate
          Provide a vector of discount start date.
protected  java.lang.String startIndex
          Provide the string type of start index to dynamic list page view.
 
Fields inherited from interface com.ibm.commerce.tools.promotions.ECPromotionsConstants
BY_AMOUNT_PER_UNIT, BY_FIXED_AMOUNT, BY_PERCENTAGE, CONTRACT_DISPLAY, CUMULATIVE_FALSE, CURRENCY_RANGE, DISCOUNT_PUBLISHED, DISCOUNT_RESOURCES, DO_NOT_GROUP, EC_Calcode_Id, EC_Code, EC_EndDate, EC_Orderby, EC_Range_Max, EC_StartDate, EC_Status, ERROR_DISCOUNT_APPLIED, ERROR_DISCOUNT_DUPLICATE_CODE, ERROR_DISCOUNT_NOT_SAVED, ITEM_DISPLAY, MSG_DISCOUNT_APPLIED, MSG_DISCOUNT_SAVED, ORDER_DISPLAY, ORDER_LEVEL, ORDERITEM_DISPLAY, PRODUCT_DISPLAY, PRODUCT_LEVEL, QTY_RANGE, REST_OF_TIMESTRING, ZERO_STRING
 
Constructor Summary
DiscountChooseListBean()
          DiscountCalculationCodeList constructor.
 
Method Summary
 java.lang.String getCalcode_Id(int index)
           
 java.lang.String getCheckBoxName(int index)
          Returns the name of the check box in each row.
 java.lang.String getCode(int index)
           
 java.lang.String[] getColumns(int i)
          Returns the content of row i
 java.lang.String getDefaultAction(int i)
          This method returns the first column hyper-link.
 java.lang.String getDescription(int index)
           
 DiscountChooseListRow[] getDiscountRowList()
           
 java.lang.String getEndDate(int index)
           
 java.lang.String[][] getHeadings()
          This method returns the headings of the table.
 int getLength()
           
 int getListSize()
          This method returns the size of your result.
 java.lang.String getOrderBy()
           
 java.lang.String getParm(java.lang.String para)
          This method returns the given parameter's value.
 java.lang.String getPublished(int index)
           
 TypedProperty getRequestProperties()
          getRequestProperties method comment.
 java.lang.String getStartDate(int index)
           
 java.lang.String getUserJSfnc()
           
 java.lang.String getUserJSfnc(java.util.Hashtable NLSfile)
          Returns the user defined JavaScript function.
 void populate()
          populate this DataBean to GUI.
 void setLength(int newLength)
          set the number of the list
 void setOrderBy(java.lang.String newOrderBy)
           
 void setParm(java.lang.String para, java.lang.String value)
          This method sets the given parameter para equal to value value.
 void setRequestProperties(TypedProperty param)
          set RequestProperties param param com.ibm.commerce.datatype.TypedProperty
 

Field Detail

calcode_Id

protected java.util.Vector calcode_Id
Provide a vector of calcode ID.

calcodeId

protected java.lang.String calcodeId
Provide the string type of calcode ID.

code

protected java.util.Vector code
Provide a vector of code.

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.

description

protected java.util.Vector description
Provide a vector of administration description.

discountRowList

protected DiscountChooseListRow[] discountRowList
Provide an object Array of DiscountChooseListRow for dynamic list.

endDate

protected java.util.Vector endDate
Provide a vector of discount end date.

endIndex

protected java.lang.String endIndex
Provide the string type of end index to dynamic list page view.

heading

protected java.lang.String[][] heading
Provide a String Array of table headings for dynamic list.

orderBy

protected java.lang.String orderBy
Provide a string of orderBy which used for dynamic list records sorting function.

published

protected java.util.Vector published
Provide a vector of published.

startDate

protected java.util.Vector startDate
Provide a vector of discount start date.

startIndex

protected java.lang.String startIndex
Provide the string type of start index to dynamic list page view.
Constructor Detail

DiscountChooseListBean

public DiscountChooseListBean()
DiscountCalculationCodeList constructor.
Method Detail

getCalcode_Id

public java.lang.String getCalcode_Id(int index)
Parameters:
the - index of discount record in the table
Returns:
ID of calculation code, also is the ID of the discount object.

getCheckBoxName

public java.lang.String getCheckBoxName(int index)
Description copied from interface: SimpleDynamicListBean
Returns the name of the check box in each row. The name should be unique. Normally, this is the parameter you want to pass on to the other views.
Specified by:
getCheckBoxName in interface SimpleDynamicListBean
Parameters:
i - int
Returns:
the name of check box in each Row i

getCode

public java.lang.String getCode(int index)
Parameters:
index - of the Array of the discounts.
Returns:
the name of the discount.

getColumns

public java.lang.String[] getColumns(int i)
Description copied from interface: SimpleDynamicListBean
Returns the content of row i
Specified by:
getColumns in interface SimpleDynamicListBean
Parameters:
index - of the Array of the discounts.
Returns:
String Array of the Discount properties, which will be represented in one column.

getDefaultAction

public java.lang.String getDefaultAction(int i)
Description copied from interface: SimpleDynamicListBean
This method returns the first column hyper-link.
Specified by:
getDefaultAction in interface SimpleDynamicListBean
Parameters:
index - of the Array of the discounts.
Returns:
NONE in this case

getDescription

public java.lang.String getDescription(int index)
Parameters:
index - of the Array of the discounts.
Returns:
administrator's description for the discount associated by index i.

getDiscountRowList

public DiscountChooseListRow[] getDiscountRowList()
Returns:
com.ibm.commerce.tools.promotions.DiscountChooseListRow[]

getEndDate

public java.lang.String getEndDate(int index)
Parameters:
index - of the Array of the discounts.
Returns:
the end date of the current discount availablity.

getHeadings

public java.lang.String[][] getHeadings()
Description copied from interface: SimpleDynamicListBean
This method returns the headings of the table.

The first column is the NLS entry name used to locate the NLS character in your property file. The second is the variable name of this column which is used for sorting purposes.

If you do not want this column to be sorted, put "null" for the variable name of this column.

Specified by:
getHeadings in interface SimpleDynamicListBean
Returns:
HTML table heading

getLength

public int getLength()
Returns:
length

getListSize

public int getListSize()
Description copied from interface: SimpleDynamicListBean
This method returns the size of your result.
Specified by:
getListSize in interface SimpleDynamicListBean
Returns:
the size of discount list found

getOrderBy

public java.lang.String getOrderBy()
Returns:
the property name, which used to sort the list records.

getParm

public java.lang.String getParm(java.lang.String para)
Description copied from interface: SimpleDynamicListBean
This method returns the given parameter's value.
Specified by:
getParm in interface SimpleDynamicListBean
Parameters:
parameter - name passed by GUI.
Returns:
the internal parameter name associated with the param passed.

getPublished

public java.lang.String getPublished(int index)
Returns:
the discount status

getRequestProperties

public TypedProperty getRequestProperties()
getRequestProperties method comment.

getStartDate

public java.lang.String getStartDate(int index)
Parameters:
index - of the Array of the discounts.
Returns:
start date of the discount availablity.

getUserJSfnc

public java.lang.String getUserJSfnc()
Returns:
User defined JavaScript functions

getUserJSfnc

public java.lang.String getUserJSfnc(java.util.Hashtable NLSfile)
Description copied from interface: SimpleDynamicListBean
Returns the user defined JavaScript function. This method is provided for easily processing NLS characters and Java objects used in the user's JavaScript functions. If your file does not have any NLS or java related issues, you can use the tag in your XML file to include the JavaScript file.
Specified by:
getUserJSfnc in interface SimpleDynamicListBean
Parameters:
National - Languages profile object
Returns:
User defined JavaScript functions

populate

public void populate()
              throws java.lang.Exception
populate this DataBean to GUI.

setLength

public void setLength(int newLength)
set the number of the list
Parameters:
newNumOfList - int

setOrderBy

public void setOrderBy(java.lang.String newOrderBy)
Parameters:
newOrderBy - java.lang.String

setParm

public void setParm(java.lang.String para,
                    java.lang.String value)
Description copied from interface: SimpleDynamicListBean
This method sets the given parameter para equal to value value.
Specified by:
setParm in interface SimpleDynamicListBean
Parameters:
para - java.lang.String
value - java.lang.String

setRequestProperties

public void setRequestProperties(TypedProperty param)
                          throws java.lang.Exception
set RequestProperties param param com.ibm.commerce.datatype.TypedProperty