You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2017/02/02 11:06:18 UTC

svn commit: r1781370 [2/2] - /webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/

Modified: webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java?rev=1781370&r1=1781369&r2=1781370&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/UsernameToken.java Thu Feb  2 11:06:17 2017
@@ -78,6 +78,41 @@ public class UsernameToken extends Abstr
     public QName getName() {
         return getVersion().getSPConstants().getUsernameToken();
     }
+    
+    @Override
+    public boolean equals(Object object) {
+        if (object == this) {
+            return true;
+        }
+        if (!(object instanceof UsernameToken)) {
+            return false;
+        }
+        
+        UsernameToken that = (UsernameToken)object;
+        if (passwordType != that.passwordType || usernameTokenType != that.usernameTokenType) {
+            return false;
+        }
+        if (created != that.created || nonce != that.nonce) {
+            return false;
+        }
+        
+        return super.equals(object);
+    }
+    
+    @Override
+    public int hashCode() {
+        int result = 17;
+        if (passwordType != null) {
+            result = 31 * result + passwordType.hashCode();
+        }
+        if (usernameTokenType != null) {
+            result = 31 * result + usernameTokenType.hashCode();
+        }
+        result = 31 * result + Boolean.hashCode(created);
+        result = 31 * result + Boolean.hashCode(nonce);
+        
+        return 31 * result + super.hashCode();
+    }
 
     @Override
     protected AbstractSecurityAssertion cloneAssertion(Policy nestedPolicy) {

Modified: webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java?rev=1781370&r1=1781369&r2=1781370&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss10.java Thu Feb  2 11:06:17 2017
@@ -54,6 +54,37 @@ public class Wss10 extends AbstractSecur
     public QName getName() {
         return getVersion().getSPConstants().getWss10();
     }
+    
+    @Override
+    public boolean equals(Object object) {
+        if (object == this) {
+            return true;
+        }
+        if (!(object instanceof Wss10)) {
+            return false;
+        }
+        
+        Wss10 that = (Wss10)object;
+        if (mustSupportRefKeyIdentifier != that.mustSupportRefKeyIdentifier
+            || mustSupportRefIssuerSerial != that.mustSupportRefIssuerSerial
+            || mustSupportRefExternalURI != that.mustSupportRefExternalURI
+            || mustSupportRefEmbeddedToken != that.mustSupportRefEmbeddedToken) {
+            return false;
+        }
+        
+        return super.equals(object);
+    }
+    
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + Boolean.hashCode(mustSupportRefKeyIdentifier);
+        result = 31 * result + Boolean.hashCode(mustSupportRefIssuerSerial);
+        result = 31 * result + Boolean.hashCode(mustSupportRefExternalURI);
+        result = 31 * result + Boolean.hashCode(mustSupportRefEmbeddedToken);
+        
+        return 31 * result + super.hashCode();
+    }
 
     @Override
     public PolicyComponent normalize() {

Modified: webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java?rev=1781370&r1=1781369&r2=1781370&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/Wss11.java Thu Feb  2 11:06:17 2017
@@ -42,6 +42,35 @@ public class Wss11 extends Wss10 {
     public QName getName() {
         return getVersion().getSPConstants().getWss11();
     }
+    
+    @Override
+    public boolean equals(Object object) {
+        if (object == this) {
+            return true;
+        }
+        if (!(object instanceof Wss11)) {
+            return false;
+        }
+        
+        Wss11 that = (Wss11)object;
+        if (mustSupportRefThumbprint != that.mustSupportRefThumbprint
+            || mustSupportRefEncryptedKey != that.mustSupportRefEncryptedKey
+            || requireSignatureConfirmation != that.requireSignatureConfirmation) {
+            return false;
+        }
+        
+        return super.equals(object);
+    }
+    
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + Boolean.hashCode(mustSupportRefThumbprint);
+        result = 31 * result + Boolean.hashCode(mustSupportRefEncryptedKey);
+        result = 31 * result + Boolean.hashCode(requireSignatureConfirmation);
+        
+        return 31 * result + super.hashCode();
+    }
 
     @Override
     protected AbstractSecurityAssertion cloneAssertion(Policy nestedPolicy) {

Modified: webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java?rev=1781370&r1=1781369&r2=1781370&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/X509Token.java Thu Feb  2 11:06:17 2017
@@ -71,6 +71,43 @@ public class X509Token extends AbstractT
     public QName getName() {
         return getVersion().getSPConstants().getX509Token();
     }
+    
+    @Override
+    public boolean equals(Object object) {
+        if (object == this) {
+            return true;
+        }
+        if (!(object instanceof X509Token)) {
+            return false;
+        }
+        
+        X509Token that = (X509Token)object;
+        if (tokenType != that.tokenType) {
+            return false;
+        }
+        if (requireKeyIdentifierReference != that.requireKeyIdentifierReference
+            || requireIssuerSerialReference != that.requireIssuerSerialReference
+            || requireEmbeddedTokenReference != that.requireEmbeddedTokenReference
+            || requireThumbprintReference != that.requireThumbprintReference) {
+            return false;
+        }
+        
+        return super.equals(object);
+    }
+    
+    @Override
+    public int hashCode() {
+        int result = 17;
+        if (tokenType != null) {
+            result = 31 * result + tokenType.hashCode();
+        }
+        result = 31 * result + Boolean.hashCode(requireKeyIdentifierReference);
+        result = 31 * result + Boolean.hashCode(requireIssuerSerialReference);
+        result = 31 * result + Boolean.hashCode(requireEmbeddedTokenReference);
+        result = 31 * result + Boolean.hashCode(requireThumbprintReference);
+        
+        return 31 * result + super.hashCode();
+    }
 
     @Override
     protected AbstractSecurityAssertion cloneAssertion(Policy nestedPolicy) {

Modified: webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/XPath.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/XPath.java?rev=1781370&r1=1781369&r2=1781370&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/XPath.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/XPath.java Thu Feb  2 11:06:17 2017
@@ -64,4 +64,45 @@ public class XPath {
     public Map<String, String> getPrefixNamespaceMap() {
         return prefixNamespaceMap;
     }
+    
+    @Override
+    public boolean equals(Object object) {
+        if (object == this) {
+            return true;
+        }
+        if (!(object instanceof XPath)) {
+            return false;
+        }
+        
+        XPath that = (XPath)object;
+        if (xPath != null && !xPath.equals(that.xPath)
+            || xPath == null && that.xPath != null) {
+            return false;
+        }
+        if (version != that.version) {
+            return false;
+        }
+        if (filter != null && !filter.equals(that.filter)
+            || filter == null && that.filter != null) {
+            return false;
+        }
+        
+        return true;
+    }
+    
+    @Override
+    public int hashCode() {
+        int result = 17;
+        if (xPath != null) {
+            result = 31 * result + xPath.hashCode();
+        }
+        if (version != null) {
+            result = 31 * result + version.hashCode();
+        }
+        if (filter != null) {
+            result = 31 * result + filter.hashCode();
+        }
+        
+        return 31 * result + super.hashCode();
+    }
 }