cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1071692 - in /cxf/trunk: api/src/main/java/org/apache/cxf/ws/policy/ api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/ api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressi...
Date Thu, 17 Feb 2011 16:50:56 GMT
Author: dkulp
Date: Thu Feb 17 16:50:55 2011
New Revision: 1071692

URL: http://svn.apache.org/viewvc?rev=1071692&view=rev
Log:
Update to leverage the Neethi AssertionBuilder and
AssertionBuilderFactory stuff directly and the Neethi PolicyEngine
instead of our own custom PolicyBuilder stuff.

Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilder.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyBuilder.java
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder.java
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/PrimitiveAssertionBuilder.java
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/policy/AddressingAssertionBuilder.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistryImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyBuilderImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MTOMAssertionBuilder.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust10Builder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust13Builder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java

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=1071692&r1=1071691&r2=1071692&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 Thu Feb 17 16:50:55 2011
@@ -19,34 +19,13 @@
 
 package org.apache.cxf.ws.policy;
 
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-import org.apache.cxf.extension.Registry;
-import org.apache.neethi.Assertion;
+import org.apache.neethi.AssertionBuilderFactory;
 
 /**
  * AssertionBuilderRegistry is used to manage AssertionBuilders and
  * create Assertion objects from given xml elements.
  */
