com.ibm.commerce.contract.commands
Class ValidateBusinessPolicyInContractForStoreCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.contract.commands.ValidateBusinessPolicyInContractForStoreCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, TaskCommand, ValidateBusinessPolicyInContractForStoreCmd

public class ValidateBusinessPolicyInContractForStoreCmdImpl
extends TaskCommandImpl
implements ValidateBusinessPolicyInContractForStoreCmd

Validate the Business policy in the specified contract for the specified store (WebSphere Commerce Business Edition only). This is the default implementation of ValidateBusinessPolicyInContractForStore. In the default implementation, we check if the business policy expired, if the business policy is available to the specified store. Calling command: ContractDeploy The following AccessBeans are used in this default implementaton: BusinessPolicyAccessBean, StoreJDBCHelperAccessBean().findStoresCreatedByContract(contractId) ContractJDBCHelperAccessBean().findSameFamilyContracts(name, ownerId, origin, contractId), ContractAccessBean, StoreAccessBean, TradingAgreementAccessBean

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this command.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.contract.commands. ValidateBusinessPolicyInContractForStoreCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ValidateBusinessPolicyInContractForStoreCmdImpl()
          Constructor for ValidateBusinessPolicyInContractForStoreCmdImpl
 
Method Summary
 java.lang.Long getContractId()
          Returns the ID of the contract to validate.
  TypedProperty getResponseProperties()
          Returns the response properties.
 void otherValidateCheck()
          Any other checks.
 void performExecute()
          Validates all the business policies referred by the specified contract in the specified store.
 void setContractId(java.lang.Long contractId)
          Sets the ID of the contract to validate.
 void setResponseProperties( TypedProperty resp)
          Sets the response properties.
 void setReturnViewForTools(java.lang.String returnView)
          Sets the return view for the tools GUI
 void setStoreId(java.lang.Integer storeId)
          Sets the ID of the store.
 void validateBusinessPolicies()
          Validates if the business policies are expired and if they are available for the store.
 
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, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this command.
See Also:
Constant Field Values
Constructor Detail

ValidateBusinessPolicyInContractForStoreCmdImpl

public ValidateBusinessPolicyInContractForStoreCmdImpl()
Constructor for ValidateBusinessPolicyInContractForStoreCmdImpl
Method Detail

getContractId

public java.lang.Long getContractId()
Returns the ID of the contract to validate.
Specified by:
getContractId in interface ValidateBusinessPolicyInContractForStoreCmd
Returns:
the contract ID

getResponseProperties

public TypedProperty getResponseProperties()
Returns the response properties.
Specified by:
getResponseProperties in interface ValidateBusinessPolicyInContractForStoreCmd
Returns:
responseProperties the response properties

otherValidateCheck

public void otherValidateCheck()
                        throws ECException,
                               CreateException,
                               java.rmi.RemoteException,
                               FinderException,
                               javax.naming.NamingException
Any other checks. It is empty in this default implementation.
Specified by:
otherValidateCheck in interface ValidateBusinessPolicyInContractForStoreCmd
Throws:
com.ibm.commerce.exception.ECException.
java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException

setContractId

public void setContractId(java.lang.Long contractId)
Sets the ID of the contract to validate.
Specified by:
setContractId in interface ValidateBusinessPolicyInContractForStoreCmd
Parameters:
contractId - the contract ID

setResponseProperties

public void setResponseProperties(TypedProperty resp)
Sets the response properties.
Specified by:
setResponseProperties in interface ValidateBusinessPolicyInContractForStoreCmd
Parameters:
resp - the response properties

setReturnViewForTools

public void setReturnViewForTools(java.lang.String returnView)
Sets the return view for the tools GUI
Specified by:
setReturnViewForTools in interface ValidateBusinessPolicyInContractForStoreCmd
Parameters:
returnView - the return view name

setStoreId

public void setStoreId(java.lang.Integer storeId)
Sets the ID of the store.
Specified by:
setStoreId in interface ValidateBusinessPolicyInContractForStoreCmd
Parameters:
storeId - the store ID

validateBusinessPolicies

public void validateBusinessPolicies()
                              throws ECException,
                                     CreateException,
                                     java.rmi.RemoteException,
                                     FinderException,
                                     javax.naming.NamingException,
                                     java.sql.SQLException
Validates if the business policies are expired and if they are available for the store.
Specified by:
validateBusinessPolicies in interface ValidateBusinessPolicyInContractForStoreCmd
Throws:
com.ibm.commerce.exception.ECException. - Raised with message _ERR_BIZ_POLICY_NOT_AVAILABLE_FOR_STORE if one of the referred business policies is not available in the specified store. Raised with message _ERR_BIZ_POLICY_EXPIRED if one of the referred business policies is expired.
java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
java.sql.SQLException.
java.sql.SQLException
ECException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException

performExecute

public void performExecute()
                    throws ECException
Validates all the business policies referred by the specified contract in the specified store.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException
See Also:
validateBusinessPolicies(), otherValidateCheck(), AbstractECTargetableCommand.performExecute()