com.ibm.commerce.membergroup.commands

Class ListMemberGroupsForUserCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ListMemberGroupsForUserCmd, SegmentConstants, 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 ListMemberGroupsForUserCmdImpl
    extends TaskCommandImpl
    implements ListMemberGroupsForUserCmd, SegmentConstants
    This class implements the ListMemberGroupsForUserCmd interface to provide the task command that lists all of the member groups to which a specified user belongs. AccessBean used within the implementation:MemberGroupAccessBean,UserAccessBean.
    See Also:
    Serialized Form
    • Constructor Detail

      • ListMemberGroupsForUserCmdImpl

        public ListMemberGroupsForUserCmdImpl()
    • Method Detail

      • reset

        public void reset()
        Description copied from class: AbstractECTargetableCommand
        This method is called after a command has been executed. It is used to reset its states variables. After the call to reset, the command should be able to be executed again.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
        See Also:
        Command.reset()
      • setMemberGroupUsageTypeId

        public void setMemberGroupUsageTypeId(java.lang.Integer memberGroupUsageTypeId)
        Sets the member group usage type ID.
        Specified by:
        setMemberGroupUsageTypeId in interface ListMemberGroupsForUserCmd
        Parameters:
        memberGroupUsageTypeId - Member group usage type ID.
      • getMemberGroups

        public java.lang.String[] getMemberGroups()
        Gets the array of member group names.
        Specified by:
        getMemberGroups in interface ListMemberGroupsForUserCmd
        Returns:
        An array of member group names.
      • setStoreId

        public void setStoreId(java.lang.Integer storeId)
        Sets the store ID that is used to find member group from the database. This method is equivalent to setStoreIds(new Integer[] {storeId}).
        Specified by:
        setStoreId in interface ListMemberGroupsForUserCmd
        Parameters:
        storeId - The ID of the store. If null, defaults to getStoreId().
      • setStoreIds

        public void setStoreIds(java.lang.Integer[] storeIds)
        Sets the store IDs that are used to find member group from the database.
        Specified by:
        setStoreIds in interface ListMemberGroupsForUserCmd
        Parameters:
        storeIds - The ID of stores. If null, defaults to new Integer[] {getStoreId()}. Any null elements are changed to getStoreId().
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Checks to see if the command is ready to call. This method will return false if the user is null.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        true if the command is ready to go.
      • setFindByMemberGroupUsageTypeOnly

        public void setFindByMemberGroupUsageTypeOnly(boolean bFindByUsageTypeOnly)
        Set a flag to specify whether to find the member groups by MemberGroupUsageType only or to find by MemberGroupUsageType and Store. By default, the flag is set to false. (i.e. find by MemberGroupUsageType and Store)
        Specified by:
        setFindByMemberGroupUsageTypeOnly in interface ListMemberGroupsForUserCmd
        Parameters:
        true - if find the member groups by MemberGroupUsageType only
      • performExecuteOnCacheMiss

        public void performExecuteOnCacheMiss()
                                       throws ECException
        Performs the execution of the command without obtaining results from the cache. This method is intended to be called by the cache when the result is not already in the cache.
        Throws:
        ECException
      • setOutputProperties

        public void setOutputProperties(com.ibm.websphere.command.TargetableCommand aCachedCommand)
        Sets the output properties by copying results from a previously cached command.
        Specified by:
        setOutputProperties in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        setOutputProperties in class com.ibm.websphere.command.TargetableCommandImpl
        Parameters:
        aCachedCommand - the previously cached command.