com.ibm.commerce.utf.commands
Class RFQModifyCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand, OfferingBaseCmd, RFQModifyCmd, com.ibm.commerce.utf.utils.UTFConstants, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class RFQModifyCmdImpl extends OfferingBaseCmdImpl implements RFQModifyCmd
This is the default implementation of the RFQModifyCmd.This command calls the following TaskCommands:
This command uses the following AccessBeans/DataBeans:- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field.boolean
emptyProductList
Empty Product List Flag.boolean
emptyTCList
Empty Product T&C Flag.java.util.Vector
originalProducts
Original Product List Vector.-
Fields inherited from class com.ibm.commerce.utf.commands.OfferingBaseCmdImpl
accessType, accountid, catalogid, categoryid, catname, closingrule, documentdesc, documentURL, domain, enddate, endresult, endtime, endtimestamp, field1, field2, field3, field4, field5, field6, iOrderItemId, longdesc, mimeencoding, mimetype, name, negotiationType, numbids, numResponses, offeringid, orderid, ownerid, participantList, percentagePrice, prodattrList, prodComments, prodList, productid, ruleType, shortdesc, startdate, starttime, starttimestamp, state, statemachine, synchronize, TcElements, tcList, tradingengine, versionid
-
Fields inherited from interface com.ibm.commerce.utf.commands.RFQModifyCmd
defaultCommandClassName, NAME
-
Fields inherited from interface com.ibm.commerce.utf.utils.UTFConstants
BILLING_ADDRESS_ID_PROPERTY_NAME, CONTENT_SECTION, EC_ACCOUNT_ID, EC_ADDRESS_ID, EC_ALGO_ALLOCATION, EC_ALGO_CLASS, EC_ALGO_DESC, EC_ALGO_EXP_DATE, EC_ALGO_EXP_TIME, EC_ALGO_ID, EC_ALGO_MATCHING, EC_ALGO_NAME, EC_ALGO_PRICING, EC_ALGO_TYPE, EC_APPROVED_STRING, EC_ATTR_ATTRGROUP, EC_ATTR_ATTRID, EC_ATTR_ATTRTYPE, EC_ATTR_CHANGEABLE, EC_ATTR_DATE, EC_ATTR_FLOAT, EC_ATTR_ID, EC_ATTR_INTEGER, EC_ATTR_MANDATORY, EC_ATTR_NAME, EC_ATTR_OPERATOR, EC_ATTR_PATTRID, EC_ATTR_STRING, EC_ATTR_TCID, EC_ATTR_TYPE_ID, EC_ATTR_UNIT, EC_ATTR_USERDEF, EC_ATTR_VALUE, EC_ATTR_VALUEDELIM, EC_ATTRDICT_DESC, EC_ATTRDICT_NAME, EC_ATTRTYPE_ATTACHMENT, EC_ATTRTYPE_BIGINT, EC_ATTRTYPE_BIGINT_AB, EC_ATTRTYPE_DATE_AB, EC_ATTRTYPE_DATETIME, EC_ATTRTYPE_FLOAT, EC_ATTRTYPE_FLOAT_AB, EC_ATTRTYPE_FREEFORM, EC_ATTRTYPE_FREEFORM_AB, EC_ATTRTYPE_INTEGER, EC_ATTRTYPE_INTEGER_AB, EC_ATTRTYPE_STRING, EC_ATTRTYPE_STRING_AB, EC_AUC_VIEWTASKNAME, EC_BASE_TIME, EC_BILL_ADDRESS_ID, EC_BILLING_ADDRESS, EC_BUYABLE_ITEM, EC_BUYER_ROLE, EC_CARD_BRAND, EC_CARD_EXP_MONTH, EC_CARD_EXP_YEAR, EC_CATENTRY_ID, EC_CHARGE_TYPE, EC_CLOSE_RULE1, EC_CLOSE_RULE2, EC_CLOSE_RULE3, EC_CLOSE_RULE4, EC_COPY_ATTACHMENT, EC_DEFAULT_PRICELIST_PRECEDENCE, EC_DEFAULT_STRING, EC_ENFORCE_MINIMUM_QUANTITY, EC_FALSE_VALUE, EC_FORWARD_VIEW_CMD, EC_MARK_FOR_DELETE_AFTER_NUMBER_OF_DAYS, EC_NEW_RFQ_NAME, EC_NICKNAME, EC_NOT_BUYABLE_ITEM, EC_OFFERING_ACCESSTYPE, EC_OFFERING_CATALOG, EC_OFFERING_CATDESCRIPTION, EC_OFFERING_CATEGORYID, EC_OFFERING_CATENTRYID, EC_OFFERING_CLOSINGRULE, EC_OFFERING_CURRENCY, EC_OFFERING_DELETEMARK, EC_OFFERING_DOCDESC, EC_OFFERING_DOCURL, EC_OFFERING_DOMAIN, EC_OFFERING_EMPTYPRODLIST, EC_OFFERING_EMPTYTCLIST, EC_OFFERING_ENDDATE, EC_OFFERING_ENDRESULT, EC_OFFERING_ENDTIME, EC_OFFERING_FIRSTVERSION, EC_OFFERING_ID, EC_OFFERING_LONGDESC, EC_OFFERING_MIMEENCODING, EC_OFFERING_MIMETYPE, EC_OFFERING_NAME, EC_OFFERING_NODELETEMARK, EC_OFFERING_NUMBIDS, EC_OFFERING_NUMRESPONSES, EC_OFFERING_PARTNUM, EC_OFFERING_PERCENTAGEPRICE, EC_OFFERING_PERCENTPRICE, EC_OFFERING_PRICE, EC_OFFERING_PRODATTRLIST, EC_OFFERING_PRODCOMMENTS, EC_OFFERING_PRODLIST, EC_OFFERING_QTYUNIT, EC_OFFERING_QUANTITY, EC_OFFERING_RULETYPE, EC_OFFERING_SHORTDESC, EC_OFFERING_STARTDATE, EC_OFFERING_STARTTIME, EC_OFFERING_STATEMACHINE, EC_OFFERING_SYNCHRONIZE, EC_OFFERING_TCLIST, EC_OFFERING_TITLE, EC_OFFERING_TRADINGENGINE, EC_OPERATOR_ENUMERATION, EC_OPERATOR_EQUAL, EC_OPERATOR_EXCLUSIVE_RANGE, EC_OPERATOR_GREATER_THAN, EC_OPERATOR_GREATER_THAN_AND_EQUAL, EC_OPERATOR_INCLUSIVE_RANGE, EC_OPERATOR_LESS_THAN, EC_OPERATOR_LESS_THAN_AND_EQUAL, EC_OPERATOR_NOT, EC_ORG_BEAN, EC_ORIG_RFQ_ID, EC_PARTICIPANT_ID, EC_PARTICIPANT_ROLE, EC_PATTRVALUE_ID, EC_PAYMENT_METHOD, EC_PAYMENT_TC_ID, EC_PO_NUMBER, EC_POLICY_ID, EC_POLICY_TYPE, EC_PRODUCT_NAME, EC_PRODUCT_SHORTDESC, EC_REDIRECT_VIEW_CMD, EC_RESPONSE_ID, EC_RETURN_APPROVAL_POLICY, EC_RETURN_APPROVAL_POLICY_TYPE, EC_RETURN_CHARGE, EC_RETURN_CHARGE_LIST, EC_RETURN_CHARGE_POLICY, EC_RETURN_CHARGE_POLICY_TYPE, EC_RETURN_PAYMENT, EC_RETURN_PAYMENT_LIST, EC_RETURN_PAYMENT_POLICY, EC_RFQ_CLOSE_MESSAGE_ID, EC_RFQ_CLOSE_MESSAGE_NAME, EC_RFQ_CLOSEVIEW_CMD, EC_RFQ_COMPLETE_MESSAGE_ID, EC_RFQ_COMPLETE_MESSAGE_NAME, EC_RFQ_COMPLETEVIEW_CMD, EC_RFQ_NOTIFICATION_MONITOR_JOB_REF_NUM, EC_RFQ_RESPONSE_ID, EC_RFQ_RFQID, EC_RFQ_STRING, EC_RFQ_SUBMIT_MESSAGE_ID, EC_RFQ_SUBMIT_MESSAGE_NAME, EC_RFQ_SUBMITVIEW_CMD, EC_SELLER_ROLE, EC_SHIP_ADDRESS, EC_SHIP_MODE, EC_SHIP_MODE_ID, EC_SHIPPING_ADDRESS, EC_SHIPPING_CHARGE, EC_SHIPPING_CHARGE_LIST, EC_SHIPPING_MODE, EC_STORE_ID, EC_TA_ACTIVE, EC_TA_INACTIVE, EC_TC_BEGIN_TAG, EC_TC_CUSTOM_PRICELIST, EC_TC_CUSTOM_PRICELIST_TYPE, EC_TC_END_TAG, EC_TC_HEADER, EC_TC_OFFER, EC_TC_OFFER_NEW, EC_TC_OFFERPRICE, EC_TC_PURCHASELIMITS_BY_QUANTITY, EC_TC_RETURNAPPROVALPOLICY, EC_TC_RETURNCHARGEPOLICY, EC_TC_STOREREF, EC_TOOL_CANCELRFQ_VIEWCMD, EC_TOOL_CLOSERFQ_VIEWCMD, EC_TOOL_DIALOG_NAV_VIEW_CMD, EC_TOOL_NOTEBOOK_NAV_VIEW_CM, EC_TOOL_NOTEBOOK_NAV_VIEW_CMD, EC_TOOL_SUBMITRFQ_VIEWCMD, EC_TOOL_WIZARD_NAV_VIEW_CMD, EC_TRADENG_ALGO, EC_TRADENG_DOMAIN, EC_TRADENG_ENDDATE, EC_TRADENG_ENDTIME, EC_TRADENG_HANDLER, EC_TRADENG_ID, EC_TRADENG_LONGDESC, EC_TRADENG_NAME, EC_TRADENG_NUMSTAGES, EC_TRADENG_SHORTDESC, EC_TRADENG_STAGE, EC_TRADENG_STAGEINFO, EC_TRADENG_STARTDATE, EC_TRADENG_STARTTIME, EC_TRADENG_STATEMACHINE, EC_TRADENG_SUBDOMAIN, EC_TRADENG_TRADENTLIMIT, EC_TRUE_VALUE, EC_USER_BEAN, EC_UTF_ACKPAGE, EC_UTF_ACTION_CREATE, EC_UTF_ACTION_DELETE, EC_UTF_ACTION_UPDATE, EC_UTF_CHANGEABLE, EC_UTF_DOMAIN, EC_UTF_ENCRYPTION_FLAG, EC_UTF_ENDRESULT_CONTRACT, EC_UTF_ENDRESULT_ORDER, EC_UTF_ERROR_CODE, EC_UTF_ERRORPAGE, EC_UTF_LANGUAGE_ID, EC_UTF_MANDATORY, EC_UTF_NON_CHANGEABLE, EC_UTF_OPTIONAL, EC_UTF_OWNER_ID, EC_UTF_PERSONALIZED, EC_UTF_SEQUENCE, EC_UTF_STANDARD, EC_UTF_VISIBILITY, EC_VALUETYPE_ENUMERATION, EC_VALUETYPE_EXCLUSIVE_RANGE, EC_VALUETYPE_INCLUSIVE_RANGE, EC_VALUETYPE_SINGLEVALUE, MSG_SECTION, ParticipantRoles, SUBJECT_SECTION
-
-
Constructor Summary
Constructors Constructor and Description RFQModifyCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Long
createItem(java.lang.String itemname, java.lang.String shortdesc, java.lang.Long productid)
Calls the CreateRFQItemCmd task command to create a new item in the catalog.void
createRFQCatentryRel(java.lang.Long catentryId, java.math.BigDecimal price, java.lang.Double quantity, java.lang.String currency, java.lang.String quantityUnit, java.lang.Double priceAdjust, java.lang.Integer negotiationType, java.lang.Long customfield1, java.lang.Integer customfield2, java.lang.String customfield3, java.lang.String customfield4)
Creates the association between an item and the RFQ .void
deleteRFQCatentryRel()
Calls the DeleteRFQCatentryRelCmd to delete the associations between the RFQ and one or more items.java.lang.String
determineCatentryType(java.lang.Long catentryId)
Determines the type of a given catalog entry.void
doAcknowledgment()
Composes and sends out the response to the browserjava.util.Vector
getOriginalProducts()
Returns a vector of identifiers of catalog entries that the RFQ buyer had picked.boolean
isEmptyProductList()
Returns true if the product list is empty, else returns false.boolean
isEmptyTCList()
Returns true if the term-condition list is empty, else returns false.void
modifyBasicOffering()
Calls the ModifyRFQBasicInfoCmd task command to update RFQ information.void
performExecute()
Modifies the RFQ.void
processProductAttributes()
Processes standard and personalized attributes for each item in the RFQ.void
processProductComments()
Processes freeform comments for each item in the RFQ.void
processTCs()
Processes freeform comments for the RFQ.void
setEmptyProductList(boolean newEmptyProductList)
Sets a member variable to the incoming boolean value.void
setEmptyProductListFromUrl(java.lang.String s, boolean isReq)
Sets a member variable to the incoming boolean value from the request.void
setEmptyTCList(boolean newEmptyTCList)
Sets a member variable to the incoming boolean value.void
setEmptyTCListFromUrl(java.lang.String s, boolean isReq)
Sets a member variable to the incoming boolean value from the request.void
setOriginalProducts(java.util.Vector OriginalProducts)
Sets a member variable to the incoming vector of catalog entry IDs.void
updateCatentryIdInAllVectors(java.lang.Long originalProductId, java.lang.Long itemId)
Replaces the occurrence of the first parameter originalProductId with the second parameter itemId in three lists : the product list, the product comments list and the product attributes list.
When the buyer selects a product and associates it with the RFQ, it causes an item to be created under the covers.void
validateParameters()
Checks for validity of incoming parameters.-
Methods inherited from class com.ibm.commerce.utf.commands.OfferingBaseCmdImpl
getAccessType, getAccountid, getCatalogId, getCategoryid, getCatname, getClosingrule, getDocumentdesc, getDocumentURL, getDomain, getEnddate, getEndresult, getEndtime, getEndtimestamp, getErrorContent, getErrorFlag, getField1, getField2, getField3, getField4, getField5, getField6, getLongdesc, getMimeencoding, getMimetype, getName, getNegotiationType, getNumbids, getNumResponses, getOfferingid, getOrderid, getOrderItemId, getOwnerid, getParticipantList, getPercentagePrice, getProdattrList, getProdComments, getProdList, getProductid, getRuleType, getShortdesc, getStartdate, getStarttime, getStarttimestamp, getState, getStatemachine, getSynchronize, getTcList, getToolXMLObject, getTradingengine, getVersionid, reset, setAccessType, setAccountid, setAccountIdFromUrl, setCatalogid, setCategoryid, setCatname, setClosingrule, setClosingRuleFromUrl, setDocumentdesc, setDocumentDescriptionFromUrl, setDocumentURL, setDocumentURLFromUrl, setDomain, setDomainFromUrl, setEnddate, setEndDateFromUrl, setEndresult, setEndResultFromUrl, setEndtime, setEndTimeFromUrl, setEndtimestamp, setErrorContent, setErrorFlag, setField1, setField2, setField3, setField4, setField5, setField6, setLongdesc, setLongDescFromUrl, setMarketFromUrl, setMimeencoding, setMimetype, setMimeTypeEncodingFromUrl, setMimeTypeFromUrl, setName, setNameFromUrl, setNegotiationType, setNumbids, setNumBidsFromUrl, setNumResponses, setOfferAttrListFromUrl, setOfferIdFromUrl, setOfferingid, setOrderid, setOrderItemId, setOwnerid, setOwnerIdFromUrl, setParticipantList, setParticipantListFromUrl, setPercentagePrice, setProdattrList, setProdAttrListFromUrl, setProdComments, setProdCommentsFromUrl, setProdList, setProdListFromUrl, setProductid, setRequestProperties, setRuleType, setShortdesc, setShortDescFromUrl, setStartdate, setStartDateFromUrl, setStarttime, setStartTimeFromUrl, setStarttimestamp, setState, setStatemachine, setStateMachineFromUrl, setSynchronize, setTcList, setTcListFromUrl, setToolXMLObject, setTradingengine, setTradingEngineFromUrl, setVersionid
-
Methods inherited from class com.ibm.commerce.tools.command.ToolsControllerCommandImpl
getViewInputProperties
-
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, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.utf.commands.OfferingBaseCmd
setAccountIdFromUrl, setClosingRuleFromUrl, setDocumentDescriptionFromUrl, setDocumentURLFromUrl, setDomainFromUrl, setEndDateFromUrl, setEndTimeFromUrl, setLongDescFromUrl, setMarketFromUrl, setMimeTypeEncodingFromUrl, setMimeTypeFromUrl, setNameFromUrl, setNumBidsFromUrl, setOfferAttrListFromUrl, setOfferIdFromUrl, setOwnerIdFromUrl, setProdAttrListFromUrl, setProdListFromUrl, setShortDescFromUrl, setStartDateFromUrl, setStartTimeFromUrl, setStateMachineFromUrl, setTcListFromUrl, setTradingEngineFromUrl
-
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.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
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, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
originalProducts
public java.util.Vector originalProducts
Original Product List Vector.
-
emptyProductList
public boolean emptyProductList
Empty Product List Flag.
-
emptyTCList
public boolean emptyTCList
Empty Product T&C Flag.
-
-
Method Detail
-
createItem
public java.lang.Long createItem(java.lang.String itemname, java.lang.String shortdesc, java.lang.Long productid) throws ECException
Calls the CreateRFQItemCmd task command to create a new item in the catalog.- Parameters:
itemname
- The name of the item.shortdesc
- A brief description of the item.productid
- The identifier of the product which will be the parent catalog entry for this new item.- Returns:
- the Long Item Id.
- Throws:
ECException
-
createRFQCatentryRel
public void createRFQCatentryRel(java.lang.Long catentryId, java.math.BigDecimal price, java.lang.Double quantity, java.lang.String currency, java.lang.String quantityUnit, java.lang.Double priceAdjust, java.lang.Integer negotiationType, java.lang.Long customfield1, java.lang.Integer customfield2, java.lang.String customfield3, java.lang.String customfield4) throws ECException
Creates the association between an item and the RFQ .
Behaviour:
- Determines if the incoming item is already associated with the RFQ that is being modified.
- If the association exists, updates it with the new values of price, quantity, currency and quantityunit.
- If the association does not exist, creates a new association.
- Parameters:
catentryId
- The identifier of the item.price
- The price of the item as specified by the buyer who created the RFQ.quantity
- The quantity of the item requested by the buyer.currency
- The currency specified by the buyer.quantityUnit
- An optional unit of measure for the quantity.- Throws:
ECException
-
deleteRFQCatentryRel
public void deleteRFQCatentryRel() throws ECException
Calls the DeleteRFQCatentryRelCmd to delete the associations between the RFQ and one or more items.
Behaviour:
- Determines if the list of items for this RFQ is empty. If yes, sets the deleteAll flag to delete all the existing associations between the RFQ and items.
- If there is a list of items for this RFQ, compares these items with the existing items for the RFQ. And it composes a vector of items that have been removed from the RFQ.
- Calls the task command to delete all or some associations.
- Throws:
ECException
-
determineCatentryType
public java.lang.String determineCatentryType(java.lang.Long catentryId) throws ECException
Determines the type of a given catalog entry.- Parameters:
catentryId
- The catalog entry identifier.- Returns:
- the String Catentry Type
- Throws:
ECException
-
doAcknowledgment
public void doAcknowledgment() throws ECException
Composes and sends out the response to the browser- Throws:
ECException
-
getOriginalProducts
public java.util.Vector getOriginalProducts()
Returns a vector of identifiers of catalog entries that the RFQ buyer had picked.- Returns:
- A vector of catalog entry identifiers.
-
isEmptyProductList
public boolean isEmptyProductList()
Returns true if the product list is empty, else returns false.- Returns:
- A boolean indicating whether the product list is empty or not.
-
isEmptyTCList
public boolean isEmptyTCList()
Returns true if the term-condition list is empty, else returns false.- Returns:
- A boolean indicating whether the term-condition list is empty or not.
-
modifyBasicOffering
public void modifyBasicOffering() throws ECException
Calls the ModifyRFQBasicInfoCmd task command to update RFQ information.- Throws:
ECException
-
performExecute
public void performExecute() throws ECException
Modifies the RFQ.
This method does the following:
- Updates basic RFQ information by calling the modifyBasicOffering method.
- Keeps a backup of the list of products/items selected by the buyer in a vector.
- For every "product" chosen by the buyer, create an "item" in the catalog by calling the createItem method.
- Creates associations between the RFQ and its items.
- Calls the deleteRFQCatentryRel method to delete any RFQ-item associations that are no longer valid.
- Creates/updates product attributes by calling the processProductAttributes method.
- Creates/updates product comments by calling the processProductComments method.
- Creates/updates RFQ level freeform comments by calling the processTCs method.
- Calls the doAcknowledgment method to send back the response.
- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- See Also:
ECCommand#performExecute()
-
processProductAttributes
public void processProductAttributes() throws ECException
Processes standard and personalized attributes for each item in the RFQ.
This method does the following:
- Determines if the list of items for this RFQ is empty. If yes, sets the deleteAll flag to true.
- If there is a list of items for this RFQ, retrieves all the OrderItemPAttribute TCs corresponding to personalization attributes that are not of type "FREEFORM". Loops through these TCs to determine if the buyer has deleted any of them. Composes a vector of TC identifiers for the TCs that have been deleted.
- Calls the DeleteOrderItemPAttributeTCCmd task command to delete some or all of the TCs depending on the outcome of the previous steps.
- Loops through the list of incoming attributes. For each attribute does one of the following:
- If the attribute corresponds to a product for which a new item has been created, and if the attribute was defined for the product in the catalog, creates a standard attribute for the new item in the catalog.
- If the attribute is user defined and no TC ID is specified, adds the attribute information to a "createVector"
- If the attribute is user defined and a TC ID is specified, adds the attribute information to an "updateVector"
- If the "createVector" is not empty, call CreateOrderItemPAttributeTCCmd task command to create one OrderItemPAttribute TC for each vector element
- If the "updateVector" is not empty, call ModifyOrderItemPAttributeTCCmd task command to update existing OrderItemPAttribute TCs with information from the "updateVector".
- Throws:
ECException
-
processProductComments
public void processProductComments() throws ECException
Processes freeform comments for each item in the RFQ.
This method does the following:
- Determines if the list of items for this RFQ is empty. If yes, sets the deleteAll flag to true.
- If there is a list of items for this RFQ, retrieves all the OrderItemPAttribute TCs corresponding to personalization attributes that are of type "FREEFORM". Loops through these TCs to determine if the buyer has deleted any of them. Composes a vector of TC identifiers for the TCs that have been deleted.
- Calls the DeleteOrderItemPAttributeTCCmd task command to delete some or all of the TCs depending on the outcome of the previous steps.
- Loops through the list of incoming comments. For each comment does one of the following:
- If no TC ID is specified for the comment, adds the comment information to a "createVector"
- If a TC ID is specified, adds the comment information to an "updateVector"
- If the "createVector" is not empty, call CreateOrderItemPAttributeTCCmd task command to create one OrderItemPAttribute TC for each vector element
- If the "updateVector" is not empty, call ModifyOrderItemPAttributeTCCmd task command to update existing OrderItemPAttribute TCs with information from the "updateVector".
- Throws:
ECException
-
processTCs
public void processTCs() throws ECException
Processes freeform comments for the RFQ.
This method does the following:
- Determines if the list of term-conditions for this RFQ is empty. If yes, sets the deleteAll flag to true.
- If there is a list of term-conditions for this RFQ, retrieves all the OrderComment TCs for this RFQ. Loops through these TCs to determine if the buyer has deleted any of them. Composes a vector of TC identifiers for the TCs that have been deleted.
- Calls the DeleteOrderCommentsTCCmd task command to delete some or all of the TCs depending on the outcome of the previous steps.
- Loops through the list of incoming term-conditions. For each term-condition does one of the following:
- If no TC ID is specified for the term-condition, adds the term-condition information to a "createVector"
- If a TC ID is specified, adds the term-condition information to an "updateVector"
- If the "createVector" is not empty, call CreateOrderCommentsTCCmd task command to create one OrderComment TC for each vector element
- If the "updateVector" is not empty, call ModifyOrderCommentsTCCmd task command to update existing OrderComment TCs with information from the "updateVector".
- Throws:
ECException
-
setEmptyProductList
public void setEmptyProductList(boolean newEmptyProductList)
Sets a member variable to the incoming boolean value.- Parameters:
newEmptyProductList
- True if the list of products is empty for this RFQ. False otherwise.
-
setEmptyProductListFromUrl
public void setEmptyProductListFromUrl(java.lang.String s, boolean isReq)
Sets a member variable to the incoming boolean value from the request. The incoming boolean value indicates whether the list of products for this RFQ is empty or not.- Parameters:
s
- The name of the parameter to look for in the tools XML objects.isReq
- If true, implies that the parameter is mandatory. If the parameter is not found, causes an exception.
If false, the parameter is optional. If parameter is not found, sets the member variable to a default value of false.
-
setEmptyTCList
public void setEmptyTCList(boolean newEmptyTCList)
Sets a member variable to the incoming boolean value.- Parameters:
newEmptyProductList
- True if the list of TCs is empty for this RFQ. False otherwise.
-
setEmptyTCListFromUrl
public void setEmptyTCListFromUrl(java.lang.String s, boolean isReq)
Sets a member variable to the incoming boolean value from the request. The incoming boolean value indicates whether the list of TCs for this RFQ is empty or not.- Parameters:
s
- The name of the parameter to look for in the tools XML objects.isReq
- If true, implies that the parameter is mandatory. If the parameter is not found, causes an exception.
If false, the parameter is optional. If parameter is not found, sets the member variable to a default value of false.
-
setOriginalProducts
public void setOriginalProducts(java.util.Vector OriginalProducts)
Sets a member variable to the incoming vector of catalog entry IDs. The catalog entry IDs correspond to the products or item selected by the RFQ buyer for this RFQ.- Parameters:
newNewItems
- A vector of catalog entries.
-
updateCatentryIdInAllVectors
public void updateCatentryIdInAllVectors(java.lang.Long originalProductId, java.lang.Long itemId) throws ECException
Replaces the occurrence of the first parameter originalProductId with the second parameter itemId in three lists : the product list, the product comments list and the product attributes list.
When the buyer selects a product and associates it with the RFQ, it causes an item to be created under the covers. Every occurrence of the original product has to now be replaced by this new item. This method goes through all the incoming information that reference the product ID selected by the buyer and replaces them with the new item ID.- Parameters:
originalProductId
- The ID of the product selected by the buyer.itemId
- The ID of the new item that was created under the covers.- Throws:
ECException
-
validateParameters
public void validateParameters() throws ECException
Checks for validity of incoming parameters.
This method does the following:
- Calls the initParameters method to store the incoming request parameters in member variables .
- Checks to see that the RFQ is in the draft state .
- Checks if the specified RFQ start date & time are not in the past.
- Checks if the specified RFQ end date & time are not in the past.
- Checks if the specified RFQ end date & time are later than the specified RFQ start date and time.
- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
- See Also:
ECCommand#validateParameters()
-
-