-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.
-     * 
-     * @param element the element from which to build an Assertion.
-     * @return an Assertion that is built using the specified element.
-     */
-    Assertion build(Element element);
+public interface AssertionBuilderRegistry extends AssertionBuilderFactory {
     
     /**
      * Indicates if unknown assertions should simply be ignored.
@@ -62,7 +41,7 @@ public interface AssertionBuilderRegistr
      * If set to false, the policy engine will throw an exception upon
      * encountering an assertion type for which no AssertionBuilder
      * has been registered. 
-     * @param ignoreUnknownAssertions iff unknown assertions should be ignored
+     * @param ignoreUnknownAssertions if unknown assertions should be ignored
      */
     void setIgnoreUnknownAssertions(boolean ignoreUnknownAssertions);
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyBuilder.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyBuilder.java Thu Feb 17 16:50:55 2011
@@ -24,8 +24,6 @@ import java.io.InputStream;
 
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.w3c.dom.Element;
-
 import org.xml.sax.SAXException;
 
 import org.apache.neethi.Policy;
@@ -44,7 +42,7 @@ public interface PolicyBuilder {
      * @param element the element
      * @return the PolicyReference object constructed from the element
      */
-    PolicyReference getPolicyReference(Element element);
+    PolicyReference getPolicyReference(Object element);
     
     /**
      * Creates a Policy object from an DOM element.
@@ -52,7 +50,7 @@ public interface PolicyBuilder {
      * @param element the element
      * @return the Policy object constructed from the element
      */
-    Policy getPolicy(Element element);
+    Policy getPolicy(Object element);
     
     
     /**

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder.java Thu Feb 17 16:50:55 2011
@@ -36,13 +36,13 @@ import org.apache.cxf.common.classloader
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.jaxb.JAXBUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Constants;
+import org.apache.neethi.builders.AssertionBuilder;
 import org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder;
 
-public class JaxbAssertionBuilder<T> implements AssertionBuilder {
+public class JaxbAssertionBuilder<T> implements AssertionBuilder<Element> {
 
     private static final Logger LOG = LogUtils.getL7dLogger(JaxbAssertionBuilder.class);
     private Unmarshaller unmarshaller;

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/PrimitiveAssertionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/PrimitiveAssertionBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/PrimitiveAssertionBuilder.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/PrimitiveAssertionBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,11 +26,11 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class PrimitiveAssertionBuilder implements AssertionBuilder {
+public class PrimitiveAssertionBuilder implements AssertionBuilder<Element> {
 
     protected Bus bus;
     private QName knownElements[] = {};

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/policy/AddressingAssertionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/policy/AddressingAssertionBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/policy/AddressingAssertionBuilder.java (original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/policy/AddressingAssertionBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,18 +26,18 @@ import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.policy.builder.primitive.NestedPrimitiveAssertion;
 import org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 /**
  * 
  */
-public class AddressingAssertionBuilder implements AssertionBuilder {
+public class AddressingAssertionBuilder implements AssertionBuilder<Element> {
 
     private static final QName[] KNOWN_ELEMENTS = {
         MetadataConstants.ADDRESSING_ASSERTION_QNAME,

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=1071692&r1=1071691&r2=1071692&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 Thu Feb 17 16:50:55 2011
@@ -19,16 +19,14 @@
 
 package org.apache.cxf.ws.policy;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.HashSet;
 import java.util.ResourceBundle;
+import java.util.Set;
 import java.util.logging.Logger;
 
 import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 
-import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.i18n.BundleUtils;
@@ -36,26 +34,24 @@ import org.apache.cxf.common.i18n.Messag
 import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
-import org.apache.cxf.configuration.spring.MapProvider;
 import org.apache.cxf.extension.BusExtension;
-import org.apache.cxf.extension.RegistryImpl;
 import org.apache.cxf.ws.policy.builder.primitive.NestedPrimitiveAssertionBuilder;
-import org.apache.neethi.Assertion;
-import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.AssertionBuilderFactoryImpl;
+import org.apache.neethi.PolicyEngine;
+import org.apache.neethi.builders.AssertionBuilder;
 
 /**
  * 
  */
 @NoJSR250Annotations(unlessNull = "bus")
-public class AssertionBuilderRegistryImpl extends RegistryImpl<QName, AssertionBuilder> implements
+public class AssertionBuilderRegistryImpl extends AssertionBuilderFactoryImpl implements
     AssertionBuilderRegistry, BusExtension {
 
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(AssertionBuilderRegistryImpl.class);
     private static final Logger LOG 
         = LogUtils.getL7dLogger(AssertionBuilderRegistryImpl.class);
-    private static final int IGNORED_CACHE_SIZE = 10;
     private boolean ignoreUnknownAssertions = true; 
-    private List<QName> ignored = new ArrayList<QName>(IGNORED_CACHE_SIZE);
+    private Set<QName> ignored = new HashSet<QName>();
     private Bus bus;
     private boolean dynamicLoaded;
     
@@ -67,21 +63,15 @@ public class AssertionBuilderRegistryImp
         setBus(b);
     }
 
-    public AssertionBuilderRegistryImpl(Map<QName, AssertionBuilder> builders) {
-        super(builders);
-    }
-    public AssertionBuilderRegistryImpl(MapProvider<QName, AssertionBuilder> builders) {
-        super(builders.createMap());
-    }
-    public AssertionBuilderRegistryImpl(Bus b, MapProvider<QName, AssertionBuilder> builders) {
-        super(builders.createMap());
-        setBus(b);
-    }
     @Resource
     public final void setBus(Bus b) {
         bus = b;
         if (b != null) {
             b.setExtension(this, AssertionBuilderRegistry.class);
+            PolicyBuilder builder = b.getExtension(PolicyBuilder.class);
+            if (builder instanceof PolicyEngine) {
+                engine = (PolicyEngine)builder;
+            }
         }
     }
 
@@ -89,13 +79,6 @@ public class AssertionBuilderRegistryImp
         return AssertionBuilderRegistry.class;
     }
     
-    public void register(AssertionBuilder builder) {
-        QName names[] = builder.getKnownElements();
-        for (QName n : names) {
-            super.register(n, builder);
-        }
-    }
-
     public boolean isIgnoreUnknownAssertions() {
         return ignoreUnknownAssertions;
     }
@@ -111,43 +94,24 @@ public class AssertionBuilderRegistryImp
             if (c != null) {
                 c.getBeansOfType(AssertionBuilderLoader.class);
                 for (AssertionBuilder b : c.getBeansOfType(AssertionBuilder.class)) {
-                    register(b);
+                    registerBuilder(b);
                 }
             }
         }
     }
-    public Assertion build(Element element) {
-        return build(element, null);
-    }
-    public Assertion build(Element element, AssertionBuilderFactory factory) {
-        loadDynamic();
-        
-        AssertionBuilder builder;
-
-        QName qname = new QName(element.getNamespaceURI(), element.getLocalName());
-        builder = get(qname);
-
-        if (null == builder) {
-            Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
-            if (ignoreUnknownAssertions) {
-                boolean alreadyWarned = ignored.contains(qname);
-                if (alreadyWarned) {
-                    ignored.remove(qname);
-                } else if (ignored.size() == IGNORED_CACHE_SIZE) {
-                    ignored.remove(IGNORED_CACHE_SIZE - 1);
-                }
-                ignored.add(0, qname);
-                if (!alreadyWarned) {
-                    LOG.warning(m.toString());
-                }
-                
-                builder = new NestedPrimitiveAssertionBuilder(bus.getExtension(PolicyBuilder.class));
-            } else {
-                throw new PolicyException(m);
+    protected AssertionBuilder handleNoRegisteredBuilder(QName qname) {
+        if (ignoreUnknownAssertions) {
+            boolean alreadyWarned = ignored.contains(qname);
+            if (!alreadyWarned) {
+                ignored.add(qname);
+                Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
+                LOG.warning(m.toString());
             }
+            return new NestedPrimitiveAssertionBuilder(bus.getExtension(PolicyBuilder.class));
+        } else {
+            Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
+            throw new PolicyException(m);
         }
-
-        return builder.build(element, factory);
-
     }
+    
 }

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyBuilderImpl.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyBuilderImpl.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyBuilderImpl.java Thu Feb 17 16:50:55 2011
@@ -19,33 +19,10 @@
 
 package org.apache.cxf.ws.policy;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ResourceBundle;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import org.xml.sax.SAXException;
-
 import org.apache.cxf.Bus;
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.extension.BusExtension;
-import org.apache.cxf.helpers.DOMUtils;
-import org.apache.neethi.All;
-import org.apache.neethi.Assertion;
-import org.apache.neethi.Constants;
-import org.apache.neethi.ExactlyOne;
-import org.apache.neethi.Policy;
-import org.apache.neethi.PolicyOperator;
-import org.apache.neethi.PolicyReference;
-import org.apache.neethi.PolicyRegistry;
+import org.apache.neethi.PolicyEngine;
 
 
 /**
@@ -54,164 +31,42 @@ import org.apache.neethi.PolicyRegistry;
  * from DOM elements, but also from an input stream etc.
  */
 @NoJSR250Annotations
-public class PolicyBuilderImpl implements PolicyBuilder, BusExtension {
-    
-    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(PolicyBuilderImpl.class);
- 
-    private AssertionBuilderRegistry assertionBuilderRegistry;
+public class PolicyBuilderImpl extends PolicyEngine implements PolicyBuilder, BusExtension {
     private Bus bus;
    
     public PolicyBuilderImpl() {
     }
     
     public PolicyBuilderImpl(Bus theBus) {
-        bus = theBus;
-        assertionBuilderRegistry = theBus.getExtension(AssertionBuilderRegistry.class);
+        super(null);
+        setBus(theBus);
     }
 
     public Class<?> getRegistrationType() {
         return PolicyBuilder.class;
     }
     
-    public void setBus(Bus theBus) {
-        bus = theBus;
-    }
-    
-    public Bus getBus() {
-        return bus;
-    }
-    
-    public void setAssertionBuilderRegistry(AssertionBuilderRegistry abr) {
-        assertionBuilderRegistry = abr;        
-    }
-    
-    public AssertionBuilderRegistry getAssertionBuilderRegistry() {
-        return assertionBuilderRegistry;        
-    }
-
-
-    /**
-     * Creates a PolicyReference object from an InputStream.
-     * 
-     * @param inputStream the input stream
-     * @return the PolicyReference constructed from the input stream
-     */
-    public PolicyReference getPolicyReference(InputStream is)
-        throws IOException, ParserConfigurationException, SAXException {
-        Element element = DOMUtils.readXml(is).getDocumentElement();
-        return getPolicyReference(element);
-    }
-    
-    /**
-     * Creates a PolicyReference object from a DOM element.
-     * 
-     * @param element the element
-     * @return the PolicyReference object constructed from the element
-     */
-    public PolicyReference getPolicyReference(Element element) {
-        if (!Constants.ELEM_POLICY_REF.equals(element.getLocalName())) {
-            throw new PolicyException(new Message("NOT_A_POLICYREF_ELEMENT_EXC", BUNDLE));
-        }
-        synchronized (element) {
-            PolicyReference reference = new PolicyReference();
-            reference.setURI(element.getAttribute("URI"));
-            return reference;
-        }
-    }
-    
-    /**
-     * Creates a Policy object from an InputStream.
-     * 
-     * @param inputStream the input stream
-     * @return the Policy object constructed from the input stream
-     */
-    public Policy getPolicy(InputStream is) 
-        throws IOException, ParserConfigurationException, SAXException {
-        Element element = DOMUtils.readXml(is).getDocumentElement();
-        return getPolicy(element);
+    public void setAssertionBuilderRegistry(AssertionBuilderRegistry reg) {
+        factory = reg;
     }
     
-    /**
-     * Creates a Policy object from a DOM element.
-     * 
-     * @param element the element
-     * @retun the Policy object constructed from the element
-     */
-    public Policy getPolicy(Element element) {
-        return getPolicyOperator(element);
-    }
-    
-    private Policy getPolicyOperator(Element element) {
-        return (Policy) processOperationElement(element, new Policy());
-    }
-
-    private ExactlyOne getExactlyOneOperator(Element element) {
-        return (ExactlyOne) processOperationElement(element, new ExactlyOne());
-    }
-
-    private All getAllOperator(Element element) {
-        return (All) processOperationElement(element, new All());
-    }
-
-    private PolicyOperator processOperationElement(Element operationElement, PolicyOperator operator) {
-        synchronized (operationElement) {
-    
-            if (Constants.TYPE_POLICY == operator.getType()) {
-                Policy policyOperator = (Policy)operator;
-                QName key;
-    
-                NamedNodeMap nnm = operationElement.getAttributes();
-                for (int i = 0; i < nnm.getLength(); i++) {
-                    Node n = nnm.item(i);
-                    if (Node.ATTRIBUTE_NODE == n.getNodeType()) {
-                        String namespace = n.getNamespaceURI();    
-                        if (namespace == null) {
-                            key = new QName(n.getLocalName());
-    
-                        } else if (n.getPrefix() == null) {
-                            key = new QName(namespace, n.getLocalName());
-    
-                        } else {
-                            key = new QName(namespace, n.getLocalName(), n.getPrefix());
-                        }
-                        policyOperator.addAttribute(key, n.getNodeValue());
-                    }
-                }            
+    public final void setBus(Bus theBus) {
+        bus = theBus;
+        if (bus != null) {
+            AssertionBuilderRegistry reg = theBus.getExtension(AssertionBuilderRegistry.class);
+            if (reg != null) {
+                factory = reg;
             }
-    
-            
-            Element childElement;
-            for (Node n = operationElement.getFirstChild(); n != null; n = n.getNextSibling()) {
-                if (Node.ELEMENT_NODE != n.getNodeType()) {
-                    continue;
-                }
-                childElement = (Element)n;
-                String namespaceURI = childElement.getNamespaceURI();
-                String localName = childElement.getLocalName();
-    
-                QName qn = new QName(namespaceURI, localName);
-                if (PolicyConstants.isPolicyElem(qn)) {
-                    operator.addPolicyComponent(getPolicyOperator(childElement));
-                } else if (PolicyConstants.isAll(qn)) {
-                    operator.addPolicyComponent(getAllOperator(childElement));
-                } else if (PolicyConstants.isExactlyOne(qn)) {
-                    operator.addPolicyComponent(getExactlyOneOperator(childElement));
-                } else if (PolicyConstants.isPolicyRefElem(qn)) {
-                    operator.addPolicyComponent(getPolicyReference(childElement));                
-                } else if (null != assertionBuilderRegistry) {
-                    Assertion a = assertionBuilderRegistry.build(childElement);
-                    if (null != a) {
-                        operator.addPolicyComponent(a);
-                    }
-                }
+            org.apache.cxf.ws.policy.PolicyEngine e 
+                = bus.getExtension(org.apache.cxf.ws.policy.PolicyEngine.class);
+            if (e != null) {
+                this.setPolicyRegistry(e.getRegistry());
             }
-            return operator;
         }
     }
-
-    public PolicyRegistry getPolicyRegistry() {
-        PolicyEngine e = bus.getExtension(PolicyEngine.class);
-        return e == null ? null : e.getRegistry();
-    }
     
+    public Bus getBus() {
+        return bus;
+    }
+
 }

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MTOMAssertionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MTOMAssertionBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MTOMAssertionBuilder.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MTOMAssertionBuilder.java Thu Feb 17 16:50:55 2011
@@ -25,13 +25,13 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class MTOMAssertionBuilder implements AssertionBuilder {
+public class MTOMAssertionBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {MetadataConstants.MTOM_ASSERTION_QNAME};
     

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java (original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java Thu Feb 17 16:50:55 2011
@@ -80,12 +80,12 @@ public class NormalizeTest extends Asser
         PrimitiveAssertionBuilder ab = new PrimitiveAssertionBuilder();
         ab.setBus(bus);
        
-        abr.register(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityToken"), ab);
-        abr.register(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityHeader"), ab);
-        abr.register(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "Integrity"), ab);
-        abr.register(new QName("http://sample.org/Assertions", "A"), ab);
-        abr.register(new QName("http://sample.org/Assertions", "B"), ab);
-        abr.register(new QName("http://sample.org/Assertions", "C"), ab);
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityToken"), ab);
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityHeader"), ab);
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "Integrity"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "C"), ab);
         return builder;
     }
     

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java (original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java Thu Feb 17 16:50:55 2011
@@ -30,6 +30,8 @@ import org.apache.neethi.Constants;
 import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyComponent;
 import org.apache.neethi.PolicyReference;
+import org.apache.neethi.builders.AssertionBuilder;
+
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -44,9 +46,9 @@ public class PolicyBuilderTest extends A
         AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
         builder.setAssertionBuilderRegistry(abr);
         AssertionBuilder ab = new PrimitiveAssertionBuilder();
-        abr.register(new QName("http://sample.org/Assertions", "A"), ab);
-        abr.register(new QName("http://sample.org/Assertions", "B"), ab);
-        abr.register(new QName("http://sample.org/Assertions", "C"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "C"), ab);
     }
     
     @Test

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java (original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java Thu Feb 17 16:50:55 2011
@@ -35,6 +35,7 @@ import org.apache.cxf.ws.policy.attachme
 import org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -58,9 +59,9 @@ public class PolicyExtensionsTest extend
 
             AssertionBuilderRegistry abr = bus.getExtension(AssertionBuilderRegistry.class);
             assertNotNull(abr);
-            AssertionBuilder ab = abr.get(KNOWN);
+            AssertionBuilder ab = abr.getBuilder(KNOWN);
             assertNotNull(ab);
-            ab = abr.get(UNKNOWN);
+            ab = abr.getBuilder(UNKNOWN);
             assertNull(ab);
 
             PolicyInterceptorProviderRegistry pipr = bus
@@ -114,7 +115,7 @@ public class PolicyExtensionsTest extend
         }
     }
     
-    public static class TestAssertionBuilder implements AssertionBuilder {
+    public static class TestAssertionBuilder implements AssertionBuilder<Element> {
         
         QName knownElements[] = {KNOWN};
 

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java (original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java Thu Feb 17 16:50:55 2011
@@ -127,9 +127,9 @@ public class Wsdl11AttachmentPolicyProvi
         
         
         PrimitiveAssertionBuilder ab = new PrimitiveAssertionBuilder();
-        abr.register(new QName("http://cxf.apache.org/test/assertions", "A"), ab);
-        abr.register(new QName("http://cxf.apache.org/test/assertions", "B"), ab);
-        abr.register(new QName("http://cxf.apache.org/test/assertions", "C"), ab);
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "C"), ab);
         
         PolicyBuilderImpl pb = new PolicyBuilderImpl();
         bus.getExtension(PolicyBuilder.class);

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java (original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java Thu Feb 17 16:50:55 2011
@@ -62,17 +62,20 @@ public class NestedPrimitiveAssertionTes
         control = EasyMock.createNiceControl();
         
         bus = control.createMock(Bus.class);
+        bus.getExtension(AssertionBuilderRegistry.class);
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
+        bus.getExtension(org.apache.cxf.ws.policy.PolicyEngine.class);
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
         
         AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
         builder = new PolicyBuilderImpl();
-        builder.setBus(bus);
         builder.setAssertionBuilderRegistry(abr);
         
         NestedPrimitiveAssertionBuilder npab = new NestedPrimitiveAssertionBuilder();
         npab.setBus(bus);
         npab.setPolicyBuilder(builder);
         npab.setKnownElements(Collections.singletonList(TEST_NAME1));
-        abr.register(TEST_NAME1, npab);
+        abr.registerBuilder(TEST_NAME1, npab);
         
         PrimitiveAssertionBuilder pab = new PrimitiveAssertionBuilder();
         pab.setBus(bus);
@@ -80,10 +83,12 @@ public class NestedPrimitiveAssertionTes
         known.add(TEST_NAME2);
         known.add(TEST_NAME3);
         pab.setKnownElements(known);
-        abr.register(TEST_NAME2, pab);
-        abr.register(TEST_NAME3, pab); 
+        abr.registerBuilder(TEST_NAME2, pab);
+        abr.registerBuilder(TEST_NAME3, pab); 
         
         control.replay();
+        
+        builder.setBus(bus);
     }
     
     @After

Modified: 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=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java Thu Feb 17 16:50:55 2011
@@ -90,35 +90,35 @@ public final class WSSecurityPolicyLoade
             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());
-        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 KeyValueTokenBuilder());
-        reg.register(new WSS10Builder());
-        reg.register(new WSS11Builder());
-        reg.register(new X509TokenBuilder(pbuild));
+        reg.registerBuilder(new AlgorithmSuiteBuilder());
+        reg.registerBuilder(new AsymmetricBindingBuilder(pbuild));
+        reg.registerBuilder(new ContentEncryptedElementsBuilder());
+        reg.registerBuilder(new EncryptedElementsBuilder());
+        reg.registerBuilder(new EncryptedPartsBuilder());
+        reg.registerBuilder(new HttpsTokenBuilder(pbuild));
+        reg.registerBuilder(new InitiatorTokenBuilder(pbuild));
+        reg.registerBuilder(new IssuedTokenBuilder(pbuild));
+        reg.registerBuilder(new LayoutBuilder());
+        reg.registerBuilder(new ProtectionTokenBuilder(pbuild));
+        reg.registerBuilder(new RecipientTokenBuilder(pbuild));
+        reg.registerBuilder(new RequiredElementsBuilder());
+        reg.registerBuilder(new RequiredPartsBuilder());
+        reg.registerBuilder(new SecureConversationTokenBuilder(pbuild));
+        reg.registerBuilder(new SecurityContextTokenBuilder());
+        reg.registerBuilder(new SignedElementsBuilder());
+        reg.registerBuilder(new SignedPartsBuilder());
+        reg.registerBuilder(new SupportingTokens12Builder(pbuild));
+        reg.registerBuilder(new SupportingTokensBuilder(pbuild));
+        reg.registerBuilder(new SymmetricBindingBuilder(pbuild));
+        reg.registerBuilder(new TransportBindingBuilder(pbuild));
+        reg.registerBuilder(new TransportTokenBuilder(pbuild));
+        reg.registerBuilder(new Trust10Builder());
+        reg.registerBuilder(new Trust13Builder());
+        reg.registerBuilder(new UsernameTokenBuilder(pbuild));
+        reg.registerBuilder(new KeyValueTokenBuilder());
+        reg.registerBuilder(new WSS10Builder());
+        reg.registerBuilder(new WSS11Builder());
+        reg.registerBuilder(new X509TokenBuilder(pbuild));
         
         //add generic assertions for these known things to prevent warnings
         List<QName> others = Arrays.asList(new QName[] {
@@ -145,7 +145,7 @@ public final class WSSecurityPolicyLoade
             new QName(SP12Constants.SP_NS, SP12Constants.ENCRYPT_BEFORE_SIGNING),
             new QName(SP11Constants.SP_NS, SP11Constants.ENCRYPT_BEFORE_SIGNING),
         });
-        reg.register(new PrimitiveAssertionBuilder(others));
+        reg.registerBuilder(new PrimitiveAssertionBuilder(others));
     }
     
     public void registerProviders() {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AlgorithmSuiteBuilder.java Thu Feb 17 16:50:55 2011
@@ -25,7 +25,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
@@ -33,9 +32,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.AlgorithmSuite;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class AlgorithmSuiteBuilder implements AssertionBuilder {
+public class AlgorithmSuiteBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.ALGORITHM_SUITE, SP12Constants.ALGORITHM_SUITE};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/AsymmetricBindingBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -39,8 +38,9 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class AsymmetricBindingBuilder implements AssertionBuilder {
+public class AsymmetricBindingBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.ASYMMETRIC_BINDING, SP12Constants.ASYMMETRIC_BINDING};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ContentEncryptedElementsBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,15 +26,15 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.ContentEncryptedElements;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class ContentEncryptedElementsBuilder implements AssertionBuilder {
+public class ContentEncryptedElementsBuilder implements AssertionBuilder<Element> {
     public static final QName KNOWN_ELEMENTS[] 
         = {SP12Constants.CONTENT_ENCRYPTED_ELEMENTS};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedElementsBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,16 +26,16 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.SignedEncryptedElements;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class EncryptedElementsBuilder implements AssertionBuilder {
+public class EncryptedElementsBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.ENCRYPTED_ELEMENTS, SP12Constants.ENCRYPTED_ELEMENTS};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
@@ -31,9 +30,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.SignedEncryptedParts;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class EncryptedPartsBuilder implements AssertionBuilder {
+public class EncryptedPartsBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.ENCRYPTED_PARTS, SP12Constants.ENCRYPTED_PARTS};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/HttpsTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -32,6 +31,7 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.HttpsToken;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
 /**
@@ -47,7 +47,7 @@ import org.apache.neethi.AssertionBuilde
  * alternatives in the HttpsToken considering both cases whether the policy is normalized or not.
  * 
  */
-public class HttpsTokenBuilder implements AssertionBuilder {
+public class HttpsTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.HTTPS_TOKEN, SP12Constants.HTTPS_TOKEN};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/InitiatorTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -37,9 +36,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class InitiatorTokenBuilder implements AssertionBuilder {
+public class InitiatorTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.INITIATOR_TOKEN, SP12Constants.INITIATOR_TOKEN};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/IssuedTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -36,9 +35,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class IssuedTokenBuilder implements AssertionBuilder {
+public class IssuedTokenBuilder implements AssertionBuilder<Element> {
     private static final String WSA_NAMESPACE_SUB = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
     private static final String WSA_NAMESPACE = "http://www.w3.org/2005/08/addressing";
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/KeyValueTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -24,7 +24,6 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -32,8 +31,9 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.KeyValueToken;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class KeyValueTokenBuilder implements AssertionBuilder {
+public class KeyValueTokenBuilder implements AssertionBuilder<Element> {
     private static final String MS_NS = "http://schemas.microsoft.com/ws/2005/07/securitypolicy";
     private static final QName KNOWN_ELEMENTS[] 
         = {SP12Constants.KEYVALUE_TOKEN, new QName(MS_NS, "RsaToken")};

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/LayoutBuilder.java Thu Feb 17 16:50:55 2011
@@ -24,7 +24,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -32,8 +31,9 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.Layout;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class LayoutBuilder implements AssertionBuilder {
+public class LayoutBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.LAYOUT, SP12Constants.LAYOUT};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ProtectionTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -36,9 +35,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class ProtectionTokenBuilder implements AssertionBuilder {
+public class ProtectionTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.PROTECTION_TOKEN, SP12Constants.PROTECTION_TOKEN};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RecipientTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -36,9 +35,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class RecipientTokenBuilder implements AssertionBuilder {
+public class RecipientTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.RECIPIENT_TOKEN, SP12Constants.RECIPIENT_TOKEN};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredElementsBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,16 +26,16 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.RequiredElements;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class RequiredElementsBuilder implements AssertionBuilder {
+public class RequiredElementsBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.REQUIRED_ELEMENTS, SP12Constants.REQUIRED_ELEMENTS};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,15 +23,15 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.Header;
 import org.apache.cxf.ws.security.policy.model.RequiredParts;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class RequiredPartsBuilder implements AssertionBuilder {
+public class RequiredPartsBuilder implements AssertionBuilder<Element> {
         
     public Assertion build(Element element, AssertionBuilderFactory factory)
         throws IllegalArgumentException {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -33,9 +32,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SecureConversationTokenBuilder implements AssertionBuilder {
+public class SecureConversationTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SECURE_CONVERSATION_TOKEN, SP12Constants.SECURE_CONVERSATION_TOKEN};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -31,9 +30,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.SecurityContextToken;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SecurityContextTokenBuilder implements AssertionBuilder {
+public class SecurityContextTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SECURITY_CONTEXT_TOKEN, SP12Constants.SECURITY_CONTEXT_TOKEN};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedElementsBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,16 +26,16 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.SignedEncryptedElements;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SignedElementsBuilder implements AssertionBuilder {
+public class SignedElementsBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SIGNED_ELEMENTS, SP12Constants.SIGNED_ELEMENTS};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants;
@@ -31,9 +30,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.SignedEncryptedParts;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SignedPartsBuilder implements AssertionBuilder {
+public class SignedPartsBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SIGNED_PARTS, SP12Constants.SIGNED_PARTS};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.SPConstants.SupportTokenType;
@@ -38,9 +37,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SupportingTokens12Builder implements AssertionBuilder {
+public class SupportingTokens12Builder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP12Constants.SUPPORTING_TOKENS,
            SP12Constants.SIGNED_SUPPORTING_TOKENS,

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -39,9 +38,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SupportingTokensBuilder implements AssertionBuilder {
+public class SupportingTokensBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SUPPORTING_TOKENS, 
            SP11Constants.SIGNED_SUPPORTING_TOKENS,

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SymmetricBindingBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -38,9 +37,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class SymmetricBindingBuilder implements AssertionBuilder {
+public class SymmetricBindingBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.SYMMETRIC_BINDING, SP12Constants.SYMMETRIC_BINDING};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportBindingBuilder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -36,8 +35,9 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.TransportToken;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class TransportBindingBuilder implements AssertionBuilder {
+public class TransportBindingBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.TRANSPORT_BINDING, SP12Constants.TRANSPORT_BINDING};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/TransportTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -36,9 +35,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class TransportTokenBuilder implements AssertionBuilder {
+public class TransportTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] 
         = {SP11Constants.TRANSPORT_TOKEN, SP12Constants.TRANSPORT_TOKEN};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust10Builder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust10Builder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust10Builder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust10Builder.java Thu Feb 17 16:50:55 2011
@@ -23,14 +23,14 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.model.Trust10;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class Trust10Builder implements AssertionBuilder {
+public class Trust10Builder implements AssertionBuilder<Element> {
     public Trust10Builder() {
     }
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust13Builder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust13Builder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust13Builder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/Trust13Builder.java Thu Feb 17 16:50:55 2011
@@ -23,15 +23,15 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.model.Trust13;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class Trust13Builder implements AssertionBuilder {
+public class Trust13Builder implements AssertionBuilder<Element> {
 
     public Assertion build(Element element, AssertionBuilderFactory factory) {
         element = PolicyConstants.findPolicyElement(element);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -25,7 +25,6 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -34,9 +33,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.UsernameToken;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class UsernameTokenBuilder implements AssertionBuilder {
+public class UsernameTokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[]  
         = {SP11Constants.USERNAME_TOKEN, SP12Constants.USERNAME_TOKEN};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS10Builder.java Thu Feb 17 16:50:55 2011
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -31,9 +30,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.Wss10;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class WSS10Builder implements AssertionBuilder {
+public class WSS10Builder implements AssertionBuilder<Element> {
     private static final QName[] KNOWN_ELEMENTS 
         = {SP11Constants.WSS10, SP12Constants.WSS10};
     

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/WSS11Builder.java Thu Feb 17 16:50:55 2011
@@ -24,7 +24,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
@@ -32,9 +31,10 @@ import org.apache.cxf.ws.security.policy
 import org.apache.cxf.ws.security.policy.model.Wss11;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
+import org.apache.neethi.builders.AssertionBuilder;
 
 
-public class WSS11Builder implements AssertionBuilder {
+public class WSS11Builder implements AssertionBuilder<Element> {
     private static final QName[] KNOWN_ELEMENTS 
         = {SP11Constants.WSS11, SP12Constants.WSS11};
 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java?rev=1071692&r1=1071691&r2=1071692&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/X509TokenBuilder.java Thu Feb 17 16:50:55 2011
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.ws.policy.AssertionBuilder;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.security.policy.SP11Constants;
@@ -36,8 +35,9 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.Assertion;
 import org.apache.neethi.AssertionBuilderFactory;
 import org.apache.neethi.Policy;
+import org.apache.neethi.builders.AssertionBuilder;
 
-public class X509TokenBuilder implements AssertionBuilder {
+public class X509TokenBuilder implements AssertionBuilder<Element> {
     private static final QName KNOWN_ELEMENTS[] = {SP11Constants.X509_TOKEN, SP12Constants.X509_TOKEN};
     
     



Mime
View raw message