com.ibm.commerce.membergroup.commands

Class CheckCurrentUserInMemberGroupCmdImpl

    • Field Detail

    • Constructor Detail

      • CheckCurrentUserInMemberGroupCmdImpl

        public CheckCurrentUserInMemberGroupCmdImpl()
    • Method Detail

      • setMemberGroupOwnerId

        public void setMemberGroupOwnerId(java.lang.Long memberGroupOwnerId)
        Sets the member group owner ID.
        Specified by:
        setMemberGroupOwnerId in interface CheckCurrentUserInMemberGroupCmd
        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 CheckCurrentUserInMemberGroupCmd
        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 current user belongs to the member group or not.
        Specified by:
        getResult in interface CheckCurrentUserInMemberGroupCmd
        Returns:
        true if the current 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.
        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>
        Most of the processing of this method is done by the CheckUserInMemberGroupCmd task command.
        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>
        The processing of this method is done by the CheckUserInMemberGroupCmd task command.
        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.