public Map < String , Set < ? > > getRegistry ( final IPerson user , final PortletRequest req ) { Map < String , Set < ? > > registry = new TreeMap < String , Set < ? > > ( ) ; // Empty, or the set of categories that are permitted to // be displayed in the Portlet Marketplace (portlet) final Set < PortletCategory > permittedCategories = getPermittedCategories ( req ) ; final Set < MarketplaceEntry > visiblePortlets = this . marketplaceService . browseableMarketplaceEntriesFor ( user , permittedCategories ) ; final Set < PortletCategory > visibleCategories = this . marketplaceService . browseableNonEmptyPortletCategoriesFor ( user , permittedCategories ) ; final Set < MarketplaceEntry > featuredPortlets = this . marketplaceService . featuredEntriesForUser ( user , permittedCategories ) ; registry . put ( "portlets" , visiblePortlets ) ; registry . put ( "categories" , visibleCategories ) ; registry . put ( "featured" , featuredPortlets ) ; return registry ; }
Returns a set of MarketplacePortletDefinitions . Supply a user to limit the set to only portlets the user can use . If user is null this will return all portlets . Setting user to null will superscede all other parameters .