geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r813648 - in /geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi: ./ model/
Date Fri, 11 Sep 2009 01:39:47 GMT
Author: djencks
Date: Fri Sep 11 01:39:45 2009
New Revision: 813648

URL: http://svn.apache.org/viewvc?rev=813648&view=rev
Log:
javadoc and minor code cleanup

Modified:
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/AuthConfigFactoryImpl.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ClassLoaderLookup.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ConstantClassLoaderLookup.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/AuthModuleType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthConfigType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthContextType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ConfigProviderType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiUtil.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiXmlUtil.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObject.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObjectMapAdapter.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/MessagePolicyType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ProtectionPolicyType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthConfigType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthContextType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetPolicyType.java
    geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetType.java

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/AuthConfigFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/AuthConfigFactoryImpl.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/AuthConfigFactoryImpl.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/AuthConfigFactoryImpl.java
Fri Sep 11 01:39:45 2009
@@ -16,28 +16,26 @@
  */
 package org.apache.geronimo.components.jaspi;
 
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import org.apache.geronimo.components.jaspi.model.ConfigProviderType;
+import org.apache.geronimo.components.jaspi.model.JaspiType;
+import org.apache.geronimo.components.jaspi.model.JaspiXmlUtil;
+import org.xml.sax.SAXException;
 
 import javax.security.auth.AuthPermission;
 import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
 import javax.security.auth.message.config.AuthConfigFactory;
 import javax.security.auth.message.config.AuthConfigProvider;
 import javax.security.auth.message.config.RegistrationListener;
 import javax.xml.bind.JAXBException;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLStreamException;
-
-import org.apache.geronimo.components.jaspi.model.ConfigProviderType;
-import org.apache.geronimo.components.jaspi.model.JaspiType;
-import org.apache.geronimo.components.jaspi.model.JaspiXmlUtil;
-import org.xml.sax.SAXException;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Implementation of the AuthConfigFactory.
@@ -46,8 +44,8 @@
  */
 public class AuthConfigFactoryImpl extends AuthConfigFactory {
 
-    public static final String JASPI_CONFIGURATION_FILE = "org.apache.geronimo.jaspi.configurationFile";
-    private static final File DEFAULT_CONFIG_FILE = new File("var/config/security/jaspi/jaspi.xml");
+    public static final String JASPI_CONFIGURATION_FILE = "org.apache.geronimo.jaspic.configurationFile";
+    private static final File DEFAULT_CONFIG_FILE = new File("var/config/security/jaspic/jaspic.xml");
     public static CallbackHandler staticCallbackHandler;
 
     private static ClassLoader contextClassLoader;
@@ -91,14 +89,6 @@
         } else {
             file = new File(fileLocation);
         }
