tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r503274 - in /incubator/openejb/trunk/openejb2/modules/openejb-corba/src: main/java/org/apache/openejb/corba/security/config/css/ main/java/org/apache/openejb/corba/security/config/tss/ test/java/org/apache/openejb/corba/security/ test/java...
Date Sat, 03 Feb 2007 18:19:20 GMT
Author: djencks
Date: Sat Feb  3 10:19:18 2007
New Revision: 503274

URL: http://svn.apache.org/viewvc?view=rev&rev=503274
Log:
OPENEJB-468 provide meaningful toString implementations on css and tss config elements

Added:
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java   (with props)
Modified:
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechListConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigDynamic.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigStatic.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLTransportConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAbsent.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAnonymous.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameDynamic.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameStatic.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASIdentityToken.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSSLTransportConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSTransportMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechListConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSEntity.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSExportedNameConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSUPMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGeneralNameConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAbsent.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAnonymous.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTDistinguishedName.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTPrincipalNameGSSUP.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTX509CertChain.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLTransportConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASIdentityToken.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSECIOPTransportConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSSLTransportConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSServiceConfigurationConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportAddressConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportMechConfig.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSX509AttributeCertChain.java

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -26,15 +26,18 @@
  */
 public interface CSSASMechConfig extends Serializable {
 
-    public short getSupports();
+    short getSupports();
 
-    public short getRequires();
+    short getRequires();
 
-    public boolean canHandle(TSSASMechConfig asMech);
+    boolean canHandle(TSSASMechConfig asMech);
 
     /**
      * Encode the client authentication token
      * @return the encoded client authentication token
      */
-    public byte[] encode();
+    byte[] encode();
+
+    void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java Sat Feb  3 10:19:18 2007
@@ -119,4 +119,22 @@
 
         return context;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSCompoundSecMechConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS: ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES: ").append(ConfigUtil.flags(requires)).append("\n");
+        transport_mech.toString(moreSpaces, buf);
+        as_mech.toString(moreSpaces, buf);
+        sas_mech.toString(moreSpaces, buf);
+        buf.append(spaces).append("]\n");
+    }
+    
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechListConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechListConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechListConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSCompoundSecMechListConfig.java Sat Feb  3 10:19:18 2007
@@ -72,4 +72,21 @@
 
         return result;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSCompoundSecMechListConfig: [\n");
+        for (Iterator availMechs = mechs.iterator(); availMechs.hasNext();) {
+            CSSCompoundSecMechConfig aConfig = (CSSCompoundSecMechConfig) availMechs.next();
+            aConfig.toString(spaces + "  ", buf);
+            buf.append("\n");
+        }
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSConfig.java Sat Feb  3 10:19:18 2007
@@ -35,4 +35,17 @@
     public List findCompatibleSet(TSSCompoundSecMechListConfig mechListConfig) {
         return mechList.findCompatibleSet(mechListConfig);
     }
+
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSConfig: [\n");
+        mechList.toString(spaces + "  ", buf);
+        buf.append(spaces).append("]\n");
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigDynamic.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigDynamic.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigDynamic.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigDynamic.java Sat Feb  3 10:19:18 2007
@@ -83,4 +83,18 @@
         }
         return encoding;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSGSSUPMechConfigDynamic: [\n");
+        buf.append(moreSpaces).append("domain:   ").append(domain).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigStatic.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigStatic.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigStatic.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSGSSUPMechConfigStatic.java Sat Feb  3 10:19:18 2007
@@ -18,6 +18,7 @@
 
 import org.apache.openejb.corba.security.config.tss.TSSASMechConfig;
 import org.apache.openejb.corba.security.config.tss.TSSGSSUPMechConfig;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 import org.apache.openejb.corba.util.Util;
 
 
@@ -60,4 +61,20 @@
         }
         return encoding;
     }
