[jboss-cvs] JBossAS SVN: r64574 - in projects/security/security-jboss-sx/trunk/src: main/org/jboss/security/identitytrust/config and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 14 11:38:34 EDT 2007
Author: anil.saldhana at jboss.com
Date: 2007-08-14 11:38:34 -0400 (Tue, 14 Aug 2007)
New Revision: 64574
Added:
projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditConfigEntryHolder.java
projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustConfigEntryHolder.java
Modified:
projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditProviderEntry.java
projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustModuleEntry.java
projects/security/security-jboss-sx/trunk/src/resources/schema/security-config_5_0.xsd
Log:
update generic value containers for audit and identitytrust
Added: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditConfigEntryHolder.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditConfigEntryHolder.java (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditConfigEntryHolder.java 2007-08-14 15:38:34 UTC (rev 64574)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.audit.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.security.auth.login.ModuleOption;
+import org.jboss.xb.binding.GenericValueContainer;
+
+//$Id$
+
+/**
+ * A container for creating AuditConfigEntry during jbxb parse
+ * @author Anil.Saldhana at redhat.com
+ * @since Aug 14, 2007
+ * @version $Revision$
+ */
+public class AuditConfigEntryHolder implements GenericValueContainer
+{
+ private Map moduleOptions = new HashMap();
+ String moduleName = null;
+
+ public void addChild(QName name, Object value)
+ {
+ if("code".equals(name.getLocalPart()))
+ {
+ moduleName = (String)value;
+ }
+ if(value instanceof ModuleOption)
+ {
+ ModuleOption mo = (ModuleOption)value;
+ moduleOptions.put(mo.getName(),mo.getValue());
+ }
+ }
+
+ public void addOption(ModuleOption option)
+ {
+ moduleOptions.put(option.getName(), option.getValue());
+ }
+
+ public AuditProviderEntry getEntry()
+ {
+ return (AuditProviderEntry)instantiate();
+ }
+
+ public Object instantiate()
+ {
+ AuditProviderEntry entry = new AuditProviderEntry( moduleName,moduleOptions );
+ return entry;
+ }
+
+ public Class getTargetClass()
+ {
+ return AuditProviderEntry.class;
+ }
+}
Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditProviderEntry.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditProviderEntry.java 2007-08-14 15:37:15 UTC (rev 64573)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/audit/config/AuditProviderEntry.java 2007-08-14 15:38:34 UTC (rev 64574)
@@ -41,10 +41,15 @@
private Map options = new HashMap();
public AuditProviderEntry(String name)
- {
- super();
+ {
this.name = name;
}
+
+ public AuditProviderEntry(String name, Map options)
+ {
+ this.name = name;
+ this.options = options;
+ }
public String getName()
{
Added: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustConfigEntryHolder.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustConfigEntryHolder.java (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustConfigEntryHolder.java 2007-08-14 15:38:34 UTC (rev 64574)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.identitytrust.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.security.auth.login.ModuleOption;
+import org.jboss.xb.binding.GenericValueContainer;
+
+//$Id$
+
+/**
+ * A container for creating AuditConfigEntry during jbxb parse
+ * @author Anil.Saldhana at redhat.com
+ * @since Aug 14, 2007
+ * @version $Revision$
+ */
+public class IdentityTrustConfigEntryHolder implements GenericValueContainer
+{
+ private Map moduleOptions = new HashMap();
+ String moduleName = null;
+
+ public void addChild(QName name, Object value)
+ {
+ if("code".equals(name.getLocalPart()))
+ {
+ moduleName = (String)value;
+ }
+ if(value instanceof ModuleOption)
+ {
+ ModuleOption mo = (ModuleOption)value;
+ moduleOptions.put(mo.getName(),mo.getValue());
+ }
+ }
+
+ public void addOption(ModuleOption option)
+ {
+ moduleOptions.put(option.getName(), option.getValue());
+ }
+
+ public IdentityTrustModuleEntry getEntry()
+ {
+ return (IdentityTrustModuleEntry)instantiate();
+ }
+
+ public Object instantiate()
+ {
+ IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry( moduleName,moduleOptions );
+ return entry;
+ }
+
+ public Class getTargetClass()
+ {
+ return IdentityTrustModuleEntry.class;
+ }
+}
Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustModuleEntry.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustModuleEntry.java 2007-08-14 15:37:15 UTC (rev 64573)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/identitytrust/config/IdentityTrustModuleEntry.java 2007-08-14 15:38:34 UTC (rev 64574)
@@ -43,10 +43,15 @@
private Map options = new HashMap();
public IdentityTrustModuleEntry(String name)
- {
- super();
+ {
this.name = name;
}
+
+ public IdentityTrustModuleEntry(String name, Map options)
+ {
+ this.name = name;
+ this.options = options;
+ }
public String getName()
{
Modified: projects/security/security-jboss-sx/trunk/src/resources/schema/security-config_5_0.xsd
===================================================================
--- projects/security/security-jboss-sx/trunk/src/resources/schema/security-config_5_0.xsd 2007-08-14 15:37:15 UTC (rev 64573)
+++ projects/security/security-jboss-sx/trunk/src/resources/schema/security-config_5_0.xsd 2007-08-14 15:38:34 UTC (rev 64574)
@@ -1,6 +1,7 @@
<!-- $Id: security-config_5_0.xsd 64432 2007-08-02 16:07:41Z anil.saldhana at jboss.com $ -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jbsx="urn:jboss:security-config:5.0"
+ xmlns="urn:jboss:security-config:5.0"
xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
targetNamespace="urn:jboss:security-config:5.0"
elementFormDefault="qualified">
@@ -94,11 +95,21 @@
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="auditInfo">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:skip/>
+ </xsd:appinfo>
+ </xsd:annotation>
<xsd:sequence>
<xsd:element ref="jbsx:provider-module"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="identityTrustInfo">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:skip/>
+ </xsd:appinfo>
+ </xsd:annotation>
<xsd:sequence>
<xsd:element ref="jbsx:trust-module"/>
</xsd:sequence>
@@ -217,7 +228,7 @@
<xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
- <jbxb:class impl="org.jboss.security.trust.config.TrustConfigEntryHolder"/>
+ <jbxb:class impl="org.jboss.security.identitytrust.config.IdentityTrustConfigEntryHolder"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
More information about the jboss-cvs-commits
mailing list