geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1096960 [1/4] - in /geronimo/server/trunk/plugins/j2ee: geronimo-j2ee-builder/ geronimo-security-builder/ geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/ geronimo-security-builder/src/main/java/org/apache/g...
Date Tue, 26 Apr 2011 23:21:31 GMT
Author: djencks
Date: Tue Apr 26 23:21:29 2011
New Revision: 1096960

URL: http://svn.apache.org/viewvc?rev=1096960&view=rev
Log:
inital change to jaxb in security builder. Doesn't actually work yet

Added:
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/AuthModuleType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ClientAuthConfigType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ClientAuthContextType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ConfigProviderType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/JaspiType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/MessagePolicyType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ObjectFactory.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ProtectionPolicyType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ServerAuthConfigType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/ServerAuthContextType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/TargetPolicyType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/TargetType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/jaspi/package-info.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/AbstractLoginModuleType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/ControlFlagType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/LoginConfigType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/LoginModuleRefType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/LoginModuleType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/ObjectFactory.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/OptionType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/loginconfig/package-info.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/DescriptionType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/DistinguishedNameType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/LoginDomainPrincipalType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/ObjectFactory.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/PrincipalType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/RealmPrincipalType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/RoleMappingsType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/RoleType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/SecurityRefType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/SecurityType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/SubjectInfoType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/security/package-info.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/DefaultSubjectType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/DescriptionType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/ObjectFactory.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/RoleSubjectMappingsType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/RoleType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/SecurityType.java   (with props)
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/subjectinfo/package-info.java   (with props)
Removed:
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-security-1.2.xsd
Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/pom.xml
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/pom.xml
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-credential-store-1.0.xsd
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-jaspi.xsd
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-login-config-2.0.xsd
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-security-2.0.xsd
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/xsd/geronimo-subject-info-1.0.xsd
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/test/java/org/apache/geronimo/security/deployment/LoginConfigBuilderTest.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/pom.xml?rev=1096960&r1=1096959&r2=1096960&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/pom.xml Tue Apr 26 23:21:29 2011
@@ -117,24 +117,15 @@
                     <instructions>
                         <!--packages containing "impl" or "internal" are excluded by default -->
                         <Export-Package>
-                            org.apache.geronimo.xbeans.geronimo.j2ee,
-                            org.apache.geronimo.xbeans.geronimo.j2ee.impl,
                             org.apache.geronimo.j2ee.deployment,
                             org.apache.geronimo.j2ee.deployment.util,
                             org.apache.geronimo.j2ee.deployment.annotation,
                             org.apache.geronimo.j2ee.jsr88
                         </Export-Package>
-                        <_exportcontents>schemaorg_apache_xmlbeans*</_exportcontents>
-                        <DynamicImport-Package>schemaorg_apache_xmlbeans.*</DynamicImport-Package>
                         <Import-Package>
-                            org.apache.geronimo.deployment.xbeans.impl,
-                            org.apache.geronimo.deployment.javabean.xbeans.impl,
-                            org.apache.geronimo.deployment.xbeans,
-                            org.apache.geronimo.deployment.javabean.xbeans,
                             org.apache.geronimo.deployment.dconfigbean,
                             org.apache.geronimo.deployment.service,
                             org.apache.geronimo.deployment.service.jsr88,
-                            org.apache.xmlbeans.impl.schema;version="2.4",
                             *
                         </Import-Package>
                         <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/pom.xml?rev=1096960&r1=1096959&r2=1096960&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/pom.xml Tue Apr 26 23:21:29 2011
@@ -59,10 +59,46 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>xmlbeans-maven-plugin</artifactId>
-            </plugin>
+            <!--<plugin>-->
+                <!--<groupId>org.codehaus.mojo</groupId>-->
+                <!--<artifactId>xmlbeans-maven-plugin</artifactId>-->
+            <!--</plugin>-->
+            <!--<plugin>-->
+                <!--<groupId>org.codehaus.mojo</groupId>-->
+                <!--<artifactId>jaxb2-maven-plugin</artifactId>-->
+                <!--<executions>-->
+                    <!--<execution>-->
+                        <!--<goals>-->
+                            <!--<goal>xjc</goal>-->
+                        <!--</goals>-->
+                    <!--</execution>-->
+                <!--</executions>-->
+                <!--&lt;!&ndash;<configuration>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<schemaFiles>geronimo-credential-store-1.0.xsd</schemaFiles>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<packageName>org.apache.geronimo.security.deployment.model.credentialstore</packageName>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<extension>true</extension>&ndash;&gt;-->
+                <!--&lt;!&ndash;</configuration>&ndash;&gt;-->
+                <!--&lt;!&ndash;<configuration>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<schemaFiles>geronimo-jaspi.xsd</schemaFiles>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<packageName>org.apache.geronimo.security.deployment.model.jaspi</packageName>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<extension>true</extension>&ndash;&gt;-->
+                <!--&lt;!&ndash;</configuration>&ndash;&gt;-->
+                <!--&lt;!&ndash;<configuration>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<schemaFiles>geronimo-login-config-2.0.xsd</schemaFiles>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<packageName>org.apache.geronimo.security.deployment.model.loginconfig</packageName>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<extension>true</extension>&ndash;&gt;-->
+                <!--&lt;!&ndash;</configuration>&ndash;&gt;-->
+                <!--&lt;!&ndash;<configuration>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<schemaFiles>geronimo-security-2.0.xsd</schemaFiles>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<packageName>org.apache.geronimo.security.deployment.model.security</packageName>&ndash;&gt;-->
+                    <!--&lt;!&ndash;<extension>true</extension>&ndash;&gt;-->
+                <!--&lt;!&ndash;</configuration>&ndash;&gt;-->
+                <!--<configuration>-->
+                    <!--<schemaFiles>geronimo-subject-info-1.0.xsd</schemaFiles>-->
+                    <!--<packageName>org.apache.geronimo.security.deployment.model.subjectinfo</packageName>-->
+                    <!--<extension>true</extension>-->
+                <!--</configuration>-->
+            <!--</plugin>-->
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -73,30 +109,13 @@
                             org.apache.geronimo.security.deployment,
                             org.apache.geronimo.xml.ns.security12,
                             org.apache.geronimo.xml.ns.security12.impl,
