Return-Path: Delivered-To: apmail-hivemind-commits-archive@www.apache.org Received: (qmail 90000 invoked from network); 7 Nov 2006 14:12:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 14:12:07 -0000 Received: (qmail 74235 invoked by uid 500); 7 Nov 2006 14:12:18 -0000 Delivered-To: apmail-hivemind-commits-archive@hivemind.apache.org Received: (qmail 74226 invoked by uid 500); 7 Nov 2006 14:12:17 -0000 Mailing-List: contact commits-help@hivemind.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hivemind.apache.org Delivered-To: mailing list commits@hivemind.apache.org Received: (qmail 74217 invoked by uid 500); 7 Nov 2006 14:12:17 -0000 Delivered-To: apmail-jakarta-hivemind-cvs@jakarta.apache.org Received: (qmail 74214 invoked by uid 99); 7 Nov 2006 14:12:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 06:12:17 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 06:12:06 -0800 Received: from ajax.apache.org (localhost [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id DD08FD4972 for ; Tue, 7 Nov 2006 14:11:44 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: hivemind-cvs@jakarta.apache.org Date: Tue, 07 Nov 2006 14:11:44 -0000 Message-ID: <20061107141144.6853.97677@ajax.apache.org> Subject: [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-hivemind Wiki" for change notification. The following page has been changed by AchimHuegen: http://wiki.apache.org/jakarta-hivemind/NewAndNoteworthyFeaturesInAnnotationBranch ------------------------------------------------------------------------------ == Arbitrary Configuration Types == + Configurations are no longer restricted to lists. A configuration can be of any type whereas + collections will be the most common case. Like service points that separate between the + service interface and the service implementation a configuration has a type and an implementation + (called container) which is responsible for the aggregation of the configuration data. + To be backward compatible any configuration + defined in a xml module is by default of type java.util.List and uses an ArrayList as container + (there are some exceptions to this rule when dealing with unique attributes and mapped configurations). + + The container object is passed around to the different contributions which can add new + data to it. + + Example for a map based configuration: + {{{ + @Configuration(id = "FactoryConfig") + public Map getFactoryConfig() + { + return new HashMap(); + } + + @Contribution(configurationId = "FactoryConfig") + public void contributeToFactory(Map container) + { + container.put("map", "java.util.HashMap"); + container.put("collection", "java.util.ArrayList"); + container.put("inputStream", "java.io.ByteArrayInputStream"); + } + }}} + + The configuration type of an xml configuration point is optionally defined + by the container-class attribute (uuuh .. need some cleanup here). + The container implementation is defined by the root-element-class attribute + of a schema. An instance of the specified class is created and moved on the + top of the Element-Stack when a contribution is parsed. + + {{{ + + + + + ... + + + + + + + + + }}} + == Subsequent Schema Assignment == + The new element in module descriptors allows to assign schemas to + configuration points which have been defined in a non xml module. + {{{ + + + ... + + }}} + + It's mainly used to retain backward compatibility. Certain configurations are defined + in the core framework now which knows nothing about schemas. + + +