com.ibm.commerce.membergroup.commands

Interface CheckCurrentUserInMemberGroupCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, Evaluator, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    CheckCurrentUserInMemberGroupCmdImpl


    public interface CheckCurrentUserInMemberGroupCmd
    extends TaskCommand, Evaluator
    This interface must be implemented to provide a task command that checks to see if the current user belongs to a specified member group. Different implementations of this interface can be provided for different stores.
    • Field Detail

      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The name of the default implementation of this interface.
        See Also:
        Constant Field Values
    • Method Detail

      • setMemberGroupName

        void setMemberGroupName(java.lang.String memberGroupName)
        Sets the member group name. This parameter is required unless the member group access bean parameter is set.
        Parameters:
        memberGroupName - The name of the member group.
      • setMemberGroupOwnerId

        void setMemberGroupOwnerId(java.lang.Long memberGroupOwnerId)
        Sets the owner of the member group. If this parameter is not specified then owner of the current store will be used.
        Parameters:
        memberGroupOwnerId - The member id of the owner of the member group.
      • setMemberGroupAccessBean

        void setMemberGroupAccessBean(MemberGroupAccessBean memberGroupAccessBean)
        Sets the member group access bean. This parameter is required unless the member group name is specified. If you specify this parameter, then the conditions used to evaluate the implicit inclusion of users in a member group will be taken from the access bean.
        Parameters:
        memberGroupAccessBean - The member group access bean.
      • setMemberGroupCondition

        void setMemberGroupCondition(Condition memberGroupCondition)
        Sets the condition object. This parameter is optional. If you specify this parameter, then it will be used to evaluate the implicit inclusion of users in a member group.
        Parameters:
        memberGroupCondition - The condition used for implicit membership.
      • setMemberGroupExplicitMembersFromCache

        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.
        Parameters:
        memberGroupExplicitMembersFromCache - True if explicit members should be retrieved from the SegmentCache object; false otherwise.
      • getResult

        boolean getResult()
        Returns true if the current user belongs to the specified member group. Otherwise, it returns false. You must execute this task command before accessing this value.
        Returns:
        true if the current user belongs to the member group.