public class GravityRecommendationContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.List<FacetRequest<?>> |
facets |
GravityNameValue[] |
nameValues
The NameValues for the context.
|
int |
numberLimit
The maximum number of items in the result.
|
int |
recommendationTime
The time of the recommendation, the time when it will be shown to the end user (seconds in UNIX time).
|
java.util.HashMap<java.lang.String,java.lang.String[]> |
resultNameValueFilters |
java.lang.String[] |
resultNameValues
If not null, specifies which NameValues of the recommended items should be included in the result.
|
java.lang.String |
scenarioId
Scenarios are defined by the scenario management API.
|
Constructor and Description |
---|
GravityRecommendationContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
public int recommendationTime
public int numberLimit
public java.lang.String scenarioId
public GravityNameValue[] nameValues
The scenario can also specify that the result is not a list of items, but a list of values of item NameValues.
Name | Description |
---|---|
CurrentItemId | The identifier of the actual item, if the current page is an item page. |
ItemOnPage | Identifier of item displayed elsewhere on the page. They will be excluded from recommendation. This namevalue can be used multiple times to provide a list of items. |
CartItemId | Identifier of item in the current shopping cart. This can provide additional information to improve the quality of recommendation. This namevalue must be used as many times as many items the shopping cart contains. |
CartItemQuantity | The quantity of items in the current shopping cart, in the same order as CartItemId namevalues. |
Filter.* | If specified, only items having the specified name and value as metadata will be in the result. For example, the namevalue with name='Filter'.'CategoryId' and value='A' means that only items belonging to category 'A' will be in the result. |
public java.lang.String[] resultNameValues
public java.util.HashMap<java.lang.String,java.lang.String[]> resultNameValueFilters
public java.util.List<FacetRequest<?>> facets