You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Felix Meschberger <fm...@gmail.com> on 2010/10/18 09:33:41 UTC

Should Sling itself provide the Enum for SlingFilterScope ? (was: [jira] Created: (FELIX-2665) getting error about SlingFilterScope not being applicable for )

Hi,

Currently the SlingFilterScope is an scr-annotation-only Enum listing
two known scope values for filters registered with Sling.

As we are in the process of extending the potential values (and also
supporting multiple values) - in the current trunk and not yet released
- I wonder whether Sling should not provide an Enum of the possible
values and the scr-annotations should really refer to that enum.

WDYT ?

Regards
Felix

On 15.10.2010 21:55, Justin Edelson (JIRA) wrote:
> getting error about SlingFilterScope not being applicable for <T extends Enum>
> ------------------------------------------------------------------------------
> 
>                  Key: FELIX-2665
>                  URL: https://issues.apache.org/jira/browse/FELIX-2665
>              Project: Felix
>           Issue Type: Bug
>           Components: Maven SCR Plugin
>             Reporter: Justin Edelson
>          Attachments: FELIX-2665.patch
> 
> with a current trunk (r1022936) build of scr annotations (1.3.1-SNAPSHOT) and scr plugin (1.4.5-SNAPSHOT), building Sling errors out with an error about how SlingFilterScope isn't applicable for <T extends Enum>. Sorry - I accidentially closed the window where I'd pasted the error message, will add it in a comment later.
> 

Re: Should Sling itself provide the Enum for SlingFilterScope ?

Posted by Carsten Ziegeler <cz...@apache.org>.
Justin Edelson  wrote
> Personally, I'd like to see the Sling-specific bits factored out of both scr-annotations and scrplugin. I imagine that other projects (or just other SCR users) might be interested in a generic annotation extension mechanism as well.
> 
> That said, I haven't spent the time to see if this is feasible.
> 
I think this is already possible today, there is an interface to be
implemented by annotation providers and that's it. So from a technical
pov, factoring out is simply putting the stuff into separate jars.

Initially we decided to keep things simple and put everything into the
plugin and the scr annotations, so people using this stuff need just one
annotation dependency and the plugin.
If we now prefer to keep things separate, I'm fine with that.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Should Sling itself provide the Enum for SlingFilterScope ?

Posted by Justin Edelson <ju...@justinedelson.com>.

On Oct 18, 2010, at 8:31 AM, Carsten Ziegeler <cz...@apache.org> wrote:

> Felix Meschberger  wrote
>> Hi,
>> 
>> Currently the SlingFilterScope is an scr-annotation-only Enum listing
>> two known scope values for filters registered with Sling.
>> 
>> As we are in the process of extending the potential values (and also
>> supporting multiple values) - in the current trunk and not yet released
>> - I wonder whether Sling should not provide an Enum of the possible
>> values and the scr-annotations should really refer to that enum.
>> 
> I have no real preference here, though I would like to keep things as
> simple as possible.

Personally, I'd like to see the Sling-specific bits factored out of both scr-annotations and scrplugin. I imagine that other projects (or just other SCR users) might be interested in a generic annotation extension mechanism as well.

That said, I haven't spent the time to see if this is feasible.

Justin

> 
> As the enum is evaluated at build time, there is no difference from the
> user
> perspective: the annotation only supports the enum values from the time the
> annotations have been released.
> So I think we can keep things dependency free as it is right now.
> 
> But we should update the annotations to support latest Sling features :)
> 
> Carsten
> 
> -- 
> Carsten Ziegeler
> cziegeler@apache.org

Re: Should Sling itself provide the Enum for SlingFilterScope ?

Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger  wrote
> Hi,
> 
> Currently the SlingFilterScope is an scr-annotation-only Enum listing
> two known scope values for filters registered with Sling.
> 
> As we are in the process of extending the potential values (and also
> supporting multiple values) - in the current trunk and not yet released
> - I wonder whether Sling should not provide an Enum of the possible
> values and the scr-annotations should really refer to that enum.
> 
I have no real preference here, though I would like to keep things as
simple as possible.

As the enum is evaluated at build time, there is no difference from the
user
perspective: the annotation only supports the enum values from the time the
annotations have been released.
So I think we can keep things dependency free as it is right now.

But we should update the annotations to support latest Sling features :)

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org