Showing results for 
Search instead for 
Did you mean: 

CategoryHierarchyPopulator and CatalogOption

Former Member
0 Kudos

CatalogOption is an enum. So it cannot be extended. Then, if we want to extend the CategoryHierarchyPopulator using our custom CatalogOption, our new populator cannot extend from CategoryHierarchyPopulator.

This is the current implementation of the CategoryHierarchyPopulator:

 public void populate(final CategoryModel source, final CategoryHierarchyData target,
         final Collection<? extends CatalogOption> options, final PageOption page) throws ConversionException

Take a look to third argument. Nothing can extend from CatalogOption. I think it should be a spring bean.

View Entire Topic
Active Participant
0 Kudos


You are right , You could not extend this populator with enum other than CatalogOption ,it's really strange they put it like this , Enum is final by design and could not be extended .

an option is to forget about extending and write your own implementation of the interface PageablePopulator<SOURCE, TARGET, OPTION> and substitute the OPTION param with your own enum .