com.ibm.commerce.messaging.commands
Class GetPriceAndAvailabilityCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.command.BusinessPolicyCommandImpl
                          |
                          +--com.ibm.commerce.messaging.commands.GetPriceAndAvailabilityCmdImpl
All Implemented Interfaces:
BusinessPolicyCommand, ECCommand, ECTargetableCommand, RequestOrderQuotationPolicyCmd, TaskCommand

public class GetPriceAndAvailabilityCmdImpl
extends BusinessPolicyCommandImpl
implements RequestOrderQuotationPolicyCmd

The GetPriceAndAvailabilityCmd Policy Command Implementation is called by the StoreRequestOrderQuotationCmd Task Command to send out the priceAndAvailability message inquiry request. Given the priceAndAvailability object, uses the messaging outbound services. to compose the priceAndAvailability message and to send it out. If the command is successful, it will send out the priceAndAvailability message

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl
policyId, requestProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.messaging.commands. RequestOrderQuotationPolicyCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
GetPriceAndAvailabilityCmdImpl()
          Constructor for GetPriceAndAvailabilityCmdImpl.
 
Method Summary
 boolean getAuthenticationRequired()
          Gets the authenticationRequired
 boolean getBackOrders()
          Gets the backOrders
 java.lang.String getCollabSpace()
          Gets the collaboration name
 boolean getEnabled()
          Gets the enabled
 java.lang.String getName()
          Gets the name of the partner
 java.lang.String getPolicy()
          Gets the policy
 long getTimeout()
          Gets the timeout
 java.lang.String getUomStandard()
          Gets the uomStandard
 void performExecute()
          Sends the message.
 void setAuthenticationRequired(boolean authenticationRequired)
          Sets the authenticationRequired
 void setBackOrders(boolean backOrders)
          Sets the backOrders
 void setCollabSpace(java.lang.String collabSpace)
          Sets the collaboration name
 void setEnabled(boolean enabled)
          Sets the enabled
 void setName(java.lang.String name)
          /** Sets the name of the partner
 void setPolicy(java.lang.String policy)
          Sets the policy
 void setPriceAvailabilityRequest(com.ibm.commerce.domain.order.PriceAndAvailabilityRequest requestObj)
          Set PriceAvailabilityRequest javabean.
 void setRequestProperties( TypedProperty requestProperties)
          Sets the request properties for the policy command.
 void setTimeout(long timeout)
          Sets the timeout
 void setUomStandard(java.lang.String uomStandard)
          Sets the uomStandard
 void validateParameters()
          Checks mandatory parameters.
 
Methods inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl
getPolicyId, getRequestProperties, setPolicyId
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, 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. BusinessPolicyCommand
getPolicyId, getRequestProperties, setPolicyId
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

GetPriceAndAvailabilityCmdImpl

public GetPriceAndAvailabilityCmdImpl()
Constructor for GetPriceAndAvailabilityCmdImpl.
Method Detail

validateParameters

public void validateParameters()
                        throws ECException
Checks mandatory parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If the validation of the parameters fails.

performExecute

public void performExecute()
                    throws ECException
Sends the message.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If the message is not sent.

setRequestProperties

public void setRequestProperties(TypedProperty requestProperties)
Sets the request properties for the policy command.
Specified by:
setRequestProperties in interface BusinessPolicyCommand
Overrides:
setRequestProperties in class BusinessPolicyCommandImpl
Parameters:
requestProperties - The request properties. name The unique identifier for a partner collabSpace The CrossWorlds collaboration space backOrders Does the partner accept shopcarts with items whose availability is zero timeout A user interface should not timeout while waiting for a requested request until this many seconds has elapsed enabled Does the partner accept this request (quote/shopcart/order) uomStandard The Unit of Measure standard used to communicate. Ususally used in conjuction with QuantityUnitMapping objects authenticationRequired Does the partner require a userid and password on the request message policy The policy will be applied

getCollabSpace

public java.lang.String getCollabSpace()
Gets the collaboration name
Returns:
The collaboration name

setCollabSpace

public void setCollabSpace(java.lang.String collabSpace)
Sets the collaboration name
Specified by:
setCollabSpace in interface RequestOrderQuotationPolicyCmd
Parameters:
collabSpace - The collaboration name to set

getName

public java.lang.String getName()
Gets the name of the partner
Returns:
The name of this partener

setName

public void setName(java.lang.String name)
/** Sets the name of the partner
Specified by:
setName in interface RequestOrderQuotationPolicyCmd
Parameters:
name - The name of the partner to set

getPolicy

public java.lang.String getPolicy()
Gets the policy
Returns:
The policy.

setPolicy

public void setPolicy(java.lang.String policy)
Sets the policy
Specified by:
setPolicy in interface RequestOrderQuotationPolicyCmd
Parameters:
policy - The policy to set.

getUomStandard

public java.lang.String getUomStandard()
Gets the uomStandard
Returns:
The Unit of Measure standard used to communicate.

setUomStandard

public void setUomStandard(java.lang.String uomStandard)
Sets the uomStandard
Specified by:
setUomStandard in interface RequestOrderQuotationPolicyCmd
Parameters:
uomStandard - The Unit of Measure standard to set.

getBackOrders

public boolean getBackOrders()
Gets the backOrders
Returns:
True if the partner accept shopcarts with items whose availability is zero; false otherwise.

setBackOrders

public void setBackOrders(boolean backOrders)
Sets the backOrders
Specified by:
setBackOrders in interface RequestOrderQuotationPolicyCmd
Parameters:
backOrders - The backOrders to set

getTimeout

public long getTimeout()
Gets the timeout
Returns:
The time for waiting requested request.

setTimeout

public void setTimeout(long timeout)
Sets the timeout
Specified by:
setTimeout in interface RequestOrderQuotationPolicyCmd
Parameters:
timeout - The time for waiting requested request.

getEnabled

public boolean getEnabled()
Gets the enabled
Returns:
True if the partner accept this request (quote/shopcart/order); false otherwise.

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled
Specified by:
setEnabled in interface RequestOrderQuotationPolicyCmd
Parameters:
enabled - If the policy command is enabled.

getAuthenticationRequired

public boolean getAuthenticationRequired()
Gets the authenticationRequired
Returns:
True if the partner require a userid and password on the request message; false otherwise.

setAuthenticationRequired

public void setAuthenticationRequired(boolean authenticationRequired)
Sets the authenticationRequired
Specified by:
setAuthenticationRequired in interface RequestOrderQuotationPolicyCmd
Parameters:
authenticationRequired - If the partner requires a userid and password on the request message.

setPriceAvailabilityRequest

public void setPriceAvailabilityRequest(com.ibm.commerce.domain.order.PriceAndAvailabilityRequest requestObj)
                                 throws ECSystemException
Set PriceAvailabilityRequest javabean.
Specified by:
setPriceAvailabilityRequest in interface RequestOrderQuotationPolicyCmd
Throws:
ECException - Raised with message _ERR_UNSUPPORTED_ENCODING whenever an invalid encoding is used.
ECSystemException