Class PersonalizationResult

  • All Implemented Interfaces:

    public class PersonalizationResult
    extends Object
    implements Serializable
    A class to contain the result of a personalization, containing the list of content IDs as well as a changeType to indicate if a profile and/or a session was modified.
    See Also:
    Serialized Form
    • Field Detail


        public static final String ADDITIONAL_RESULT_INFO_IN_CONTROL_GROUP
        See Also:
        Constant Field Values
    • Constructor Detail

      • PersonalizationResult

        public PersonalizationResult()
      • PersonalizationResult

        public PersonalizationResult​(List<String> contentIds)
    • Method Detail

      • getContentIds

        public List<String> getContentIds()
        List of matching ids for current personalization
        the list of matching ids
      • setContentIds

        public void setContentIds​(List<String> contentIds)
      • getAdditionalResultInfos

        public Map<String,​Object> getAdditionalResultInfos()
        Useful open map to return additional result information to the client
        map of key/value pair for additional information, like: inControlGroup
      • setAdditionalResultInfos

        public void setAdditionalResultInfos​(Map<String,​Object> additionalResultInfos)
      • isInControlGroup

        public boolean isInControlGroup()
        Is the current personalization result in a control group ? Control group are used to identify a profile or a session that should not get personalized results, instead the current profile/session should get a specific result (usually the same for all peoples falling in control group) Note: it's for now the responsibility of the client to decide what to do when the current personalization is under control group.
        true in case current profile or session is in control group for the personalization.
      • setInControlGroup

        public void setInControlGroup​(boolean inControlGroup)
      • getChangeType

        public int getChangeType()
        Change code in case the personalization resolution modified the profile or the session Only used internally, and will not be serialized either for storage or response payload.
        change code
      • addChanges

        public void addChanges​(int changes)