Class ProfilingManager

    • Method Detail

      • 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 or channel.getProperty.

        Specified by:
        propertiesChange in interface JPropertiesListener
        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 - the QueryHandler
        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 - the QueryResultSet to filter
        context - 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 search
        axes - 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, using MemberPreference.
        Parameters:
        mbr - the member for whom we do save
        cids - 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 axis
        axes - 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 categories
        axis - the axis
        Returns:
        the common categories
      • showRefineWithProfilingCategories

        public boolean showRefineWithProfilingCategories()