com.ibm.commerce.contract.commands

Class CreateLightWeightStoreCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.contract.commands.CreateLightWeightStoreCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, CreateLightWeightStoreCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command
    Direct Known Subclasses:
    CreateLightWeightStoreWrapperCmdImpl


    public class CreateLightWeightStoreCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements CreateLightWeightStoreCmd
    This is the default implementation of the CreateLightWeightStoreCmd task command.

    Behaviour:

      Creates the light weight store based on the store XML. (WebSphere Commerce Enterprise only) Creates the store, and it depends on the supplied store XML string. It also creates the store relationships, supported languages, supported currencies, business policies, profiles, shipping modes and shipping arrangements. Also, it configures the Websphere Commerce Payments if the store type is 'Reseller Hosting Store' and if PaymentsInformation element in store XML string is not empty. additionalMethodBeforeStoreCreation() and additionalMethodAfterStoreCreation() provide a quick way to run additional codes before or after the store creation process.
    The calling command is: CreateLightWeightStoreWrapperCmd.

    Task commands called:

    AccessBeans called:

    • CSEditAttAccessBean
    • CatalogAccessBean
    • CatalogDescriptionAccessBean
    • FulfillmentCenterAccessBean
    • ISEditAttAccessBean
    • MsgTypesAccessBean
    • ProfilesAccessBean
    • ServerJDBCHelperBean
    • ShippingArrangementAccessBean
    • ShippingModeAccessBean
    • ShippingModeDescriptionAccessBean
    • StoreAccessBean
    • StoreCatalogAccessBean
    • StoreCategoryAccessBean
    • StoreEntityAccessBean
    • StoreEntityDescriptionAccessBean
    • StoreJDBCHelperAccessBean
    • StoreTransAccessBean
    • SupportedCurrencyAccessBean
    • SupportedLanguageAccessBean
    • TransportAccessBean
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of this class is "com.ibm.commerce.contract.commands.CreateLightWeightStoreCmdImpl".
      static java.lang.String COPYRIGHT
      The internal copyright field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String[] getBusinessPolicyName()
      Gets the business policy names.
      java.lang.Integer getChannelStoreId()
      Gets the channel store ID.
      java.lang.Long getCreatedByContractId()
      Gets the contract's ID that created the store.
      java.lang.Integer getDefaultShippingModeId()
      Gets the default shipping mode of the store.
      boolean getHasMasterCatalogProfileStore()
      Gets the master catalog if one exists in catalog profile store.
      java.util.Vector getPricePolicies()
      Gets price policies.
      java.lang.Long getProfileStoreCatalogId()
      Gets the catalog assets store's catalog ID.
      java.lang.String getProfileStoreCatalogName()
      Gets the catalog asset store's catalog name.
      java.lang.String getProfileStoreCatalogOwnerMemberId()
      Gets the catalog owner's member ID.
      boolean getResult()
      Gets if the store is successfully created.
      java.lang.String getStore_Id()
      Gets the store ID.
      java.lang.Integer getStoreDefaultLanguageId()
      Gets the store default language ID.
      org.w3c.dom.Element getStoreElement()
      Gets the Store element.
      java.lang.String getStoreIdentifier()
      Gets the store name (identifier).
      java.lang.String getStoreInitialState()
      Gets the store initial state.
      java.lang.String getStoreOwnerMemberId()
      Gets the store owner's member Id.
      java.lang.Integer getStoreType()
      Gets the store type.
      java.lang.String getStoreXML()
      Gets the store XML string.
      boolean getSynchronousDeployment()
      Gets the synchronousDeployment flag to indicate contract should be deployed synchronously.
      void performExecute()
      Executes the business logic of this command implementation.
      void setChannelStoreId(java.lang.Integer id)
      Sets the channel store ID.
      void setCreatedByContractId(java.lang.Long id)
      Sets the contract's ID that created the store.
      void setStoreType(java.lang.Integer i)
      Sets the store type.
      void setStoreXML(java.lang.String s)
      Sets the store XML string.
      void setSynchronousDeployment(boolean synchronousDeploymentFlag)
      Sets the synchronousDeployment flag to indicate contract should be deployed synchronously.
      void validateParameters()
      Validates the parameters.
      • 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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • 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, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class is "com.ibm.commerce.contract.commands.CreateLightWeightStoreCmdImpl".
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • CreateLightWeightStoreCmdImpl

        public CreateLightWeightStoreCmdImpl()
    • Method Detail

      • getCreatedByContractId

        public java.lang.Long getCreatedByContractId()
        Gets the contract's ID that created the store.
        Specified by:
        getCreatedByContractId in interface CreateLightWeightStoreCmd
        Returns:
        the contract ID of the contract that created the store
      • getDefaultShippingModeId

        public java.lang.Integer getDefaultShippingModeId()
        Gets the default shipping mode of the store.
        Specified by:
        getDefaultShippingModeId in interface CreateLightWeightStoreCmd
        Returns:
        Default shipping mode of the store
      • getHasMasterCatalogProfileStore

        public boolean getHasMasterCatalogProfileStore()
        Gets the master catalog if one exists in catalog profile store.
        Specified by:
        getHasMasterCatalogProfileStore in interface CreateLightWeightStoreCmd
        Returns:
        true found master catalog in one of the specified catalog profile store
        false no master catalog was found in one of the specified catalog profile store, or there was no catalog profile store specified
      • getResult

        public boolean getResult()
        Gets if the store is successfully created.
        Specified by:
        getResult in interface CreateLightWeightStoreCmd
        Returns:
        true: store is created successfully. false: store is not created.
      • getStoreType

        public java.lang.Integer getStoreType()
        Gets the store type.
        Specified by:
        getStoreType in interface CreateLightWeightStoreCmd
        Returns:
        0: distributor proxy store 1: reseller hosting store Only 0 and 1 will be returned.
      • getSynchronousDeployment

        public boolean getSynchronousDeployment()
        Gets the synchronousDeployment flag to indicate contract should be deployed synchronously.
        Specified by:
        getSynchronousDeployment in interface CreateLightWeightStoreCmd
        Returns:
        true for synchronous deployment, false for asynchronous deployment
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation.
        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
        com.ibm.commerce.exception.ECSystemException - Raised with message _ERR_FINDER_EXCEPTION if a FinderException is occured Raised with message _ERR_REMOTE_EXCEPTION if a RemoteException is occured Raised with message _ERR_NAMING_EXCEPTION if a NamingException is occured Raised with message _ERR_CREATE_EXCEPTION if a CreateException is occured Raised with message _ERR_SQL_EXCEPTION if a SQLException is occured Raised with message _ERR_REMOVE_EXCEPTION if a RemoteException is occured Raised with message _ERR_PARSE_XML if store XML cannot be parsed Raised with message _ERR_CONTRACT_CMD_EXEC whenever other errors are occured
        See Also:
        AbstractECTargetableCommand.performExecute()
      • setCreatedByContractId

        public void setCreatedByContractId(java.lang.Long id)
        Sets the contract's ID that created the store.
        Specified by:
        setCreatedByContractId in interface CreateLightWeightStoreCmd
        Parameters:
        id - contract ID
      • setStoreType

        public void setStoreType(java.lang.Integer i)
        Sets the store type.
        Specified by:
        setStoreType in interface CreateLightWeightStoreCmd
        Parameters:
        i - 0: distributor proxy store 1: reseller hosting store Only 0 and 1 are allowed here
      • setStoreXML

        public void setStoreXML(java.lang.String s)
        Sets the store XML string.
        Specified by:
        setStoreXML in interface CreateLightWeightStoreCmd
        Parameters:
        s - Store XML string
      • setSynchronousDeployment

        public void setSynchronousDeployment(boolean synchronousDeploymentFlag)
        Sets the synchronousDeployment flag to indicate contract should be deployed synchronously.
        Specified by:
        setSynchronousDeployment in interface CreateLightWeightStoreCmd
        Parameters:
        synchronousDeploymentFlag - true for synchronous deployment, false for asynchronous deployment
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Validates the parameters.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException
        com.ibm.commerce.exception.ECSystemException - Raised with message _ERR_MISSING_PARAMETER if Store XML is null or store type (distributor proxy or reseller hosting) is not set.
        See Also:
        AbstractECTargetableCommand.validateParameters()