java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl | +--com.ibm.commerce.utf.commands.RFQCompleteCmdImpl
This is the default implementation of the RFQCompleteCmd.
This command calls the following TaskCommands/ControllerCommands:
CreateContractBasicInfoCmd
CreateShippingChargeTCCmd
CreateReturnChargeTCCmd
CreateReturnPaymentTCCmd
AdminOrderItemUpdateCmd
OrderPrepareCmd
OrderProcessCmd
RFQAccessBean
RFQResponseAccessBean
RFQResponseProductAccessBean
ParticipantAccessBean
StoreCatalogEntryAccessBean
BusinessFlowEventData
BusinessFlowEvent
Field Summary | |
---|---|
boolean |
nonUTFMessage Non UTF Message. |
java.lang.Long |
rfqId RFQ Id. |
java.lang.Long |
rfqOwner RFQ Owner. |
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.utf.commands. RFQCompleteCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Constructor Summary | |
---|---|
RFQCompleteCmdImpl() |
Method Summary | |
---|---|
boolean |
checkRFQState(java.lang.Integer currentRFQState) Checks the state of the RFQ. |
void |
createContracts()
Creates a contract for each winning response.
This method does the following:
Retrieves the list of winning responses
for the incoming RFQ. For each response, performs the following steps. Creates
a contract with the same name as the RFQ Response. Creates Shipping Charge TC.
Creates Return Charge TC. Creates Return Payment TC. Creates Custom Price List
TC. Creates Participant entries for the seller and the buyer. |
void |
createOrders() Creates an order for each winning response. |
void |
doAcknowledgment() Composes and sends out the response |
java.util.Hashtable |
getErrorContent() Returns a hastable of error codes. |
AccessVector |
getResources()
Gets the access vector accessed by this command.
The protectable resource for this command is the RFQ object that needs to be
completed. |
java.lang.Long |
getRfqId() Returns the RFQ identifier. |
java.lang.Long |
getRfqOwner() Returns the RFQ owner's member Id. |
java.lang.String |
getShippingAddress(java.util.Vector shippingAddressList,
java.lang.String catentryId) Inspects the incoming list of shipping addresses to find the address corresponding to the incoming catalog entry. |
java.lang.String |
getShippingMode(java.util.Vector shippingModeList,
java.lang.String catentryId) Inspects the incoming list of shipping modes to find the mode corresponding to the incoming catalog entry. |
java.util.Hashtable |
getToolXMLObject() Fetches the XML data prepared by the tools framework. |
java.lang.String |
getWinningResponseName(java.lang.String responseId)
Gets the name of the winning response. |
boolean |
isNonUTFMessage() Provides an indication whether the error message is a UTF message or not. |
void |
performExecute()
Completes the RFQ by creating a contract or an order for each winning
response.
This method does the following:
Calls createContracts() if the endresult
s a Contract. Calls createOrders() if the endresult is an Order Sets the state
of the RFQ to "Complete". Sets the completion time for the RFQ.
Raises a UBF event to change the state of all the non-winning responses that
are in evaluation for this RFQ |
void |
setError(java.lang.String errorKey,
java.lang.String errorParams) Writes the errorcode into a hashtable |
void |
setError(java.lang.String errorKey,
java.lang.String[] errorParams) Writes the errorcode into a hashtable |
void |
setErrorContent(java.util.Hashtable newErrorContent) Assigns the incoming hashtable containing error codes and parameters to the errorContent member variable. |
void |
setNonUTFMessage(boolean newNonUTFMessage) Assigns the incoming boolean value to the nonUTFMessage member variable. |
void |
setRequestProperties(
TypedProperty requestProperties) Assigns the incoming XML object from the tools framework to a member variable toolsXMLObject. |
void |
setRfqId(java.lang.Long newRfqId) Assigns the incoming RFQ identifier to a member variable. |
void |
setRfqOwner(java.lang.Long newRfqOwner) Assigns the incoming member identifier of the RFQ owner to a member variable. |
void |
setToolXMLObject(java.util.Hashtable newToolXMLObject)
Sets a member variable to the incoming tools XML
object. |
void |
validateParameters()
Validates the incoming parameters for this command.
This method expects the following parameters :
offering_id , the reference number of the RFQ that is to be
completed
This method does the following:
Checks if a RFQ Id has been specified.
Checks if the specified RFQ Id is valid. Checks if the RFQ is in the
appropriate state. Calls checkContractParamters, if the endresult of this RFQ
is a contract. Calls checkOrderParamters, if the endresult of this RFQ is an
order. Throws an INVALID OFFERING ID Excepion if the endresult is
neither. |
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,
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,
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 java.lang.Long rfqId
public java.lang.Long rfqOwner
public boolean nonUTFMessage
Constructor Detail |
---|
public RFQCompleteCmdImpl()
Method Detail |
---|
public boolean checkRFQState(java.lang.Integer currentRFQState)
currentRFQState
- The rfq state Integer
valuepublic void createContracts() throws ECException
ECException
public void createOrders() throws ECException
ECException
public void doAcknowledgment()
public java.util.Hashtable getErrorContent()
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
ECCommand#getResources()
public java.lang.Long getRfqId()
public java.lang.Long getRfqOwner()
public java.lang.String getShippingAddress(java.util.Vector shippingAddressList, java.lang.String catentryId)
shippingAddressList
- A vector containing shipping information
for catalog entries.catentryId
- The catalog entry identifier.public java.lang.String getShippingMode(java.util.Vector shippingModeList, java.lang.String catentryId)
shippingModeList
- A vector containing shippingmode
information for catalog entries.catentryId
- The catalog entry identifier.public java.util.Hashtable getToolXMLObject()
public java.lang.String getWinningResponseName(java.lang.String responseId)
responseId
- The identifier of the winning response.public boolean isNonUTFMessage()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
ECCommand#performExecute()
public void setError(java.lang.String errorKey, java.lang.String[] errorParams)
errorKey
- The error code.errorParams
- The error parameters.public void setError(java.lang.String errorKey, java.lang.String errorParams)
errorKey
- The error code.errorParams
- The error parameters.public void setErrorContent(java.util.Hashtable newErrorContent)
newErrorContent
- The incoming hashtable containing error
codes and parameterspublic void setNonUTFMessage(boolean newNonUTFMessage)
newNonUTFMessage
- The incoming boolean
value.public void setRequestProperties(TypedProperty requestProperties) throws ECApplicationException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ToolsControllerCommandImpl
requestProperties
- TypedProperty containing the input
parameters
ECApplicationException
ControllerCmd#setRequestProperties(TypedProperty)
public void setRfqId(java.lang.Long newRfqId)
newRfqId
- The RFQ identifier.public void setRfqOwner(java.lang.Long newRfqOwner)
newRfqOwner
- The member Id of the RFQ
owner.public void setToolXMLObject(java.util.Hashtable newToolXMLObject)
newToolXMLObject
- The XML object put together by tools
framework.public void validateParameters() throws ECException
offering_id
, the reference number of the RFQ that is to be
completed
This method does the following:
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
ECCommand#validateParameters()