java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.rfq.commands.RFQToContractCreateCmdImpl
This is the default implementation of the RFQToContractCreateCmd. This command calls the following TaskCommands:
CopyAttachmentCmd
CreateTradeAttachmentCmd
CreateContractBasicInfoCmd
CreateShippingChargeTCCmd
CreateReturnChargeTCCmd
CreateReturnPaymentTCCmd
RFQAccessBean
RFQResponseAccessBean
OperatorAccessBean
RFQResponseProductAccessBean
PAttrValueAccessBean
PAttributeAccessBean
PAttrProdAccessBean
AttachmentAccessBean
TradingAttachmentRelationAccessBean
RFQResponseEvalAccessBean
ParticipantAccessBean
Field Summary |
---|
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.rfq.commands. RFQToContractCreateCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Constructor Summary | |
---|---|
RFQToContractCreateCmdImpl() |
Method Summary | |
---|---|
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. |
java.lang.Long |
getAccountId() Gets the accountId |
java.lang.Long |
getResId() Gets the resId |
AccessVector |
getResources()
Gets the access vector accessed by this command. |
java.lang.String |
getReturnApprovalPolicy() Gets the returnApprovalPolicy |
java.lang.String |
getReturnChargePolicy() Gets the returnChargePolicy |
java.lang.String[] |
getReturnPaymentPolicies() Returns the return payment policies. |
java.lang.Long |
getRfqId() Returns the RFQ identifier. |
java.lang.Long |
getRfqOwner() Returns the RFQ owner's member Id. |
java.lang.String |
getShipChargeType() Gets the shipChargeType |
void |
performExecute()
Completes the RFQ by creating a contract for the winning
response.
This method does the following:
Creates the contract if there is no more
winning responses: 1) Sets the state of the RFQ to "Complete". 2)
Sets the completion time for the RFQ. 3) Raises a UBF event to change the state
of all the non-winning responses that are in evaluation for this
RFQ |
void |
reset() Reset the command |
void |
setAccountId(java.lang.Long accountId) Sets the accountId |
void |
setRequestProperties(
TypedProperty requestProperties)
Get the rfqId, resId, billTo parameters from the
request. |
void |
setResId(java.lang.Long resId) Sets the resId |
void |
setReturnApprovalPolicy(java.lang.String returnApprovalPolicy) Sets the returnApprovalPolicy |
void |
setReturnChargePolicy(java.lang.String returnChargePolicy) Sets the returnChargePolicy |
void |
setReturnPaymentPolicies(java.lang.String[] returnPaymentPolicies) Sets the return payment policies. |
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 |
setShipChargeType(java.lang.String shipChargeType) Sets the shipChargeType |
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.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
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,
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 |
Constructor Detail |
---|
public RFQToContractCreateCmdImpl()
Method Detail |
---|
public void reset()
reset
in class
AbstractECTargetableCommand
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
- see ECCommand#getResources()public void createContracts() throws ECException
ECException
public java.lang.Long getRfqId()
public java.lang.Long getRfqOwner()
public java.lang.Long getAccountId()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
ECCommand#performExecute()
public void setRequestProperties(TypedProperty requestProperties) throws ECException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
requestProperties
- TypedProperty containing the input
parametersECException
- This exception can be raised with any of the following messages
_ERR_RFQ_INVALID_REQUESTID, _ERR_RFQ_INVALID_RESPONSEID,
_ERR_RFQ_NO_SHIPPING_CHARGE.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 setAccountId(java.lang.Long accountId)
accountId
- The accountId to setpublic 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()
public java.lang.Long getResId()
public void setResId(java.lang.Long resId)
resId
- The resId to setpublic java.lang.String getShipChargeType()
public void setShipChargeType(java.lang.String shipChargeType)
shipChargeType
- The shipChargeType to setpublic java.lang.String getReturnChargePolicy()
public void setReturnChargePolicy(java.lang.String returnChargePolicy)
returnChargePolicy
- The returnChargePolicy to
setpublic java.lang.String getReturnApprovalPolicy()
public void setReturnApprovalPolicy(java.lang.String returnApprovalPolicy)
returnApprovalPolicy
- The returnApprovalPolicy to
setpublic java.lang.String[] getReturnPaymentPolicies()
public void setReturnPaymentPolicies(java.lang.String[] returnPaymentPolicies)
returnPaymentPolicies
- The return payment
policies.