Author: dkulp
Date: Fri Apr 1 21:28:42 2011
New Revision: 1087905
URL: http://svn.apache.org/viewvc?rev=1087905&view=rev
Log:
[CXF-3434] coloc feature for blueprint
Patch from Johan Edstrom applied.
Added:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
(with props)
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
(with props)
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
(with props)
Modified:
cxf/trunk/rt/bindings/coloc/pom.xml
Modified: cxf/trunk/rt/bindings/coloc/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/pom.xml?rev=1087905&r1=1087904&r2=1087905&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/coloc/pom.xml (original)
+++ cxf/trunk/rt/bindings/coloc/pom.xml Fri Apr 1 21:28:42 2011
@@ -33,6 +33,14 @@
<dependencies>
<dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<scope>provided</scope>
Added:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java?rev=1087905&view=auto
==============================================================================
---
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
(added)
+++
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
Fri Apr 1 21:28:42 2011
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.binding.coloc.blueprint;
+
+import java.net.URL;
+import java.util.Set;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.apache.aries.blueprint.NamespaceHandler;
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.binding.coloc.feature.ColocFeature;
+import org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+
+public class ColocBPNamespaceHandler implements NamespaceHandler {
+
+ public URL getSchemaLocation(String s) {
+ return
getClass().getClassLoader().getResource("/schemas/blueprint/coloc-feature.xsd");
+ }
+
+ public Set<Class> getManagedClasses() {
+ return null;
+ }
+
+ public Metadata parse(Element element, ParserContext context) {
+ return new
SimpleBPBeanDefinitionParser(ColocFeature.class).parse(element, context);
+ }
+
+ public ComponentMetadata decorate(Node node, ComponentMetadata
componentMetadata, ParserContext context) {
+ return null;
+ }
+}
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml?rev=1087905&view=auto
==============================================================================
---
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
(added)
+++
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
Fri Apr 1 21:28:42 2011
@@ -0,0 +1,32 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <service interface="org.apache.aries.blueprint.NamespaceHandler">
+ <service-properties>
+ <entry key="osgi.service.blueprint.namespace"
value="http://cxf.apache.org/blueprint/binding/coloc"/>
+ </service-properties>
+ <bean
class="org.apache.cxf.binding.coloc.blueprint.ColocBPNamespaceHandler"/>
+ </service>
+</blueprint>
+
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/OSGI-INF/blueprint/coloc-feature.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd?rev=1087905&view=auto
==============================================================================
---
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
(added)
+++
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
Fri Apr 1 21:28:42 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<xs:schema xmlns="http://cxf.apache.org/blueprint/binding/coloc"
+ targetNamespace="http://cxf.apache.org/blueprint/binding/coloc"
+ xmlns:tns="http://cxf.apache.org/blueprint/binding/coloc"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+
+ <xs:element name="enableColoc">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
cxf/trunk/rt/bindings/coloc/src/main/resources/schemas/blueprint/coloc-feature.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml