java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.contract.commands.ValidateContractCmdImpl
Validate the contract (WebSphere Commerce Business Edition only). This is the default implementation of the ValidateContractCmd. Calling commands: ContractImportApprovedVersion, ContractSubmitPreApproval, ContractDeploy The following AccessBeans are used in this default implementation: BusinessPolicyAccessBean, ParticipantAccessBean, TradingAgreementAccessBean, TermConditionAccessBean, MemberAccessBean, ContractAccessBean
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. ValidateContractCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ValidateContractCmdImpl() Constructor for ValidateContractCmdImpl |
Method Summary | |
---|---|
void |
checkIsContractExpired() In this default implementation, we validate if the contract is expired and the expired date of the contract should later than its referenced business policies' expired date. |
java.lang.Long |
getContractId() Returns the ID of the contract to validate. |
TypedProperty |
getResponseProperties() Returns the response properties. |
void |
otherValidateCheck() Override this method to add additional contract validation. |
void |
performExecute() Validates the specified contract. |
void |
setContractId(java.lang.Long newContractId) Set the id of the contract to validate |
void |
setResponseProperties(
TypedProperty resp) set the ResponseProperties |
void |
setReturnViewForTools(java.lang.String returnView) Sets the return view for the tools GUI |
void |
validateAccountRelatedInfo() Validates business account related Information in the contract. |
void |
validateBuyerParticipant() Validates Buyer participant in contract. |
protected
void |
validateParticipantsForHostingContract() Validates participants in reseller contract. |
protected
void |
validateParticipantsForReferralContract() Validates participants in disributor contract. |
void |
validateSellerParticipant() Validate Seller participant in contract In this default implementation, this method checks: 1. |
void |
validateTCOccurrence() Validate the occurrence of the Terms and Conditions in the contract. |
protected
void |
validateTCOccurrenceForHostingContract() Validates the occurrence of the Terms and Conditions in the reseller contract. |
protected
void |
validateTCOccurrenceForReferralContract() Validates the occurrence of the Terms and Conditions in the distributor contract. |
void |
validateTCType() Validates the type of the Terms and Conditions in the contract. |
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
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public ValidateContractCmdImpl()
Method Detail |
---|
public void checkIsContractExpired() throws ECException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
checkIsContractExpired
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECException.
- Raised with message
_ERR_CONTRACT_EXPIRED if the end date of the contract is earlier than current
date. Raised with message _ERR_INVALID_CONTRACT_EXPIRED_DATE if the end date of
the business policies which the contract referred to is earlier than the end
date of the contract.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public java.lang.Long getContractId()
getContractId
in interface
ValidateContractCmd
public TypedProperty getResponseProperties()
getResponseProperties
in interface
ValidateContractCmd
public void otherValidateCheck() throws ECException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
otherValidateCheck
in interface
ValidateContractCmd
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
public void setContractId(java.lang.Long newContractId)
setContractId
in interface
ValidateContractCmd
newContractId
- the contract IDpublic void setResponseProperties(TypedProperty resp)
setResponseProperties
in interface
ValidateContractCmd
resp
-
com.ibm.commerce.datatype.TypedPropertypublic void setReturnViewForTools(java.lang.String returnView)
setReturnViewForTools
in interface
ValidateContractCmd
returnView
- the return view namepublic void validateAccountRelatedInfo() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
validateAccountRelatedInfo
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_DO_NOT_REFERRED_TO_ACCOUNT_WHEN_CREDIT_ALLOWED if the
creditAllowed attribute is set to true in the contract but the contract did not
refer to a business account. Raised with message
_ERR_NEED_PAYMENT_TC_WITH_CREDIT_IN_ACCOUNT if the creditAllowed attribute is
set to true in the contract but there is not payment with credit term and
condition in the referred business account.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public void validateBuyerParticipant() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
validateBuyerParticipant
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message EC_ERR_MISSING_BUYER_PARTICIPANT if there is no Buyer participants
in the contract. Raised with message EC_ERR_TERM_CONDITION_PARTICIPANT_ROLE if
one of the terms and conditions participants is not a Buyer participant. Raised
with message _ERR_MBRGRP_BUYER_CANNOT_REFER_ACCOUNT if one of the Buyer
participants in the contract is a member group when the contract referred to a
business account. Raised with message
_ERR_BUYER_IN_CNTR_DOES_NOT_MATCH_WITH_BUYER_IN_ACNT if one of the Buyer
participants in the contract does not match the Buyer participants in the
referred business account. Raised with message
_ERR_MISSING_ACCOUNT_HOLDER_IN_ACCOUNT if there is not AccountHolder in the
referred business account when there are no Buyer pariticipants neither. Raised
with message _ERR_BUYER_IN_CNTR_DOES_NOT_MATCH_WITH_ACCOUNTHOLDER_IN_ACNT if
one of the Buyer participants in the contract does not match the AccountHolder
participant in the referred business account.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public void validateSellerParticipant() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
validateSellerParticipant
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_CANNOT_HAVE_MORE_THAN_ONE_SELLER if there are more than one
Seller participants in the contract. Raised with message
_ERR_MISSING_SELLER_PARTICIPANT if the Seller participant is missing from the
the contract. Raised with message _ERR_SELLER_DO_NOT_MATCH_TO_SELLER_IN_ACCOUNT
if the Seller participant in the contract does not match the Seller participant
in the business account which it referred to.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public void validateTCOccurrence() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
validateTCOccurrence
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_MISSING_PRICE_TC if there is no Price terms and conditions in
the contract. Raised with message _ERR_MISSING_SHIPPING_CHARGE_TC if the
ShippingCharge term and condition is missing or there are more than one
ShippingCharge terms and conditions in the contract. Raised with message
_ERR_CANNOT_HAVE_MORE_THAN_ONE_RIGHT_TO_BUY_BY_AMOUNT_TC if there are more than
one RightToBuyByAmount terms and conditions in the contract. Raised with
message _ERR_CANNOT_HAVE_MORE_THAN_ONE_OBLIGATION_TO_BUY_BY_AMOUNT_TC if ther
are more than one ObligationToBuyByAmount terms and conditions in the contract.
Raised with message _ERR_CANNOT_HAVE_MORE_THAN_ONE_ORDER_APPROVAL_TC if there
are more than one OrderApproval terms and conditions in the contract. Raised
with message _ERR_CANNOT_HAVE_MORE_THAN_ONE_RETURN_CHARGE_TC if there are more
than one ReturnTCReturnCharge terms and conditions in the contract. Raised with
message _ERR_RETURN_TC_CHARGE_AND_REFUND_METHOD_DO_NOT_MATCH if only one of the
ReturnTCReturnCharge and ReturnTCRefundPaymentMethod terms and conditions is in
the contract. Raised with message
_ERR_CANNOT_HAVE_MORE_THAN_ONE_PRICE_TC_MC_OPTIONAL_ADJUSTMENT if there are
more than one PriceTCMasterCatalogWithOptionalAdjustment terms and conditions
in the contract.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public void validateTCType() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
validateTCType
in interface
ValidateContractCmd
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_CANNOT_HAVE_PAYMENT_TC_WITH_CREDIT_LINE_IN_CONTRACT if there
are PaymentTC with credit line terms and conditions in the contract. Raised
with message _ERR_CANNOT_HAVE_DISPLAY_CUSTOMIZATION_TC_IN_CONTRACT if there are
DisplayCustomizationTC terms and conditions in the contract. Raised with
message _ERR_CANNOT_HAVE_INVOICE_TC_IN_CONTRACT if there are InvoiceTC terms
and conditions in the contract. Raised with message
_ERR_CANNOT_HAVE_PURCHASE_ORDER_TC_IN_CONTRACT if there are purchase order
terms and conditions in the contract.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
checkIsContractExpired()
,
validateParticipantsForDistributorContract()
,
validateTCOccurrenceForDistributorContract()
,
validateParticipantsForResellerContract()
,
validateTCOccurrenceForResellerContract()
,
validateAccountRelatedInfo()
,
validateBuyerParticipant()
,
validateSellerParticipant()
,
validateTCOccurrence()
,
validateTCType()
,
otherValidateCheck()
,
AbstractECTargetableCommand.performExecute()
protected void validateParticipantsForReferralContract() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_DISTRIBUTOR_PARTICIPANT if the contract has no Distributor
particicpants or has more than one Distributor participants. Raised with
message _ERR_CHANNEL_PARTICIPANT if the contract has no ServiveProvider
particicpants or has more than one ServiveProvider participants.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
protected void validateParticipantsForHostingContract() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_RESELLER_PARTICIPANT if one of the following cases happened:
1. both Reseller and Supplier participants are missing from the hosting
contract 2. both Reseller and Supplier participants are provided in the hosting
contract 3. there are more than one Reseller or Supplier partcipants in the
hosting contract Raised with message _ERR_CHANNEL_PARTICIPANT if the contract
has no ServiveProvider particicpants or has more than one ServiveProvider
participants.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
protected void validateTCOccurrenceForReferralContract() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
com.ibm.commerce.exception.ECApplicationException.
- Raised
with message _ERR_REFERRAL_INTERFACE_TC if there is no ReferralInterface terms
and conditions or more than one in the contract.java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException
protected void validateTCOccurrenceForHostingContract() throws ECApplicationException, CreateException, java.rmi.RemoteException, FinderException, javax.naming.NamingException
com.ibm.commerce.exception.ECApplicationException.
java.rmi.RemoteException.
javax.ejb.CreateException.
javax.ejb.FinderException.
javax.naming.NamingException.
ECApplicationException
CreateException
java.rmi.RemoteException
FinderException
javax.naming.NamingException