You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "John Hjelmstad (JIRA)" <ji...@apache.org> on 2009/04/16 00:35:15 UTC

[jira] Resolved: (SHINDIG-969) Need convenience method to get all required features of a gadget.

     [ https://issues.apache.org/jira/browse/SHINDIG-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hjelmstad resolved SHINDIG-969.
------------------------------------

    Resolution: Fixed

Patch 4 committed, with one small mod ensuring no NullPointerException happens if Gadget.getAllFeatures() is called when gadgetFeatureRegistry not set.

> 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, patch3.txt, patch4.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.


Re: [jira] Resolved: (SHINDIG-969) Need convenience method to get all required features of a gadget.

Posted by John Hjelmstad <fa...@google.com>.
On Wed, Apr 15, 2009 at 5:17 PM, Adam Winer <aw...@google.com> wrote:

> John, maybe there should be an IllegalStateException if
> Gadget.getAllFeatures() is called without a feature registry attached?  I'm
> concerned this will hide bugs as it's coded here.


I like this idea best of the two. getAllFeatures taking a GFR seems to me to
obviate the point, that the framework provide all transitively-required
features rather than the caller (by requiring GFR injection). I'll fashion a
CL shortly to throw an exception in the null case.

Thanks,
John


>
> Alternatively, perhaps getAllFeatures() should take a
> GadgetFeatureRegistry,
> to avoid the state dependency?
>
> On Wed, Apr 15, 2009 at 3:35 PM, John Hjelmstad (JIRA) <jira@apache.org
> >wrote:
>
> >
> >     [
> >
> https://issues.apache.org/jira/browse/SHINDIG-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
> >
> > John Hjelmstad resolved SHINDIG-969.
> > ------------------------------------
> >
> >    Resolution: Fixed
> >
> > Patch 4 committed, with one small mod ensuring no NullPointerException
> > happens if Gadget.getAllFeatures() is called when gadgetFeatureRegistry
> not
> > set.
> >
> > > 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, patch3.txt, patch4.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.
> >
> >
>

Re: [jira] Resolved: (SHINDIG-969) Need convenience method to get all required features of a gadget.

Posted by Adam Winer <aw...@google.com>.
John, maybe there should be an IllegalStateException if
Gadget.getAllFeatures() is called without a feature registry attached?  I'm
concerned this will hide bugs as it's coded here.
Alternatively, perhaps getAllFeatures() should take a GadgetFeatureRegistry,
to avoid the state dependency?

On Wed, Apr 15, 2009 at 3:35 PM, John Hjelmstad (JIRA) <ji...@apache.org>wrote:

>
>     [
> https://issues.apache.org/jira/browse/SHINDIG-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> John Hjelmstad resolved SHINDIG-969.
> ------------------------------------
>
>    Resolution: Fixed
>
> Patch 4 committed, with one small mod ensuring no NullPointerException
> happens if Gadget.getAllFeatures() is called when gadgetFeatureRegistry not
> set.
>
> > 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, patch3.txt, patch4.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.
>
>