axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r428983 - /webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/
Date Sat, 05 Aug 2006 10:36:10 GMT
Author: sanka
Date: Sat Aug  5 03:36:08 2006
New Revision: 428983

URL: http://svn.apache.org/viewvc?rev=428983&view=rev
Log: (empty)

Added:
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AbstractSecurityAssertion.java
Removed:
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/PolicyEngineData.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RootPolicyEngineData.java
Modified:
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmSuite.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmWrapper.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AsymmetricBinding.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Binding.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/EncryptionToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Header.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/HttpsToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/InitiatorToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Layout.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/ProtectionToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RecipientToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignatureToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedElements.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedParts.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SupportingToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricAsymmetricBindingBase.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricBinding.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Token.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TokenWrapper.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportBinding.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/UsernameToken.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Wss10.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/X509Token.java

Added: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AbstractSecurityAssertion.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AbstractSecurityAssertion.java?rev=428983&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AbstractSecurityAssertion.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AbstractSecurityAssertion.java Sat Aug  5 03:36:08 2006
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.ws.security.policy.model;
+
+import org.apache.neethi.Assertion;
+
+public abstract class AbstractSecurityAssertion implements Assertion{
+
+    private boolean isOptional;
+
+    public boolean isOptional() {
+        return isOptional;
+    }
+    
+    public void setOptional(boolean isOptional) {
+        this.isOptional = isOptional;
+    }
+
+    public short getType() {
+        return Assertion.ASSERTION;
+    }    
+
+}

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmSuite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmSuite.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmSuite.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmSuite.java Sat Aug  5 03:36:08 2006
@@ -15,10 +15,17 @@
  */
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
 import org.apache.ws.security.policy.Constants;
-import org.apache.ws.security.policy.WSSPolicyException;
 
