java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl | +--com.ibm.commerce.tools.promotions.DiscountSaveCmdImpl
Top Frame Variable List (from Tools Framework)
varName | type | existsIf | meaning/Usage |
---|---|---|---|
Welcome page | |||
discName | string | name | |
discDesc | string | shopper's description | |
discAdminDesc | string | administration description | |
hasDateTimeRange | boolean | specifies whether discount is date dependent | |
discStartDate | string | hasDateTimeRange=true | start date |
discEndDate | string | hasDateTimeRange=true | end date |
discStartTimeSelectedIndex | int | hasDateTimeRange=true | start time (0-23) |
discEndTimeSelectedIndex | int | hasDateTimeRange=true | end time (0-23) |
discCurrSelectedIndex | int | index of currency array | |
storeCurrArray | array | array of currencys (CAD, USD) | |
discCurr | string | currency string (CAD, USD) | |
visitedWizWelcome | boolean | true if visited welcome page before | |
ShopperGroup page | |||
allGroups | boolean | true if applies to all groups, false if applies to specified grps only | |
assignedShopperGroups | array{name, ref} | allGroups=true | array of assigned groups |
Scope/Type page | |||
discType | int | 0==order 1==product | |
discSubType | int | 0==percentage 1==amount | |
multiRange | boolean | true==custom discount (multi-tier) | |
visitedWizType | boolean | true==visited here before | |
ProductLevel Page (customDiscount=false) | |||
hasMin | boolean | customDiscount=false | true==has minimum qualification |
prodGrpAllowed | boolean | discType=1,hasMin=true | true==combos allowed |
visitedWizProductLevel | boolean | true==visited here before | |
Custom/Multitier Page (customDiscount=true) | |||
rangeType | int | 0==price 1==qty | |
visitedWizCustom | boolean | true==we've been here |
Field Summary | |
---|---|
protected
boolean |
_allShoppers if the discount is for all shoppers |
protected
java.util.Vector |
_assignedShopperGroups the shopper groups that discount is available to |
protected
java.lang.String |
_discAdminDesc discount description for administrator |
protected
java.lang.String |
_discCurr discount currency |
protected
java.lang.String |
_discDesc discount description for shoppers |
protected
java.lang.String |
_discEndDay discount end day in the month |
protected
java.lang.String |
_discEndMonth discount end month in the year |
protected
java.lang.String |
_discEndTime discount end time |
protected
java.lang.String |
_discEndYear discount end year |
protected
java.lang.String |
_discName discount name |
protected
java.util.Vector |
_discountValueVector the vector of the discount values related to range from values |
protected
java.lang.String |
_discStartDay discount start day in the month |
protected
java.lang.String |
_discStartMonth discount start month in the year |
protected
java.lang.String |
_discStartTime discount start time |
protected
java.lang.String |
_discStartYear discount start year |
protected
int |
_discSubType discount sub-type |
protected
int |
_discType discount type |
protected
boolean |
_hasDateTimeRange if the discount has date and time range |
protected
boolean |
_hasMin if has a minimum requirement to qulify the discount |
protected
boolean |
_multiRange if the discount has multi range |
protected
boolean |
_prodGrpAllowed if the product group is allowed |
protected
java.util.Vector |
_rangeFromVector the vector of the range from values |
protected
int |
_rangeType the discount multi range type |
protected
StoreEntityAccessBean |
_store store object |
protected
java.lang.Integer |
_storeId store id |
protected
java.lang.String |
_xmlFile xml file required |
static java.lang.String |
COPYRIGHT IBM copyright |
protected
java.sql.Timestamp |
endTimestamp discount end timestamp |
protected
java.lang.String |
error error string |
protected
ECMessage |
errorMessage error message in ECMessage type |
protected
java.lang.String |
errorMessageString error message string |
protected
java.util.Hashtable |
resources resources hashtable |
protected
java.sql.Timestamp |
startTimestamp discount start timestamp |
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl |
requestProperties,
responseProperties,
retriable,
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.tools.common. ECToolsConstants |
EC_LINE_SEPARATOR,
EC_TOOLS_FULFILLMENT_CENTER_ID,
EC_TOOLS_MERCHANT_CENTER_URL,
EC_TOOLS_STORE_LANGUAGE_URL,
EC_TOOLS_STORES_ACCESS_CONTROL_REQUIRED,
EC_TOOLS_STORES_EMPTY,
EC_TOOLS_STORES_NO_ACCESS,
EC_TOOLS_STORES_NOT_ADMINISTRATOR,
EC_XML,
EC_XMLFILE,
EC_XMLFILEOBJECT,
EC_XMLOBJECT,
EC_XMLSTRING |
Fields inherited from interface com.ibm.commerce.tools.promotions. DiscountSaveCmd |
defaultCommandClassName |
Fields inherited from interface com.ibm.commerce.tools.command. ToolsControllerCommand |
NAME |
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 | |
---|---|
DiscountSaveCmdImpl() DiscountSaveCmdImpl constructor |
Method Summary | |
---|---|
void |
checkDiscount() Validating if the new discount object has the unique name for this store, otherwise, throw duplicate error message. |
void |
customMethod() This Method is implemented by customer. |
AccessVector |
getResources() This method is using for Access Control. |
void |
invokeTaskCmd() Calling provided task commands. |
void |
performExecute() Called when the marketing manager creates a discount |
void |
validateParameters() Check parameters, form validation. |
Methods inherited from class com.ibm.commerce.tools.command. ToolsControllerCommandImpl |
getViewInputProperties,
setRequestProperties |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
isGeneric,
isRetriable,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable,
setViewInputProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRequestProperties,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
getResourceOwners,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected java.lang.Integer _storeId
protected java.lang.String _discName
protected java.lang.String _discDesc
protected java.lang.String _discAdminDesc
protected boolean _hasDateTimeRange
protected java.lang.String _discStartYear
protected java.lang.String _discStartMonth
protected java.lang.String _discStartDay
protected java.lang.String _discEndYear
protected java.lang.String _discEndMonth
protected java.lang.String _discEndDay
protected java.lang.String _discStartTime
protected java.lang.String _discEndTime
protected java.lang.String _discCurr
protected boolean _allShoppers
protected java.util.Vector _assignedShopperGroups
protected int _discType
protected int _discSubType
protected boolean _multiRange
protected boolean _hasMin
protected boolean _prodGrpAllowed
protected int _rangeType
protected java.lang.String _xmlFile
protected java.sql.Timestamp startTimestamp
protected java.sql.Timestamp endTimestamp
protected java.util.Vector _rangeFromVector
protected java.util.Vector _discountValueVector
protected java.util.Hashtable resources
protected ECMessage errorMessage
protected java.lang.String error
protected java.lang.String errorMessageString
protected StoreEntityAccessBean _store
Constructor Detail |
---|
public DiscountSaveCmdImpl()
Method Detail |
---|
public void checkDiscount()
performExecute()
.
public void customMethod()
performExecute()
. an empty method for customization.
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
AccessVector
.ECException
public void invokeTaskCmd()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- ECExceptionpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- ECException