public class BTGEvaluationContext extends Object implements Cloneable, Serializable
Defines a set of options that affect the way a segment is evaluated and how evaluation results are stored. There are three options:
BTGConditionEvaluationScope: For some conditions the data is available only when there's an active
session (ONLINE), e.g. pages visited by the user or products in the cart. Some data is always available, no matter if
there is an active session or not (OFFLINE). if you set this option to OFFLINE all conditions that can only deal
ONLINE data won't be evaluated. If you set it to OFFLINE all conditions will be evaluated. Default
is OFFLINE.BTGEvaluationMethod: A segment can be considered not fulfilled if one of its conditions evaluates to
false. That's because als conditions and rules and AND'ed together. So usually it's okay to stop evaluating when the
first condition has evaluated to false because the whole segment can't be fulfilled anymore. This is called the
OPTIMIZED mode.On the other hand for testing purposes you might want to have all the rules and conditions evaluated
no matter if one of them evaluates to false. This is called the FULL mode. Default is OPTIMIZEDBTGResultScope: The result for the evaluation of a segment may either be valid in the scope of a session
(SESSION) or be permanent across sessions (PERMANENT). Default is null. We have the following rules as to how what
scope we're actually using:
| Constructor and Description |
|---|
BTGEvaluationContext()
Initializes this object with:
BTGConditionEvaluationScope = ONLINE}
BTGEvaluationMethod = OPTIMIZES}
BTGResultScope = null, i.e. |
BTGEvaluationContext(BTGConditionEvaluationScope evaluationScope,
BTGEvaluationMethod evaluationMethod)
Initializes this object with given result scope and evaluation method and result scope null which means that the
above rules for determining the actual result scope apply.
|
BTGEvaluationContext(BTGConditionEvaluationScope evaluationScope,
BTGEvaluationMethod evaluationMethod,
BTGResultScope resultScope)
Initializes this object with the given parameters.
|
BTGEvaluationContext(BTGResultScope resultScope)
Initializes this object with given result scope amd:
BTGConditionEvaluationScope = ONLINE}
BTGEvaluationMethod = OPTIMIZES} |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
BTGEvaluationMethod |
getEvaluationMethod(BTGSegmentModel segment)
Get the evaluation method
|
BTGConditionEvaluationScope |
getEvaluationScope()
Get the evaluation scope
|
String |
getJaloSessionId()
Returns passed or current jalo session identifier.
|
BTGResultScope |
getResultScope(BTGSegmentModel segment,
UserModel user)
Get the result scope
|
void |
setEvaluationMethod(BTGEvaluationMethod evaluationMethod)
Set the evaluation method
|
void |
setEvaluationScope(BTGConditionEvaluationScope scope)
Set the evaluation scope
|
void |
setJaloSessionId(String jaloSessionId) |
void |
setResultScope(BTGResultScope resultScope)
Set the result scope
|
public BTGEvaluationContext()
BTGConditionEvaluationScope = ONLINE}BTGEvaluationMethod = OPTIMIZES}BTGResultScope = null, i.e. use default result scope of segmentpublic BTGEvaluationContext(BTGResultScope resultScope)
BTGConditionEvaluationScope = ONLINE}BTGEvaluationMethod = OPTIMIZES}public BTGEvaluationContext(BTGConditionEvaluationScope evaluationScope, BTGEvaluationMethod evaluationMethod)
public BTGEvaluationContext(BTGConditionEvaluationScope evaluationScope, BTGEvaluationMethod evaluationMethod, BTGResultScope resultScope)
public void setEvaluationScope(BTGConditionEvaluationScope scope)
BTGEvaluationContextpublic BTGConditionEvaluationScope getEvaluationScope()
BTGEvaluationContextpublic void setEvaluationMethod(BTGEvaluationMethod evaluationMethod)
BTGEvaluationContextpublic BTGEvaluationMethod getEvaluationMethod(BTGSegmentModel segment)
BTGEvaluationContextpublic void setResultScope(BTGResultScope resultScope)
BTGEvaluationContextpublic BTGResultScope getResultScope(BTGSegmentModel segment, UserModel user)
BTGEvaluationContextpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String getJaloSessionId()
public void setJaloSessionId(String jaloSessionId)
Copyright © 2017 SAP SE. All Rights Reserved.