Class PersonalizationServiceImpl
- java.lang.Object
-
- org.apache.unomi.services.impl.personalization.PersonalizationServiceImpl
-
- All Implemented Interfaces:
PersonalizationService
public class PersonalizationServiceImpl extends Object implements PersonalizationService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.unomi.api.services.PersonalizationService
PersonalizationService.Filter, PersonalizationService.PersonalizationRequest, PersonalizationService.PersonalizedContent, PersonalizationService.Target
-
-
Constructor Summary
Constructors Constructor Description PersonalizationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)
String
bestMatch(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)
Get the best match among a list of items, for the specified profile and sessionboolean
filter(Profile profile, Session session, PersonalizationService.PersonalizedContent personalizedContent)
Check if an item is visible for the specified profile and sessionPersonalizationResult
personalizeList(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)
Get a personalized list, filtered and sorted, based on the profile and sessionvoid
removePersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)
void
setBundleContext(org.osgi.framework.BundleContext bundleContext)
void
setProfileService(ProfileService profileService)
-
-
-
Method Detail
-
setProfileService
public void setProfileService(ProfileService profileService)
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
addPersonalizationStrategy
public void addPersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)
-
removePersonalizationStrategy
public void removePersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)
-
filter
public boolean filter(Profile profile, Session session, PersonalizationService.PersonalizedContent personalizedContent)
Description copied from interface:PersonalizationService
Check if an item is visible for the specified profile and session- Specified by:
filter
in interfacePersonalizationService
- Parameters:
profile
- The profilesession
- The sessionpersonalizedContent
- Personalized content, containing a list of filters- Returns:
- If the content is visible or not
-
bestMatch
public String bestMatch(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)
Description copied from interface:PersonalizationService
Get the best match among a list of items, for the specified profile and session- Specified by:
bestMatch
in interfacePersonalizationService
- Parameters:
profile
- The profilesession
- The sessionpersonalizationRequest
- Personalization request, containing the list of variants and the required strategy- Returns:
- The id of the best-matching variant
-
personalizeList
public PersonalizationResult personalizeList(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)
Description copied from interface:PersonalizationService
Get a personalized list, filtered and sorted, based on the profile and session- Specified by:
personalizeList
in interfacePersonalizationService
- Parameters:
profile
- The profilesession
- The sessionpersonalizationRequest
- Personalization request, containing the list of variants and the required strategy- Returns:
- List of ids, based on user profile
-
-