Package com.jalios.jcms.profiling
Class ProfilingManager
- java.lang.Object
-
- com.jalios.jcms.profiling.ProfilingManager
-
- All Implemented Interfaces:
JPropertiesListener
public class ProfilingManager extends java.lang.Object implements JPropertiesListener
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFirstStepProfileFilter(QueryHandler qh, java.util.Map context)
This method is aimed to apply a first filter on Content instances to display.QueryResultSet
addSecondStepProfileFilter(QueryResultSet set, java.util.Map context)
This method is aimed to apply a second filter on Content instances to display.Category
getCategoryAxis(Category cat, java.util.Set<Category> axes)
The purpose of this method is to get the axis (among the given axes) of a given category.java.util.Set<Category>
getCommonCategories(java.util.Set<Category> catSet, Category axis)
The aim of this method is to retain only the categories of the given axis in the categories provided.static ProfilingManager
getInstance()
java.util.Set<Category>
getMemberProfilingCategories(Member mbr)
The purpose of this method is to return the member's chosen categories on his ESN profile.java.util.Set<Category>
getMemberProfilingUnexactCategories(Member mbr, java.util.Set<Category> axes)
The purpose of this method is to return the member's chosen categories on his ESN profile.java.util.Set<Category>
getProfilingAxes()
This method is aimed to return the profiling axes defined in property.void
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.void
saveMemberProfilingCategories(Member mbr, java.lang.String[] cids)
The purpose of this method is to save profiling category ids for a given member, usingMemberPreference
.boolean
showRefineWithProfilingCategories()
-
-
-
Method Detail
-
getInstance
public static ProfilingManager getInstance()
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListener
Invoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getProperties
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- Parameters:
properties
- the properties which have been submitted to change
-
addFirstStepProfileFilter
public void addFirstStepProfileFilter(QueryHandler qh, java.util.Map context)
This method is aimed to apply a first filter on Content instances to display. Here, we determine the axis with less categories involving the member. Then, we add those categories to the query handler to have the partially filtered results.- Parameters:
qh
- theQueryHandler
context
- the map containing useful informations
-
addSecondStepProfileFilter
public QueryResultSet addSecondStepProfileFilter(QueryResultSet set, java.util.Map context)
This method is aimed to apply a second filter on Content instances to display. Here, we iterate on the other axis to apply filter with their respective categories, if they are common with the member's profile.- Parameters:
set
- theQueryResultSet
to filtercontext
- the map containing useful informations
-
getProfilingAxes
public java.util.Set<Category> getProfilingAxes()
This method is aimed to return the profiling axes defined in property.- Returns:
- A new Set containing copies of the profiling axes. Modifications to the returned set will not affect the original profilingAxes field.
-
getMemberProfilingUnexactCategories
public java.util.Set<Category> getMemberProfilingUnexactCategories(Member mbr, java.util.Set<Category> axes)
The purpose of this method is to return the member's chosen categories on his ESN profile. It will also include all the descending and ascending categories of each category.- Parameters:
mbr
- the member for whom we do the searchaxes
- the profiling axes- Returns:
- the profiling categories of the member
-
getMemberProfilingCategories
public java.util.Set<Category> getMemberProfilingCategories(Member mbr)
The purpose of this method is to return the member's chosen categories on his ESN profile.- Parameters:
mbr
- the member for whom we do the search- Returns:
- the profiling categories of the member
-
saveMemberProfilingCategories
public void saveMemberProfilingCategories(Member mbr, java.lang.String[] cids)
The purpose of this method is to save profiling category ids for a given member, usingMemberPreference
.- Parameters:
mbr
- the member for whom we do savecids
- the category ids to save
-
getCategoryAxis
public Category getCategoryAxis(Category cat, java.util.Set<Category> axes)
The purpose of this method is to get the axis (among the given axes) of a given category.- Parameters:
cat
- the cat for which we want to retrieve the axisaxes
- the axes- Returns:
- the axis
-
getCommonCategories
public java.util.Set<Category> getCommonCategories(java.util.Set<Category> catSet, Category axis)
The aim of this method is to retain only the categories of the given axis in the categories provided.- Parameters:
catSet
- the initial set of categoriesaxis
- the axis- Returns:
- the common categories
-
showRefineWithProfilingCategories
public boolean showRefineWithProfilingCategories()
-
-