Return-Path: X-Original-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B739C9879 for ; Tue, 3 Jan 2012 18:56:53 +0000 (UTC) Received: (qmail 76944 invoked by uid 500); 3 Jan 2012 18:56:53 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 76883 invoked by uid 500); 3 Jan 2012 18:56:53 -0000 Mailing-List: contact deltaspike-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-dev@incubator.apache.org Received: (qmail 76875 invoked by uid 99); 3 Jan 2012 18:56:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 18:56:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [87.128.223.163] (HELO mx01.openknowledge.de) (87.128.223.163) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 18:56:49 +0000 From: Arne Limburg To: "deltaspike-dev@incubator.apache.org" Date: Tue, 3 Jan 2012 19:57:34 +0100 Subject: AW: [DISCUSS] [DELTASPIKE-7] ExpressionActivated Thread-Topic: [DISCUSS] [DELTASPIKE-7] ExpressionActivated Thread-Index: AczKPO+/k85Bp8OCQNOga51RyMj/bQAC9Ntg References: <299BE16A-C9DB-4CCC-BEA6-2E2E56F25BB3@gmail.com> <7FA5BF1C-5FE3-410C-967E-C4FCDB18DE07@gmail.com> <1325598530.47377.YahooMailNeo@web27804.mail.ukl.yahoo.com> <1325611187.36475.YahooMailNeo@web27802.mail.ukl.yahoo.com> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Message-Id: <20120103185614.7023A164408@mx01.openknowledge.de> +1 for unifying all that stuff within one annotation. In addition we should think about supporting stereotypes. @ProductionActiva= ted then could be a stereotype with @Veto(...) on it. Cheers, Arne -----Urspr=FCngliche Nachricht----- Von: Gerhard Petracek [mailto:gerhard.petracek@gmail.com]=20 Gesendet: Dienstag, 3. Januar 2012 18:26 An: deltaspike-dev@incubator.apache.org Betreff: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated +1 for using projectStage, notInProjectStage (if needed),... explicitly. we can handle extensibility via the expression and custom implementations o= f ExpressionInterpreter (like we are using it in myfaces codi already). regards, gerhard 2012/1/3 Mark Struberg > Sitting together with Gerhard we had another idea. > > What do you think about unifying all this stuff > > > @Veto > > @Veto(projectStage=3DUnitTest.class) > > @Veto(notInProjectStage=3DProduction.class) > > @Veto(expression=3D"myproperty=3DmyValue") > > > (independent on the final name of @Veto) > > > > Instead of having projectStage and notInProjectStage as explicit=20 > annotation values, we could also move this to a string based=20 > expression For example > @Veto("projectStage=3DProduction") > The downside is that we would loose the type safety, thus I don't=20 > really like it. > > WDYT? > > LieGrue, > strub + os890 > > > > > ----- Original Message ----- > > From: Mark Struberg > > To: "deltaspike-dev@incubator.apache.org" < > deltaspike-dev@incubator.apache.org> > > Cc: > > Sent: Tuesday, January 3, 2012 2:48 PM > > Subject: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated > > > > Back then we also had a few discussions about this very topic. > > > > > > We did choose @ProjectStageActivated and @ExpressionActivated,=20 > > because > the beans > > are not 'actived by this expression' but 'only active on this=20 > > expression' > > > > Any @Alternative @ActivatedByExtression public class MyBean will=20 > > _not_ get automatically enabled, but _still_ needs the > > > entry in beans.xml! > > > > @ActivatedByExpression and @ActivatedByProjectStage (or the=20 > > equivalent > ..On...) > > imo implies a bit too much. > > > > Actually it's rather the other way around. A bean will _not_ get > _vetoed_ if > > the underlying expression resolves to 'true' ;) > > > > So I'm +0.8 for @ExpressionActivated and -0.2 against=20 > > @ActivatedByExpression. Imo the @ActivatedOnExpression is a bit=20 > > better, > so +0.2 > > for it. > > > > LieGrue, > > strub > > > > > > > > ----- Original Message ----- > >> From: Peter Muir > >> To: "deltaspike-dev@incubator.apache.org" > > > >> Cc: "deltaspike-dev@incubator.apache.org" > > > >> Sent: Tuesday, January 3, 2012 2:18 PM > >> Subject: Re: [DISCUSS] [DELTASPIKE-7] ExpressionActivated > >> > >> I would prefer @activatedonexpression, it fits better with the spec. > >> > >> As an alternative, what about @ActivatedByExpression which to me=20 > >> reads > > better. > >> > >> > >> -- > >> Pete Muir > >> http://in.relation.to/Bloggers/Pete > >> > >> On 2 Jan 2012, at 05:34, Jason Porter > > wrote: > >> > >>> +1 for @ActivatedOnExpression. It reads better which goes a long=20 > >>> way > > for > >> easy to use, self documenting code. > >>> > >>> Sent from my iPhone > >>> > >>> On Jan 1, 2012, at 17:57, Gerhard Petracek > >> wrote: > >>> > >>>> hi, > >>>> > >>>> please send your opinion about the name (@ActivatedOnExpression vs > >>>> @ExpressionActivated). > >>>> > >>>> thx & regards, > >>>> gerhard > >>>> > >>>> > >>>> > >>>> 2011/12/20 Christian Kaltepoth > >>>> > >>>>> +1 > >>>>> > >>>>> 2011/12/20 Marius Bogoevici > > : > >>>>>> +1 > >>>>>> > >>>>>> On 2011-12-19, at 8:28 AM, Gerhard Petracek wrote: > >>>>>> > >>>>>>> hi @ all, > >>>>>>> > >>>>>>> fyi: please check [1] before you answer. > >>>>>>> > >>>>>>> [2] provides a short introduction as well as the basic > > > >> usage. > >>>>>>> > >>>>>>> the basic concept: > >>>>>>> via the annotation @ExpressionActivated it's > > possible > >> to veto bean > >>>>>>> implementations based on the given expression. > >>>>>>> it's possible to change the supported syntax via > > an > >> optional > >>>>>>> ExpressionInterpreter. > >>>>>>> > >>>>>>> please send > >>>>>>> +1, +0 or -1 because... > >>>>>>> for the basic idea as well as the basic concept. > >>>>>>> if there are >basic< objections, please also add > > them > >> to [3] > >>>>>>> > >>>>>>> regards, > >>>>>>> gerhard > >>>>>>> > >>>>>>> [1] http://markmail.org/message/7yefspfuvtz4jvmp > >>>>>>> [2] > >>>>>>> > >>>>> > >> > > > https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage#CoreUsag > e-@ExpressionActivated > >>>>>>> [3] > >>>>>>> > >>>>> > >> > https://cwiki.apache.org/confluence/display/DeltaSpike/SE+Feature+Rank > ing > >>>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Christian Kaltepoth > >>>>> Blog: http://chkal.blogspot.com/ > >>>>> Twitter: http://twitter.com/chkal > >>>>> > >> > > >