com.ibm.commerce.utf.commands
Class RFQSubmitCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
|
+--com.ibm.commerce.utf.commands.RFQSubmitCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RFQSubmitCmd, ToolsControllerCommand
- public class RFQSubmitCmdImpl
- extends ToolsControllerCommandImpl
- implements RFQSubmitCmd
Implementation class for submitting RFQs
Method Summary |
void |
doAcknowledgment()
Composes and sends out the response to the browser. |
java.util.Hashtable |
getErrorContent()
Returns the errorContent hashtable |
AccessVector |
getResources()
Gets the access vector accessed by this command.
The protectable resource for the submit operation is the RFQ itself. |
java.lang.Long |
getRFQId()
Returns the RFQ Id. |
void |
performExecute()
Submits the RFQ. |
void |
setErrorContent(java.util.Hashtable newErrorContent)
Copies the incoming hashtable into a member variable. |
void |
setRequestProperties(TypedProperty requestProperties)
Retrieves the identifier of the RFQ that is to be submitted.
The WebController calls the setRequestProperties method before invoking the execute method in this command. |
void |
setRFQId(java.lang.Long newRFQ)
Sets the value of the member variable, rfqId, to the incoming value. |
void |
validateParameters()
Checks for a valid RFQ identifier. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
RFQSubmitCmdImpl
public RFQSubmitCmdImpl()
doAcknowledgment
public void doAcknowledgment()
- Composes and sends out the response to the browser.
getErrorContent
public java.util.Hashtable getErrorContent()
- Returns the errorContent hashtable
- Returns:
- The hashtable containing error codes.
getResources
public AccessVector getResources()
throws ECException
- Gets the access vector accessed by this command.
The protectable resource for the submit operation is the RFQ itself.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Returns:
- AccessVector - a vector of resource action pairs
- Throws:
ECException
-
getRFQId
public java.lang.Long getRFQId()
- Returns the RFQ Id.
- Returns:
- The RFQ identifier.
performExecute
public void performExecute()
throws ECException
- Submits the RFQ.
Behaviour
- Checks if the RFQ is in the draft state.
- Checks that the RFQ contains at least one product.
- Sets the state of the RFQ to active or future depending on the RFQ start time.
- Sets the activate time for the RFQ to the current time. In case, no start time had been specified for the RFQ,
sets the RFQ start time also to the current time.
setErrorContent
public void setErrorContent(java.util.Hashtable newErrorContent)
- Copies the incoming hashtable into a member variable.
- Parameters:
newErrorContent
- The incoming hashtable containing errorcodes.
setRequestProperties
public void setRequestProperties(TypedProperty requestProperties)
throws ECApplicationException
- Retrieves the identifier of the RFQ that is to be submitted.
The WebController calls the setRequestProperties method before invoking the execute method in this command.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class ToolsControllerCommandImpl
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECApplicationException.
-
setRFQId
public void setRFQId(java.lang.Long newRFQ)
- Sets the value of the member variable, rfqId, to the incoming value.
- Parameters:
newRFQ
- The incoming value for an RFQ identifier.
validateParameters
public void validateParameters()
throws ECException
- Checks for a valid RFQ identifier.
This method does the following:
- Checks if a RFQ Id has been specified.
- Checks if the specified RFQ Id is valid.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Throws:
ECException
-