-                            org.apache.geronimo.xbeans.geronimo.credentialstore,
-                            org.apache.geronimo.xbeans.geronimo.credentialstore.impl,
-                            org.apache.geronimo.xbeans.geronimo.jaspi,
-                            org.apache.geronimo.xbeans.geronimo.jaspi.impl,
-                            org.apache.geronimo.xbeans.geronimo.loginconfig,
-                            org.apache.geronimo.xbeans.geronimo.loginconfig.impl,
-                            org.apache.geronimo.xbeans.geronimo.security,
-                            org.apache.geronimo.xbeans.geronimo.security.impl,
-                            org.apache.geronimo.xbeans.geronimo.security.subjectinfo,
-                            org.apache.geronimo.xbeans.geronimo.security.subjectinfo.impl
                         </Export-Package>
                         <_exportcontents>schemaorg_apache_xmlbeans*</_exportcontents>
                         <DynamicImport-Package>schemaorg_apache_xmlbeans.*</DynamicImport-Package>
                         <Import-Package>
-                            org.apache.geronimo.deployment.xbeans.impl,
-                            org.apache.geronimo.deployment.javabean.xbeans.impl,
-                            org.apache.geronimo.deployment.xbeans,
-                            org.apache.geronimo.deployment.javabean.xbeans,
                             org.apache.geronimo.deployment.dconfigbean,
                             org.apache.geronimo.deployment.service,
                             org.apache.geronimo.deployment.service.jsr88,
-                            org.apache.xmlbeans.impl.schema;version="2.4",
-                            org.apache.geronimo.xbeans.geronimo.j2ee,
-                            org.apache.geronimo.xbeans.geronimo.j2ee.impl,
                             org.apache.geronimo.j2ee.deployment,
                             org.apache.geronimo.j2ee.deployment.annotation,
                             org.apache.geronimo.j2ee.jsr88,

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java?rev=1096960&r1=1096959&r2=1096960&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java Tue Apr 26 23:21:29 2011
@@ -27,12 +27,11 @@ import org.apache.geronimo.common.Deploy
 import org.apache.geronimo.deployment.service.XmlAttributeBuilder;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.xbeans.geronimo.credentialstore.CredentialStoreDocument;
