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 4ED08D1D1 for ; Thu, 28 Jun 2012 06:27:06 +0000 (UTC) Received: (qmail 23908 invoked by uid 500); 28 Jun 2012 06:27:04 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 23810 invoked by uid 500); 28 Jun 2012 06:27:01 -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 23755 invoked by uid 99); 28 Jun 2012 06:26:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2012 06:26:59 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=FREEMAIL_FORGED_REPLYTO,FSL_FREEMAIL_1,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [77.238.189.39] (HELO nm10.bullet.mail.ird.yahoo.com) (77.238.189.39) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 28 Jun 2012 06:26:50 +0000 Received: from [77.238.189.52] by nm10.bullet.mail.ird.yahoo.com with NNFMP; 28 Jun 2012 06:26:29 -0000 Received: from [212.82.108.244] by tm5.bullet.mail.ird.yahoo.com with NNFMP; 28 Jun 2012 06:26:29 -0000 Received: from [127.0.0.1] by omp1009.mail.ird.yahoo.com with NNFMP; 28 Jun 2012 06:26:29 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 772174.15810.bm@omp1009.mail.ird.yahoo.com Received: (qmail 62368 invoked by uid 60001); 28 Jun 2012 06:26:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1340864789; bh=31gp+17OlUoRpo4lIm78hxI2lH4S3Q4DWg5BjrtCU20=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LDa4cpn5k4tza8cU90rZbouPoWpYHw/Xazec4GjD6eI2/oB3Qzal150NYRA2jRniTRzAbnqCipo1MwUhPnBEFNSHUBH6d2Nr8VOMaUZPor8bXBbqKTMK8H5t4LIBENPsxNWTVX/URWWZghLqC+SIzk0gmbcZVsLBb0z9WN4Y1Xk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=U25OFln+xz1lpdJFoF02S9Et4sU985K0Sf3aROscfMq+K0Iunxlez9BDkbFX7ZOOzGraiRq/CVRlbhfapFvdDACMJeZdgWGZT7fUJ6/u5o2ujTyHMTMT03OaSA8s5JQ06YDBrkjosXK3KmR9IixJh8PB1UbAx+tVEmbrqJdAtUc=; X-YMail-OSG: hlZUdWIVM1lNdv34WJpmYksmGeHJvf204z3QVWbBIlDAiyT DVsh.50mkmqqMVjgM5AEDEUtt6IiQnd3fUGEO2cKFMiKBjtD30kxrJZ4MRjj Wpo5zwaLMgCVnEJDiug2SX5bU4P4qFlIvVqYiRK9FZ_VBX1LU0pYMZa9o6yf B95AujbLGw.iid8KjxNhSAJNlGwKq7YmPI4u4v71VJbl_BDhh.X0vGENWbzg QPmwjNq1Z8.oH3PvozbucVZ97BaLpyXAtAbAM7AySpik83rSH5ZlHKnYLLwF t5t33cKRdMbz2kwq6GMPZyHHqlFf_6N2dG6zOTu9ECdbvtHgmHSkkRde4ke0 XoYkYp7WYxNavyAjgK9gl8f_4DCqp4rrlJDYLdyeirXNJc1rf2euOLYsuOgp 0N7VA6Pamwp3zT449rWIJnXOkBOu4U1n2tg-- Received: from [80.108.122.184] by web171502.mail.ir2.yahoo.com via HTTP; Thu, 28 Jun 2012 07:26:29 BST X-Mailer: YahooMailWebService/0.8.118.349524 Message-ID: <1340864789.51324.YahooMailNeo@web171502.mail.ir2.yahoo.com> Date: Thu, 28 Jun 2012 07:26:29 +0100 (BST) From: Mark Struberg Reply-To: Mark Struberg Subject: MessageBuilder take3 To: deltaspike MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable ... and a take 4 will follow I'm sure :)=0A=0AHi!=0A=0AThe MessageBuilder i= s now working a bit better, but I'm still not satisfied.=0A=0AWhat I change= d so far:=A0=0A=0AHow it works:=0A=0AThere are 2 big areas in the game=0A= =0A1.) the MessageContext. This contains the core messaging functionality, = a fluent API and a configuration section.=0A=0A=0A=0A2.) the typesafe @Mess= ageBundle + MessageBundleInvocationHandler. There have been lot's of code i= nside the invocation handler which logically should rather be handled in th= e MessageContext. I now moved the whole ResourceBundle handling to the Mess= ageContext for example. Prior to that it had not been possible to create a = messagebundle text with the fluent api. I'm still not 100% happy with some = parts but the functionality works now at least.=0A=0A=0A=0AIt's now also a = bit easier to change the default behaviour of the MessageContext.=0AThe con= figuration consists off 3 parts=0A=0Aa.) the LocaleResolver (resolves en_US= , de_AT, ...). We do not inject a final Locale but only the Resolver, becau= se in e.g. JSF this information can be taken from the ViewRoot, the logged = in user, etc...=0A=0Ab.) the MessageInterpolator. The default one now uses = the String.format which allows lots of tweaks. If someone used the java.tex= t.MessageFormat in his project in the past, then he can simply change this = now.=0A=0Ac.) the MessageResolver. This is the location where messages will= be taken from the ResourceBundle. I needed to add an 'initialize' method w= hich is slightly 'out of tune' from my gut feeling. Maybe we should give it= a way to resolve the other configurations from the MessageContext? Please = review!=0A=0AI'll write another mail about the @DefaultConfiguration...=0A= =0ALieGrue,=0Astrub=0A