Author: bdaw
Date: 2006-11-22 14:35:37 -0500 (Wed, 22 Nov 2006)
New Revision: 5713
Added:
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceController.java
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceControllerImpl.java
trunk/identity/src/main/org/jboss/portal/identity2/config/IdentityConfigurationMetaDataFactory.java
trunk/identity/src/main/org/jboss/portal/identity2/config/info/
trunk/identity/src/main/org/jboss/portal/identity2/config/info/ProfileInfoSupport.java
trunk/identity/src/main/org/jboss/portal/identity2/config/info/PropertyInfoSupport.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/IdentityConfigurationMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigOptionMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModulesMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupOptionMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedStringMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedValueMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaDataFactory.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMappingMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMetaData.java
trunk/identity/src/main/org/jboss/portal/identity2/info/
trunk/identity/src/main/org/jboss/portal/identity2/info/ProfileInfo.java
trunk/identity/src/main/org/jboss/portal/identity2/info/PropertyInfo.java
trunk/identity/src/main/org/jboss/portal/identity2/service/IdentityConfigurationService.java
Modified:
trunk/identity/src/resources/draft/db-profile.xml
trunk/identity/src/resources/draft/ldap-profile.xml
trunk/test/build.xml
Log:
- part of initial identity configuration impl
Added: trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceController.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceController.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceController.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,32 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2;
+
+/**
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public interface IdentityServiceController
+{
+ public IdentityContext getIdentityContext();
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceControllerImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceControllerImpl.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/IdentityServiceControllerImpl.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,136 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.common.util.JNDI;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity2.config.SimpleIdentityConfigurationFactory;
+import org.jboss.portal.identity2.config.IdentityConfigurationMetaDataFactory;
+import org.jboss.portal.identity2.config.metadata.IdentityConfigurationMetaData;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+import java.net.URL;
+import java.io.InputStream;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class IdentityServiceControllerImpl extends AbstractJBossService implements
IdentityServiceController
+{
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(IdentityServiceControllerImpl.class);
+
+ private String jndiName;
+
+ protected JNDI.Binding jndiBinding;
+
+ private IdentityContext identityContext;
+
+ private String configFile;
+
+ protected void startService() throws Exception
+ {
+ if (jndiName != null)
+ {
+ jndiBinding = new JNDI.Binding(jndiName, this);
+ jndiBinding.bind();
+ }
+
+ try
+ {
+ log.info("Processing portal identity configuration");
+ log.debug("config file: " + configFile);
+ URL config =
Thread.currentThread().getContextClassLoader().getResource(configFile);
+ InputStream in = config.openStream();
+ // create unmarshaller
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+
+ // create an instance of ObjectModelFactory
+ ObjectModelFactory factory = new IdentityConfigurationMetaDataFactory();
+
+ // let the object model factory to create an instance of Map and populate
it with data from XML
+ IdentityConfigurationMetaData meta =
(IdentityConfigurationMetaData)unmarshaller.unmarshal(in, factory, null);
+
+ // close the XML stream
+ in.close();
+ }
+ catch (Exception e)
+ {
+ throw new IdentityException("Cannot parse configuration file",
e);
+ }
+
+
+ }
+
+
+ protected void stopService() throws Exception
+ {
+ if (jndiBinding != null)
+ {
+ jndiBinding.unbind();
+ jndiBinding = null;
+ }
+
+ }
+
+
+ public IdentityContext getIdentityContext()
+ {
+ return identityContext;
+ }
+
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public JNDI.Binding getJndiBinding()
+ {
+ return jndiBinding;
+ }
+
+ public void setJndiBinding(JNDI.Binding jndiBinding)
+ {
+ this.jndiBinding = jndiBinding;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/IdentityConfigurationMetaDataFactory.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/IdentityConfigurationMetaDataFactory.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/IdentityConfigurationMetaDataFactory.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,221 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.jboss.portal.identity2.config.metadata.IdentityConfigurationMetaData;
+import org.jboss.portal.identity2.config.metadata.ModulesMetaData;
+import org.jboss.portal.identity2.config.metadata.OptionsMetaData;
+import org.jboss.portal.identity2.config.metadata.ModuleMetaData;
+import org.jboss.portal.identity2.config.metadata.ModuleConfigMetaData;
+import org.jboss.portal.identity2.config.metadata.ModuleConfigOptionMetaData;
+import org.jboss.portal.identity2.config.metadata.OptionsGroupMetaData;
+import org.jboss.portal.identity2.config.metadata.OptionsGroupOptionMetaData;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class IdentityConfigurationMetaDataFactory implements GenericObjectModelFactory
+{
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(IdentityConfigurationMetaDataFactory.class);
+
+ public Object newRoot(Object object, UnmarshallingContext unmarshallingContext, String
string, String string1, Attributes attributes)
+ {
+ return new IdentityConfigurationMetaData();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext unmarshallingContext,
String string, String string1)
+ {
+ return root;
+ }
+
+ public Object newChild(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ if (root instanceof IdentityConfigurationMetaData)
+ {
+ if ("modules".equals(localName))
+ {
+ return new ModulesMetaData();
+ }
+ else if("options".equals(localName))
+ {
+ return new OptionsMetaData();
+ }
+ }
+ else if (root instanceof ModulesMetaData)
+ {
+ if ("module".equals(localName))
+ {
+ return new ModuleMetaData();
+ }
+ }
+ else if (root instanceof ModuleMetaData)
+ {
+ if ("config".equals(localName))
+ {
+ return new ModuleConfigMetaData();
+ }
+ }
+ else if (root instanceof ModuleConfigMetaData)
+ {
+ if ("option".equals(localName))
+ {
+ return new ModuleConfigOptionMetaData();
+ }
+ }
+ else if (root instanceof OptionsMetaData)
+ {
+ if ("option-group".equals(localName))
+ {
+ return new OptionsGroupMetaData();
+ }
+ }
+ else if (root instanceof OptionsGroupMetaData)
+ {
+ if ("option".equals(localName))
+ {
+ return new OptionsGroupOptionMetaData();
+ }
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String
nsURI, String localName)
+ {
+ if (parent instanceof IdentityConfigurationMetaData)
+ {
+ IdentityConfigurationMetaData identity = (IdentityConfigurationMetaData)parent;
+ if (child instanceof ModulesMetaData)
+ {
+ identity.setModules((ModulesMetaData)child);
+ }
+ else if (child instanceof OptionsMetaData)
+ {
+ identity.setOptions((OptionsMetaData)child);
+ }
+
+ }
+ else if (parent instanceof ModulesMetaData)
+ {
+ ModulesMetaData modules = (ModulesMetaData)parent;
+ if (child instanceof ModuleMetaData)
+ {
+ modules.addModule((ModuleMetaData)child);
+ }
+ }
+ else if (parent instanceof ModuleMetaData)
+ {
+ ModuleMetaData module = (ModuleMetaData)parent;
+ if (child instanceof ModuleConfigMetaData)
+ {
+ module.setConfig((ModuleConfigMetaData)child);
+ }
+ }
+ else if (parent instanceof ModuleConfigMetaData)
+ {
+ ModuleConfigMetaData config = (ModuleConfigMetaData)parent;
+ if (child instanceof ModuleConfigOptionMetaData)
+ {
+ config.addOption((ModuleConfigOptionMetaData)child);
+ }
+ }
+ else if (parent instanceof OptionsMetaData)
+ {
+ OptionsMetaData options = (OptionsMetaData)parent;
+ if (child instanceof OptionsGroupMetaData)
+ {
+ options.addGroup((OptionsGroupMetaData)child);
+ }
+ }
+ else if (parent instanceof OptionsGroupMetaData)
+ {
+ OptionsGroupMetaData group = (OptionsGroupMetaData)parent;
+ if (child instanceof OptionsGroupOptionMetaData)
+ {
+ group.addOption((OptionsGroupOptionMetaData)child);
+ }
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext unmarshallingContext, String
nsUri, String localName, String value)
+ {
+ if (object instanceof ModuleMetaData)
+ {
+ ModuleMetaData module = (ModuleMetaData)object;
+ if ("type".equals(localName))
+ {
+ module.setType(value);
+ }
+ else if ("implementation".equals(localName))
+ {
+ module.setImplementation(value);
+ }
+ else if ("service-name".equals(localName))
+ {
+ module.setServiceName(value);
+ }
+ else if ("class".equals(localName))
+ {
+ module.setClassName(value);
+ }
+ else if ("jndi-name".equals(localName))
+ {
+ module.setJndiName(value);
+ }
+ }
+ else if (object instanceof ModuleConfigOptionMetaData)
+ {
+ ModuleConfigOptionMetaData option = (ModuleConfigOptionMetaData)object;
+ if ("name".equals(localName))
+ {
+ option.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ option.setValue(value);
+ }
+ }
+ else if (object instanceof OptionsGroupMetaData)
+ {
+ OptionsGroupMetaData group = (OptionsGroupMetaData)object;
+ if ("group-name".equals(localName))
+ {
+ group.setName(value);
+ }
+ }
+ else if (object instanceof OptionsGroupOptionMetaData)
+ {
+ OptionsGroupOptionMetaData option = (OptionsGroupOptionMetaData)object;
+ if ("name".equals(localName))
+ {
+ option.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ option.addValue(value);
+ }
+ }
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/info/ProfileInfoSupport.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/info/ProfileInfoSupport.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/info/ProfileInfoSupport.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,76 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.info;
+
+import org.jboss.portal.identity2.info.ProfileInfo;
+import org.jboss.portal.identity2.info.PropertyInfo;
+import org.jboss.portal.identity2.config.metadata.profile.ProfileMetaData;
+import org.jboss.portal.identity2.config.metadata.profile.PropertyMetaData;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ProfileInfoSupport implements ProfileInfo
+{
+ private Map properties;
+
+
+ public ProfileInfoSupport(ProfileMetaData profile)
+ {
+ properties = new HashMap();
+ Map meta = profile.getProperties();
+ for (Iterator iterator = meta.keySet().iterator(); iterator.hasNext();)
+ {
+ String name = (String)iterator.next();
+ PropertyMetaData property = (PropertyMetaData)meta.get(name);
+ PropertyInfo pi = new PropertyInfoSupport(property);
+ properties.put(pi.getName(), pi);
+ }
+ }
+
+ public Map getPropertiesInfo()
+ {
+ if (properties != null)
+ {
+ return Collections.unmodifiableMap(properties);
+ }
+ else
+ {
+ return Collections.EMPTY_MAP;
+ }
+ }
+
+ public PropertyInfo getPropertyInfo(String name)
+ {
+ if (name != null)
+ {
+ return (PropertyInfo)properties.get(name);
+ }
+ return null;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/info/PropertyInfoSupport.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/info/PropertyInfoSupport.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/info/PropertyInfoSupport.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,116 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.info;
+
+import org.jboss.portal.identity2.info.PropertyInfo;
+import org.jboss.portal.identity2.config.metadata.profile.PropertyMetaData;
+import org.jboss.portal.identity2.config.metadata.profile.LocalizedValueMetaData;
+import org.jboss.portal.common.util.LocalizedString;
+
+import java.util.Locale;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyInfoSupport implements PropertyInfo
+{
+ private String name;
+ private String type;
+ private String accessMode;
+ private String usage;
+ private LocalizedString displayName;
+ private LocalizedString description;
+ private String mappingType;
+ private String mappingValue;
+
+
+ public PropertyInfoSupport(PropertyMetaData meta)
+ {
+ name = meta.getName();
+ type = meta.getType();
+ accessMode = meta.getAccessMode();
+ usage = meta.getUsage();
+ mappingType = meta.getMapping().getType();
+ mappingValue = meta.getMapping().getValue();
+
+ Map descValues = new HashMap();
+ for (Iterator iterator = meta.getDescription().getValues().iterator();
iterator.hasNext();)
+ {
+ LocalizedValueMetaData value = (LocalizedValueMetaData)iterator.next();
+ descValues.put(value.getLocale(),value.getValue());
+ }
+ Map dispValues = new HashMap();
+ for (Iterator iterator = meta.getDisplayName().getValues().iterator();
iterator.hasNext();)
+ {
+ LocalizedValueMetaData value = (LocalizedValueMetaData)iterator.next();
+ dispValues.put(value.getLocale(),value.getValue());
+ }
+
+ description = new LocalizedString(descValues, Locale.ENGLISH);
+ displayName = new LocalizedString(dispValues, Locale.ENGLISH);
+
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public String getAccessMode()
+ {
+ return accessMode;
+ }
+
+ public String getUsage()
+ {
+ return usage;
+ }
+
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public String getMappingType()
+ {
+ return mappingType;
+ }
+
+ public String getMappingValue()
+ {
+ return mappingValue;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/IdentityConfigurationMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/IdentityConfigurationMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/IdentityConfigurationMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,61 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class IdentityConfigurationMetaData
+{
+ private ModulesMetaData modules;
+ private OptionsMetaData options;
+
+
+ public IdentityConfigurationMetaData()
+ {
+ }
+
+
+ public ModulesMetaData getModules()
+ {
+ return modules;
+ }
+
+ public void setModules(ModulesMetaData modules)
+ {
+ this.modules = modules;
+ }
+
+ public OptionsMetaData getOptions()
+ {
+ return options;
+ }
+
+ public void setOptions(OptionsMetaData options)
+ {
+ this.options = options;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,61 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ModuleConfigMetaData
+{
+ private Map options;
+
+
+ public ModuleConfigMetaData()
+ {
+ options = new HashMap();
+ }
+
+
+ public Map getOptions()
+ {
+ return options;
+ }
+
+ public void setOptions(Map options)
+ {
+ this.options = options;
+ }
+
+ public void addOption(ModuleConfigOptionMetaData option)
+ {
+ options.put(option.getName(), option);
+ }
+
+ public ModuleConfigOptionMetaData getOption(String name)
+ {
+ return (ModuleConfigOptionMetaData)options.get(name);
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigOptionMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigOptionMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleConfigOptionMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,58 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ModuleConfigOptionMetaData
+{
+ private String name;
+ private String value;
+
+
+ public ModuleConfigOptionMetaData()
+ {
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModuleMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,102 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ModuleMetaData
+{
+ private String type;
+ private String implementation;
+ private String serviceName;
+ private String className;
+ private String jndiName;
+ private ModuleConfigMetaData config;
+
+
+ public ModuleMetaData()
+ {
+ }
+
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getImplementation()
+ {
+ return implementation;
+ }
+
+ public void setImplementation(String implementation)
+ {
+ this.implementation = implementation;
+ }
+
+ public String getServiceName()
+ {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public ModuleConfigMetaData getConfig()
+ {
+ return config;
+ }
+
+ public void setConfig(ModuleConfigMetaData config)
+ {
+ this.config = config;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModulesMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModulesMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/ModulesMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,63 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ModulesMetaData
+{
+ private Map modules;
+
+
+ public ModulesMetaData()
+ {
+ modules = new HashMap();
+ }
+
+
+ public Map getModules()
+ {
+ return modules;
+ }
+
+ public void setModules(Map modules)
+ {
+ this.modules = modules;
+ }
+
+ public void addModule(ModuleMetaData module)
+ {
+ modules.put(module.getType(), module);
+ }
+
+ public ModuleMetaData getModule(String type)
+ {
+ return (ModuleMetaData)modules.get(type);
+ }
+
+
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,70 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class OptionsGroupMetaData
+{
+ private String name;
+ private Map options;
+
+ public OptionsGroupMetaData()
+ {
+ options = new HashMap();
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Map getOptions()
+ {
+ return options;
+ }
+
+ public void setOptions(Map options)
+ {
+ this.options = options;
+ }
+
+ public void addOption(OptionsGroupOptionMetaData option)
+ {
+ options.put(option.getName(), option);
+ }
+
+ public OptionsGroupOptionMetaData getOption(String name)
+ {
+ return (OptionsGroupOptionMetaData)options.get(name);
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupOptionMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupOptionMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsGroupOptionMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,67 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class OptionsGroupOptionMetaData
+{
+ private String name;
+ private Set values;
+
+
+ public OptionsGroupOptionMetaData()
+ {
+ values = new HashSet();
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Set getValues()
+ {
+ return values;
+ }
+
+ public void setValues(Set values)
+ {
+ this.values = values;
+ }
+
+ public void addValue(String value)
+ {
+ values.add(value);
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/OptionsMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,61 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class OptionsMetaData
+{
+ private Map groups;
+
+
+ public OptionsMetaData()
+ {
+ groups = new HashMap();
+ }
+
+
+ public Map getGroups()
+ {
+ return groups;
+ }
+
+ public void setGroups(Map groups)
+ {
+ this.groups = groups;
+ }
+
+ public void addGroup(OptionsGroupMetaData group)
+ {
+ groups.put(group.getName(), group);
+ }
+
+ public OptionsGroupMetaData getGroup(String name)
+ {
+ return (OptionsGroupMetaData)groups.get(name);
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedStringMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedStringMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedStringMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,46 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class LocalizedStringMetaData
+{
+
+ /** . */
+ private List values;
+
+ public LocalizedStringMetaData()
+ {
+ values = new ArrayList();
+ }
+
+ public List getValues()
+ {
+ return values;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedValueMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedValueMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/LocalizedValueMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,58 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class LocalizedValueMetaData
+{
+
+ /** . */
+ private Locale locale;
+
+ /** . */
+ private String value;
+
+ public Locale getLocale()
+ {
+ return locale;
+ }
+
+ public void setLocale(Locale locale)
+ {
+ this.locale = locale;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,61 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ProfileMetaData
+{
+ private Map properties;
+
+
+ public ProfileMetaData()
+ {
+ properties = new HashMap();
+ }
+
+
+ public Map getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Map properties)
+ {
+ this.properties = properties;
+ }
+
+ public void addProperty(PropertyMetaData property)
+ {
+ properties.put(property.getName(),property);
+ }
+
+ public PropertyMetaData getProperty(String name)
+ {
+ return (PropertyMetaData)properties.get(name);
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaDataFactory.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaDataFactory.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/ProfileMetaDataFactory.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,158 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.jboss.portal.identity2.config.IdentityConfigurationMetaDataFactory;
+import org.jboss.portal.identity2.config.metadata.IdentityConfigurationMetaData;
+import org.jboss.portal.common.util.LocaleInfo;
+import org.xml.sax.Attributes;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ProfileMetaDataFactory implements GenericObjectModelFactory
+{
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(ProfileMetaDataFactory.class);
+
+ public Object newRoot(Object object, UnmarshallingContext unmarshallingContext, String
string, String string1, Attributes attributes)
+ {
+ return new ProfileMetaData();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext unmarshallingContext,
String string, String string1)
+ {
+ return root;
+ }
+
+ public Object newChild(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ if (root instanceof ProfileMetaData)
+ {
+ if ("property".equals(localName))
+ {
+ return new PropertyMetaData();
+ }
+ }
+ else if (root instanceof PropertyMetaData)
+ {
+ if ("mapping".equals(localName))
+ {
+ return new PropertyMappingMetaData();
+ }
+ else if ("description".equals(localName))
+ {
+ String lang = attrs.getValue("xml:lang");
+ LocalizedValueMetaData value = new LocalizedValueMetaData();
+ if (lang != null)
+ {
+ Locale locale = LocaleInfo.decodeLocaleInfo(lang).getLocale();
+ value.setLocale(locale);
+ }
+ return value;
+ }
+ else if ("display-name".equals(localName))
+ {
+ String lang = attrs.getValue("xml:lang");
+ LocalizedValueMetaData value = new LocalizedValueMetaData();
+ if (lang != null)
+ {
+ Locale locale = LocaleInfo.decodeLocaleInfo(lang).getLocale();
+ value.setLocale(locale);
+ }
+ return value;
+ }
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String
nsURI, String localName)
+ {
+ if (parent instanceof ProfileMetaData)
+ {
+ ProfileMetaData profile = (ProfileMetaData)parent;
+ if (child instanceof PropertyMetaData)
+ {
+ profile.addProperty((PropertyMetaData)child);
+ }
+ }
+ else if (parent instanceof PropertyMetaData)
+ {
+ PropertyMetaData describable = (PropertyMetaData)parent;
+ if (child instanceof LocalizedValueMetaData)
+ {
+ if ("description".equals(localName))
+ {
+ describable.getDescription().getValues().add(child);
+ }
+ else if ("dispalay-name".equals(localName))
+ {
+ describable.getDisplayName().getValues().add(child);
+ }
+ }
+ else if (child instanceof PropertyMappingMetaData)
+ {
+ describable.setMapping((PropertyMappingMetaData)child);
+ }
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext unmarshallingContext, String
nsUri, String localName, String value)
+ {
+ if (object instanceof PropertyMetaData)
+ {
+ PropertyMetaData property = (PropertyMetaData)object;
+ if ("name".equals(localName))
+ {
+ property.setName(value);
+ }
+ else if ("type".equals(localName))
+ {
+ property.setType(value);
+ }
+ else if ("access-mode".equals(localName))
+ {
+ property.setType(value);
+ }
+ else if ("usage".equals(localName))
+ {
+ property.setUsage(value);
+ }
+ }
+ else if (object instanceof PropertyMappingMetaData)
+ {
+ PropertyMappingMetaData mapping = (PropertyMappingMetaData)object;
+ if ("type".equals(localName))
+ {
+ mapping.setType(value);
+ }
+ else if ("value".equals(localName))
+ {
+ mapping.setValue(value);
+ }
+ }
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMappingMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMappingMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMappingMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,58 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyMappingMetaData
+{
+ private String type;
+ private String value;
+
+
+ public PropertyMappingMetaData()
+ {
+ }
+
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMetaData.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMetaData.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/config/metadata/profile/PropertyMetaData.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,116 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.config.metadata.profile;
+
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyMetaData
+{
+ private String name;
+ private String type;
+ private String accessMode;
+ private String usage;
+ private LocalizedStringMetaData displayName;
+ private LocalizedStringMetaData description;
+ private PropertyMappingMetaData mapping;
+
+
+ public PropertyMetaData()
+ {
+ displayName= new LocalizedStringMetaData();
+ description = new LocalizedStringMetaData();
+ }
+
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getAccessMode()
+ {
+ return accessMode;
+ }
+
+ public void setAccessMode(String accessMode)
+ {
+ this.accessMode = accessMode;
+ }
+
+ public String getUsage()
+ {
+ return usage;
+ }
+
+ public void setUsage(String usage)
+ {
+ this.usage = usage;
+ }
+
+ public LocalizedStringMetaData getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedStringMetaData displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ public LocalizedStringMetaData getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(LocalizedStringMetaData description)
+ {
+ this.description = description;
+ }
+
+ public PropertyMappingMetaData getMapping()
+ {
+ return mapping;
+ }
+
+ public void setMapping(PropertyMappingMetaData mapping)
+ {
+ this.mapping = mapping;
+ }
+}
Added: trunk/identity/src/main/org/jboss/portal/identity2/info/ProfileInfo.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity2/info/ProfileInfo.java 2006-11-22
16:59:57 UTC (rev 5712)
+++ trunk/identity/src/main/org/jboss/portal/identity2/info/ProfileInfo.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,43 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.info;
+
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * Class provides info about user profile
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ProfileInfo
+{
+ /**
+ * Returns a Map o PropertyInfo objects describing profile properties
+ * @return Map of PropertyInfo objects
+ */
+ public Map getPropertiesInfo();
+
+ public PropertyInfo getPropertyInfo(String name);
+
+}
Added: trunk/identity/src/main/org/jboss/portal/identity2/info/PropertyInfo.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity2/info/PropertyInfo.java 2006-11-22
16:59:57 UTC (rev 5712)
+++ trunk/identity/src/main/org/jboss/portal/identity2/info/PropertyInfo.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,69 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.info;
+
+import org.jboss.portal.common.util.LocalizedString;
+
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public interface PropertyInfo
+{
+
+ public static final String ACCESS_MODE_READ_ONLY = "read-only";
+ public static final String ACCESS_MODE_READ_WRITE = "read-write";
+ public static final String USAGE_MANDATORY = "mandatory";
+ public static final String USAGE_OPTIONAL = "optional";
+ public static final String MAPPING_TYPE_COLUMN = "column";
+ public static final String MAPPING_TYPE_DYNAMIC = "dynamic";
+ public static final String MAPPING_TYPE_ATTRIBUTE = "attribute";
+
+
+ /*private String name;
+ private String type;
+ private String accessMode;
+ private String usage;
+ private LocalizedString displayName;
+ private LocalizedString description;
+ private PropertyMappingMetaData mapping;*/
+
+ public String getName();
+
+ public String getType();
+
+ public String getAccessMode();
+
+ public String getUsage();
+
+ public LocalizedString getDisplayName();
+
+ public LocalizedString getDescription();
+
+ public String getMappingType();
+
+ public String getMappingValue();
+
+
+
+}
Added:
trunk/identity/src/main/org/jboss/portal/identity2/service/IdentityConfigurationService.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity2/service/IdentityConfigurationService.java 2006-11-22
16:59:57 UTC (rev 5712)
+++
trunk/identity/src/main/org/jboss/portal/identity2/service/IdentityConfigurationService.java 2006-11-22
19:35:37 UTC (rev 5713)
@@ -0,0 +1,325 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.portal.identity2.service;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.identity2.IdentityConfiguration;
+import org.jboss.portal.identity2.IdentityContext;
+import org.jboss.portal.identity2.config.SimpleIdentityConfigurationFactory;
+import org.jboss.portal.common.util.JNDI;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+import java.util.Map;
+import java.util.Set;
+import java.net.URL;
+import java.io.InputStream;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class IdentityConfigurationService extends AbstractJBossService implements
IdentityConfiguration
+{
+
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(IdentityConfigurationService.class);
+
+ private Map data;
+
+ private String jndiName;
+
+ //private String configFile;
+
+ protected JNDI.Binding jndiBinding;
+
+ private IdentityContext identityContext;
+
+ public IdentityConfigurationService(Map optionGroups)
+ {
+ this.data = optionGroups;
+ }
+
+ protected void startService() throws Exception
+ {
+
+
+ /*try
+ {
+ log.info("Processing portal identity configuration");
+ log.debug("config file: " + configFile);
+ URL config =
Thread.currentThread().getContextClassLoader().getResource(configFile);
+ InputStream in = config.openStream();
+ // create unmarshaller
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+
+ // create an instance of ObjectModelFactory
+ ObjectModelFactory factory = new SimpleIdentityConfigurationFactory();
+
+ // let the object model factory to create an instance of Map and populate it
with data from XML
+ data = (Map)unmarshaller.unmarshal(in, factory, null);
+
+ // close the XML stream
+ in.close();
+ }
+ catch (Exception e)
+ {
+ throw new IdentityException("Cannot parse configuration file", e);
+ }*/
+
+ //
+ if (jndiName != null)
+ {
+ jndiBinding = new JNDI.Binding(jndiName, this);
+ jndiBinding.bind();
+ }
+
+ if (identityContext == null)
+ {
+ throw new IdentityException("Cannot register module in context - missing
reference");
+ }
+ else
+ {
+ identityContext.register(this, IdentityContext.IDENTITY_CONFIGURATION);
+ }
+
+
+ }
+
+
+ protected void stopService() throws Exception
+ {
+ if (jndiBinding != null)
+ {
+ jndiBinding.unbind();
+ jndiBinding = null;
+ }
+
+ if (identityContext == null)
+ {
+ log.error("Cannot unregister module in context - missing reference");
+ }
+ else
+ {
+ identityContext.unregister(IdentityContext.IDENTITY_CONFIGURATION);
+ }
+
+ }
+
+
+
+ public Set getValues(String optionGroup, String option)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ Map group = (Map)data.get(optionGroup);
+ if (group.containsKey(option))
+ {
+ return (Set)group.get(option);
+ }
+ }
+ return null;
+ }
+
+ public String getValue(String optionGroup, String option)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ Map group = (Map)data.get(optionGroup);
+ if (group.containsKey(option))
+ {
+ Set values = (Set)group.get(option);
+ if (values.size() > 0)
+ {
+ return (String)values.toArray()[0];
+ }
+ }
+ }
+ return null;
+ }
+
+ public String getValue(String option)
+ {
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (data.containsKey(GROUP_COMMON))
+ {
+ Map group = (Map)data.get(GROUP_COMMON);
+ if (group.containsKey(option))
+ {
+ Set values = (Set)group.get(option);
+ if (values.size() > 0)
+ {
+ return (String)values.toArray()[0];
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setValues(String optionGroup, String option, Set values)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (values == null)
+ {
+ throw new IllegalArgumentException("null values list");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ ((Map)data.get(optionGroup)).put(option, values);
+ }
+ }
+
+ public void addValue(String optionGroup, String option, String value)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (value == null)
+ {
+ throw new IllegalArgumentException("null value name");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ Map group = (Map)data.get(optionGroup);
+ if (group.containsKey(option))
+ {
+ ((Set)group.get(option)).add(value);
+ }
+ }
+ }
+
+ public Map getOptions(String optionGroup)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ return (Map)data.get(optionGroup);
+ }
+ return null;
+ }
+
+ public void setOptions(String optionGroup, Map options)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (options == null)
+ {
+ throw new IllegalArgumentException("null options map");
+ }
+ data.put(optionGroup,options);
+ }
+
+ public void remoeOption(String optionGroup, String option)
+ {
+ if (optionGroup == null)
+ {
+ throw new IllegalArgumentException("null option group");
+ }
+ if (option == null)
+ {
+ throw new IllegalArgumentException("null option name");
+ }
+ if (data.containsKey(optionGroup))
+ {
+ ((Map)data.get(optionGroup)).put(option, null);
+ }
+ }
+
+
+ public void setData(Map data)
+ {
+ this.data = data;
+ }
+
+ public Map getOptionGroups()
+ {
+ return data;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+// public String getConfigFile()
+// {
+// return configFile;
+// }
+//
+// public void setConfigFile(String configFile)
+// {
+// this.configFile = configFile;
+// }
+
+ public IdentityContext getIdentityContext()
+ {
+ return identityContext;
+ }
+
+ public void setIdentityContext(IdentityContext identityContext)
+ {
+ this.identityContext = identityContext;
+ }
+
+}
Modified: trunk/identity/src/resources/draft/db-profile.xml
===================================================================
--- trunk/identity/src/resources/draft/db-profile.xml 2006-11-22 16:59:57 UTC (rev 5712)
+++ trunk/identity/src/resources/draft/db-profile.xml 2006-11-22 19:35:37 UTC (rev 5713)
@@ -24,54 +24,52 @@
<profile>
<!--Database mapping - jbp_user table column mapping-->
<property>
- <attribute-name>user.name.given</attribute-name>
+ <name>user.name.given</name>
<type>java.lang.String</type>
<access-mode>read-only</access-mode>
<usage>mandatory</usage>
<display-name xml:lang="EN">User name</display-name>
<description xml:lang="EN">The user name</description>
<mapping>
- <column>
- <column-name>jbp_givenname</column-name>
- </column>
+ <type>column</type>
+ <value>jbp_givenname</value>
</mapping>
</property>
<property>
- <attribute-name>portal.user.enabled</attribute-name>
+ <name>portal.user.enabled</name>
<type>java.lang.Boolean</type>
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="EN">User enabled</display-name>
<description xml:lang="EN">User enabled status</description>
<mapping>
- <column>
- <column-name>jbp_enabled</column-name>
- </column>
+ <type>column</type>
+ <value>jbp_enabled</value>
</mapping>
</property>
<property>
- <attribute-name>user.name.nickName</attribute-name>
+ <name>user.name.nickName</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="EN">Nick name</display-name>
<description xml:lang="EN">The nick name</description>
<mapping>
- <column>
- <column-name>jbp_nickname</column-name>
- </column>
+ <type>column</type>
+ <value>jbp_nickname</value>
</mapping>
</property>
<!--Dynamic database store-->
<property>
- <attribute-name>portal.user.signature</attribute-name>
+ <name>portal.user.signature</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="EN">Signature</display-name>
<description xml:lang="EN">The user signature</description>
<mapping>
- <dynamic-name>portal.user.signature</dynamic-name>
+ <type>dynamic</type>
+ <value>portal.user.signature</value>
</mapping>
</property>
</profile>
\ No newline at end of file
Modified: trunk/identity/src/resources/draft/ldap-profile.xml
===================================================================
--- trunk/identity/src/resources/draft/ldap-profile.xml 2006-11-22 16:59:57 UTC (rev
5712)
+++ trunk/identity/src/resources/draft/ldap-profile.xml 2006-11-22 19:35:37 UTC (rev
5713)
@@ -24,28 +24,28 @@
<profile>
<!--LDAP-->
<property>
- <attribute-name>portal.user.realEmail</attribute-name>
+ <name>portal.user.realEmail</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="EN">Real Email</display-name>
<description xml:lang="EN">The real email</description>
<mapping>
- <attribute>
- <attribute-name>mail</attribute-name>
- </attribute>
+ <type>attribute</type>
+ <value>mail</value>
</mapping>
</property>
<!--Dynamic database store-->
<property>
- <attribute-name>portal.user.signature</attribute-name>
+ <name>portal.user.signature</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="EN">Signature</display-name>
<description xml:lang="EN">The user signature</description>
<mapping>
- <dynamic-name>portal.user.signature</dynamic-name>
+ <type>dynamic</type>
+ <value>portal.user.signature</value>
</mapping>
</property>
</profile>
\ No newline at end of file
Modified: trunk/test/build.xml
===================================================================