-public class AlgorithmSuite extends PolicyEngineData {
+public class AlgorithmSuite extends AbstractSecurityAssertion {
     
     private String symmetricSignature = Constants.HMAC_SHA1;
     
@@ -54,6 +61,8 @@
     
     private String xPath;
     
+    private List algorithmSuites;
+        
 //    public AlgorithmSuite (String algoSuite) throws WSSPolicyException {
 //        this.setAlgorithmSuite(algoSuite);
 //    }
@@ -79,7 +88,7 @@
      * @see Constants#ALGO_SUITE_TRIPLE_DES_SHA256
      * @see Constants#ALGO_SUITE_TRIPLE_DES_SHA256_RSA15
      */
-    public void setAlgorithmSuite(String algoSuite) throws WSSPolicyException {
+    public void setAlgorithmSuite(String algoSuite) {
         //TODO: Optimize this :-)
         if(Constants.ALGO_SUITE_BASIC256.equals(algoSuite)) {
             this.digest = Constants.SHA1;
@@ -210,7 +219,7 @@
             this.signatureKeyDerivation = Constants.P_SHA1_L192;
             this.minimumSymmetricKeyLength = 192;
         } else {
-            throw new WSSPolicyException("Invalid algorithm suite : " + algoSuite);
+//            throw new WSSPolicyException("Invalid algorithm suite : " + algoSuite);
         }
     }
 
@@ -315,7 +324,7 @@
     /**
      * @param c14n The c14n to set.
      */
-    public void setC14n(String c14n) throws WSSPolicyException {
+    public void setC14n(String c14n) {
             this.c14n = c14n;
     }
 
@@ -329,7 +338,7 @@
     /**
      * @param soapNormalization The soapNormalization to set.
      */
-    public void setSoapNormalization(String soapNormalization) throws WSSPolicyException {
+    public void setSoapNormalization(String soapNormalization) {
             this.soapNormalization = soapNormalization;
     }
 
@@ -343,7 +352,7 @@
     /**
      * @param strTransform The strTransform to set.
      */
-    public void setStrTransform(String strTransform) throws WSSPolicyException {
+    public void setStrTransform(String strTransform) {
             this.strTransform = strTransform;
     }
 
@@ -357,8 +366,30 @@
     /**
      * @param path The xPath to set.
      */
-    public void setXPath(String path) throws WSSPolicyException{
+    public void setXPath(String path) {
         xPath = path;
     }
     
+    public List getOptions() {
+        return algorithmSuites;
+    }
+    
+    public void addOption(AlgorithmSuite algorithmSuite) {
+        if (algorithmSuites == null) {
+            algorithmSuites = new ArrayList();
+        }
+        algorithmSuites.add(algorithmSuite);
+    }
+
+    public QName getName() {
+        return Constants.ALGORITHM_SUITE;
+    }
+    
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+    
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmWrapper.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmWrapper.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AlgorithmWrapper.java Sat Aug  5 03:36:08 2006
@@ -16,10 +16,8 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
 public interface AlgorithmWrapper {
 
-    public void setAlgorithmSuite(AlgorithmSuite algorithmSuite) throws WSSPolicyException;
+    public void setAlgorithmSuite(AlgorithmSuite algorithmSuite);
     
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AsymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AsymmetricBinding.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AsymmetricBinding.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/AsymmetricBinding.java Sat Aug  5 03:36:08 2006
@@ -16,12 +16,25 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
 public class AsymmetricBinding extends SymmetricAsymmetricBindingBase {
     
     private InitiatorToken initiatorToken;
     
     private RecipientToken recipientToken;
     
+    private List asymmetricBindings = new  ArrayList();
+    
     /**
      * @return Returns the initiatorToken.
      */
@@ -46,6 +59,24 @@
     public void setRecipientToken(RecipientToken recipientToken) {
         this.recipientToken = recipientToken;
     }
+    
+    public Iterator getOptions() {
+        return asymmetricBindings.iterator();
+    }
+    
+    public void addOption(AsymmetricBinding asymmetricBinding) {
+        asymmetricBindings.add(asymmetricBinding);
+    }
+    public QName getName() {
+        return Constants.ASYMMETRIC_BINDING;
+    }
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }
+    
     
     
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Binding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Binding.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Binding.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Binding.java Sat Aug  5 03:36:08 2006
@@ -16,14 +16,14 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
-public class Binding extends PolicyEngineData implements AlgorithmWrapper {
+public abstract class Binding extends AbstractSecurityAssertion implements AlgorithmWrapper {
 
     private AlgorithmSuite algorithmSuite;
     private boolean includeTimestamp;
     private Layout layout = new Layout();
-    
+    private SupportingToken signedSupportingToken;
+    private SupportingToken signedEndorsingSupportingTokens;
+        
     /**
      * @return Returns the algorithmSuite.
      */
@@ -62,7 +62,28 @@
     /**
      * @param layout The layout to set.
      */
-    public void setLayout(Layout layout) throws WSSPolicyException {
+    public void setLayout(Layout layout) {
         this.layout = layout;
     }
+
+    public SupportingToken getSignedEndorsingSupportingTokens() {
+        return signedEndorsingSupportingTokens;
+    }
+
+    public void setSignedEndorsingSupportingTokens(
+            SupportingToken signedEndorsingSupportingTokens) {
+        this.signedEndorsingSupportingTokens = signedEndorsingSupportingTokens;
+    }
+
+    public SupportingToken getSignedSupportingToken() {
+        return signedSupportingToken;
+    }
+
+    public void setSignedSupportingToken(SupportingToken signedSupportingToken) {
+        this.signedSupportingToken = signedSupportingToken;
+    }
+    
+    
+    
+    
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/EncryptionToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/EncryptionToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/EncryptionToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/EncryptionToken.java Sat Aug  5 03:36:08 2006
@@ -16,9 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
-public class EncryptionToken extends PolicyEngineData implements TokenWrapper {
+public class EncryptionToken implements TokenWrapper {
 
     private Token encryptionToken;
 
@@ -39,7 +37,7 @@
     /* (non-Javadoc)
      * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
      */
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok)  {
         this.setEncryptionToken(tok);
     }
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Header.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Header.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Header.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Header.java Sat Aug  5 03:36:08 2006
@@ -16,7 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-public class Header extends PolicyEngineData {
+public class Header {
 
     private String name;
     private String namespace;

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/HttpsToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/HttpsToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/HttpsToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/HttpsToken.java Sat Aug  5 03:36:08 2006
@@ -16,13 +16,26 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
 /**
  *
  * @author Ruchith Fernando (ruchith.fernando@gmail.com)
  */
-public class HttpsToken extends PolicyEngineData {
+public class HttpsToken extends Token {
 
     private Token httpsToken;
+    
+    private List httpsTokens = new ArrayList();
 
     /**
      * @return Returns the httpsToken.
@@ -37,6 +50,27 @@
     public void setHttpsToken(Token httpsToken) {
         this.httpsToken = httpsToken;
     }
+    
+    public Iterator getOptions() {
+        return httpsTokens.iterator();
+    }
+    
+    public void addOption(HttpsToken httpsToken) {
+        httpsTokens.add(httpsToken);
+    }
+
+    public QName getName() {
+        return Constants.HTTPS_TOKEN;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }
+    
     
 
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/InitiatorToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/InitiatorToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/InitiatorToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/InitiatorToken.java Sat Aug  5 03:36:08 2006
@@ -16,9 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
-public class InitiatorToken extends PolicyEngineData implements TokenWrapper {
+public class InitiatorToken implements TokenWrapper {
     
     private Token initiatorToken;
 
@@ -39,7 +37,7 @@
     /* (non-Javadoc)
      * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
      */
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok) {
         this.setInitiatorToken(tok);
     }
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Layout.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Layout.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Layout.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Layout.java Sat Aug  5 03:36:08 2006
@@ -16,12 +16,21 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
 import org.apache.ws.security.policy.Constants;
-import org.apache.ws.security.policy.WSSPolicyException;
 
-public class Layout extends PolicyEngineData {
+public class Layout extends AbstractSecurityAssertion  {
    
     private String value = Constants.LAYOUT_LAX;
+    
+    private List layouts;
 
     /**
      * @return Returns the value.
@@ -33,16 +42,37 @@
     /**
      * @param value The value to set.
      */
-    public void setValue(String value) throws WSSPolicyException{
+    public void setValue(String value) {
         if(Constants.LAYOUT_LAX.equals(value) ||
                 Constants.LAYOUT_STRICT.equals(value) ||
                 Constants.LAYOUT_LAX_TIMESTAMP_FIRST.equals(value) ||
                 Constants.LAYOUT_LAX_TIMESTAMP_LAST.equals(value)) {
                  this.value = value;
              } else {
-                 throw new WSSPolicyException("Incorrect layout value : " + value);
+//                 throw new WSSPolicyException("Incorrect layout value : " + value);
              }
     }
     
+    public List getOptions() {
+        return layouts;
+    }
     
+    public void addOption(Layout layout) {
+        if (layouts == null) {
+            layouts = new ArrayList();
+        }
+        layouts.add(layout);
+    }
+
+    public QName getName() {
+        return Constants.LAYOUT;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/ProtectionToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/ProtectionToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/ProtectionToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/ProtectionToken.java Sat Aug  5 03:36:08 2006
@@ -16,11 +16,22 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
-public class ProtectionToken extends PolicyEngineData implements TokenWrapper {
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
+public class ProtectionToken extends AbstractSecurityAssertion implements TokenWrapper {
     
     private Token protectionToken;
+    
+    private List protectionTokens = new ArrayList();
 
     /**
      * @return Returns the protectionToken.
@@ -36,8 +47,30 @@
         this.protectionToken = protectionToken;
     }
 
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok) {
         this.setProtectionToken(tok);
+    }
+    
+    public Iterator getOptions() {
+        return protectionTokens.iterator();
+    }
+    
+    public void addOption(ProtectionToken protectionToken) {
+        protectionTokens.add(protectionToken);
+    }
+
+    public QName getName() {
+        return Constants.PROTECTION_TOKEN;
+    }
+
+    public PolicyComponent normalize() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO Auto-generated method stub
+        
     }
     
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RecipientToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RecipientToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RecipientToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/RecipientToken.java Sat Aug  5 03:36:08 2006
@@ -16,9 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
-public class RecipientToken extends PolicyEngineData implements TokenWrapper {
+public class RecipientToken implements TokenWrapper {
     
     private Token receipientToken;
 
@@ -39,7 +37,7 @@
     /* (non-Javadoc)
      * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
      */
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok) {
         this.setReceipientToken(tok);
     }
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignatureToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignatureToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignatureToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignatureToken.java Sat Aug  5 03:36:08 2006
@@ -16,9 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
-public class SignatureToken extends PolicyEngineData implements TokenWrapper {
+public class SignatureToken implements TokenWrapper {
 
     private Token signatureToken;
 
@@ -39,7 +37,7 @@
     /* (non-Javadoc)
      * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
      */
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok) {
         this.setSignatureToken(tok);
     }
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedElements.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedElements.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedElements.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedElements.java Sat Aug  5 03:36:08 2006
@@ -18,7 +18,14 @@
 
 import java.util.ArrayList;
 
-public class SignedEncryptedElements extends PolicyEngineData {
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
+public class SignedEncryptedElements extends AbstractSecurityAssertion {
 
     private ArrayList xPathExpressions = new ArrayList();
     private String xPathVersion;
@@ -63,6 +70,22 @@
      */
     public boolean isSignedElemets() {
         return signedElemets;
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+        
+    }
+
+    public QName getName() {
+        if (signedElemets) {
+            return Constants.SIGNED_ELEMENTS;
+        } 
+        return Constants.ENCRYPTED_ELEMENTS;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
     }
     
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedParts.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedParts.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedParts.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SignedEncryptedParts.java Sat Aug  5 03:36:08 2006
@@ -18,7 +18,14 @@
 
 import java.util.ArrayList;
 
-public class SignedEncryptedParts extends PolicyEngineData {
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
+public class SignedEncryptedParts extends AbstractSecurityAssertion {
 
     private boolean body;
     
@@ -64,7 +71,19 @@
     public boolean isSignedParts() {
         return signedParts;
     }
-    
-    
-    
+
+    public QName getName() {
+        if (signedParts) {
+            return Constants.SIGNED_PARTS;
+        }
+        return Constants.ENCRYPTED_PARTS;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }    
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SupportingToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SupportingToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SupportingToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SupportingToken.java Sat Aug  5 03:36:08 2006
@@ -16,33 +16,44 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
 import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.Assertion;
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
 
-public class SupportingToken extends PolicyEngineData implements AlgorithmWrapper, TokenWrapper {
+public class SupportingToken implements AlgorithmWrapper, TokenWrapper,
+        Assertion {
 
     /**
      * Type of SupportingToken
+     * 
      * @see SupportingToken#SUPPORTING
      * @see SupportingToken#ENDORSING
      * @see SupportingToken#SIGNED
      * @see SupportingToken#SIGNED_ENDORSING
      */
     private int type;
-    
+
     private AlgorithmSuite algorithmSuite;
-    
+
     private ArrayList tokens = new ArrayList();
-    
+
     private SignedEncryptedElements signedElements;
-    
+
     private SignedEncryptedElements encryptedElements;
-    
+
     private SignedEncryptedParts signedParts;
-    
+
     private SignedEncryptedParts encryptedParts;
-    
+
+    private ArrayList SupportingTokens = new ArrayList();
+
     public SupportingToken(int type) {
         this.type = type;
     }
@@ -55,7 +66,8 @@
     }
 
     /**
-     * @param algorithmSuite The algorithmSuite to set.
+     * @param algorithmSuite
+     *            The algorithmSuite to set.
      */
     public void setAlgorithmSuite(AlgorithmSuite algorithmSuite) {
         this.algorithmSuite = algorithmSuite;
@@ -69,7 +81,8 @@
     }
 
     /**
-     * @param token The token to set.
+     * @param token
+     *            The token to set.
      */
     public void addToken(Token token) {
         this.tokens.add(token);
@@ -78,14 +91,15 @@
     /**
      * @return Returns the type.
      */
-    public int getType() {
+    public int getTokenType() {
         return type;
     }
 
     /**
-     * @param type The type to set.
+     * @param type
+     *            The type to set.
      */
-    public void setType(int type) {
+    public void setTokenType(int type) {
         this.type = type;
     }
 
@@ -97,7 +111,8 @@
     }
 
     /**
-     * @param encryptedElements The encryptedElements to set.
+     * @param encryptedElements
+     *            The encryptedElements to set.
      */
     public void setEncryptedElements(SignedEncryptedElements encryptedElements) {
         this.encryptedElements = encryptedElements;
@@ -111,7 +126,8 @@
     }
 
     /**
-     * @param encryptedParts The encryptedParts to set.
+     * @param encryptedParts
+     *            The encryptedParts to set.
      */
     public void setEncryptedParts(SignedEncryptedParts encryptedParts) {
         this.encryptedParts = encryptedParts;
@@ -125,7 +141,8 @@
     }
 
     /**
-     * @param signedElements The signedElements to set.
+     * @param signedElements
+     *            The signedElements to set.
      */
     public void setSignedElements(SignedEncryptedElements signedElements) {
         this.signedElements = signedElements;
@@ -139,19 +156,60 @@
     }
 
     /**
-     * @param signedParts The signedParts to set.
+     * @param signedParts
+     *            The signedParts to set.
      */
     public void setSignedParts(SignedEncryptedParts signedParts) {
         this.signedParts = signedParts;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
      */
-    public void setToken(Token tok) throws WSSPolicyException {
+    public void setToken(Token tok) {
         this.addToken(tok);
     }
-    
-    
-    
+
+    public QName getName() {
+        switch (type) {
+        case Constants.SUPPORTING_TOKEN_SIGNED:
+            return Constants.SIGNED_SUPPORTING_TOKENS;
+        case Constants.SUPPORTING_TOKEN_ENDORSING:
+            return Constants.ENDORSING_SUPPORTING_TOKENS;
+        case Constants.SUPPORTING_TOKEN_SIGNED_ENDORSING:
+            return Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS;
+        default:
+            return null;
+        }
+    }
+
+    public boolean isOptional() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public PolicyComponent normalize() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public short getType() {
+        return Assertion.ASSERTION;
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void addOption(SupportingToken supportingToken) {
+        this.SupportingTokens.add(supportingToken);
+    }
+
+    public Iterator getOptions() {
+        return this.SupportingTokens.iterator();
+    }
+
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricAsymmetricBindingBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricAsymmetricBindingBase.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricAsymmetricBindingBase.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricAsymmetricBindingBase.java Sat Aug  5 03:36:08 2006
@@ -17,9 +17,8 @@
 package org.apache.ws.security.policy.model;
 
 import org.apache.ws.security.policy.Constants;
-import org.apache.ws.security.policy.WSSPolicyException;
 
-public class SymmetricAsymmetricBindingBase extends Binding {
+public abstract class SymmetricAsymmetricBindingBase extends Binding {
 
     private String protectionOrder = Constants.SIGN_BEFORE_ENCRYPTING;
     
@@ -54,14 +53,13 @@
     /**
      * @param protectionOrder The protectionOrder to set.
      */
-    public void setProtectionOrder(String protectionOrder)
-            throws WSSPolicyException {
+    public void setProtectionOrder(String protectionOrder) {
         if(Constants.ENCRYPT_BEFORE_SIGNING.equals(protectionOrder) ||
            Constants.SIGN_BEFORE_ENCRYPTING.equals(protectionOrder)) {
             this.protectionOrder = protectionOrder;
         } else {
-            throw new WSSPolicyException("Incorrect protection order value : "
-                    + protectionOrder);
+//            throw new WSSPolicyException("Incorrect protection order value : "
+//                    + protectionOrder);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricBinding.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricBinding.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/SymmetricBinding.java Sat Aug  5 03:36:08 2006
@@ -16,7 +16,15 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
 
 public class SymmetricBinding extends SymmetricAsymmetricBindingBase {
 
@@ -25,7 +33,9 @@
     private SignatureToken signatureToken;
     
     private ProtectionToken protectionToken;
-
+    
+    private List symmetricBindings = new ArrayList();
+    
     /**
      * @return Returns the encryptionToken.
      */
@@ -36,10 +46,10 @@
     /**
      * @param encryptionToken The encryptionToken to set.
      */
-    public void setEncryptionToken(EncryptionToken encryptionToken) throws WSSPolicyException {
+    public void setEncryptionToken(EncryptionToken encryptionToken)  {
         if(this.protectionToken != null) {
-            throw new WSSPolicyException("Cannot use an EncryptionToken in a " +
-                    "SymmetricBinding when there is a ProtectionToken");
+//            throw new WSSPolicyException("Cannot use an EncryptionToken in a " +
+//                    "SymmetricBinding when there is a ProtectionToken");
         }
         this.encryptionToken = encryptionToken;
     }
@@ -54,11 +64,11 @@
     /**
      * @param protectionToken The protectionToken to set.
      */
-    public void setProtectionToken(ProtectionToken protectionToken) throws WSSPolicyException {
+    public void setProtectionToken(ProtectionToken protectionToken)  {
         if(this.encryptionToken != null || this.signatureToken != null) {
-            throw new WSSPolicyException("Cannot use a ProtectionToken in a " +
-            "SymmetricBinding when there is a SignatureToken or an" +
-            "EncryptionToken");
+//            throw new WSSPolicyException("Cannot use a ProtectionToken in a " +
+//            "SymmetricBinding when there is a SignatureToken or an" +
+//            "EncryptionToken");
         }
         this.protectionToken = protectionToken;
     }
@@ -73,12 +83,35 @@
     /**
      * @param signatureToken The signatureToken to set.
      */
-    public void setSignatureToken(SignatureToken signatureToken) throws WSSPolicyException {
+    public void setSignatureToken(SignatureToken signatureToken) {
         if(this.protectionToken != null) {
-            throw new WSSPolicyException("Cannot use a SignatureToken in a " +
-                    "SymmetricBinding when there is a ProtectionToken");
+//            throw new WSSPolicyException("Cannot use a SignatureToken in a " +
+//                    "SymmetricBinding when there is a ProtectionToken");
         }
         this.signatureToken = signatureToken;
+    }
+    
+    public Iterator getOptions() {
+        return symmetricBindings.iterator();
+    }
+    
+    public void addOption(SymmetricBinding symmetricBinding) {
+        symmetricBindings.add(symmetricBinding);
+    }
+
+    public QName getName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public PolicyComponent normalize() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO Auto-generated method stub
+        
     }
     
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Token.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Token.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Token.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Token.java Sat Aug  5 03:36:08 2006
@@ -17,9 +17,8 @@
 package org.apache.ws.security.policy.model;
 
 import org.apache.ws.security.policy.Constants;
-import org.apache.ws.security.policy.WSSPolicyException;
 
-public class Token extends PolicyEngineData {
+public abstract class Token extends AbstractSecurityAssertion {
 
     /**
      * Inclusiong property of a TokenAssertion
@@ -41,14 +40,14 @@
     /**
      * @param inclusion The inclusion to set.
      */
-    public void setInclusion(String inclusion) throws WSSPolicyException {
+    public void setInclusion(String inclusion)  {
         if(Constants.INCLUDE_ALWAYS.equals(inclusion) || 
            Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(inclusion) ||
            Constants.INCLUDE_NEVER.equals(inclusion) ||
            Constants.INCLUDE_ONCE.equals(inclusion)) {
             this.inclusion = inclusion;
         } else {
-            throw new WSSPolicyException("Incorrect inclusion value: " + inclusion);
+//            throw new WSSPolicyException("Incorrect inclusion value: " + inclusion);
         }
     }
     

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TokenWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TokenWrapper.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TokenWrapper.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TokenWrapper.java Sat Aug  5 03:36:08 2006
@@ -16,9 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-import org.apache.ws.security.policy.WSSPolicyException;
-
 public interface TokenWrapper {
 
-    public void setToken(Token tok) throws WSSPolicyException;
+    public void setToken(Token tok);
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportBinding.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportBinding.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportBinding.java Sat Aug  5 03:36:08 2006
@@ -16,22 +16,57 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
 public class TransportBinding extends Binding {
     
-    private Token transportToken;
-
+    private TransportToken transportToken;
+    
+    private List transportBindings;
+    
     /**
      * @return Returns the transportToken.
      */
-    public Token getTransportToken() {
+    public TransportToken getTransportToken() {
         return transportToken;
     }
 
     /**
      * @param transportToken The transportToken to set.
      */
-    public void setTransportToken(Token transportToken) {
+    public void setTransportToken(TransportToken transportToken) {
         this.transportToken = transportToken;
+    }
+    
+    public List getOptions() {
+        return transportBindings;
+    }
+    
+    public void addOption(TransportBinding transportBinding) {
+        if (transportBindings == null) {
+            transportBindings = new ArrayList();
+        }
+        transportBindings.add(transportBinding);
+    }
+
+    public QName getName() {
+        return Constants.TRANSPORT_BINDING;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+    
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
     }
 
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/TransportToken.java Sat Aug  5 03:36:08 2006
@@ -16,11 +16,23 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.Iterator;
 
-public class TransportToken extends PolicyEngineData {
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.Assertion;
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
 
-    private Token transportToken;
 
+public class TransportToken implements Assertion {
+
+    private Token transportToken;
+    
+    private ArrayList transportTokens = new ArrayList();
 
     /**
      * @return Returns the transportToken.
@@ -35,4 +47,37 @@
     public void setTransportToken(Token transportToken) {
         this.transportToken = transportToken;
     }
+    
+    public Iterator getOptions() {
+        return transportTokens.iterator();
+    }
+    
+    public void addOption(TransportToken transportToken) {
+        transportTokens.add(transportToken);
+    }
+
+    public QName getName() {
+        return new QName(Constants.SP_NS, "TransportToken");
+    }
+
+    public boolean isOptional() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public PolicyComponent normalize() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public short getType() {
+        return Assertion.ASSERTION;
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO Auto-generated method stub
+        
+    }
+    
+    
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/UsernameToken.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/UsernameToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/UsernameToken.java Sat Aug  5 03:36:08 2006
@@ -16,8 +16,20 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
 public class UsernameToken extends Token {
     
+    private List usernameTokens;
+    
     private boolean useUTProfile11;
 
     /**
@@ -34,5 +46,26 @@
         this.useUTProfile11 = useUTProfile11;
     }
     
+    public List getOptions() {
+        return usernameTokens;
+    }
     
+    public void addOption(UsernameToken usernameToken) {
+        if (usernameTokens == null) {
+            usernameTokens= new ArrayList();
+        }
+        usernameTokens.add(usernameToken);
+    }
+
+    public QName getName() {
+        return Constants.USERNAME_TOKEN;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }       
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Wss10.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Wss10.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Wss10.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/Wss10.java Sat Aug  5 03:36:08 2006
@@ -16,7 +16,7 @@
 
 package org.apache.ws.security.policy.model;
 
-public class Wss10 extends PolicyEngineData {
+public class Wss10 {
     
     private boolean mustSupportRefKeyIdentifier;
     private boolean MustSupportRefIssuerSerial;

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/X509Token.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/X509Token.java?rev=428983&r1=428982&r2=428983&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/X509Token.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/model/X509Token.java Sat Aug  5 03:36:08 2006
@@ -16,6 +16,17 @@
 
 package org.apache.ws.security.policy.model;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.neethi.PolicyComponent;
+import org.apache.ws.security.policy.Constants;
+
 public class X509Token extends Token {
 
     private boolean requireKeyIdentifierReference;
@@ -27,7 +38,9 @@
     private boolean requireThumbprintReference;
     
     private String tokenVersionAndType;
-
+    
+    private List x509Tokens = new ArrayList();
+    
     /**
      * @return Returns the requireEmbeddedTokenReference.
      */
@@ -99,6 +112,27 @@
     public void setTokenVersionAndType(String tokenVersionAndType) {
         this.tokenVersionAndType = tokenVersionAndType;
     }
+    
+    public Iterator getOptions() {
+        return x509Tokens.iterator();
+    }
+    
+    public void addOption(X509Token token) {
+        x509Tokens.add(token);
+    }
+
+    public QName getName() {
+        return Constants.X509_TOKEN;
+    }
+
+    public PolicyComponent normalize() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        throw new UnsupportedOperationException();
+    }
+    
     
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message