com.ibm.commerce.experimentation.commands

Class MigrateExperimentResultCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, MigrateExperimentResultCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class MigrateExperimentResultCmdImpl
    extends TaskCommandImpl
    implements MigrateExperimentResultCmd
    This class implements the MigrateExperimentResultCmd interface to provide the task command that migrates experiment results. By default, this command is invoked when a customer logs on to the site, and the experiment result that is associated with the current session is migrated and associated with the customer. By doing this, the content generated by the experiment remains the same after the customer logs on. This is required if the persistency of experiment result is scoped to the lifetime of the experiment. This task command can be extended to provide different implementations to migrate experiment results.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • MigrateExperimentResultCmdImpl

        public MigrateExperimentResultCmdImpl()
    • Method Detail

      • getSessionId

        public java.lang.String getSessionId()
        This method returns the ID of the session with which the experiment results are associated.
        Returns:
        The ID of the session.
      • getOldUserId

        public java.lang.Long getOldUserId()
        This method returns the old ID of the user who owns the experiment results before the user logged on.
        Returns:
        The old ID of the user.
      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the execution of this command. It invokes the migration method implemented in this command to migrate experiment results that belong to the given user and are associated with the given session. Different migrate methods can be provided for different logic to migrate results in different manners according to the current state at runtime.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - Thrown when an exception occurs while executing this method.
      • setSessionId

        public void setSessionId(java.lang.String sessionId)
        This method sets the ID of the session with which the experiment results are associated.
        Specified by:
        setSessionId in interface MigrateExperimentResultCmd
        Parameters:
        sessionId - The ID of the session.
      • setOldUserId

        public void setOldUserId(java.lang.Long oldUserId)
        This method sets the old ID of the user who owns the experiment results before the user logged on.
        Specified by:
        setOldUserId in interface MigrateExperimentResultCmd
        Parameters:
        userId - The old ID of the user.
      • setUserId

        public void setUserId(java.lang.Long userId)
        This method sets the ID of the user who owns the experiment results.
        Specified by:
        setUserId in interface MigrateExperimentResultCmd
        Parameters:
        userId - The ID of the user.