com.ibm.commerce.contract.commands

Class UpdateXSDContractCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, UpdateXSDContractCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class UpdateXSDContractCmdImpl
    extends CreateUpdateTradingAgreementBaseCmdImpl
    implements UpdateXSDContractCmd
    This is the default implementation of the UpdateXSDContractCmd task command. Update a contract based on the given Contract element (WebSphere Commerce Enterprise only).

    Behaviour:

    Calling commands: ContractSave, ContractUpdate, ContractImportApprovedVersion, ContractImportDraftVersion. The following AccessBeans are used in this default implementation: ContractJDBCHelperAccessBean.addEntryToContractName(String, Long, Integer), ContractAccessBean, TermConditionDescriptionAccessBean, TradingDescriptionAccessBean, ParticipantAccessBean, OrderApprovalTCAccessBean, PriceTCMasterCatalogWithFilteringAccessBean, PriceTCPriceListWithOptionalAdjustmentAccessBean, PriceTCMasterCatalogWithOptionalAdjustmentAccessBean, PriceTCPriceListWithSelectiveAdjustmentAccessBean, ReferralInterfaceTCAccessBean, FulfillmentTCAccessBean, ObligationToBuyTCByAmountAccessBean, PaymentTCAccessBean, OrderTCOrderCommentAccessBean, OrderTCOrderItemPAttributeAccessBean, PriceTCCustomPriceListAccessBean, ProductSetTCCustomExclusionAccessBean, ProductSetTCCustomInclusionAccessBean, ProductSetTCExclusionAccessBean, ProductSetTCInclusionAccessBean, ReturnTCRefundPaymentMethodAccessBean, ReturnTCReturnChargeAccessBean, RightToBuyTCByAmountAccessBean, ShippingTCShipToAddressAccessBean, ShippingTCShippingChargeAccessBean, ShippingTCShippingModeAccessBean, TradingAgreementAccessBean, OrganizationAccessBean, UserAccessBean, MemberGroupAccessBean

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getContractId()
      Returns id of the updated contract.
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      void performExecute()
      Executes the business logic of this command implementation to update the contract based on the contract element object.
      void setContractElement(org.w3c.dom.Element contractElement)
      Sets the contract Element object.
      void setContractId(java.lang.Long newContractId)
      Sets the ID of the contract to update.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The full name of this class.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • UpdateXSDContractCmdImpl

        public UpdateXSDContractCmdImpl()
    • Method Detail

      • getContractId

        public java.lang.Long getContractId()
        Returns id of the updated contract.
        Specified by:
        getContractId in interface UpdateXSDContractCmd
        Returns:
        the id of the updated contract
      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Gets the access vector accessed by this command. The default implementation returns the ContractAccessBean of the contract.
        Specified by:
        getResources in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getResources in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        AccessVector - a vector of resource action pairs
        Throws:
        com.ibm.commerce.exception.ECException
        See Also:
        AbstractECTargetableCommand#getResources()
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation to update the contract based on the contract element object.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrieved from the information provided in StoreRef element in one of the terms and conditions. Raised with message _ERR_RETRIEVE_POLICY_TYPE if the policy type cannot be retrieved based on information in policy reference element. Raised with message _ERR_RETRIEVE_ORG_ID if an error occurred when retrieving the organization ID. Raised with message _ERR_RETRIEVE_USER_ID if an error occurred when retrieving the user ID. Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID if an error occurred when retrieving the member group ID. Raised with message _ERR_RETRIEVE_OPERATOR_ID if an error occurred when retrieving opeartor_id. The value of "operator" in "AttributeValue" element is incorrect. Raised with message _ERR_RETRIEVE_PATTRIBUTE_ID if an error occurred when retrieving pattribute_id. The value of "attributeName" in "AttributeDetail" element is incorrect. Raised with message _ERR_RETRIEVE_CATENTRY_ID if an error occurred when retrieving catentry_id. The information specified in "OrderTCOrderItemPAttribute" element is incorrect. Raised with message _ERR_RETRIEVE_POLICY_ID if an error occurred when retrieving policy_id. The information specified in the policy reference element is incorrect. Raised with message _ERR_RETRIEVE_FFMCENTER_ID if an error occurred when retrieving ffmcenter_id. The information specified in "FilfillmentCenterRef" element is incorrect. Raised with message _ERR_COLUMN_ACCESSBEANNAME_IN_PATTRIBUTE_NOT_POPULATED if an error occurred when retrieving personalization attribute value accessbean. Column accessbeanname in table pattribute is not populated correctly. Raised with message _ERR_PATTRIBUTE_NOT_REGISTERED_IN_TABLE_PATTRPROD_FOR_CATENTRY if an error occurred when validating whether catentry has the corresponding personalization attribute registered in table PattrProd. catentry_id and pattribute_id retrieved from OrderTCOrderItemPAttribute element should be registered in table PattrProd. Raised with message _ERR_TOO_MANY_FULFILLMENT_TC if a contract has more than three fulfillment centers defined in a term and condition. Raised with message _ERR_SAVE_TC_ATTR if an error occurred when saving the attribute of the term and condition to tcattr table. Raised with message _ERR_DUPLICATE_KEY_IN_PROCESSING_TC if a duplicate key error occurred when processing a term and condition.
        See Also:
        AbstractECTargetableCommand#performExecute(), CreateUpdateTradingAgreementBaseCmdImpl.setAttachments(Vector, Long, String), CreateUpdateTradingAgreementBaseCmdImpl.setTradingAgreementDescAndParticipants(Long)
      • setContractElement

        public void setContractElement(org.w3c.dom.Element contractElement)
        Sets the contract Element object.
        Specified by:
        setContractElement in interface UpdateXSDContractCmd
        Parameters:
        contractElement - the contract Element object
      • setContractId

        public void setContractId(java.lang.Long newContractId)
        Sets the ID of the contract to update.
        Specified by:
        setContractId in interface UpdateXSDContractCmd
        Parameters:
        newContractId - the ID of the contract to update