-import org.apache.geronimo.xbeans.geronimo.credentialstore.CredentialStoreType;
-import org.apache.geronimo.xbeans.geronimo.credentialstore.CredentialType;
-import org.apache.geronimo.xbeans.geronimo.credentialstore.RealmType;
-import org.apache.geronimo.xbeans.geronimo.credentialstore.SubjectType;
-import org.apache.xmlbeans.XmlObject;
+import org.apache.geronimo.security.deployment.model.credentialstore.CredentialStoreType;
+import org.apache.geronimo.security.deployment.model.credentialstore.CredentialType;
+import org.apache.geronimo.security.deployment.model.credentialstore.ObjectFactory;
+import org.apache.geronimo.security.deployment.model.credentialstore.RealmType;
+import org.apache.geronimo.security.deployment.model.credentialstore.SubjectType;
 import org.osgi.framework.Bundle;
 
 /**
@@ -40,24 +39,24 @@ import org.osgi.framework.Bundle;
  */
 public class CredentialStoreBuilder implements XmlAttributeBuilder {
 
-    private static final String NAMESPACE = CredentialStoreDocument.type.getDocumentElementName().getNamespaceURI();
+    private static final String NAMESPACE = ObjectFactory._CredentialStore_QNAME.getNamespaceURI();
 
     public String getNamespace() {
         return NAMESPACE;
     }
 
-    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(Object xmlObject, Object enclosing, String type, Bundle bundle) throws DeploymentException {
         Map<String, Map<String, Map<String, String>>> credentialStore = new HashMap<String, Map<String, Map<String, String>>>();
-        CredentialStoreType cst = (CredentialStoreType) xmlObject.copy().changeType(CredentialStoreType.type);
-        for (RealmType realmType: cst.getRealmArray()) {
+        CredentialStoreType cst = (CredentialStoreType) xmlObject;
+        for (RealmType realmType: cst.getRealm()) {
             String realmName = realmType.getName().trim();
             Map<String, Map<String, String>> realm = new HashMap<String, Map<String, String>>();
             credentialStore.put(realmName, realm);
-            for (SubjectType subjectType: realmType.getSubjectArray()) {
+            for (SubjectType subjectType: realmType.getSubject()) {
                 String id = subjectType.getId().trim();
                 Map<String, String> subject = new HashMap<String, String>();
                 realm.put(id, subject);
-                for (CredentialType credentialType: subjectType.getCredentialArray()) {
+                for (CredentialType credentialType: subjectType.getCredential()) {
                     String handlerType = credentialType.getType().trim();
                     String value = credentialType.getValue().trim();
                     subject.put(handlerType, value);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java?rev=1096960&r1=1096959&r2=1096960&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java Tue Apr 26 23:21:29 2011
@@ -17,36 +17,31 @@
 
 package org.apache.geronimo.security.deployment;
 
+import java.net.URL;
 import java.security.Principal;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.Collection;
 import java.util.jar.JarFile;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.service.SingleGBeanBuilder;
-import org.apache.geronimo.deployment.xbeans.PatternType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.j2ee.deployment.EARContext;
-import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.Naming;
@@ -60,24 +55,19 @@ import org.apache.geronimo.security.Secu
 import org.apache.geronimo.security.credentialstore.CredentialStore;
 import org.apache.geronimo.security.deploy.PrincipalInfo;
 import org.apache.geronimo.security.deploy.SubjectInfo;
+import org.apache.geronimo.security.deployment.model.security.LoginDomainPrincipalType;
+import org.apache.geronimo.security.deployment.model.security.PrincipalType;
+import org.apache.geronimo.security.deployment.model.security.RealmPrincipalType;
+import org.apache.geronimo.security.deployment.model.security.RoleMappingsType;
+import org.apache.geronimo.security.deployment.model.security.RoleType;
+import org.apache.geronimo.security.deployment.model.security.SecurityRefType;
+import org.apache.geronimo.security.deployment.model.security.SecurityType;
+import org.apache.geronimo.security.deployment.model.security.SubjectInfoType;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.security.jacc.mappingprovider.ApplicationPrincipalRoleConfigurationManager;
 import org.apache.geronimo.security.jacc.PrincipalRoleMapper;
+import org.apache.geronimo.security.jacc.mappingprovider.ApplicationPrincipalRoleConfigurationManager;
 import org.apache.geronimo.security.util.ConfigurationUtil;
-import org.apache.geronimo.xbeans.geronimo.security.GerLoginDomainPrincipalType;
-import org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType;
-import org.apache.geronimo.xbeans.geronimo.security.GerRealmPrincipalType;
-import org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType;
-import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
-import org.apache.geronimo.xbeans.geronimo.security.GerSecurityDocument;
-import org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefDocument;
-import org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType;
-import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
-import org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType;
-import org.apache.xmlbeans.QNameSet;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.Bundle;
 
 /**
@@ -85,10 +75,10 @@ import org.osgi.framework.Bundle;
  */
 @GBean(j2eeType = NameFactory.MODULE_BUILDER)
 public class GeronimoSecurityBuilderImpl implements NamespaceDrivenBuilder, ModuleBuilderExtension, GBeanLifecycle {
-    private static final QName BASE_SECURITY_QNAME = org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument.type.getDocumentElementName();
-    private static final QName SECURITY_QNAME = GerSecurityDocument.type.getDocumentElementName();
-    private static final QName SECURITY_REF_QNAME = GerSecurityRefDocument.type.getDocumentElementName();
-    private static final QNameSet SECURITY_QNAME_SET = QNameSet.forArray(new QName[]{SECURITY_QNAME, SECURITY_REF_QNAME});
+//    private static final QName BASE_SECURITY_QNAME = org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument.type.getDocumentElementName();
+//    private static final QName SECURITY_QNAME = GerSecurityDocument.type.getDocumentElementName();
+//    private static final QName SECURITY_REF_QNAME = GerSecurityRefDocument.type.getDocumentElementName();
+//    private static final QNameSet SECURITY_QNAME_SET = QNameSet.forArray(new QName[]{SECURITY_QNAME, SECURITY_REF_QNAME});
     public static final String GERONIMO_SECURITY_NAMESPACE = "http://geronimo.apache.org/xml/ns/security-2.0";
     private static final Map<String, String> NAMESPACE_UPDATES = new HashMap<String, String>();
 
@@ -161,19 +151,13 @@ public class GeronimoSecurityBuilderImpl
     }
 
     //NamespaceDrivenBuilder methods
-    public void buildEnvironment(XmlObject container, Environment environment) throws DeploymentException {
+    public void buildEnvironment(Object container, Environment environment) throws DeploymentException {
     }
 
 
-    public void build(XmlObject container, DeploymentContext applicationContext, DeploymentContext moduleContext) throws DeploymentException {
-        XmlObject[] items = container.selectChildren(SECURITY_QNAME);
-        for (XmlObject item : items) {
-            GerSecurityType securityType;
-            try {
-                securityType = (GerSecurityType) XmlBeansUtil.typedCopy(item, GerSecurityType.type);
-            } catch (XmlException e) {
-                throw new DeploymentException("Could not validate security element", e);
-            }
+    public void build(Object container, DeploymentContext applicationContext, DeploymentContext moduleContext) throws DeploymentException {
+        if (container instanceof SecurityType) {
+            SecurityType securityType = (SecurityType) container;
             Bundle bundle = applicationContext.getDeploymentBundle();
 
             if (applicationContext instanceof EARContext) {
@@ -186,26 +170,20 @@ public class GeronimoSecurityBuilderImpl
                 setRoleMapperName(applicationContext, roleMapperDataName);
             }
         }
-        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
-        if (refs.length > 1) {
-            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
-        }
-        if (refs.length == 1) {
-            GerSecurityRefType ref;
-            try {
-                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
-                if (ref.isSetName()) {
+        if (container instanceof SecurityRefType) {
+            SecurityRefType ref = (SecurityRefType) container;
+                if (ref.getName() != null) {
                     String name = ref.getName().trim();
+                    //TODO its an osgi filter expression
                     AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                     setRoleMapperName(applicationContext, roleMapperDataName);
                 } else {
-                    PatternType SecurityRefType = ref.getRef();
-                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
+                    String filter = ref.getRef();
+                    //TODO its an osgi filter expression
+                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", filter), PrincipalRoleMapper.class.getName());
+//                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                     setRoleMapperName(applicationContext, roleMapperDataName);
                 }
-            } catch (XmlException e) {
-                throw new DeploymentException("Could not validate security element", e);
-            }
         }
     }
 
@@ -237,15 +215,15 @@ public class GeronimoSecurityBuilderImpl
         }
     }
 
-    private SecurityConfiguration buildSecurityConfig(GerSecurityType securityType) {
+    private SecurityConfiguration buildSecurityConfig(SecurityType securityType) {
 
         if (securityType == null) {
             return null;
         }
 
-        boolean doAsCurrentCaller = securityType.getDoasCurrentCaller();
-        boolean useContextHandler = securityType.getUseContextHandler();
-        String defaultRole = securityType.isSetDefaultRole() ? securityType.getDefaultRole().trim() : null;
+        boolean doAsCurrentCaller = securityType.isDoasCurrentCaller();
+        boolean useContextHandler = securityType.isUseContextHandler();
+        String defaultRole = securityType.getDefaultRole();
 
         return new SecurityConfiguration(defaultRole, doAsCurrentCaller, useContextHandler);
     }
@@ -259,7 +237,7 @@ public class GeronimoSecurityBuilderImpl
         roles.add(roleName);
     }
 
-    private SubjectInfo buildSubjectInfo(GerSubjectInfoType defaultSubject) {
+    private SubjectInfo buildSubjectInfo(SubjectInfoType defaultSubject) {
         if (defaultSubject == null) {
             return null;
         }
@@ -268,50 +246,48 @@ public class GeronimoSecurityBuilderImpl
         return new SubjectInfo(realmName, id);
     }
 
-    private static Principal buildRealmPrincipal(GerRealmPrincipalType realmPrincipalType, Bundle bundle) {
-        return ConfigurationUtil.generateRealmPrincipal(realmPrincipalType.getRealmName().trim(), realmPrincipalType.getDomainName().trim(), realmPrincipalType.getClass1().trim(), realmPrincipalType.getName().trim(), bundle);
+    private static Principal buildRealmPrincipal(RealmPrincipalType realmPrincipalType, Bundle bundle) {
+        return ConfigurationUtil.generateRealmPrincipal(realmPrincipalType.getRealmName().trim(), realmPrincipalType.getDomainName().trim(), realmPrincipalType.getClazz().trim(), realmPrincipalType.getName().trim(), bundle);
     }
 
-    private static Principal buildDomainPrincipal(GerLoginDomainPrincipalType domainPrincipalType, Bundle bundle) {
-        return ConfigurationUtil.generateDomainPrincipal(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(), domainPrincipalType.getName().trim(), bundle);
+    private static Principal buildDomainPrincipal(LoginDomainPrincipalType domainPrincipalType, Bundle bundle) {
+        return ConfigurationUtil.generateDomainPrincipal(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClazz().trim(), domainPrincipalType.getName().trim(), bundle);
     }
 
-    private static Principal buildPrincipal(GerPrincipalType principalType, Bundle bundle) {
-        return ConfigurationUtil.generatePrincipal(principalType.getClass1().trim(), principalType.getName().trim(), bundle);
+    private static Principal buildPrincipal(PrincipalType principalType, Bundle bundle) {
+        return ConfigurationUtil.generatePrincipal(principalType.getClazz().trim(), principalType.getName().trim(), bundle);
     }
 
     //used from TSSConfigEditor
-    public PrincipalInfo buildPrincipal(XmlObject xmlObject) {
-        GerPrincipalType principalType = (GerPrincipalType) xmlObject;
-        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim());
+    public PrincipalInfo buildPrincipal(PrincipalType principalType) {
+        return new PrincipalInfo(principalType.getClazz().trim(), principalType.getName().trim());
     }
 
-    protected AbstractNameQuery configureRoleMapper(DeploymentContext deploymentContext, GerSecurityType securityType, Bundle bundle) throws DeploymentException {
+    protected AbstractNameQuery configureRoleMapper(DeploymentContext deploymentContext, SecurityType securityType, Bundle bundle) throws DeploymentException {
         Map<String, SubjectInfo> roleDesignates = new HashMap<String, SubjectInfo>();
         Map<Principal, Set<String>> principalRoleMap = new HashMap<Principal, Set<String>>();
-        if (securityType.isSetRoleMappings()) {
-            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
-            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
-                GerRoleType roleType = roleMappingsType.getRoleArray(i);
+        if (securityType.getRoleMappings() != null) {
+            RoleMappingsType roleMappingsType = securityType.getRoleMappings();
+            for (RoleType roleType : roleMappingsType.getRole()) {
 
                 String roleName = roleType.getRoleName().trim();
-                if (roleType.isSetRunAsSubject()) {
+                if (roleType.getRunAsSubject() != null) {
                     SubjectInfo subjectInfo = buildSubjectInfo(roleType.getRunAsSubject());
                     roleDesignates.put(roleName, subjectInfo);
                 }
 
-                for (int j = 0; j < roleType.sizeOfRealmPrincipalArray(); j++) {
-                    Principal principal = buildRealmPrincipal(roleType.getRealmPrincipalArray(j), bundle);
+                for (RealmPrincipalType realmPrincipalType: roleType.getRealmPrincipal()) {
+                    Principal principal = buildRealmPrincipal(realmPrincipalType, bundle);
                     add(roleName, principal, principalRoleMap);
                 }
 
-                for (int j = 0; j < roleType.sizeOfLoginDomainPrincipalArray(); j++) {
-                    Principal principal = buildDomainPrincipal(roleType.getLoginDomainPrincipalArray(j), bundle);
+                for (LoginDomainPrincipalType loginDomainPrincipalType: roleType.getLoginDomainPrincipal()) {
+                    Principal principal = buildDomainPrincipal(loginDomainPrincipalType, bundle);
                     add(roleName, principal, principalRoleMap);
                 }
 
-                for (int j = 0; j < roleType.sizeOfPrincipalArray(); j++) {
-                    Principal principal = buildPrincipal(roleType.getPrincipalArray(j), bundle);
+                for (PrincipalType principalType: roleType.getPrincipal()) {
+                    Principal principal = buildPrincipal(principalType, bundle);
                     add(roleName, principal, principalRoleMap);
                 }
 
@@ -320,14 +296,16 @@ public class GeronimoSecurityBuilderImpl
 
         SubjectInfo defaultSubjectInfo = buildSubjectInfo(securityType.getDefaultSubject());
         AbstractNameQuery credentialStoreName;
-        if (securityType.isSetCredentialStoreRef()) {
-            PatternType credentialStoreType = securityType.getCredentialStoreRef();
-            credentialStoreName = SingleGBeanBuilder.buildAbstractNameQuery(credentialStoreType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
+        if (securityType.getCredentialStoreRef() != null) {
+            String credentialStoreType = securityType.getCredentialStoreRef();
+            //TODO use osgi filter
+            credentialStoreName = new AbstractNameQuery(null, Collections.singletonMap("name", credentialStoreType), CredentialStore.class.getName());
+//            credentialStoreName = SingleGBeanBuilder.buildAbstractNameQuery(credentialStoreType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
         } else {
             credentialStoreName = this.defaultCredentialStoreName;
         }
         Naming naming = deploymentContext.getNaming();
-        String name = securityType.isSetName() ? securityType.getName() : "RoleMapper";
+        String name = securityType.getName() != null ? securityType.getName() : "RoleMapper";
         AbstractName roleMapperName = naming.createChildName(deploymentContext.getModuleName(), "RoleMapper", name);
         GBeanData roleMapperData = new GBeanData(roleMapperName, ApplicationPrincipalRoleConfigurationManager.GBEAN_INFO);
         roleMapperData.setAttribute("principalRoleMap", principalRoleMap);
@@ -351,17 +329,5 @@ public class GeronimoSecurityBuilderImpl
         return jaccBeanData;
     }
 
-    public QNameSet getSpecQNameSet() {
-        return QNameSet.EMPTY;
-    }
-
-    public QNameSet getPlanQNameSet() {
-        return SECURITY_QNAME_SET;
-    }
-
-    public QName getBaseQName() {
-        return BASE_SECURITY_QNAME;
-    }
-
 
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java?rev=1096960&r1=1096959&r2=1096960&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java Tue Apr 26 23:21:29 2011
@@ -18,6 +18,7 @@ package org.apache.geronimo.security.dep
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -25,14 +26,10 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.xml.namespace.QName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.service.SingleGBeanBuilder;
 import org.apache.geronimo.deployment.service.XmlAttributeBuilder;
 import org.apache.geronimo.deployment.service.XmlReferenceBuilder;
-import org.apache.geronimo.deployment.xbeans.PatternType;
-import org.apache.geronimo.deployment.xbeans.XmlAttributeType;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -45,27 +42,24 @@ import org.apache.geronimo.kernel.GBeanA
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.security.SecurityNames;
+import org.apache.geronimo.security.deployment.model.loginconfig.AbstractLoginModuleType;
+import org.apache.geronimo.security.deployment.model.loginconfig.LoginConfigType;
+import org.apache.geronimo.security.deployment.model.loginconfig.LoginModuleRefType;
+import org.apache.geronimo.security.deployment.model.loginconfig.LoginModuleType;
+import org.apache.geronimo.security.deployment.model.loginconfig.ObjectFactory;
+import org.apache.geronimo.security.deployment.model.loginconfig.OptionType;
 import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
 import org.apache.geronimo.security.jaas.LoginModuleControlFlag;
 import org.apache.geronimo.security.jaas.LoginModuleControlFlagEditor;
 import org.apache.geronimo.security.jaas.LoginModuleGBean;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerAbstractLoginModuleType;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerLoginConfigDocument;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerLoginConfigType;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerLoginModuleRefType;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerLoginModuleType;
-import org.apache.geronimo.xbeans.geronimo.loginconfig.GerOptionType;
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
 import org.osgi.framework.Bundle;
 
 
 /**
  * @version $Rev$ $Date$
  */
-public class LoginConfigBuilder implements XmlReferenceBuilder {
-    public static final String LOGIN_CONFIG_NAMESPACE = GerLoginConfigDocument.type.getDocumentElementName().getNamespaceURI();
+public class LoginConfigBuilder {
+    public static final String LOGIN_CONFIG_NAMESPACE = ObjectFactory._LoginConfig_QNAME.getNamespaceURI();
     private static final QName LOGIN_MODULE_QNAME = new QName(LOGIN_CONFIG_NAMESPACE, "login-module");
     private static final QName SERVER_SIDE_QNAME = new QName(null, "server-side");
 
@@ -95,42 +89,39 @@ public class LoginConfigBuilder implemen
         return LOGIN_CONFIG_NAMESPACE;
     }
 
-    public ReferencePatterns getReferences(XmlObject xmlObject, DeploymentContext context, AbstractName parentName, Bundle bundle) throws DeploymentException {
+    public ReferencePatterns getReferences(Object xmlObject, DeploymentContext context, AbstractName parentName, Bundle bundle) throws DeploymentException {
         List<GBeanData> uses = new ArrayList<GBeanData>();
-        GerLoginConfigType loginConfig = (GerLoginConfigType) xmlObject.copy().changeType(GerLoginConfigType.type);
-        XmlCursor xmlCursor = loginConfig.newCursor();
-        xmlCursor.push();
+        LoginConfigType loginConfig = (LoginConfigType) xmlObject;
+//        XmlCursor xmlCursor = loginConfig.newCursor();
+//        xmlCursor.push();
         try {
             //munge xml
-            if (xmlCursor.toChild(LOGIN_MODULE_QNAME)) {
-                do {
-                    xmlCursor.removeAttribute(SERVER_SIDE_QNAME);
-                } while (xmlCursor.toNextSibling(LOGIN_MODULE_QNAME));
-            }
-            xmlCursor.pop();
+//            if (xmlCursor.toChild(LOGIN_MODULE_QNAME)) {
+//                do {
+//                    xmlCursor.removeAttribute(SERVER_SIDE_QNAME);
+//                } while (xmlCursor.toNextSibling(LOGIN_MODULE_QNAME));
+//            }
+//            xmlCursor.pop();
             //validate
-            XmlOptions xmlOptions = new XmlOptions();
-            xmlOptions.setLoadLineNumbers();
-            Collection errors = new ArrayList();
-            xmlOptions.setErrorListener(errors);
-            if (!loginConfig.validate(xmlOptions)) {
-                throw new DeploymentException("Invalid login configuration:\n" + errors + "\nDescriptor: " + loginConfig.toString());
-            }
+//            XmlOptions xmlOptions = new XmlOptions();
+//            xmlOptions.setLoadLineNumbers();
+//            Collection errors = new ArrayList();
+//            xmlOptions.setErrorListener(errors);
+//            if (!loginConfig.validate(xmlOptions)) {
+//                throw new DeploymentException("Invalid login configuration:\n" + errors + "\nDescriptor: " + loginConfig.toString());
+//            }
             //find the login modules
             Set<String> loginModuleNames = new HashSet<String>();
-            boolean atStart = true;
-            while ((atStart && xmlCursor.toFirstChild()) || (!atStart && xmlCursor.toNextSibling())) {
-                atStart = false;
-                XmlObject child = xmlCursor.getObject();
-                GerAbstractLoginModuleType abstractLoginModule = (GerAbstractLoginModuleType) child;
+            for (AbstractLoginModuleType abstractLoginModule: loginConfig.getLoginModuleRefOrLoginModule()) {
                 String controlFlag = abstractLoginModule.getControlFlag().toString();
-                boolean wrapPrincipals = (abstractLoginModule.isSetWrapPrincipals() && abstractLoginModule.getWrapPrincipals());
+                boolean wrapPrincipals = (abstractLoginModule.isWrapPrincipals() != null && abstractLoginModule.isWrapPrincipals());
                 ReferencePatterns loginModuleReferencePatterns;
                 String name;
-                if (abstractLoginModule instanceof GerLoginModuleRefType) {
-                    GerLoginModuleRefType loginModuleRef = (GerLoginModuleRefType) abstractLoginModule;
-                    PatternType patternType = loginModuleRef.getPattern();
-                    AbstractNameQuery loginModuleNameQuery = SingleGBeanBuilder.buildAbstractNameQuery(patternType, USE_REFERENCE_INFO);
+                if (abstractLoginModule instanceof LoginModuleRefType) {
+                    LoginModuleRefType loginModuleRef = (LoginModuleRefType) abstractLoginModule;
+                    String patternType = loginModuleRef.getFilter();
+                    //TODO osgi this is a filter
+                    AbstractNameQuery loginModuleNameQuery = new AbstractNameQuery(null, Collections.singletonMap("name", patternType), LoginModuleGBean.class.getName());
                     loginModuleReferencePatterns = new ReferencePatterns(loginModuleNameQuery);
                     name = (String) loginModuleNameQuery.getName().get("name");
                     if (name == null) {
@@ -153,40 +144,39 @@ public class LoginConfigBuilder implemen
 //                    {
 //                        throw new DeploymentException("Unable to create reference to login module " + name, e);
 //                    }
-                } else if (abstractLoginModule instanceof GerLoginModuleType) {
+                } else if (abstractLoginModule instanceof LoginModuleType) {
                     //create the LoginModuleGBean also
                     AbstractName loginModuleName;
 
-                    GerLoginModuleType loginModule = (GerLoginModuleType) abstractLoginModule;
+                    LoginModuleType loginModule = (LoginModuleType) abstractLoginModule;
                     name = trim(loginModule.getLoginDomainName());
                     if (!loginModuleNames.add(name)) {
                         throw new DeploymentException("Security realm contains two login domains called '" + name + "'");
                     }
                     String className = trim(loginModule.getLoginModuleClass());
                     Map<String, Object> options = new HashMap<String, Object>();
-                    GerOptionType[] optionArray = loginModule.getOptionArray();
-                    for (GerOptionType gerOptionType : optionArray) {
+                    for (OptionType gerOptionType : loginModule.getOption()) {
                         String key = gerOptionType.getName();
-                        String value = trim(gerOptionType.getStringValue());
+                        String value = trim(gerOptionType.getValue());
                         options.put(key, value);
                     }
-                    XmlAttributeType[] xmlOptionArray = loginModule.getXmlOptionArray();
-                    if (xmlOptionArray != null) {
-                        for (XmlAttributeType xmlOptionType : xmlOptionArray) {
-                            String key = xmlOptionType.getName().trim();
-                            XmlObject[] anys = xmlOptionType.selectChildren(XmlAttributeType.type.qnameSetForWildcardElements());
-                            if (anys.length != 1) {
-                                throw new DeploymentException("Unexpected count of xs:any elements in xml-attribute " + anys.length + " qnameset: " + XmlAttributeType.type.qnameSetForWildcardElements());
-                            }
-                            String namespace = xmlObject.getDomNode().getNamespaceURI();
-                            XmlAttributeBuilder builder = (XmlAttributeBuilder) xmlAttributeBuilderMap.get(namespace);
-                            if (builder == null) {
-                                throw new DeploymentException("No attribute builder deployed for namespace: " + namespace);
-                            }
-                            Object value = builder.getValue(anys[0], xmlOptionType, null, bundle);
-                            options.put(key, value);
-                        }
-                    }
+//                    XmlAttributeType[] xmlOptionArray = loginModule.getXmlOptionArray();
+//                    if (xmlOptionArray != null) {
+//                        for (XmlAttributeType xmlOptionType : xmlOptionArray) {
+//                            String key = xmlOptionType.getName().trim();
+//                            XmlObject[] anys = xmlOptionType.selectChildren(XmlAttributeType.type.qnameSetForWildcardElements());
+//                            if (anys.length != 1) {
+//                                throw new DeploymentException("Unexpected count of xs:any elements in xml-attribute " + anys.length + " qnameset: " + XmlAttributeType.type.qnameSetForWildcardElements());
+//                            }
+//                            String namespace = xmlObject.getDomNode().getNamespaceURI();
+//                            XmlAttributeBuilder builder = (XmlAttributeBuilder) xmlAttributeBuilderMap.get(namespace);
+//                            if (builder == null) {
+//                                throw new DeploymentException("No attribute builder deployed for namespace: " + namespace);
+//                            }
+//                            Object value = builder.getValue(anys[0], xmlOptionType, null, bundle);
+//                            options.put(key, value);
+//                        }
+//                    }
                     loginModuleName = naming.createChildName(parentName, name, SecurityNames.LOGIN_MODULE);
                     loginModuleReferencePatterns = new ReferencePatterns(loginModuleName);
                     GBeanData loginModuleGBeanData = new GBeanData(loginModuleName, LoginModuleGBean.GBEAN_INFO);
@@ -215,8 +205,8 @@ public class LoginConfigBuilder implemen
             }
         } catch (GBeanAlreadyExistsException e) {
             throw new DeploymentException(e);
-        } finally {
-            xmlCursor.dispose();
+//        } finally {
+//            xmlCursor.dispose();
         }
         return uses.size() == 0 ? null : new ReferencePatterns(uses.get(0).getAbstractName());
     }

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,174 @@
+/*
+ * 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.geronimo.security.deployment.model;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.ValidationEvent;
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.sax.SAXSource;
+import org.apache.geronimo.security.deployment.model.loginconfig.LoginConfigType;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLFilter;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLFilterImpl;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class JaxbUtil {
+
+    public static final XMLInputFactory XMLINPUT_FACTORY = XMLInputFactory.newInstance();
+    private static JAXBContext LOGIN_CONFIG_CONTEXT;
+    static {
+        try {
+            LOGIN_CONFIG_CONTEXT = JAXBContext.newInstance(LoginConfigType.class);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static LoginConfigType unmarshalLoginConfig(InputStream in, boolean validate) throws XMLStreamException, JAXBException {
+        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
+        Unmarshaller unmarshaller = LOGIN_CONFIG_CONTEXT.createUnmarshaller();
+        JAXBElement<LoginConfigType> element = unmarshaller.unmarshal(xmlStream, LoginConfigType.class);
+        LoginConfigType applicationType = element.getValue();
+        return applicationType;
+    }
+
+    public static void marshalLoginConfig(LoginConfigType object, Writer out) throws JAXBException {
+        Marshaller marshaller = LOGIN_CONFIG_CONTEXT.createMarshaller();
+
+        marshaller.setProperty("jaxb.formatted.output", true);
+
+        marshaller.marshal(object, out);
+    }
+    public static <T> void marshal(Class<T> type, Object object, Writer out) throws JAXBException {
+        JAXBContext ctx2 = JAXBContext.newInstance(type);
+        Marshaller marshaller = ctx2.createMarshaller();
+
+        marshaller.setProperty("jaxb.formatted.output", true);
+
+        marshaller.marshal(object, out);
+    }
+
+
+    public static LoginConfigType unmarshalLoginConfig2(InputStream in, boolean validate) throws ParserConfigurationException, SAXException, JAXBException {
+        InputSource inputSource = new InputSource(in);
+
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        factory.setValidating(validate);
+        SAXParser parser = factory.newSAXParser();
+
+        Unmarshaller unmarshaller = LOGIN_CONFIG_CONTEXT.createUnmarshaller();
+        unmarshaller.setEventHandler(new ValidationEventHandler() {
+            public boolean handleEvent(ValidationEvent validationEvent) {
+                System.out.println(validationEvent);
+                return false;
+            }
+        });
+
+        XMLFilter xmlFilter = new NoSourceFilter(parser.getXMLReader());
+        xmlFilter.setContentHandler(unmarshaller.getUnmarshallerHandler());
+
+        SAXSource source = new SAXSource(xmlFilter, inputSource);
+
+        return LoginConfigType.class.cast(unmarshaller.unmarshal(source));
+    }
+
+    /**
+     * Read in a T from the input stream.
+     *
+     * @param type     Class of object to be read in
+     * @param in       input stream to read
+     * @param validate whether to validate the input.
+     * @param <T>      class of object to be returned
+     * @return a T read from the input stream
+     * @throws javax.xml.parsers.ParserConfigurationException is the SAX parser can not be configured
+     * @throws org.xml.sax.SAXException                 if there is an xml problem
+     * @throws JAXBException                if the xml cannot be marshalled into a T.
+     */
+    public static <T> T unmarshal(Class<T> type, InputStream in, boolean validate) throws ParserConfigurationException, SAXException, JAXBException {
+        InputSource inputSource = new InputSource(in);
+
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        factory.setValidating(validate);
+        SAXParser parser = factory.newSAXParser();
+
+        JAXBContext ctx = JAXBContext.newInstance(type);
+        Unmarshaller unmarshaller = ctx.createUnmarshaller();
+        unmarshaller.setEventHandler(new ValidationEventHandler() {
+            public boolean handleEvent(ValidationEvent validationEvent) {
+                System.out.println(validationEvent);
+                return false;
+            }
+        });
+
+        XMLFilter xmlFilter = new NoSourceFilter(parser.getXMLReader());
+        xmlFilter.setContentHandler(unmarshaller.getUnmarshallerHandler());
+
+        SAXSource source = new SAXSource(xmlFilter, inputSource);
+
+        return type.cast(unmarshaller.unmarshal(source));
+    }
+
+    public static class NoSourceFilter extends XMLFilterImpl {
+        private static final InputSource EMPTY_INPUT_SOURCE = new InputSource(new ByteArrayInputStream(new byte[0]));
+
+        public NoSourceFilter(XMLReader xmlReader) {
+            super(xmlReader);
+        }
+
+        @Override
+        public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
+            return EMPTY_INPUT_SOURCE;
+        }
+
+        @Override
+        public void startElement(String uri, String localName, String qname, Attributes atts) throws SAXException {
+            super.startElement("http://geronimo.apache.org/xml/ns/deployment-1.2", localName, qname, atts);
+        }
+
+        @Override
+        public void endElement(String uri, String localName, String qName) throws SAXException {
+            super.endElement("http://geronimo.apache.org/xml/ns/deployment-1.2", localName, qName);
+        }
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/JaxbUtil.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,78 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+
+package org.apache.geronimo.security.deployment.model.credentialstore;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ *                 Defines the list of realms
+ *             
+ * 
+ * <p>Java class for credential-storeType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="credential-storeType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="realm" type="{http://geronimo.apache.org/xml/ns/credentialstore-1.0}realmType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "credential-storeType", propOrder = {
+    "realm"
+})
+public class CredentialStoreType {
+
+    protected List<RealmType> realm;
+
+    /**
+     * Gets the value of the realm property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the realm property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getRealm().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link RealmType }
+     * 
+     * 
+     */
+    public List<RealmType> getRealm() {
+        if (realm == null) {
+            realm = new ArrayList<RealmType>();
+        }
+        return this.realm;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialStoreType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,97 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+
+package org.apache.geronimo.security.deployment.model.credentialstore;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for credentialType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="credentialType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "credentialType", propOrder = {
+    "type",
+    "value"
+})
+public class CredentialType {
+
+    @XmlElement(required = true)
+    protected String type;
+    @XmlElement(required = true)
+    protected String value;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/CredentialType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,84 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+
+package org.apache.geronimo.security.deployment.model.credentialstore;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.apache.geronimo.security.deployment.model.credentialstore package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    public final static QName _CredentialStore_QNAME = new QName("http://geronimo.apache.org/xml/ns/credentialstore-1.0", "credential-store");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.geronimo.security.deployment.model.credentialstore
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link SubjectType }
+     * 
+     */
+    public SubjectType createSubjectType() {
+        return new SubjectType();
+    }
+
+    /**
+     * Create an instance of {@link CredentialType }
+     * 
+     */
+    public CredentialType createCredentialType() {
+        return new CredentialType();
+    }
+
+    /**
+     * Create an instance of {@link CredentialStoreType }
+     * 
+     */
+    public CredentialStoreType createCredentialStoreType() {
+        return new CredentialStoreType();
+    }
+
+    /**
+     * Create an instance of {@link RealmType }
+     * 
+     */
+    public RealmType createRealmType() {
+        return new RealmType();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link CredentialStoreType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://geronimo.apache.org/xml/ns/credentialstore-1.0", name = "credential-store")
+    public JAXBElement<CredentialStoreType> createCredentialStore(CredentialStoreType value) {
+        return new JAXBElement<CredentialStoreType>(_CredentialStore_QNAME, CredentialStoreType.class, null, value);
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/ObjectFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+
+package org.apache.geronimo.security.deployment.model.credentialstore;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for realmType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="realmType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="subject" type="{http://geronimo.apache.org/xml/ns/credentialstore-1.0}subjectType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "realmType", propOrder = {
+    "subject"
+})
+public class RealmType {
+
+    protected List<SubjectType> subject;
+    @XmlAttribute(required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the subject property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the subject property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSubject().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SubjectType }
+     * 
+     * 
+     */
+    public List<SubjectType> getSubject() {
+        if (subject == null) {
+            subject = new ArrayList<SubjectType>();
+        }
+        return this.subject;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/RealmType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,103 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+
+package org.apache.geronimo.security.deployment.model.credentialstore;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for subjectType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="subjectType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="credential" type="{http://geronimo.apache.org/xml/ns/credentialstore-1.0}credentialType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "subjectType", propOrder = {
+    "id",
+    "credential"
+})
+public class SubjectType {
+
+    @XmlElement(required = true)
+    protected String id;
+    protected List<CredentialType> credential;
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the credential property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the credential property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getCredential().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link CredentialType }
+     * 
+     * 
+     */
+    public List<CredentialType> getCredential() {
+        if (credential == null) {
+            credential = new ArrayList<CredentialType>();
+        }
+        return this.credential;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/SubjectType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java?rev=1096960&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java Tue Apr 26 23:21:29 2011
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.26 at 10:40:10 AM PDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://geronimo.apache.org/xml/ns/credentialstore-1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.geronimo.security.deployment.model.credentialstore;

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/model/credentialstore/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message