com.ibm.commerce.messaging.commands
Class ProductOfferPriceUpdateCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.messaging.commands.ProductOfferPriceUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ProductOfferPriceUpdateCmd

public class ProductOfferPriceUpdateCmdImpl
extends ControllerCommandImpl
implements ProductOfferPriceUpdateCmd

The implementation of the ProductOfferPriceUpdate command (see interface for a detailed description of the ProductOfferPriceUpdate command)

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
 java.util.Vector iRequestPropertiesVector
          A vector containing a request property for each update needed.
 
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.messaging.commands. ProductOfferPriceUpdateCmd
defaultCommandClassName, NAME
 
Constructor Summary
ProductOfferPriceUpdateCmdImpl()
           
 
Method Summary
 boolean doPostProcess( TypedProperty aRequestProperty)
          Performs a verification check after the command executes.
 boolean doPreProcess( TypedProperty aRequestProperty)
          Performs a verification check before the command executes.
 boolean doProcess( TypedProperty aRequestProperty)
          Updates the product offer price based on the request properties.
 java.lang.Long[] getResourceOwners()
          This method returns the Organization unit reference numbers for all the resources accessed by this command It will return null if no resource if being accessed by this command.
  AccessVector getResources()
          Get resources.
 boolean isReadyToCallExecute()
          Indicates whether the command is ready to execute.
 boolean isReadyToCallExecutePerCommandInstance()
          Indicates whether each command instance is ready to be executed.
 void offerPropertySet( OfferAccessBean ab)
          Sets the offer property set
 void performExecute()
          Processes each request property in the iRequestPropertiesVector.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the iRequestPropertiesVector based on the given aRequestProperties.
 void setRequestPropertiesPerCommandInstance( TypedProperty aRequestProperties)
          Sets the command instance variables before processing each item in the iRequestPropertiesVector.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, 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, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
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, 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, validateParameters
 

Field Detail
public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values

iRequestPropertiesVector

public java.util.Vector iRequestPropertiesVector
A vector containing a request property for each update needed.
Constructor Detail

ProductOfferPriceUpdateCmdImpl

public ProductOfferPriceUpdateCmdImpl()
Method Detail

doPostProcess

public boolean doPostProcess(TypedProperty aRequestProperty)
Performs a verification check after the command executes.
Specified by:
doPostProcess in interface ProductOfferPriceUpdateCmd
Parameters:
aRequestProperty - The request property.
Returns:
true for successful verification check false for unsuccessful verification check
Throws:
ECException

doPreProcess

public boolean doPreProcess(TypedProperty aRequestProperty)
Performs a verification check before the command executes.
Specified by:
doPreProcess in interface ProductOfferPriceUpdateCmd
Parameters:
aRequestProperty - The request property.
Returns:
true for successful verification check false for unsuccessful verification check
Throws:
ECException

doProcess

public boolean doProcess(TypedProperty aRequestProperty)
                  throws ECException
Updates the product offer price based on the request properties. If a problem with the update occurs, an ECException will be thrown.
Specified by:
doProcess in interface ProductOfferPriceUpdateCmd
Parameters:
aRequestProperty - The request property
Returns:
boolean
Throws:
java.rmi.RemoteException - Raised whenever a communication related problems occured
FinderEception - Raised whenever a request object is not found
javax.naming.NamingException - Raised whenever a failure to look up the JNDI name occured
CreateException - Raised whenever a failure to create the EJB occured
ECException

getResourceOwners

public java.lang.Long[] getResourceOwners()
                                   throws ECException
This method returns the Organization unit reference numbers for all the resources accessed by this command It will return null if no resource if being accessed by this command.
Specified by:
getResourceOwners in interface AccCommand
Overrides:
getResourceOwners in class ControllerCommandImpl
Returns:
The array of all organization unit reference numbers
Throws:
ECException

getResources

public AccessVector getResources()
                          throws ECException
Get resources.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
a vector of resource action pairs
Throws:
ECException
See Also:
ECCommand.getResources()

isReadyToCallExecute

public boolean isReadyToCallExecute()
Indicates whether the command is ready to execute.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
true is the command is ready to execute false if the command is not ready to execute

isReadyToCallExecutePerCommandInstance

public boolean isReadyToCallExecutePerCommandInstance()
Indicates whether each command instance is ready to be executed.
Returns:
true is the command is ready to execute false if the command is not ready to execute

offerPropertySet

public void offerPropertySet(OfferAccessBean ab)
                      throws ECException
Sets the offer property set
Throws:
ECException - Raised with _ERR_OS_INVALID_NUMERIC whenever a NumberFormatException is thrown Raised with _ERR_OS_INVALID_TIMESTAMP whenever a IllegalArgumentException is thrown

performExecute

public void performExecute()
                    throws ECException
Processes each request property in the iRequestPropertiesVector. Before each request property is processed, a pre condition check is performed. If the pre condition check on the request property is ok, the business logic will be performed followed by a post condition check to ensure integrity is maintained. If either of the 3 steps fail, an ECException will be thrown.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
Sets the iRequestPropertiesVector based on the given aRequestProperties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - request properties

setRequestPropertiesPerCommandInstance

public void setRequestPropertiesPerCommandInstance(TypedProperty aRequestProperties)
                                            throws ECApplicationException
Sets the command instance variables before processing each item in the iRequestPropertiesVector.
Throws:
ECApplicationException