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 voidaddPersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)StringbestMatch(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)Get the best match among a list of items, for the specified profile and sessionbooleanfilter(Profile profile, Session session, PersonalizationService.PersonalizedContent personalizedContent)Check if an item is visible for the specified profile and sessionPersonalizationResultpersonalizeList(Profile profile, Session session, PersonalizationService.PersonalizationRequest personalizationRequest)Get a personalized list, filtered and sorted, based on the profile and sessionvoidremovePersonalizationStrategy(org.osgi.framework.ServiceReference<PersonalizationStrategy> personalizationStrategyRef)voidsetBundleContext(org.osgi.framework.BundleContext bundleContext)voidsetProfileService(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:PersonalizationServiceCheck if an item is visible for the specified profile and session- Specified by:
filterin 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:PersonalizationServiceGet the best match among a list of items, for the specified profile and session- Specified by:
bestMatchin 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:PersonalizationServiceGet a personalized list, filtered and sorted, based on the profile and session- Specified by:
personalizeListin 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
-
-