[ 
https://issues.apache.org/jira/browse/SHINDIG-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682738#action_12682738
 ] 

John Hjelmstad commented on SHINDIG-969:
----------------------------------------

Thanks Balaji, looks a lot cleaner. A few additional comments:

* IMO this method would be even more useful if it returned all dependencies in 
priority. While that makes searches/traversals relatively more costly, the 
resulting List size is typically small enough that it probably wouldn't matter.
* Please add a check (and test for same) that if setGadgetFeatureRegistry(...) 
isn't called, getAllFeatures() won't NPE.

Thanks!

> Need convenience method to get all required features of a gadget.
> -----------------------------------------------------------------
>
>                 Key: SHINDIG-969
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-969
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Java
>    Affects Versions: trunk
>            Reporter: Balaji Srinivasan
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: patch.txt, patch2.txt
>
>
> Right now if we want to find out all the required features for a gadget, we 
> have to do the following
> gadgetFeatureRegistry.getFeatures(gadget.getSpec().getModulePrefs().getFeatures().keySet())
> This means that any component that needs to get to the list of required 
> features, has to get access to the gadget feature registry.
> It would be nice to have a convenience method in Gadget that would give 
> that...
> ie gadget.getAllFeatures();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to