-//        if (!file.exists()) {
-//            file.getParentFile().mkdirs();
-//            try {
-//                file.createNewFile();
-//            } catch (IOException e) {
-//                throw new SecurityException("Could not initialize jaspi configuration file");
-//            }
-//        }
         return file;
     }
 

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ClassLoaderLookup.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ClassLoaderLookup.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ClassLoaderLookup.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ClassLoaderLookup.java
Fri Sep 11 01:39:45 2009
@@ -21,6 +21,8 @@
 package org.apache.geronimo.components.jaspi;
 
 /**
+ * Get a classloader suitable for a named context.
+ *
  * @version $Rev$ $Date$
  */
 public interface ClassLoaderLookup {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ConstantClassLoaderLookup.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ConstantClassLoaderLookup.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ConstantClassLoaderLookup.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/ConstantClassLoaderLookup.java
Fri Sep 11 01:39:45 2009
@@ -21,7 +21,9 @@
 package org.apache.geronimo.components.jaspi;
 
 /**
- * @version $Rev:$ $Date:$
+ * Simple default ClassLoader lookup that always returns the same classloader
+ *
+ * @version $Rev$ $Date$
  */
 public class ConstantClassLoaderLookup implements ClassLoaderLookup {
 

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/AuthModuleType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/AuthModuleType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/AuthModuleType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/AuthModuleType.java
Fri Sep 11 01:39:45 2009
@@ -24,24 +24,23 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.Map;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessagePolicy;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.MessagePolicy;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Map;
 
 
 /**

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthConfigType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthConfigType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthConfigType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthConfigType.java
Fri Sep 11 01:39:45 2009
@@ -24,25 +24,23 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ClientAuthConfig;
+import javax.security.auth.message.config.ClientAuthContext;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.security.auth.message.config.ClientAuthConfig;
-import javax.security.auth.message.config.ClientAuthContext;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.MessageInfo;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -177,7 +175,8 @@
 
     /**
      * Gets the value of the protected property.
-     * 
+     *
+     * @return whether the client auth config is protected
      */
     public boolean isProtected() {
         return _protected;
@@ -188,7 +187,8 @@
 
     /**
      * Sets the value of the protected property.
-     * 
+     *
+     * @param value whether client auth config is protected.
      */
     public void setProtected(boolean value) {
         this._protected = value;
@@ -214,7 +214,8 @@
      * Objects of the following type(s) are allowed in the list
      * {@link ClientAuthContextType }
      * 
-     * 
+     *
+     * @return map of id to client auth context
      */
     public Map<String, ClientAuthContextType> getClientAuthContext() {
         if (clientAuthContext == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthContextType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthContextType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthContextType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ClientAuthContextType.java
Fri Sep 11 01:39:45 2009
@@ -24,10 +24,7 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collections;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
@@ -40,8 +37,10 @@
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 
 /**

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ConfigProviderType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ConfigProviderType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ConfigProviderType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ConfigProviderType.java
Fri Sep 11 01:39:45 2009
@@ -24,31 +24,22 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.config.*;
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.io.Serializable;
-import java.util.Map;
-import java.util.List;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.security.auth.message.config.AuthConfigFactory;
-import javax.security.auth.message.config.RegistrationListener;
-import javax.security.auth.message.config.AuthConfigProvider;
-import javax.security.auth.message.config.ClientAuthConfig;
-import javax.security.auth.message.config.ServerAuthConfig;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.callback.CallbackHandler;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -274,7 +265,7 @@
      * Objects of the following type(s) are allowed in the list
      * {@link ClientAuthConfigType }
      * 
-     * 
+     * @return map of id to client auth config
      */
     public Map<String, ClientAuthConfigType> getClientAuthConfig() {
         if (clientAuthConfig == null) {
@@ -303,7 +294,7 @@
      * Objects of the following type(s) are allowed in the list
      * {@link ServerAuthConfigType }
      * 
-     * 
+     * @return map of id to server auth config
      */
     public Map<String, ServerAuthConfigType> getServerAuthConfig() {
         if (serverAuthConfig == null) {
@@ -365,7 +356,7 @@
                 provider = java.security.AccessController
                 .doPrivileged(new PrivilegedExceptionAction<AuthConfigProvider>() {
                     public AuthConfigProvider run() throws ClassNotFoundException, SecurityException,
NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException,
InvocationTargetException {
-                        Class<? extends AuthConfigProvider> cl = (Class<? extends
AuthConfigProvider>) Class.forName(className, true, classLoader);
+                        Class<? extends AuthConfigProvider> cl = Class.forName(className,
true, classLoader).asSubclass(AuthConfigProvider.class);
                         Constructor<? extends AuthConfigProvider> cnst = cl.getConstructor(Map.class,
AuthConfigFactory.class);
                         return cnst.newInstance(properties, authConfigFactory);
                     }
@@ -407,8 +398,8 @@
 
         /**
          * spec required constructor
-         * @param properties
-         * @param factory
+         * @param properties useless properties map
+         * @param factory useless factory
          */
         public ConfigProviderImpl(Map<String, String> properties, AuthConfigFactory
factory) {
             throw new RuntimeException("don't call this");

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiType.java
Fri Sep 11 01:39:45 2009
@@ -24,16 +24,13 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.Map;
-import java.util.HashMap;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.apache.geronimo.components.jaspi.model.ConfigProviderType;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -89,7 +86,8 @@
      * Objects of the following type(s) are allowed in the list
      * {@link ConfigProviderType }
      * 
-     * 
+     *
+     * @return map of id to Config Provider
      */
     public Map<String, ConfigProviderType> getConfigProvider() {
         if (configProvider == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiUtil.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiUtil.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiUtil.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiUtil.java
Fri Sep 11 01:39:45 2009
@@ -20,15 +20,14 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.util.Collections;
-import java.util.Map;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
 import javax.security.auth.message.AuthException;
 import javax.security.auth.message.config.AuthConfigProvider;
 import javax.security.auth.message.module.ClientAuthModule;
 import javax.security.auth.message.module.ServerAuthModule;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.util.Collections;
+import java.util.Map;
 
 /**
  * Convenience methods to wrap various jaspi objects into AuthConfigProvider instances, ready
to be registered.

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiXmlUtil.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiXmlUtil.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiXmlUtil.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/JaspiXmlUtil.java
Fri Sep 11 01:39:45 2009
@@ -20,26 +20,21 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Writer;
-import java.io.Reader;
-import java.io.IOException;
-import java.util.Collections;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import org.xml.sax.SAXException;
 
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.module.ClientAuthModule;
+import javax.security.auth.message.module.ServerAuthModule;
+import javax.xml.bind.*;
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.module.ServerAuthModule;
-import javax.security.auth.message.module.ClientAuthModule;
-
-import org.xml.sax.SAXException;
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Collections;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObject.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObject.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObject.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObject.java
Fri Sep 11 01:39:45 2009
@@ -20,13 +20,13 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import javax.security.auth.message.AuthException;
-import javax.security.auth.callback.CallbackHandler;
-
 import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public interface KeyedObject {
     String getKey();

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObjectMapAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObjectMapAdapter.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObjectMapAdapter.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/KeyedObjectMapAdapter.java
Fri Sep 11 01:39:45 2009
@@ -20,17 +20,16 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import org.apache.geronimo.components.jaspi.ConstantClassLoaderLookup;
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.lang.reflect.Array;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.security.auth.callback.CallbackHandler;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
-import org.apache.geronimo.components.jaspi.ConstantClassLoaderLookup;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/MessagePolicyType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/MessagePolicyType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/MessagePolicyType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/MessagePolicyType.java
Fri Sep 11 01:39:45 2009
@@ -24,15 +24,15 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessagePolicy;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlType;
-import javax.security.auth.message.MessagePolicy;
-import javax.security.auth.message.AuthException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -89,7 +89,8 @@
      * Objects of the following type(s) are allowed in the list
      * {@link TargetPolicyType }
      * 
-     * 
+     *
+     * @return list of target policies
      */
     public List<TargetPolicyType> getTargetPolicy() {
         if (targetPolicy == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ProtectionPolicyType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ProtectionPolicyType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ProtectionPolicyType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ProtectionPolicyType.java
Fri Sep 11 01:39:45 2009
@@ -24,18 +24,17 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
-
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessagePolicy;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.security.auth.message.MessagePolicy;
-import javax.security.auth.message.AuthException;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 
 
 /**
@@ -99,7 +98,7 @@
             return java.security.AccessController
             .doPrivileged(new PrivilegedExceptionAction<MessagePolicy.ProtectionPolicy>()
{
                 public MessagePolicy.ProtectionPolicy run() throws ClassNotFoundException,
SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException,
IllegalAccessException, InvocationTargetException {
-                    Class<? extends MessagePolicy.ProtectionPolicy> cl = (Class<?
extends MessagePolicy.ProtectionPolicy>) Class.forName(className, true, classLoader);
+                    Class<? extends MessagePolicy.ProtectionPolicy> cl = Class.forName(className,
true, classLoader).asSubclass(MessagePolicy.ProtectionPolicy.class);
                     Constructor<? extends MessagePolicy.ProtectionPolicy> cnst = cl.getConstructor();
                     MessagePolicy.ProtectionPolicy target = cnst.newInstance();
                     return target;

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthConfigType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthConfigType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthConfigType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthConfigType.java
Fri Sep 11 01:39:45 2009
@@ -24,25 +24,23 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ServerAuthConfig;
+import javax.security.auth.message.config.ServerAuthContext;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.security.auth.message.config.ServerAuthConfig;
-import javax.security.auth.message.config.ServerAuthContext;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.MessageInfo;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -188,7 +186,8 @@
 
     /**
      * Gets the value of the protected property.
-     * 
+     *
+     * @return whether the server auth config is protected
      */
     public boolean isProtected() {
         return _protected;
@@ -199,7 +198,8 @@
 
     /**
      * Sets the value of the protected property.
-     * 
+     *
+     * @param value whether the server auth context should be protected
      */
     public void setProtected(boolean value) {
         this._protected = value;
@@ -225,7 +225,8 @@
      * Objects of the following type(s) are allowed in the list
      * {@link ServerAuthContextType }
      * 
-     * 
+     *
+     * @return map of id to Server auth config
      */
     public Map<String, ServerAuthContextType> getServerAuthContext() {
         if (serverAuthContext == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthContextType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthContextType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthContextType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/ServerAuthContextType.java
Fri Sep 11 01:39:45 2009
@@ -24,25 +24,23 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collections;
+import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.message.AuthException;
 import javax.security.auth.message.AuthStatus;
 import javax.security.auth.message.MessageInfo;
-import javax.security.auth.message.module.ServerAuthModule;
-import javax.security.auth.message.module.ClientAuthModule;
 import javax.security.auth.message.config.ServerAuthContext;
+import javax.security.auth.message.module.ServerAuthModule;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.geronimo.components.jaspi.ClassLoaderLookup;
+import javax.xml.bind.annotation.XmlType;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 
 /**
@@ -181,6 +179,7 @@
      * <p/>
      * Objects of the following type(s) are allowed in the list
      * {@link AuthModuleType }
+     * @return list of Server auth modules in this context
      */
     public List<AuthModuleType<ServerAuthModule>> getServerAuthModule() {
         if (serverAuthModule == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java
Fri Sep 11 01:39:45 2009
@@ -20,15 +20,16 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.util.Properties;
-import java.util.Map;
-import java.util.HashMap;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
 
 /**
+ * jaxb helper class for maps
+ *
  * @version $Rev$ $Date$
  */
 public class StringMapAdapter extends XmlAdapter<String, Map<String, String>>
{

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetPolicyType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetPolicyType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetPolicyType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetPolicyType.java
Fri Sep 11 01:39:45 2009
@@ -24,23 +24,15 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessagePolicy;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.security.auth.message.MessagePolicy;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.callback.CallbackHandler;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -122,7 +114,8 @@
      * Objects of the following type(s) are allowed in the list
      * {@link TargetType }
      * 
-     * 
+     *
+     * @return list of targets
      */
     public List<TargetType> getTarget() {
         if (target == null) {

Modified: geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetType.java
URL: http://svn.apache.org/viewvc/geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetType.java?rev=813648&r1=813647&r2=813648&view=diff
==============================================================================
--- geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetType.java
(original)
+++ geronimo/components/jaspi/trunk/geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/TargetType.java
Fri Sep 11 01:39:45 2009
@@ -24,21 +24,17 @@
 
 package org.apache.geronimo.components.jaspi.model;
 
-import java.io.Serializable;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.Map;
-
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessagePolicy;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.security.auth.message.MessagePolicy;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.callback.CallbackHandler;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 
 
 /**
@@ -102,7 +98,7 @@
             return java.security.AccessController
             .doPrivileged(new PrivilegedExceptionAction<MessagePolicy.Target>() {
                 public MessagePolicy.Target run() throws ClassNotFoundException, SecurityException,
NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException,
InvocationTargetException {
-                    Class<? extends MessagePolicy.Target> cl = (Class<? extends
MessagePolicy.Target>) Class.forName(className, true, classLoader);
+                    Class<? extends MessagePolicy.Target> cl = Class.forName(className,
true, classLoader).asSubclass(MessagePolicy.Target.class);
                     Constructor<? extends MessagePolicy.Target> cnst = cl.getConstructor();
                     MessagePolicy.Target target = cnst.newInstance();
                     return target;



Mime
View raw message