Return-Path: Delivered-To: apmail-incubator-aries-commits-archive@minotaur.apache.org Received: (qmail 15953 invoked from network); 28 Sep 2010 20:07:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 20:07:19 -0000 Received: (qmail 97124 invoked by uid 500); 28 Sep 2010 19:07:19 -0000 Delivered-To: apmail-incubator-aries-commits-archive@incubator.apache.org Received: (qmail 97025 invoked by uid 500); 28 Sep 2010 19:07:19 -0000 Mailing-List: contact aries-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: aries-dev@incubator.apache.org Delivered-To: mailing list aries-commits@incubator.apache.org Received: (qmail 97017 invoked by uid 99); 28 Sep 2010 19:07:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 19:07:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 19:07:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1B6D3238890A; Tue, 28 Sep 2010 19:06:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1002327 - in /incubator/aries/trunk/blueprint/blueprint-cm/src/main: java/org/apache/aries/blueprint/compendium/cm/ resources/OSGI-INF/blueprint/ resources/org/apache/aries/blueprint/compendium/cm/ Date: Tue, 28 Sep 2010 19:06:57 -0000 To: aries-commits@incubator.apache.org From: gnodet@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100928190657.1B6D3238890A@eris.apache.org> Author: gnodet Date: Tue Sep 28 19:06:56 2010 New Revision: 1002327 URL: http://svn.apache.org/viewvc?rev=1002327&view=rev Log: [ARIES-429] Use a new version for the cm schema for the new attribute Added: incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd - copied, changed from r1002318, incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.1.0.xsd - copied, changed from r1002318, incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd Removed: incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd Modified: incubator/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml Modified: incubator/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java?rev=1002327&r1=1002326&r2=1002327&view=diff ============================================================================== --- incubator/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java (original) +++ incubator/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java Tue Sep 28 19:06:56 2010 @@ -79,7 +79,8 @@ import org.slf4j.LoggerFactory; public class CmNamespaceHandler implements NamespaceHandler { public static final String BLUEPRINT_NAMESPACE = "http://www.osgi.org/xmlns/blueprint/v1.0.0"; - public static final String BLUEPRINT_CM_NAMESPACE = "http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; + public static final String BLUEPRINT_CM_NAMESPACE_1_0 = "http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; + public static final String BLUEPRINT_CM_NAMESPACE_1_1 = "http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"; public static final String PROPERTY_PLACEHOLDER_ELEMENT = "property-placeholder"; public static final String MANAGED_PROPERTIES_ELEMENT = "managed-properties"; @@ -138,7 +139,13 @@ public class CmNamespaceHandler implemen } public URL getSchemaLocation(String namespace) { - return getClass().getResource("blueprint-cm.xsd"); + if (BLUEPRINT_CM_NAMESPACE_1_1.equals(namespace)) { + return getClass().getResource("blueprint-cm-1.1.0.xsd"); + } else if (BLUEPRINT_CM_NAMESPACE_1_0.equals(namespace)) { + return getClass().getResource("blueprint-cm-1.0.0.xsd"); + } else { + return null; + } } public Set getManagedClasses() { @@ -226,7 +233,8 @@ public class CmNamespaceHandler implemen Node node = nl.item(i); if (node instanceof Element) { Element e = (Element) node; - if (BLUEPRINT_CM_NAMESPACE.equals(e.getNamespaceURI())) { + if (BLUEPRINT_CM_NAMESPACE_1_0.equals(e.getNamespaceURI()) + || BLUEPRINT_CM_NAMESPACE_1_1.equals(e.getNamespaceURI())) { if (nodeNameEquals(e, DEFAULT_PROPERTIES_ELEMENT)) { if (defaultsRef != null) { throw new ComponentDefinitionException("Only one of " + DEFAULTS_REF_ATTRIBUTE + " attribute or " + DEFAULT_PROPERTIES_ELEMENT + " element is allowed"); @@ -257,7 +265,8 @@ public class CmNamespaceHandler implemen Node node = nl.item(i); if (node instanceof Element) { Element e = (Element) node; - if (BLUEPRINT_CM_NAMESPACE.equals(e.getNamespaceURI())) { + if (BLUEPRINT_CM_NAMESPACE_1_0.equals(e.getNamespaceURI()) + || BLUEPRINT_CM_NAMESPACE_1_1.equals(e.getNamespaceURI())) { if (nodeNameEquals(e, PROPERTY_ELEMENT)) { BeanProperty prop = context.parseElement(BeanProperty.class, enclosingComponent, e); props.addEntry(createValue(context, prop.getName(), String.class.getName()), prop.getValue()); @@ -325,7 +334,8 @@ public class CmNamespaceHandler implemen } else if (nodeNameEquals(e, Parser.REGISTRATION_LISTENER_ELEMENT)) { listeners.add(parser.parseRegistrationListener(e, factoryMetadata)); } - } else if (BLUEPRINT_CM_NAMESPACE.equals(e.getNamespaceURI())) { + } else if (BLUEPRINT_CM_NAMESPACE_1_0.equals(e.getNamespaceURI()) + || BLUEPRINT_CM_NAMESPACE_1_1.equals(e.getNamespaceURI())) { if (nodeNameEquals(e, MANAGED_COMPONENT_ELEMENT)) { MutableBeanMetadata managedComponent = context.parseElement(MutableBeanMetadata.class, null, e); generateIdIfNeeded(context, managedComponent); Modified: incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml?rev=1002327&r1=1002326&r2=1002327&view=diff ============================================================================== --- incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml (original) +++ incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/blueprint-cm.xml Tue Sep 28 19:06:56 2010 @@ -21,7 +21,12 @@ - + + + http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 + http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 + + Copied: incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd (from r1002318, incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd) URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd?p2=incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd&p1=incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd&r1=1002318&r2=1002327&rev=1002327&view=diff ============================================================================== --- incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm.xsd (original) +++ incubator/aries/trunk/blueprint/blueprint-cm/src/main/resources/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd Tue Sep 28 19:06:56 2010 @@ -45,18 +45,9 @@ - - - - - - - - - - @@ -49,7 +49,7 @@ - + @@ -57,7 +57,6 @@ -