+    
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSGSSUPMechConfigStatic: [\n");
+        buf.append(moreSpaces).append("username: ").append(username).append("\n");
+        buf.append(moreSpaces).append("password: ").append(password).append("\n");
+        buf.append(moreSpaces).append("domain:   ").append(domain).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -43,4 +43,9 @@
     public byte[] encode() {
         return new byte[0];
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSNULLASMechConfig\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLTransportConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLTransportConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLTransportConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSNULLTransportConfig.java Sat Feb  3 10:19:18 2007
@@ -41,4 +41,8 @@
 
         return true;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSNULLTransportConfig\n");
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAbsent.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAbsent.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAbsent.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAbsent.java Sat Feb  3 10:19:18 2007
@@ -30,4 +30,10 @@
         token.absent(true);
         return token;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSSASITTAbsent\n");
+    }
+
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAnonymous.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAnonymous.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAnonymous.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTAnonymous.java Sat Feb  3 10:19:18 2007
@@ -30,4 +30,9 @@
         token.anonymous(true);
         return token;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("CSSSASITTAnonymous\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameDynamic.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameDynamic.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameDynamic.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameDynamic.java Sat Feb  3 10:19:18 2007
@@ -115,4 +115,21 @@
 
         return token;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSSASITTPrincipalNameDynamic: [\n");
+        buf.append(moreSpaces).append("oid: ").append(oid).append("\n");
+        buf.append(moreSpaces).append("principalClass: ").append(principalClass).append("\n");
+        buf.append(moreSpaces).append("domain: ").append(domain).append("\n");
+        buf.append(moreSpaces).append("realm: ").append(realm).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+    
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameStatic.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameStatic.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameStatic.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASITTPrincipalNameStatic.java Sat Feb  3 10:19:18 2007
@@ -63,4 +63,19 @@
         }
         return token;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSSASITTPrincipalNameStatic: [\n");
+        buf.append(moreSpaces).append("oid: ").append(oid).append("\n");
+        buf.append(moreSpaces).append("name: ").append(name).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASIdentityToken.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASIdentityToken.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASIdentityToken.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASIdentityToken.java Sat Feb  3 10:19:18 2007
@@ -26,5 +26,8 @@
  */
 public interface CSSSASIdentityToken extends Serializable {
 
-    public IdentityToken encodeIdentityToken();
+    IdentityToken encodeIdentityToken();
+
+    void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -22,6 +22,7 @@
 import org.omg.CSI.IdentityToken;
 
 import org.apache.openejb.corba.security.config.tss.TSSSASMechConfig;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 
 
 /**
@@ -75,4 +76,22 @@
     public IdentityToken encodeIdentityToken() {
         return identityToken.encodeIdentityToken();
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSSASMechConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS: ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES: ").append(ConfigUtil.flags(requires)).append("\n");
+        if (identityToken != null) {
+            identityToken.toString(moreSpaces, buf);
+        }
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSSLTransportConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSSLTransportConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSSLTransportConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSSSLTransportConfig.java Sat Feb  3 10:19:18 2007
@@ -17,6 +17,7 @@
 package org.apache.openejb.corba.security.config.css;
 
 import org.apache.openejb.corba.security.config.tss.TSSTransportMechConfig;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 
 
 /**
@@ -50,5 +51,19 @@
         if ((requires & transMech.getSupports()) != requires) return false;
 
         return true;
+    }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("CSSSSLTransportConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS: ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES: ").append(ConfigUtil.flags(requires)).append("\n");
+        buf.append(spaces).append("]\n");
     }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSTransportMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSTransportMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSTransportMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/css/CSSTransportMechConfig.java Sat Feb  3 10:19:18 2007
@@ -26,9 +26,12 @@
  */
 public interface CSSTransportMechConfig extends Serializable {
 
-    public short getSupports();
+    short getSupports();
 
-    public short getRequires();
+    short getRequires();
+
+    boolean canHandle(TSSTransportMechConfig transMech);
+
+    void toString(String spaces, StringBuffer buf);
 
-    public boolean canHandle(TSSTransportMechConfig transMech);
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -51,4 +51,7 @@
     }
 
     public abstract Subject check(EstablishContext msg) throws SASException;
+
+    public abstract void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechConfig.java Sat Feb  3 10:19:18 2007
@@ -67,9 +67,9 @@
     public short getSupports() {
         short result = 0;
 
-        result |= transport_mech.getSupports();
-        result |= as_mech.getSupports();
-        result |= sas_mech.getSupports();
+        if (transport_mech != null) result |= transport_mech.getSupports();
+        if (as_mech != null) result |= as_mech.getSupports();
+        if (sas_mech != null) result |= sas_mech.getSupports();
 
         return result;
     }
@@ -77,9 +77,9 @@
     public short getRequires() {
         short result = 0;
 
-        result |= transport_mech.getRequires();
-        result |= as_mech.getRequires();
-        result |= sas_mech.getRequires();
+        if (transport_mech != null) result |= transport_mech.getRequires();
+        if (as_mech != null) result |= as_mech.getRequires();
+        if (sas_mech != null) result |= sas_mech.getRequires();
 
         return result;
     }
@@ -137,4 +137,29 @@
 
         return asSubject;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSCompoundSecMechConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS (aggregate): ").append(ConfigUtil.flags(getSupports())).append("\n");
+        buf.append(moreSpaces).append("REQUIRES (aggregate): ").append(ConfigUtil.flags(getRequires())).append("\n");
+        if (transport_mech != null) {
+            transport_mech.toString(moreSpaces, buf);
+        }
+        if (as_mech != null) {
+            as_mech.toString(moreSpaces, buf);
+        }
+        if (sas_mech != null) {
+            sas_mech.toString(moreSpaces, buf);
+        }
+        buf.append(spaces).append("]\n");
+    }
+
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechListConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechListConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechListConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSCompoundSecMechListConfig.java Sat Feb  3 10:19:18 2007
@@ -18,6 +18,8 @@
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Iterator;
+
 import javax.security.auth.Subject;
 
 import org.omg.CORBA.Any;
@@ -102,4 +104,20 @@
 
         return result;
     }
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("TSSCompoundSecMechListConfig: [\n");
+        for (Iterator availMechs = mechs.iterator(); availMechs.hasNext();) {
+            TSSCompoundSecMechConfig aConfig = (TSSCompoundSecMechConfig) availMechs.next();
+            aConfig.toString(spaces + "  ", buf);
+            buf.append("\n");
+        }
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSConfig.java Sat Feb  3 10:19:18 2007
@@ -81,4 +81,27 @@
 
         return transportSubject;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSConfig: [\n");
+        if (defaultPrincipal != null) {
+            buf.append(moreSpaces).append("defaultPrincipal: ").append(defaultPrincipal.toString()).append("\n");
+        } else {
+            buf.append(moreSpaces).append("defaultPrincipal null\n");
+        }
+        if (transport_mech != null) {
+            transport_mech.toString(moreSpaces, buf);
+        } else {
+            buf.append(moreSpaces).append("null transport_mech\n");
+        }
+        mechListConfig.toString(moreSpaces, buf);
+        buf.append(spaces).append("]\n");
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSEntity.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSEntity.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSEntity.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSEntity.java Sat Feb  3 10:19:18 2007
@@ -42,4 +42,18 @@
     public void setDistinguishedName(X500Principal distinguishedName) {
         this.distinguishedName = distinguishedName;
     }
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSEntity: [\n");
+        buf.append(moreSpaces).append("hostname: ").append(hostname).append("\n");
+        buf.append(moreSpaces).append("distinguishedName: ").append(distinguishedName).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSExportedNameConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSExportedNameConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSExportedNameConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSExportedNameConfig.java Sat Feb  3 10:19:18 2007
@@ -68,4 +68,12 @@
 
         return config;
     }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSGSSExportedNameConfig: [\n");
+        buf.append(moreSpaces).append("oid : ").append(oid).append("\n");
+        buf.append(moreSpaces).append("name: ").append(name).append("\n");
+        buf.append(spaces).append("]\n");
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSUPMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSUPMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSUPMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGSSUPMechConfig.java Sat Feb  3 10:19:18 2007
@@ -117,4 +117,19 @@
 
         return result;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSGSSUPMechConfig: [\n");
+        buf.append(moreSpaces).append("targetName:   ").append(targetName).append("\n");
+        buf.append(moreSpaces).append("required  :   ").append(required).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGeneralNameConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGeneralNameConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGeneralNameConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSGeneralNameConfig.java Sat Feb  3 10:19:18 2007
@@ -60,4 +60,12 @@
             throw new ConfigException("Unable to encode GeneralName", e);
         }
     }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSGeneralNameConfig: [\n");
+        buf.append(moreSpaces).append("name: ").append(name).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAbsent.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAbsent.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAbsent.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAbsent.java Sat Feb  3 10:19:18 2007
@@ -41,4 +41,9 @@
     public Subject check(IdentityToken identityToken) throws SASException {
         return null;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("TSSITTAbsent\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAnonymous.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAnonymous.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAnonymous.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTAnonymous.java Sat Feb  3 10:19:18 2007
@@ -46,4 +46,9 @@
         //TODO the presence of an identity token is an identity assertion.
         return null;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("TSSITTAnonymous\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTDistinguishedName.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTDistinguishedName.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTDistinguishedName.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTDistinguishedName.java Sat Feb  3 10:19:18 2007
@@ -84,4 +84,13 @@
 
         return subject;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSITTDistinguishedName: [\n");
+        buf.append(moreSpaces).append("domain: ").append(domainName).append("\n");
+        buf.append(moreSpaces).append("realm: ").append(realmName).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTPrincipalNameGSSUP.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTPrincipalNameGSSUP.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTPrincipalNameGSSUP.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTPrincipalNameGSSUP.java Sat Feb  3 10:19:18 2007
@@ -108,4 +108,14 @@
 
         return subject;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSITTPrincipalNameGSSUP: [\n");
+        buf.append(moreSpaces).append("principalClass: ").append(principalClass).append("\n");
+        buf.append(moreSpaces).append("domain: ").append(domainName).append("\n");
+        buf.append(moreSpaces).append("realm: ").append(realmName).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTX509CertChain.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTX509CertChain.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTX509CertChain.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSITTX509CertChain.java Sat Feb  3 10:19:18 2007
@@ -48,4 +48,13 @@
     public Subject check(IdentityToken identityToken) throws SASException {
         throw new SASException(1, new Exception("NYI -- cert chain identity token"));
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSITTX509CertChain (NYI): [\n");
+        buf.append(moreSpaces).append("domain: ").append(domainName).append("\n");
+        buf.append(moreSpaces).append("realm: ").append(realmName).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -64,4 +64,9 @@
     public Subject check(EstablishContext msg) throws SASException {
         return null;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("TSSNULLASMechConfig\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLTransportConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLTransportConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLTransportConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSNULLTransportConfig.java Sat Feb  3 10:19:18 2007
@@ -60,4 +60,9 @@
     public Subject check(SSLSession session) throws SASException {
         return null;
     }
+
+    public void toString(String spaces, StringBuffer buf) {
+        buf.append(spaces).append("TSSNULLTransportConfig\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASIdentityToken.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASIdentityToken.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASIdentityToken.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASIdentityToken.java Sat Feb  3 10:19:18 2007
@@ -52,4 +52,12 @@
         return result;
     }
 
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    abstract void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSASMechConfig.java Sat Feb  3 10:19:18 2007
@@ -33,6 +33,7 @@
 import org.omg.CSIIOP.ServiceConfiguration;
 import org.omg.IOP.Codec;
 import org.apache.openejb.corba.security.SASException;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 import org.apache.openejb.corba.util.Util;
 
 
@@ -147,9 +148,6 @@
     }
 
     public Subject check(EstablishContext msg) throws SASException {
-//        Subject result = null;
-
-//        try {
         if (msg.identity_token != null) {
             IdentityToken identityToken = msg.identity_token;
             int discriminator = identityToken.discriminator();
@@ -162,44 +160,34 @@
         } else {
             return null;
         }
-//                switch (discriminator) {
-//                    case org.omg.CSI.ITTAbsent.value:
-//                        break;
-//                    case org.omg.CSI.ITTAnonymous.value:
-//                        //TODO implement this one or figure out if this is correct???
-//                        break;
-//                    case ITTPrincipalName.value:
-//                        byte[] principalNameToken = identityToken.principal_name();
-//                        Any any = Util.getCodec().decode_value(principalNameToken, GSS_NT_ExportedNameHelper.type());
-//                        byte[] principalNameBytes = GSS_NT_ExportedNameHelper.extract(any);
-//                        String principalName = Util.decodeGSSExportName(principalNameBytes);
-//                        Principal basePrincipal = new GeronimoUserPrincipal(principalName);
-//                        //TODO parameterize or otherwise select realm name
-//                        Principal wrappedPrincipal = new RealmPrincipal("cts-properties-realm", basePrincipal);
-//                        result = new Subject();
-//                        result.getPrincipals().add(basePrincipal);
-//                        result.getPrincipals().add(wrappedPrincipal);
-//                        break;
-//                    case org.omg.CSI.ITTX509CertChain.value:
-//                        byte[] ccChainBytes = identityToken.certificate_chain();
-//                        //TODO implement this one
-//                        throw new SASException(1, new Exception("NYI -- cert chain identity token"));
-//                    case org.omg.CSI.ITTDistinguishedName.value:
-//                        //TODO implement this one
-//                        throw new SASException(1, new Exception("NYI -- distinguished name identity token"));
-//                    default:
-//                        throw new SASException(1);
-//                }
-//
-//            }
-//        } catch (TypeMismatch typeMismatch) {
-//            throw new SASException(1, typeMismatch);
-//        } catch (FormatMismatch formatMismatch) {
-//            throw new SASException(1, formatMismatch);
-////        } catch (UnsupportedEncodingException e) {
-////            throw new SASException(1, e);
-//        }
-//
-//        return result;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append(getName()).append(": [\n");
+        buf.append(moreSpaces).append("required: ").append(required).append("\n");
+        buf.append(moreSpaces).append("SUPPORTS: ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES: ").append(ConfigUtil.flags(requires)).append("\n");
+        for (Iterator iterator = privilegeAuthorities.iterator(); iterator.hasNext();) {
+            TSSServiceConfigurationConfig tssServiceConfigurationConfig = (TSSServiceConfigurationConfig) iterator.next();
+            tssServiceConfigurationConfig.toString(moreSpaces, buf);
+        }
+        buf.append("\n");
+        for (Iterator iterator = idTokens.values().iterator(); iterator.hasNext();) {
+            TSSSASIdentityToken identityToken = (TSSSASIdentityToken) iterator.next();
+            identityToken.toString(moreSpaces, buf);
+        }
+        buf.append(spaces).append("]\n");
+    }
+
+    protected String getName() {
+        return "TSSSASMechConfig";
+    }
+    
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSECIOPTransportConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSECIOPTransportConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSECIOPTransportConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSECIOPTransportConfig.java Sat Feb  3 10:19:18 2007
@@ -33,6 +33,7 @@
 import org.omg.IOP.TaggedComponent;
 
 import org.apache.openejb.corba.security.SASException;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 import org.apache.openejb.corba.util.Util;
 
 
@@ -133,5 +134,20 @@
     public Subject check(SSLSession session) throws SASException {
         return new Subject();
     }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSSASMechConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS  : ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES  : ").append(ConfigUtil.flags(requires)).append("\n");
+        buf.append(moreSpaces).append("mechOID   : ").append(mechOID).append("\n");
+        buf.append(moreSpaces).append("targetName: ").append(targetName).append("\n");
+        for (Iterator iterator = addresses.iterator(); iterator.hasNext();) {
+            TSSTransportAddressConfig tssTransportAddressConfig = (TSSTransportAddressConfig) iterator.next();
+            tssTransportAddressConfig.toString(moreSpaces, buf);
+        }
+       buf.append(spaces).append("]\n");
+    }
+    
 
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSSLTransportConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSSLTransportConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSSLTransportConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSSSLTransportConfig.java Sat Feb  3 10:19:18 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.corba.security.config.tss;
 
+import java.util.Iterator;
+
 import javax.net.ssl.SSLPeerUnverifiedException;
 import javax.net.ssl.SSLSession;
 import javax.security.auth.Subject;
@@ -38,6 +40,7 @@
 import org.omg.IOP.TaggedComponent;
 
 import org.apache.openejb.corba.security.SASException;
+import org.apache.openejb.corba.security.config.ConfigUtil;
 
 
 /**
@@ -157,6 +160,17 @@
             if (log.isDebugEnabled()) log.debug("Unverified peer, returning null");
             return null;
         }
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSSASMechConfig: [\n");
+        buf.append(moreSpaces).append("SUPPORTS: ").append(ConfigUtil.flags(supports)).append("\n");
+        buf.append(moreSpaces).append("REQUIRES: ").append(ConfigUtil.flags(requires)).append("\n");
+        buf.append(moreSpaces).append("port    : ").append(port).append("\n");
+        buf.append(moreSpaces).append("hostName: ").append(hostname).append("\n");
+        buf.append(moreSpaces).append("handshakeTimeout: ").append(handshakeTimeout).append("\n");
+       buf.append(spaces).append("]\n");
     }
 
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSServiceConfigurationConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSServiceConfigurationConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSServiceConfigurationConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSServiceConfigurationConfig.java Sat Feb  3 10:19:18 2007
@@ -42,4 +42,13 @@
 
         return result;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    abstract void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportAddressConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportAddressConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportAddressConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportAddressConfig.java Sat Feb  3 10:19:18 2007
@@ -49,4 +49,19 @@
     public void setHostname(String hostname) {
         this.hostname = hostname;
     }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    void toString(String spaces, StringBuffer buf) {
+        String moreSpaces = spaces + "  ";
+        buf.append(spaces).append("TSSTransportAddressConfig: [\n");
+        buf.append(moreSpaces).append("port    : ").append(port).append("\n");
+        buf.append(moreSpaces).append("hostName: ").append(hostname).append("\n");
+        buf.append(spaces).append("]\n");
+    }
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportMechConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportMechConfig.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportMechConfig.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSTransportMechConfig.java Sat Feb  3 10:19:18 2007
@@ -83,4 +83,12 @@
 
     public abstract Subject check(SSLSession session) throws SASException;
 
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        toString("", buf);
+        return buf.toString();
+    }
+
+    abstract void toString(String spaces, StringBuffer buf);
+
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSX509AttributeCertChain.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSX509AttributeCertChain.java?view=diff&rev=503274&r1=503273&r2=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSX509AttributeCertChain.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/config/tss/TSSX509AttributeCertChain.java Sat Feb  3 10:19:18 2007
@@ -21,5 +21,9 @@
  * @version $Revision$ $Date$
  */
 public class TSSX509AttributeCertChain extends TSSSASMechConfig {
+    
+    protected String getName() {
+        return "TSSX509AttributeCertChain";
+    }
 
 }

Added: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java?view=auto&rev=503274
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java (added)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java Sat Feb  3 10:19:18 2007
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.openejb.corba.security.config.tss;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class ToStringTest extends TestCase {
+    
+    public void testToString() throws Exception {
+        TSSConfig t = new TSSConfig();
+        String s = t.toString();
+        t.setTransport_mech(new TSSSECIOPTransportConfig());
+        t.toString();
+        t.setTransport_mech(new TSSSSLTransportConfig());
+        t.toString();
+        TSSCompoundSecMechConfig tssCompoundSecMechConfig = new TSSCompoundSecMechConfig();
+        t.getMechListConfig().add(tssCompoundSecMechConfig);
+        t.toString();
+        tssCompoundSecMechConfig.setAs_mech(new TSSGSSUPMechConfig());
+        tssCompoundSecMechConfig.setSas_mech(new TSSSASMechConfig());
+        tssCompoundSecMechConfig.setTransport_mech(new TSSSSLTransportConfig());
+        t.toString();
+    }
+}

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/security/config/tss/ToStringTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message