cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r686370 - in /cxf/trunk: api/src/main/java/org/apache/cxf/ws/policy/ common/common/src/main/java/org/apache/cxf/configuration/spring/ parent/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ rt/ws/policy/src/main/java/org/apache...
Date Fri, 15 Aug 2008 21:13:32 GMT
Author: dkulp
Date: Fri Aug 15 14:13:31 2008
New Revision: 686370

URL: http://svn.apache.org/viewvc?rev=686370&view=rev
Log:
Update trunk to Spring 2.5.5 by default.
Register ws-securitypolicy builders

Added:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
  (with props)
    cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
  (with props)
    cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf.extension
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/StringBeanDefinitionParser.java
    cxf/trunk/parent/pom.xml
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java
    cxf/trunk/rt/ws/security/pom.xml

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java Fri
Aug 15 14:13:31 2008
@@ -30,6 +30,14 @@
  */
 public interface AssertionBuilderRegistry extends Registry<QName, AssertionBuilder>
{
     
+    
+    /**
+     * Register the builder for all qnames from the builders
+     * getKnownElements call.
+     * @param builder the builder to register 
+     */
+    void register(AssertionBuilder builder);
+    
     /**
      * Returns an assertion that is built using the specified xml element.
      * 

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
Fri Aug 15 14:13:31 2008
@@ -232,6 +232,7 @@
         mapElementToJaxbProperty(parent, bean, name, propertyName, null);
     }
    
+    @SuppressWarnings("deprecation")
     protected void mapElementToJaxbProperty(Element parent, 
                                             BeanDefinitionBuilder bean, 
                                             QName name,

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java
Fri Aug 15 14:13:31 2008
@@ -34,6 +34,7 @@
  */
 public abstract class AbstractFactoryBeanDefinitionParser extends AbstractBeanDefinitionParser
{
     
+    @SuppressWarnings("deprecation")
     @Override
     protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean)
{
         BeanDefinitionBuilder factoryBean = BeanDefinitionBuilder.rootBeanDefinition(getFactoryClass());

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/StringBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/StringBeanDefinitionParser.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/StringBeanDefinitionParser.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/StringBeanDefinitionParser.java
Fri Aug 15 14:13:31 2008
@@ -26,6 +26,7 @@
 
 public class StringBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
+    @SuppressWarnings("deprecation")
     @Override
     protected void doParse(Element element, BeanDefinitionBuilder builder) {
         builder.addConstructorArg(DOMUtils.getContent(element));

Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Fri Aug 15 14:13:31 2008
@@ -36,7 +36,7 @@
         <surefire.fork.mode>once</surefire.fork.mode>
         <surefire.format>brief</surefire.format>
         <surefire.usefile>false</surefire.usefile>
-	<surefire.fork.vmargs>-ea</surefire.fork.vmargs>
+        <surefire.fork.vmargs>-ea</surefire.fork.vmargs>
         <compile.flags>-Xlint:unchecked,deprecation,fallthrough,finally</compile.flags>
         <eclipse.outputDirectory>${basedir}/target/classes</eclipse.outputDirectory>
         <saaj.impl.groupId>com.sun.xml.messaging.saaj</saaj.impl.groupId>
@@ -48,8 +48,8 @@
         <jetty.version>6.1.9</jetty.version>
         <saaj.version>1.3</saaj.version>
         <saaj.impl.version>1.3</saaj.impl.version>
-        <spring.version>2.0.8</spring.version>
-        <spring.mock>spring-mock</spring.mock>
+        <spring.version>2.5.5</spring.version>
+        <spring.mock>spring-test</spring.mock>
         <wsdl4j.version>1.6.2</wsdl4j.version>
         <derby.version>10.2.2.0</derby.version>
         <activemq.version>4.1.1</activemq.version>
@@ -1159,10 +1159,10 @@
             </build>
         </profile>
         <profile>
-            <id>spring2.5</id>
+            <id>spring2.0</id>
             <properties>
-                <spring.version>2.5.4</spring.version>
-                <spring.mock>spring-test</spring.mock>
+                <spring.version>2.0.8</spring.version>
+                <spring.mock>spring-mock</spring.mock>
             </properties>
         </profile>
     </profiles>

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
Fri Aug 15 14:13:31 2008
@@ -129,6 +129,7 @@
         bean.setLazyInit(false);
     }
 
+    @SuppressWarnings("deprecation")
     private void loadImplementor(BeanDefinitionBuilder bean, String val) {
         if (!StringUtils.isEmpty(val)) {
             if (val.startsWith("#")) {

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java
Fri Aug 15 14:13:31 2008
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.policy;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
@@ -64,6 +65,13 @@
         return AssertionBuilderRegistry.class;
     }
     
+    public void register(AssertionBuilder builder) {
+        Collection<QName> names = builder.getKnownElements();
+        for (QName n : names) {
+            super.register(n, builder);
+        }
+    }
+
     public boolean isIgnoreUnknownAssertions() {
         return ignoreUnknownAssertions;
     }

Modified: cxf/trunk/rt/ws/security/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/pom.xml?rev=686370&r1=686369&r2=686370&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/pom.xml (original)
+++ cxf/trunk/rt/ws/security/pom.xml Fri Aug 15 14:13:31 2008
@@ -54,6 +54,12 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>javax.xml.soap</groupId>
             <artifactId>saaj-api</artifactId>
         </dependency>

Added: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java?rev=686370&view=auto
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
(added)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
Fri Aug 15 14:13:31 2008
@@ -0,0 +1,111 @@
+/**
+ * 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.ws.security.policy;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.ws.policy.AssertionBuilderRegistry;
+import org.apache.cxf.ws.policy.PolicyBuilder;
+import org.apache.cxf.ws.security.policy.builders.AlgorithmSuiteBuilder;
+import org.apache.cxf.ws.security.policy.builders.AsymmetricBindingBuilder;
+import org.apache.cxf.ws.security.policy.builders.ContentEncryptedElementsBuilder;
+import org.apache.cxf.ws.security.policy.builders.EncryptedElementsBuilder;
+import org.apache.cxf.ws.security.policy.builders.EncryptedPartsBuilder;
+import org.apache.cxf.ws.security.policy.builders.HttpsTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.InitiatorTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.IssuedTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.LayoutBuilder;
+import org.apache.cxf.ws.security.policy.builders.ProtectionTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.RecipientTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.RequiredElementsBuilder;
+import org.apache.cxf.ws.security.policy.builders.RequiredPartsBuilder;
+import org.apache.cxf.ws.security.policy.builders.SecureConversationTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.SecurityContextTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.SignedElementsBuilder;
+import org.apache.cxf.ws.security.policy.builders.SignedPartsBuilder;
+import org.apache.cxf.ws.security.policy.builders.SupportingTokens12Builder;
+import org.apache.cxf.ws.security.policy.builders.SupportingTokensBuilder;
+import org.apache.cxf.ws.security.policy.builders.SymmetricBindingBuilder;
+import org.apache.cxf.ws.security.policy.builders.TransportBindingBuilder;
+import org.apache.cxf.ws.security.policy.builders.TransportTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.Trust10Builder;
+import org.apache.cxf.ws.security.policy.builders.Trust13Builder;
+import org.apache.cxf.ws.security.policy.builders.UsernameTokenBuilder;
+import org.apache.cxf.ws.security.policy.builders.WSS10Builder;
+import org.apache.cxf.ws.security.policy.builders.WSS11Builder;
+import org.apache.cxf.ws.security.policy.builders.X509TokenBuilder;
+
+
+public class WSSecurityPolicyLoader {
+    Bus bus;
+    
+    @Resource(name = "cxf")
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
+    @PostConstruct
+    public void register() {
+        registerBuilders();
+        registerProviders();
+    }
+    public void registerBuilders() {
+        AssertionBuilderRegistry reg = bus.getExtension(AssertionBuilderRegistry.class);
+        if (reg == null) {
+            return;
+        }
+        PolicyBuilder pbuild = bus.getExtension(PolicyBuilder.class);
+        reg.register(new AlgorithmSuiteBuilder());
+        reg.register(new AsymmetricBindingBuilder(pbuild));
+        reg.register(new ContentEncryptedElementsBuilder());
+        reg.register(new EncryptedElementsBuilder());
+        reg.register(new EncryptedPartsBuilder());
+        reg.register(new HttpsTokenBuilder(pbuild));
+        reg.register(new InitiatorTokenBuilder(pbuild));
+        reg.register(new IssuedTokenBuilder(pbuild));
+        reg.register(new LayoutBuilder(pbuild));
+        reg.register(new ProtectionTokenBuilder(pbuild));
+        reg.register(new RecipientTokenBuilder(pbuild));
+        reg.register(new RequiredElementsBuilder());
+        reg.register(new RequiredPartsBuilder());
+        reg.register(new SecureConversationTokenBuilder(pbuild));
+        reg.register(new SecurityContextTokenBuilder());
+        reg.register(new SignedElementsBuilder());
+        reg.register(new SignedPartsBuilder());
+        reg.register(new SupportingTokens12Builder(pbuild));
+        reg.register(new SupportingTokensBuilder(pbuild));
+        reg.register(new SymmetricBindingBuilder(pbuild));
+        reg.register(new TransportBindingBuilder(pbuild));
+        reg.register(new TransportTokenBuilder(pbuild));
+        reg.register(new Trust10Builder());
+        reg.register(new Trust13Builder());
+        reg.register(new UsernameTokenBuilder(pbuild));
+        reg.register(new WSS10Builder(pbuild));
+        reg.register(new WSS11Builder(pbuild));
+        reg.register(new X509TokenBuilder(pbuild));
+    }
+    
+    public void registerProviders() {
+        //interceptor providers for all of the above
+    }
+
+}

Propchange: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml?rev=686370&view=auto
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
(added)
+++ cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
Fri Aug 15 14:13:31 2008
@@ -0,0 +1,30 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean id="org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader"
+         class="org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader">
+        <property name="bus" ref="cxf"/>
+    </bean>
+</beans>
\ No newline at end of file

Propchange: cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf-extension-ws-security.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf.extension
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf.extension?rev=686370&view=auto
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf.extension (added)
+++ cxf/trunk/rt/ws/security/src/main/resources/META-INF/cxf/cxf.extension Fri Aug 15 14:13:31
2008
@@ -0,0 +1 @@
+META-INF/cxf/cxf-extension-ws-security.xml
\ No newline at end of file



Mime
View raw message