com.ibm.commerce.membergroup.commands

Class CheckUserInMemberGroupCmdImpl

    • Field Detail

    • Constructor Detail

      • CheckUserInMemberGroupCmdImpl

        public CheckUserInMemberGroupCmdImpl()
    • Method Detail

      • setUser

        public void setUser(UserAccessBean user)
        Sets the information of the user of whom the checking will be performed on.
        Specified by:
        setUser in interface CheckUserInMemberGroupCmd
        Parameters:
        user - An instance of UserAccessBean that contains all the information of the user.
      • setMemberGroupName

        public void setMemberGroupName(java.lang.String memberGroupName)
        Sets the member group name.
        Specified by:
        setMemberGroupName in interface CheckUserInMemberGroupCmd
        Parameters:
        memberGroupName - Member group name.
      • setMemberGroupOwnerId

        public void setMemberGroupOwnerId(java.lang.Long memberGroupOwnerId)
        Sets the member group owner ID.
        Specified by:
        setMemberGroupOwnerId in interface CheckUserInMemberGroupCmd
        Parameters:
        memberGroupOwnerId - Member group owner ID.
      • setMemberGroupExplicitMembersFromCache

        public void setMemberGroupExplicitMembersFromCache(boolean memberGroupExplicitMembersFromCache)
        Sets the flag that indicates whether the explicit members of the member group should be retrieved from the SegmentCache object or not. Default value of this flag is false. It is not recommended to cache the members of the member group in the in-memory segment cache. This has been replaced with a cache entry for the command MemberGroupsCacheCmdImpl to cache the member groups per member in dynacache.
        Specified by:
        setMemberGroupExplicitMembersFromCache in interface CheckUserInMemberGroupCmd
        Parameters:
        memberGroupExplicitMembersFromCache - True if explicit members should be retrieved from the SegmentCache object; false otherwise.
      • getResult

        public boolean getResult()
        Gets the result of the checking on whether the specified user belongs to the member group or not.
        Specified by:
        getResult in interface CheckUserInMemberGroupCmd
        Returns:
        true if the specified user belongs to the member group; false otherwise.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Checks to see if the command is ready to call. This method will return false if both the member group name and the member group access bean are null or 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.
      • evaluate

        public boolean evaluate(java.lang.String variable,
                                java.lang.String operator,
                                java.lang.String value,
                                SimpleCondition.Qualifier[] qualifiers)
        Evaluate a simple condition. Simple conditions are persisted in XML format as follows:
        <simpleCondition>
        <variable name="gender"/>
        <operator name="="/>
        <value data="M"/>
        </simpleCondition>
        Specified by:
        evaluate in interface Evaluator
        Parameters:
        variable - The name of the variable.
        operator - The name of the operator.
        value - The data for the value.
        qualifiers - An array of qualifiers.
        Returns:
        true if the condition evaluates to true.
      • evaluate

        public boolean evaluate(java.lang.String name,
                                OpenCondition.Parameter[] parameters)
        Evaluate an open condition. Open conditions are persisted in XML format as follows:
        <openCondition name="testCondition">
        <parameter name="parameter1" value="100"/>
        </openCondition>
        Specified by:
        evaluate in interface Evaluator
        Parameters:
        name - The name of the open condition.
        parameters - An array of parameters.
        Returns:
        true if the condition evaluates to true.