com.ibm.commerce.membergroup.commands
Interface CheckUserInMemberGroupCmd
-
- 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:
- CheckUserInMemberGroupCmdImpl, GiftListCheckUserInMemberGroupCmdImpl, GiftRegistryCheckUserInMemberGroupCmdImpl
public interface CheckUserInMemberGroupCmd extends TaskCommand, Evaluator
This interface must be implemented to provide a task command that checks to see if a user belongs to a specified member group. Different implementations of this interface can be provided for different stores.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
Copyright.static java.lang.String
defaultCommandClassName
The name of the default implementation of this interface.static java.lang.String
Name
The name of this interface.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description boolean
evaluateMarketingPopulates()
This method evaluates the "marketingPopulates" condition.boolean
getResult()
Returns true if the current user belongs to the specified member group.void
setMemberGroupAccessBean(MemberGroupAccessBean memberGroupAccessBean)
Sets the member group access bean.void
setMemberGroupCondition(Condition condition)
Sets the condition object.void
setMemberGroupExplicitMembersFromCache(boolean memberGroupExplicitMembersFromCache)
Sets the flag that indicates whether the explicit members of the member group should be retrieved from theSegmentCache
object or not.void
setMemberGroupName(java.lang.String memberGroupName)
Sets the member group name.void
setMemberGroupOwnerId(java.lang.Long memberGroupOwnerId)
Sets the owner of the member group.void
setUser(UserAccessBean user)
Sets the user that you want to test.-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
-
-
-
Field Detail
-
COPYRIGHT
static final java.lang.String COPYRIGHT
Copyright.- See Also:
- Constant Field Values
-
Name
static final java.lang.String Name
The name of this interface.- See Also:
- Constant Field Values
-
defaultCommandClassName
static final java.lang.String defaultCommandClassName
The name of the default implementation of this interface.- See Also:
- Constant Field Values
-
-
Method Detail
-
setUser
void setUser(UserAccessBean user)
Sets the user that you want to test. This parameter is required.- Parameters:
user
- The user access bean.
-
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 condition)
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 theSegmentCache
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 commandMemberGroupsCacheCmdImpl
to cache the member groups per member in dynacache.- Parameters:
memberGroupExplicitMembersFromCache
- True if explicit members should be retrieved from theSegmentCache
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.
-
evaluateMarketingPopulates
boolean evaluateMarketingPopulates()
This method evaluates the "marketingPopulates" condition. It will check if the user has been added to the segment by a marketing activity.- Returns:
true
if the condition evaluates to true.
-
-