Picketlink SVN: r744 - in federation/trunk: picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories and 3 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-07 22:51:59 -0500 (Mon, 07 Feb 2011)
New Revision: 744
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/JBossAuthCacheInvalidationFactory.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/SecurityActions.java
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SecurityActions.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java
Log:
PLFED-132: register to expire the JBoss Auth Cache when saml principal expires
Modified: federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
===================================================================
--- federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-02-07 23:17:31 UTC (rev 743)
+++ federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -32,11 +32,16 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.LoginException;
+import javax.xml.datatype.XMLGregorianCalendar;
+import org.jboss.security.SecurityConstants;
import org.jboss.security.auth.callback.ObjectCallback;
import org.jboss.security.auth.spi.AbstractServerLoginModule;
import org.picketlink.identity.federation.bindings.jboss.subject.PicketLinkGroup;
import org.picketlink.identity.federation.bindings.jboss.subject.PicketLinkPrincipal;
+import org.picketlink.identity.federation.core.factories.JBossAuthCacheInvalidationFactory;
+import org.picketlink.identity.federation.core.factories.JBossAuthCacheInvalidationFactory.TimeCacheExpiry;
+import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
import org.picketlink.identity.federation.core.wstrust.STSClient;
import org.picketlink.identity.federation.core.wstrust.STSClientConfig.Builder;
import org.picketlink.identity.federation.core.wstrust.SamlCredential;
@@ -59,11 +64,16 @@
* and included in the {@code Group} returned by the {@code getRoleSets} method.
* </p>
* <p>
- * This module defines one module option:
+ * This module defines module options:
* <li>
* <ul>configFile - this property identifies the properties file that will be used to establish communication with
* the external security token service.
* </ul>
+ * <ul>cache.invalidation: set it to true if you require invalidation of JBoss Auth Cache at SAML Principal expiration.
+ * </ul>
+ * <ul>jboss.security.security_domain: name of the security domain where this login module is configured. This is only required
+ * if the cache.invalidation option is configured.
+ * </ul>
* </li>
* An example of a {@code configFile} can be seen bellow:
* <pre>
@@ -82,6 +92,7 @@
* </p>
*
* @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
+ * @author Anil.Saldhana(a)redhat.com
*/
@SuppressWarnings("unchecked")
public class SAML2STSLoginModule extends AbstractServerLoginModule
@@ -95,6 +106,10 @@
protected AssertionType assertion;
+ protected boolean enableCacheInvalidation = false;
+
+ protected String securityDomain = null;
+
/*
* (non-Javadoc)
* @see org.jboss.security.auth.spi.AbstractServerLoginModule#initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
@@ -106,6 +121,16 @@
super.initialize(subject, callbackHandler, sharedState, options);
// check if the options contain the name of the STS configuration file.
this.stsConfigurationFile = (String) options.get("configFile");
+
+ String cacheInvalidation = (String) options.get( "cache.invalidation" );
+ if( cacheInvalidation != null && !cacheInvalidation.isEmpty() )
+ {
+ enableCacheInvalidation = Boolean.parseBoolean( cacheInvalidation );
+ securityDomain = (String) options.get( SecurityConstants.SECURITY_DOMAIN_OPTION );
+ if( securityDomain == null || securityDomain.isEmpty() )
+ throw new RuntimeException( "Please configure option:" + SecurityConstants.SECURITY_DOMAIN_OPTION );
+ }
+
}
/*
@@ -191,17 +216,22 @@
{
NameIDType nameID = (NameIDType) baseID;
this.principal = new PicketLinkPrincipal(nameID.getValue());
- }
- /*for (JAXBElement<?> element : subject.getContent())
- {
- if (element.getDeclaredType().equals(NameIDType.class))
+ //If the user has configured cache invalidation of subject based on saml token expiry
+ if( enableCacheInvalidation )
{
- NameIDType nameID = (NameIDType) element.getValue();
- this.principal = new PicketLinkPrincipal(nameID.getValue());
- break;
+ TimeCacheExpiry cacheExpiry = JBossAuthCacheInvalidationFactory.getCacheExpiry();
+ XMLGregorianCalendar expiry = AssertionUtil.getExpiration( assertion );
+ if( expiry != null )
+ {
+ cacheExpiry.register( securityDomain, expiry.toGregorianCalendar().getTime() , principal );
+ }
+ else
+ {
+ log.warn( "SAML Assertion has been found to have no expiration: ID = " + assertion.getID() );
+ }
}
- }*/
+ }
}
}
catch (Exception e)
Modified: federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SecurityActions.java
===================================================================
--- federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SecurityActions.java 2011-02-07 23:17:31 UTC (rev 743)
+++ federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SecurityActions.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -35,13 +35,12 @@
* @version $Revision: 1 $
*/
class SecurityActions
-{
- @SuppressWarnings({"rawtypes", "unchecked"})
+{
static SecurityContext createSecurityContext() throws PrivilegedActionException
{
- return (SecurityContext) AccessController.doPrivileged(new PrivilegedExceptionAction()
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<SecurityContext>()
{
- public Object run() throws Exception
+ public SecurityContext run() throws Exception
{
return SecurityContextFactory.createSecurityContext("CLIENT");
}
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/JBossAuthCacheInvalidationFactory.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/JBossAuthCacheInvalidationFactory.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/JBossAuthCacheInvalidationFactory.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.picketlink.identity.federation.core.factories;
+
+import java.security.Principal;
+import java.util.Date;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+/**
+ * <p>
+ * A factory that is used to obtain an expiration policy of type {@link TimeCacheExpiry}
+ * </p>
+ * <p>
+ * Primarily used to expire the SAML Principal in the JAAS Subject cached in the JBoss Auth Cache.
+ * </p>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Feb 7, 2011
+ */
+public class JBossAuthCacheInvalidationFactory
+{
+ /**
+ * Get an instance of {@link TimeCacheExpiry}
+ * @return
+ */
+ public static TimeCacheExpiry getCacheExpiry()
+ {
+ return ExpiringPrincipalCacheInvalidation.get();
+ }
+
+ public interface TimeCacheExpiry
+ {
+ /**
+ * Register a Principal that has an expiry at {@link Date}
+ * @param securityDomain the security domain under which the principal may be cached in a subject
+ * @param expiry when to expire the principal and hence the subject
+ * @param principal the principal which needs to be expired
+ */
+ void register( String securityDomain, Date expiry, Principal principal );
+ }
+
+ protected static class ExpiringPrincipalCacheInvalidation implements TimeCacheExpiry
+ {
+ protected static ExpiringPrincipalCacheInvalidation _instance = null;
+
+ protected static String objectName = "jboss.security:service=JaasSecurityManager";
+
+ protected static Timer timer = new Timer();
+
+ protected ExpiringPrincipalCacheInvalidation()
+ {
+ }
+
+ protected static ExpiringPrincipalCacheInvalidation get()
+ {
+ if( _instance == null )
+ _instance = new ExpiringPrincipalCacheInvalidation();
+ return _instance;
+ }
+
+ protected static void setObjectName( String oName )
+ {
+ objectName = oName;
+ }
+
+ public void register( final String securityDomain, final Date expiry, final Principal principal )
+ {
+ try
+ {
+ timer.schedule( new TimerTask()
+ {
+ @Override
+ public void run()
+ {
+ try
+ {
+ ObjectName on = new ObjectName( objectName );
+ MBeanServer server = SecurityActions.getJBossMBeanServer();
+ Object[] obj = new Object[] { securityDomain, principal };
+ String[] sig = new String[]{ "java.lang.String", "java.security.Principal" };
+
+ //Flush the Authentication Cache
+ server.invoke( on,"flushAuthenticationCache", obj, sig );
+ }
+ catch ( Exception e)
+ {
+ throw new RuntimeException( e );
+ }
+ }
+ }, expiry );
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/SecurityActions.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/SecurityActions.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/SecurityActions.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.picketlink.identity.federation.core.factories;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextFactory;
+
+/**
+ * Privileged blocks
+ *
+ * @author <a href="mmoyses(a)redhat.com">Marcus Moyses</a>
+ * @version $Revision: 1 $
+ */
+class SecurityActions
+{
+ static SecurityContext createSecurityContext() throws PrivilegedActionException
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<SecurityContext>()
+ {
+ public SecurityContext run() throws Exception
+ {
+ return SecurityContextFactory.createSecurityContext("CLIENT");
+ }
+ });
+ }
+
+ static MBeanServer getJBossMBeanServer()
+ {
+ return AccessController.doPrivileged( new PrivilegedAction<MBeanServer>()
+ {
+ public MBeanServer run()
+ {
+ return MBeanServerFactory.findMBeanServer( "jboss").get( 0 );
+ }
+ });
+
+ }
+}
\ No newline at end of file
Property changes on: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/factories/SecurityActions.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java 2011-02-07 23:17:31 UTC (rev 743)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/AssertionUtil.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -161,4 +161,21 @@
//TODO: if conditions do not exist, assume the assertion to be everlasting?
return false;
}
+
+ /**
+ * Extract the expiration time from an {@link AssertionType}
+ * @param assertion
+ * @return
+ */
+ public static XMLGregorianCalendar getExpiration( AssertionType assertion )
+ {
+ XMLGregorianCalendar expiry = null;
+
+ ConditionsType conditionsType = assertion.getConditions();
+ if(conditionsType != null)
+ {
+ expiry = conditionsType.getNotOnOrAfter();
+ }
+ return expiry;
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-02-07 23:17:31 UTC (rev 743)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -34,8 +34,10 @@
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginException;
import javax.security.auth.spi.LoginModule;
+import javax.xml.datatype.XMLGregorianCalendar;
import org.apache.log4j.Logger;
+import org.jboss.security.SecurityConstants;
import org.jboss.security.SecurityContext;
import org.jboss.security.SimpleGroup;
import org.jboss.security.SimplePrincipal;
@@ -45,12 +47,17 @@
import org.jboss.security.mapping.MappingManager;
import org.jboss.security.mapping.MappingType;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.factories.JBossAuthCacheInvalidationFactory;
+import org.picketlink.identity.federation.core.factories.JBossAuthCacheInvalidationFactory.TimeCacheExpiry;
+import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
import org.picketlink.identity.federation.core.wstrust.STSClient;
import org.picketlink.identity.federation.core.wstrust.STSClientConfig;
import org.picketlink.identity.federation.core.wstrust.STSClientConfig.Builder;
import org.picketlink.identity.federation.core.wstrust.STSClientFactory;
import org.picketlink.identity.federation.core.wstrust.SamlCredential;
import org.picketlink.identity.federation.core.wstrust.WSTrustException;
+import org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil;
+import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
import org.w3c.dom.Element;
/**
@@ -143,7 +150,12 @@
* from "Roles".
* </p>
*
+ * <p>cache.invalidation: set it to true if you require invalidation of JBoss Auth Cache at SAML Principal expiration.</p>
+ * <p>jboss.security.security_domain: name of the security domain where this login module is configured. This is only required
+ * if the cache.invalidation option is configured.</p>
+ *
* @author <a href="mailto:dbevenius@jboss.com">Daniel Bevenius</a>
+ * @author Anil.Saldhana(a)redhat.com
*/
public abstract class AbstractSTSLoginModule implements LoginModule
{
@@ -225,6 +237,10 @@
* Name of the group principal. If unconfigured, will be "null"
*/
protected String groupPrincipalName = null;
+
+ protected boolean enableCacheInvalidation = false;
+
+ protected String securityDomain = null;
/**
* Initialized this login module. Simple stores the passed in fields and
@@ -261,6 +277,15 @@
final String gpPrincipalName = (String) options.get( GROUP_PRINCIPAL_NAME );
if( gpPrincipalName != null && gpPrincipalName.length() > 0 )
groupPrincipalName = gpPrincipalName;
+
+ String cacheInvalidation = (String) options.get( "cache.invalidation" );
+ if( cacheInvalidation != null && !cacheInvalidation.isEmpty() )
+ {
+ enableCacheInvalidation = Boolean.parseBoolean( cacheInvalidation );
+ securityDomain = (String) options.get( SecurityConstants.SECURITY_DOMAIN_OPTION );
+ if( securityDomain == null || securityDomain.isEmpty() )
+ throw new RuntimeException( "Please configure option:" + SecurityConstants.SECURITY_DOMAIN_OPTION );
+ }
}
/**
@@ -573,6 +598,30 @@
principalMappingContext.performMapping(contextMap, null);
Principal principal = principalMappingContext.getMappingResult().getMappedObject();
subject.getPrincipals().add(principal);
+
+ //If the user has configured cache invalidation of subject based on saml token expiry
+ if( enableCacheInvalidation )
+ {
+ TimeCacheExpiry cacheExpiry = JBossAuthCacheInvalidationFactory.getCacheExpiry();
+ AssertionType assertion = null;
+ try
+ {
+ assertion = SAMLUtil.fromElement( samlToken );
+ }
+ catch ( Exception e)
+ {
+ throw new RuntimeException( e );
+ }
+ XMLGregorianCalendar expiry = AssertionUtil.getExpiration( assertion );
+ if( expiry != null )
+ {
+ cacheExpiry.register( securityDomain, expiry.toGregorianCalendar().getTime() , principal );
+ }
+ else
+ {
+ log.warn( "SAML Assertion has been found to have no expiration: ID = " + assertion.getID() );
+ }
+ }
}
if (roleMappingContext != null)
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java 2011-02-07 23:17:31 UTC (rev 743)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java 2011-02-08 03:51:59 UTC (rev 744)
@@ -24,8 +24,6 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import javax.xml.bind.JAXBException;
-
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
@@ -100,12 +98,11 @@
* @param assertionElement
* the {@code Element} that contains the marshaled SAMLV2.0 assertion.
* @return a reference to the unmarshaled {@code AssertionType} instance.
- * @throws JAXBException if an error occurs while unmarshalling the document.
* @throws ConfigurationException
* @throws ProcessingException
* @throws ParsingException
*/
- public static AssertionType fromElement(Element assertionElement) throws JAXBException, ProcessingException, ConfigurationException, ParsingException
+ public static AssertionType fromElement(Element assertionElement) throws ProcessingException, ConfigurationException, ParsingException
{
String assertionAsString = DocumentUtil.getDOMElementAsString(assertionElement);
14 years, 10 months
Picketlink SVN: r743 - picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-07 18:17:31 -0500 (Mon, 07 Feb 2011)
New Revision: 743
Modified:
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java
Log:
response location can be optional
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java 2011-02-07 23:17:07 UTC (rev 742)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlService.java 2011-02-07 23:17:31 UTC (rev 743)
@@ -21,6 +21,7 @@
*/
package org.picketlink.identity.seam.federation.configuration;
+import java.net.URI;
import java.util.LinkedList;
import java.util.List;
@@ -58,8 +59,13 @@
}
if (binding != null)
{
- SamlEndpoint samlEndpoint = new SamlEndpoint(this, binding, endpoint.getLocation().toString(), endpoint
- .getResponseLocation().toString());
+ String responseLocationStr = null;
+ URI responseLocation = endpoint.getResponseLocation();
+ if( responseLocation != null )
+ {
+ responseLocationStr = responseLocation.toString();
+ }
+ SamlEndpoint samlEndpoint = new SamlEndpoint(this, binding, endpoint.getLocation().toString(), responseLocationStr );
serviceEndpoints.add(samlEndpoint);
}
}
14 years, 10 months
Picketlink SVN: r742 - in picketlink-seam/trunk/picketlink-seam/src: test/java and 7 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-07 18:17:07 -0500 (Mon, 07 Feb 2011)
New Revision: 742
Added:
picketlink-seam/trunk/picketlink-seam/src/test/java/org/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/
picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java
picketlink-seam/trunk/picketlink-seam/src/test/resources/saml-entities.xml
Modified:
picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java
Log:
fix the saml configuration parsing
Modified: picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java 2011-02-07 16:57:28 UTC (rev 741)
+++ picketlink-seam/trunk/picketlink-seam/src/main/java/org/picketlink/identity/seam/federation/configuration/SamlConfiguration.java 2011-02-07 23:17:07 UTC (rev 742)
@@ -43,7 +43,6 @@
import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IDPSSODescriptorType;
-import org.picketlink.identity.federation.newmodel.saml.v2.metadata.RoleDescriptorType;
import org.picketlink.identity.seam.federation.jaxb.config.SamlConfigType;
import org.picketlink.identity.seam.federation.jaxb.config.SamlIdentityProviderType;
@@ -168,12 +167,11 @@
List<EDTDescriptorChoiceType> descriptors = edt.getDescriptors();
for( EDTDescriptorChoiceType edtDesc : descriptors )
{
- RoleDescriptorType roleDescriptor = edtDesc.getRoleDescriptor();
- if( roleDescriptor instanceof IDPSSODescriptorType )
- {
- IDPSSODescriptorType IDPSSODescriptor = (IDPSSODescriptorType) roleDescriptor;
- idpMetaInfo.put(entityId, IDPSSODescriptor);
- }
+ IDPSSODescriptorType idpSSODesc = edtDesc.getIdpDescriptor();
+ if( idpSSODesc != null )
+ {
+ idpMetaInfo.put(entityId, idpSSODesc);
+ }
}
}
Added: picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java (rev 0)
+++ picketlink-seam/trunk/picketlink-seam/src/test/java/org/picketlink/test/identity/seam/federation/SamlConfigurationUnitTestCase.java 2011-02-07 23:17:07 UTC (rev 742)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.picketlink.test.identity.seam.federation;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+import org.picketlink.identity.federation.core.parsers.saml.SAMLParser;
+import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntitiesDescriptorType;
+import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType;
+import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTChoiceType;
+import org.picketlink.identity.federation.newmodel.saml.v2.metadata.EntityDescriptorType.EDTDescriptorChoiceType;
+import org.picketlink.identity.federation.newmodel.saml.v2.metadata.IDPSSODescriptorType;
+import org.picketlink.identity.seam.federation.configuration.SamlConfiguration;
+
+/**
+ * Unit test the {@link SamlConfiguration} class
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Feb 7, 2011
+ */
+public class SamlConfigurationUnitTestCase
+{
+ private Map<String, IDPSSODescriptorType> idpMetaInfo = new HashMap<String, IDPSSODescriptorType>();
+
+ @Test
+ public void testSamlConfig() throws Exception
+ {
+ InputStream samlEntitiesStream = Thread.currentThread().getContextClassLoader().getResourceAsStream( "saml-entities.xml" );
+ if( samlEntitiesStream == null )
+ throw new RuntimeException( "SAML Entities File is missing" );
+
+ SAMLParser samlParser = new SAMLParser();
+ EntitiesDescriptorType entitiesDescriptor = (EntitiesDescriptorType) samlParser.parse( samlEntitiesStream );
+ assertNotNull( entitiesDescriptor );
+ readEntitiesDescriptor(entitiesDescriptor);
+ assertTrue( idpMetaInfo.keySet().size() > 0 );
+ }
+
+ private void readEntitiesDescriptor(EntitiesDescriptorType entitiesDescriptor)
+ {
+ for (Object object : entitiesDescriptor.getEntityDescriptor() )
+ {
+ if (object instanceof EntityDescriptorType)
+ {
+ EntityDescriptorType entityDescriptor = (EntityDescriptorType) object;
+ String entityId = entityDescriptor.getEntityID();
+
+ for( EDTChoiceType edt: entityDescriptor.getChoiceType() )
+ {
+ List<EDTDescriptorChoiceType> descriptors = edt.getDescriptors();
+ for( EDTDescriptorChoiceType edtDesc : descriptors )
+ {
+ IDPSSODescriptorType idpSSODesc = edtDesc.getIdpDescriptor();
+ if( idpSSODesc != null )
+ {
+ idpMetaInfo.put(entityId, idpSSODesc);
+ }
+ }
+ }
+
+ /*for (RoleDescriptorType roleDescriptor : entityDescriptor.getC
+ .getRoleDescriptorOrIDPSSODescriptorOrSPSSODescriptor())
+ {
+ if (roleDescriptor instanceof IDPSSODescriptorType)
+ {
+ IDPSSODescriptorType IDPSSODescriptor = (IDPSSODescriptorType) roleDescriptor;
+ idpMetaInfo.put(entityId, IDPSSODescriptor);
+ }
+ }*/
+ }
+ else
+ {
+ EntitiesDescriptorType descriptor = (EntitiesDescriptorType) object;
+ readEntitiesDescriptor(descriptor);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: picketlink-seam/trunk/picketlink-seam/src/test/resources/saml-entities.xml
===================================================================
--- picketlink-seam/trunk/picketlink-seam/src/test/resources/saml-entities.xml (rev 0)
+++ picketlink-seam/trunk/picketlink-seam/src/test/resources/saml-entities.xml 2011-02-07 23:17:07 UTC (rev 742)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<EntitiesDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd">
+ <EntityDescriptor entityID="http://localhost:8888/opensso">
+ <IDPSSODescriptor WantAuthnRequestsSigned="false"
+ protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <KeyDescriptor use="signing">
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+ <ds:X509Data>
+ <ds:X509Certificate>
+MIICQDCCAakCBEeNB0swDQYJKoZIhvcNAQEEBQAwZzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh
+bGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMQwwCgYDVQQKEwNTdW4xEDAOBgNVBAsTB09w
+ZW5TU08xDTALBgNVBAMTBHRlc3QwHhcNMDgwMTE1MTkxOTM5WhcNMTgwMTEyMTkxOTM5WjBnMQsw
+CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExDDAK
+BgNVBAoTA1N1bjEQMA4GA1UECxMHT3BlblNTTzENMAsGA1UEAxMEdGVzdDCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEArSQc/U75GB2AtKhbGS5piiLkmJzqEsp64rDxbMJ+xDrye0EN/q1U5Of+
+RkDsaN/igkAvV1cuXEgTL6RlafFPcUX7QxDhZBhsYF9pbwtMzi4A4su9hnxIhURebGEmxKW9qJNY
+Js0Vo5+IgjxuEWnjnnVgHTs1+mq5QYTA7E6ZyL8CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB3Pw/U
+QzPKTPTYi9upbFXlrAKMwtFf2OW4yvGWWvlcwcNSZJmTJ8ARvVYOMEVNbsT4OFcfu2/PeYoAdiDA
+cGy/F2Zuj8XJJpuQRSE6PtQqBuDEHjjmOQJ0rV/r8mO1ZCtHRhpZ5zYRjhRC9eCbjx9VrFax0JDC
+/FfwWigmrW0Y0Q==
+ </ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+ </KeyDescriptor>
+ <ArtifactResolutionService index="0"
+ isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/ArtifactResolver/metaAlias/idp" />
+ <SingleLogoutService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8888/opensso/IDPSloRedirect/metaAlias/idp"
+ ResponseLocation="http://localhost:8888/opensso/IDPSloRedirect/metaAlias/idp" />
+ <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8888/opensso/IDPSloPOST/metaAlias/idp"
+ ResponseLocation="http://localhost:8888/opensso/IDPSloPOST/metaAlias/idp" />
+ <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/IDPSloSoap/metaAlias/idp" />
+ <ManageNameIDService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8888/opensso/IDPMniRedirect/metaAlias/idp"
+ ResponseLocation="http://localhost:8888/opensso/IDPMniRedirect/metaAlias/idp" />
+ <ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8888/opensso/IDPMniPOST/metaAlias/idp"
+ ResponseLocation="http://localhost:8888/opensso/IDPMniPOST/metaAlias/idp" />
+ <ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/IDPMniSoap/metaAlias/idp" />
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</NameIDFormat>
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos</NameIDFormat>
+ <NameIDFormat>
+ urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</NameIDFormat>
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="http://localhost:8888/opensso/SSORedirect/metaAlias/idp" />
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="http://localhost:8888/opensso/SSOPOST/metaAlias/idp" />
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/SSOSoap/metaAlias/idp" />
+ <NameIDMappingService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/NIMSoap/metaAlias/idp" />
+ <AssertionIDRequestService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="http://localhost:8888/opensso/AIDReqSoap/IDPRole/metaAlias/idp" />
+ <AssertionIDRequestService Binding="urn:oasis:names:tc:SAML:2.0:bindings:URI"
+ Location="http://localhost:8888/opensso/AIDReqUri/IDPRole/metaAlias/idp" />
+ </IDPSSODescriptor>
+ </EntityDescriptor>
+ <EntityDescriptor entityID="http://idp.ssocircle.com"
+ xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
+ <IDPSSODescriptor WantAuthnRequestsSigned="false"
+ protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <KeyDescriptor use="signing">
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+ <ds:X509Data>
+ <ds:X509Certificate>
+ MIIB8TCCAVqgAwIBAgIFAIxwZnIwDQYJKoZIhvcNAQEEBQAwLjELMAkGA1UEBhMCREUxEjAQBgNV
+ BAoTCVNTT0NpcmNsZTELMAkGA1UEAxMCQ0EwHhcNMDkwMjIyMTUwNDI0WhcNMTEwNTIyMTUwNDI0
+ WjBLMQswCQYDVQQGEwJERTESMBAGA1UEChMJU1NPQ2lyY2xlMQwwCgYDVQQLEwNpZHAxGjAYBgNV
+ BAMTEWlkcC5zc29jaXJjbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbzDRkudC/
+ aC2gMqRVVaLdPJJEwpFB4o71fR5bnNd2ocnnNzJ/W9CoCargzKx+EJ4Nm3vWmX/IZRCFvrvy9C78
+ fP1cmt6Sa091K9luaMAyWn7oC8h/YBXH7rB42tdvWLY4Kl9VJy6UCclvasyrfKx+SR4KU6zCsM62
+ 2Kvp5wW67QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAGyaydfJHDkm77C39gq9bBb7OqK8OXEUTbIM
+ p8PDJZzIf9QkpkE7gHGcWctRKi7fNdONulc5kn2K2nbvCGrbWsWQvr/DA0bjkBrK8OeWpRhLe7fl
+ +JUgsErMcDIzRTmjNpZzUZp+WESRHV1j3SIcfY4tJM2uMt4Sc/afVnl5P6wL</ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+
+ </KeyDescriptor>
+ <KeyDescriptor use="encryption">
+ <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+ <ds:X509Data>
+ <ds:X509Certificate>
+ MIIB8TCCAVqgAwIBAgIFAIxwZnIwDQYJKoZIhvcNAQEEBQAwLjELMAkGA1UEBhMCREUxEjAQBgNV
+ BAoTCVNTT0NpcmNsZTELMAkGA1UEAxMCQ0EwHhcNMDkwMjIyMTUwNDI0WhcNMTEwNTIyMTUwNDI0
+ WjBLMQswCQYDVQQGEwJERTESMBAGA1UEChMJU1NPQ2lyY2xlMQwwCgYDVQQLEwNpZHAxGjAYBgNV
+ BAMTEWlkcC5zc29jaXJjbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbzDRkudC/
+ aC2gMqRVVaLdPJJEwpFB4o71fR5bnNd2ocnnNzJ/W9CoCargzKx+EJ4Nm3vWmX/IZRCFvrvy9C78
+ fP1cmt6Sa091K9luaMAyWn7oC8h/YBXH7rB42tdvWLY4Kl9VJy6UCclvasyrfKx+SR4KU6zCsM62
+ 2Kvp5wW67QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAGyaydfJHDkm77C39gq9bBb7OqK8OXEUTbIM
+ p8PDJZzIf9QkpkE7gHGcWctRKi7fNdONulc5kn2K2nbvCGrbWsWQvr/DA0bjkBrK8OeWpRhLe7fl
+ +JUgsErMcDIzRTmjNpZzUZp+WESRHV1j3SIcfY4tJM2uMt4Sc/afVnl5P6wL</ds:X509Certificate>
+ </ds:X509Data>
+ </ds:KeyInfo>
+ <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc">
+
+ <xenc:KeySize xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">128</xenc:KeySize>
+ </EncryptionMethod>
+ </KeyDescriptor>
+ <ArtifactResolutionService index="0"
+ isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="https://idp.ssocircle.com:443/sso/ArtifactResolver/metaAlias/ssocircle" />
+ <SingleLogoutService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.ssocircle.com:443/sso/IDPSloRedirect/metaAlias/ssocircle"
+ ResponseLocation="https://idp.ssocircle.com:443/sso/IDPSloRedirect/metaAlias/ssocircle" />
+ <!--
+ <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="https://idp.ssocircle.com:443/sso/IDPSloPost/metaAlias/ssocircle"
+ ResponseLocation="https://idp.ssocircle.com:443/sso/IDPSloPost/metaAlias/ssocircle" />
+ <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="https://idp.ssocircle.com:443/sso/IDPSloSoap/metaAlias/ssocircle" />
+ -->
+ <ManageNameIDService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.ssocircle.com:443/sso/IDPMniRedirect/metaAlias/ssocircle"
+ ResponseLocation="https://idp.ssocircle.com:443/sso/IDPMniRedirect/metaAlias/ssocircle" />
+ <ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="https://idp.ssocircle.com:443/sso/IDPMniPOSTmetaAlias/ssocircle"
+ ResponseLocation="https://idp.ssocircle.com:443/sso/IDPMniPOST/metaAlias/ssocircle" />
+
+ <ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="https://idp.ssocircle.com:443/sso/IDPMniSoap/metaAlias/ssocircle" />
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</NameIDFormat>
+ <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat>
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.ssocircle.com:443/sso/SSORedirect/metaAlias/ssocircle" />
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+ Location="https://idp.ssocircle.com:443/sso/SSOPOST/metaAlias/ssocircle" />
+
+ <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="https://idp.ssocircle.com:443/sso/SSOSoap/metaAlias/ssocircle" />
+ <NameIDMappingService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ Location="https://idp.ssocircle.com:443/sso/NIMSoap/metaAlias/ssocircle" />
+ </IDPSSODescriptor>
+ </EntityDescriptor>
+
+</EntitiesDescriptor>
14 years, 10 months
Picketlink SVN: r740 - in idm/trunk: picketlink-idm-jpa and 16 other directories.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-02-07 05:18:43 -0500 (Mon, 07 Feb 2011)
New Revision: 740
Added:
idm/trunk/picketlink-idm-jpa/
idm/trunk/picketlink-idm-jpa/pom.xml
idm/trunk/picketlink-idm-jpa/src/
idm/trunk/picketlink-idm-jpa/src/main/
idm/trunk/picketlink-idm-jpa/src/main/java/
idm/trunk/picketlink-idm-jpa/src/main/java/org/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObject.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredential.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredentialType.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationship.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationshipType.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectType.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityRoleName.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/annotations/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipTypeImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectTypeImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityProperty.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentitySessionProducer.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityStoreConfiguration.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreConfiguration.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreSessionImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/PropertyType.java
idm/trunk/picketlink-idm-jpa/src/main/resources/
idm/trunk/picketlink-idm-jpa/src/test/
idm/trunk/picketlink-idm-jpa/src/test/java/
idm/trunk/picketlink-idm-jpa/src/test/java/org/
idm/trunk/picketlink-idm-jpa/src/test/java/org/picketlink/
idm/trunk/picketlink-idm-jpa/src/test/java/org/picketlink/idm/
idm/trunk/picketlink-idm-jpa/src/test/java/org/picketlink/idm/impl/
idm/trunk/picketlink-idm-jpa/src/test/resources/
Modified:
idm/trunk/pom.xml
Log:
initial import of jpa store impl
Added: idm/trunk/picketlink-idm-jpa/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-jpa/pom.xml (rev 0)
+++ idm/trunk/picketlink-idm-jpa/pom.xml 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,127 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-parent</artifactId>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>picketlink-idm-jpa</artifactId>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>PicketLink IDM JPA</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>PicketLink IDM JPA</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam.solder</groupId>
+ <artifactId>seam-solder</artifactId>
+ <version>3.0.0.Beta2</version>
+ </dependency>
+
+ <!--<dependency>-->
+ <!--<groupId>javax.persistence</groupId>-->
+ <!--<artifactId>persistence-api</artifactId>-->
+ <!--<version>1.0</version>-->
+ <!--</dependency>-->
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <version>1.0.0.Final</version>
+ </dependency>
+
+
+ <!-- hibernate -->
+ <!--<dependency>-->
+ <!--<groupId>org.hibernate</groupId>-->
+ <!--<artifactId>hibernate-core</artifactId>-->
+ <!--<version>3.3.2.GA</version>-->
+ <!--</dependency>-->
+ <!--<dependency>-->
+ <!--<groupId>org.hibernate</groupId>-->
+ <!--<artifactId>hibernate-core</artifactId>-->
+ <!--<version>3.3.2.GA</version>-->
+ <!--</dependency>-->
+ <!--<dependency>-->
+ <!--<groupId>org.hibernate</groupId>-->
+ <!--<artifactId>hibernate-annotations</artifactId>-->
+ <!--<version>3.4.0.GA</version>-->
+ <!--</dependency>-->
+ <!--Javassist as Hibernate's bytecode provider-->
+ <!--<dependency>-->
+ <!--<groupId>javassist</groupId>-->
+ <!--<artifactId>javassist</artifactId>-->
+ <!--<version>3.8.0.GA</version>-->
+ <!--</dependency>-->
+
+ <!--<dependency>-->
+ <!--<groupId>org.hibernate</groupId>-->
+ <!--<artifactId>hibernate-cglib-repack</artifactId>-->
+ <!--<version>2.1_3</version>-->
+ <!--</dependency>-->
+
+
+ <!-- Hibernate logging set up -->
+ <!--<dependency>-->
+ <!--<groupId>org.slf4j</groupId>-->
+ <!--<artifactId>slf4j-log4j12</artifactId>-->
+ <!--<version>1.5.2</version>-->
+ <!--</dependency>-->
+ <!--<dependency>-->
+ <!--<groupId>log4j</groupId>-->
+ <!--<artifactId>log4j</artifactId>-->
+ <!--<version>1.2.14</version>-->
+ <!--</dependency>-->
+
+ <!--<dependency>-->
+ <!--<groupId>junit</groupId>-->
+ <!--<artifactId>junit</artifactId>-->
+ <!--<scope>test</scope>-->
+ <!--</dependency>-->
+
+ </dependencies>
+
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>dataSourceName</name>
+ <value>${dataSourceName}</value>
+ </property>
+ <property>
+ <name>directoryName</name>
+ <value>${directoryName}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+
+</project>
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObject.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObject.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObject.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,61 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * This entity contains identity objects, e.g. users and groups
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObject implements Serializable
+{
+ private static final long serialVersionUID = -4623023512038059728L;
+
+ private Long id;
+ private String name;
+ private IdentityObjectType type;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.TYPE)
+ @JoinColumn(name = "IDENTITY_OBJECT_TYPE_ID")
+ public IdentityObjectType getType()
+ {
+ return type;
+ }
+
+ public void setType(IdentityObjectType type)
+ {
+ this.type = type;
+ }
+
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredential.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredential.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredential.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,73 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * Holds credential values
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObjectCredential implements Serializable
+{
+ private static final long serialVersionUID = 1359292319831314803L;
+
+ private Long id;
+ private IdentityObject identityObject;
+ private IdentityObjectCredentialType type;
+ private String value;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @ManyToOne @JoinColumn(name = "IDENTITY_OBJECT_ID")
+ public IdentityObject getIdentityObject()
+ {
+ return identityObject;
+ }
+
+ public void setIdentityObject(IdentityObject identityObject)
+ {
+ this.identityObject = identityObject;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.TYPE)
+ @JoinColumn(name = "CREDENTIAL_TYPE_ID")
+ public IdentityObjectCredentialType getType()
+ {
+ return type;
+ }
+
+ public void setType(IdentityObjectCredentialType type)
+ {
+ this.type = type;
+ }
+
+ @IdentityProperty(PropertyType.VALUE)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredentialType.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredentialType.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectCredentialType.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,46 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * Lookup table containing credential types
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObjectCredentialType implements Serializable
+{
+ private static final long serialVersionUID = 282711089697868242L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationship.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationship.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationship.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,83 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * Contains relationships between identities
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObjectRelationship implements Serializable
+{
+ private static final long serialVersionUID = -5254503795105571898L;
+
+ private Long id;
+ private String name;
+ private IdentityObjectRelationshipType relationshipType;
+ private IdentityObject from;
+ private IdentityObject to;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.TYPE) @JoinColumn(name = "RELATIONSHIP_TYPE_ID")
+ public IdentityObjectRelationshipType getRelationshipType()
+ {
+ return relationshipType;
+ }
+
+ public void setRelationshipType(IdentityObjectRelationshipType relationshipType)
+ {
+ this.relationshipType = relationshipType;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.RELATIONSHIP_FROM) @JoinColumn(name = "FROM_IDENTITY_ID")
+ public IdentityObject getFrom()
+ {
+ return from;
+ }
+
+ public void setFrom(IdentityObject from)
+ {
+ this.from = from;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.RELATIONSHIP_TO) @JoinColumn(name = "TO_IDENTITY_ID")
+ public IdentityObject getTo()
+ {
+ return to;
+ }
+
+ public void setTo(IdentityObject to)
+ {
+ this.to = to;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationshipType.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationshipType.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectRelationshipType.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,46 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * Lookup table containing relationship types
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObjectRelationshipType implements Serializable
+{
+ private static final long serialVersionUID = -67640567413388470L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectType.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectType.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityObjectType.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,46 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.picketlink.idm.impl.store.jpa.IdentityProperty;
+import org.picketlink.idm.impl.store.jpa.PropertyType;
+
+/**
+ * A lookup table containing identity object types
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObjectType implements Serializable
+{
+ private static final long serialVersionUID = -8333008038699510742L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityRoleName.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityRoleName.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/model/jpa/IdentityRoleName.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,42 @@
+package org.picketlink.idm.impl.model.jpa;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * This is a simple lookup table containing role names
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityRoleName implements Serializable
+{
+ private static final long serialVersionUID = 8775236263787825703L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectImpl.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectImpl.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectImpl.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,72 @@
+package org.picketlink.idm.impl.store.jpa;
+
+
+import java.io.Serializable;
+
+import org.picketlink.idm.common.exception.PolicyValidationException;
+import org.picketlink.idm.spi.model.IdentityObject;
+import org.picketlink.idm.spi.model.IdentityObjectType;
+
+/**
+ * Based implementation of IdentityObject
+ *
+ * @author Shane Bryzak
+ */
+public class IdentityObjectImpl implements IdentityObject, Serializable
+{
+ private static final long serialVersionUID = -7880202628037808071L;
+
+ private String id;
+ private String name;
+ private IdentityObjectType type;
+
+ public IdentityObjectImpl(String id, String name, IdentityObjectType type)
+ {
+ if (name == null) throw new IllegalArgumentException("IdentityObject.name cannot be null");
+ if (type == null) throw new IllegalArgumentException("IdentityObject.identityType cannot be null");
+
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public IdentityObjectType getIdentityType()
+ {
+ return type;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void validatePolicy() throws PolicyValidationException
+ {
+
+ }
+
+ @Override
+ public boolean equals(Object value)
+ {
+ if (!(value instanceof IdentityObject)) return false;
+ IdentityObject other = (IdentityObject) value;
+
+ return (id != null ? id.equals(other.getId()) : other.getId() == null) &&
+ name.equals(other.getName()) &&
+ type.equals(other.getIdentityType());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int hash = 0;
+ if (id != null) hash ^= (id.hashCode() * 17);
+ hash ^= (name.hashCode() * 29) ^ (type.hashCode() * 37);
+ return hash;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipImpl.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipImpl.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipImpl.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,89 @@
+package org.picketlink.idm.impl.store.jpa;
+
+
+import java.io.Serializable;
+
+import org.picketlink.idm.spi.model.IdentityObject;
+import org.picketlink.idm.spi.model.IdentityObjectRelationship;
+import org.picketlink.idm.spi.model.IdentityObjectRelationshipType;
+
+/**
+ *
+ * @author Shane Bryzak
+ */
+public class IdentityObjectRelationshipImpl implements IdentityObjectRelationship, Serializable
+{
+ private static final long serialVersionUID = 487517126125658201L;
+
+ private IdentityObject fromIdentityObject;
+ private IdentityObject toIdentityObject;
+ private String name;
+ private IdentityObjectRelationshipType type;
+
+ public IdentityObjectRelationshipImpl(IdentityObject fromIdentityObject,
+ IdentityObject toIdentityObject, String name,
+ IdentityObjectRelationshipType type)
+ {
+ if (fromIdentityObject == null) throw new IllegalArgumentException("IdentityObjectRelationship.fromIdentityObject cannot be null.");
+ if (toIdentityObject == null) throw new IllegalArgumentException("IdentityObjectRelationship.toIdentityObject cannot be null.");
+ if (type == null) throw new IllegalArgumentException("IdentityObjectRelationship.type cannot be null.");
+
+ this.fromIdentityObject = fromIdentityObject;
+ this.toIdentityObject = toIdentityObject;
+ this.name = name;
+ this.type = type;
+ }
+
+ public IdentityObject getFromIdentityObject()
+ {
+ return fromIdentityObject;
+ }
+
+ public IdentityObject getToIdentityObject()
+ {
+ return toIdentityObject;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public IdentityObjectRelationshipType getType()
+ {
+ return type;
+ }
+
+ @Override
+ public boolean equals(Object value)
+ {
+ if (!(value instanceof IdentityObjectRelationship)) return false;
+ IdentityObjectRelationship other = (IdentityObjectRelationship) value;
+
+ if (!fromIdentityObject.equals(other.getFromIdentityObject())) return false;
+ if (!toIdentityObject.equals(other.getToIdentityObject())) return false;
+ if (!type.equals(other.getType())) return false;
+ if (name == null)
+ {
+ if (other.getName() != null) return false;
+ }
+ else
+ {
+ if (!name.equals(other.getName())) return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int hash = (fromIdentityObject.hashCode() * 11) ^
+ (toIdentityObject.hashCode() * 17) ^
+ (type.hashCode() * 23);
+
+ if (name != null) hash ^= (name.hashCode() * 29);
+
+ return hash;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipTypeImpl.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipTypeImpl.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectRelationshipTypeImpl.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,46 @@
+package org.picketlink.idm.impl.store.jpa;
+
+
+import java.io.Serializable;
+
+import org.picketlink.idm.spi.model.IdentityObjectRelationshipType;
+
+/**
+ * Simple implementation of IdentityObjectRelationshipType
+ *
+ * @author Shane Bryzak
+ */
+public class IdentityObjectRelationshipTypeImpl implements IdentityObjectRelationshipType, Serializable
+{
+ private static final long serialVersionUID = 6389479876202629001L;
+
+ private String name;
+
+ public IdentityObjectRelationshipTypeImpl(String name)
+ {
+ if (name == null) throw new IllegalArgumentException("IdentityObjectRelationshipType.name cannot be null.");
+
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @Override
+ public boolean equals(Object value)
+ {
+ if (!(value instanceof IdentityObjectRelationshipType)) return false;
+ IdentityObjectRelationshipType other = (IdentityObjectRelationshipType) value;
+
+ return name.equals(other.getName());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectTypeImpl.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectTypeImpl.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityObjectTypeImpl.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,42 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import java.io.Serializable;
+
+import org.picketlink.idm.spi.model.IdentityObjectType;
+
+/**
+ * Simple implementation of IdentityObjectType
+ *
+ * @author Shane Bryzak
+ */
+public class IdentityObjectTypeImpl implements IdentityObjectType, Serializable
+{
+ private static final long serialVersionUID = -4364461076493738717L;
+
+ private String name;
+
+ public IdentityObjectTypeImpl(String name)
+ {
+ if (name == null) throw new IllegalArgumentException("IdentityObjectType name cannot be null");
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @Override
+ public boolean equals(Object value)
+ {
+ if (!(value instanceof IdentityObjectType)) return false;
+ IdentityObjectType other = (IdentityObjectType) value;
+ return name.equals(other.getName());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityProperty.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityProperty.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityProperty.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,24 @@
+package org.picketlink.idm.impl.store.jpa;
+
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface IdentityProperty {
+ PropertyType value();
+ String attributeName() default "";
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentitySessionProducer.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentitySessionProducer.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentitySessionProducer.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,161 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+//import javax.enterprise.context.ApplicationScoped;
+//import javax.enterprise.context.RequestScoped;
+//import javax.enterprise.inject.Instance;
+//import javax.enterprise.inject.Produces;
+//import javax.enterprise.inject.spi.Bean;
+//import javax.enterprise.inject.spi.BeanManager;
+//import javax.inject.Inject;
+//import javax.persistence.EntityManager;
+
+import org.picketlink.idm.api.IdentitySession;
+import org.picketlink.idm.api.IdentitySessionFactory;
+import org.picketlink.idm.api.event.EventListener;
+import org.picketlink.idm.common.exception.IdentityConfigurationException;
+import org.picketlink.idm.common.exception.IdentityException;
+import org.picketlink.idm.impl.configuration.IdentityConfigurationImpl;
+import org.picketlink.idm.impl.configuration.metadata.IdentityConfigurationMetaDataImpl;
+import org.picketlink.idm.impl.configuration.metadata.IdentityRepositoryConfigurationMetaDataImpl;
+import org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl;
+import org.picketlink.idm.impl.configuration.metadata.IdentityStoreMappingMetaDataImpl;
+import org.picketlink.idm.impl.configuration.metadata.RealmConfigurationMetaDataImpl;
+import org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository;
+import org.picketlink.idm.spi.configuration.metadata.IdentityRepositoryConfigurationMetaData;
+import org.picketlink.idm.spi.configuration.metadata.IdentityStoreConfigurationMetaData;
+import org.picketlink.idm.spi.configuration.metadata.IdentityStoreMappingMetaData;
+import org.picketlink.idm.spi.configuration.metadata.RealmConfigurationMetaData;
+
+/**
+ * Produces IdentitySession instances for identity management-related operations
+ *
+ * @author Shane Bryzak
+ */
+//@ApplicationScoped
+public class IdentitySessionProducer implements EventListener
+{
+ private IdentitySessionFactory factory;
+
+ private String defaultRealm = "default";
+ private String defaultAttributeStoreId;
+ private String defaultIdentityStoreId;
+
+ //@Inject BeanManager manager;
+
+ //@Inject
+ public void init() throws IdentityConfigurationException, IdentityException
+ {
+// IdentityConfigurationMetaDataImpl metadata = new IdentityConfigurationMetaDataImpl();
+//
+// // Create the identity store configuration
+// List<IdentityStoreConfigurationMetaData> stores = new ArrayList<IdentityStoreConfigurationMetaData>();
+//
+// String defaultStoreId = null;
+//
+// Set<Bean<?>> storeBeans = manager.getBeans(IdentityStoreConfiguration.class);
+// for (Bean<?> storeBean : storeBeans)
+// {
+// IdentityStoreConfiguration config = (IdentityStoreConfiguration) manager
+// .getReference(storeBean, IdentityStoreConfiguration.class,
+// manager.createCreationalContext(storeBean));
+//
+// IdentityStoreConfigurationMetaDataImpl store = new IdentityStoreConfigurationMetaDataImpl();
+// config.configure(store);
+//
+// if (defaultStoreId == null && store.getId() != null)
+// {
+// defaultStoreId = store.getId();
+// }
+//
+// stores.add(store);
+// }
+//
+// metadata.setIdentityStores(stores);
+//
+// // Create the default realm
+// RealmConfigurationMetaDataImpl realm = new RealmConfigurationMetaDataImpl();
+// realm.setId(getDefaultRealm());
+// realm.setIdentityMapping("USER");
+// //realm.setGroupTypeMappings(groupTypeMappings)
+// realm.setOptions(new HashMap<String,List<String>>());
+// List<RealmConfigurationMetaData> realms = new ArrayList<RealmConfigurationMetaData>();
+// realms.add(realm);
+// metadata.setRealms(realms);
+//
+// List<IdentityRepositoryConfigurationMetaData> repositories = new ArrayList<IdentityRepositoryConfigurationMetaData>();
+//
+// IdentityRepositoryConfigurationMetaDataImpl repository = new IdentityRepositoryConfigurationMetaDataImpl();
+// repository.setClassName(WrapperIdentityStoreRepository.class.getName());
+// repository.setDefaultAttributeStoreId(defaultAttributeStoreId != null ? defaultAttributeStoreId : defaultStoreId);
+// repository.setDefaultIdentityStoreId(defaultIdentityStoreId != null ? defaultIdentityStoreId : defaultStoreId);
+//
+// List<IdentityStoreMappingMetaData> mappings = new ArrayList<IdentityStoreMappingMetaData>();
+//
+// IdentityStoreMappingMetaDataImpl mapping = new IdentityStoreMappingMetaDataImpl();
+// List<String> identityObjectTypes = new ArrayList<String>();
+// identityObjectTypes.add("USER");
+// identityObjectTypes.add("GROUP");
+// mapping.setIdentityObjectTypeMappings(identityObjectTypes);
+// mapping.setIdentityStoreId(defaultIdentityStoreId != null ? defaultIdentityStoreId : defaultStoreId);
+// mappings.add(mapping);
+//
+// repository.setIdentityStoreToIdentityObjectTypeMappings(mappings);
+//
+// repositories.add(repository);
+// metadata.setRepositories(repositories);
+//
+// IdentityConfigurationImpl config = new IdentityConfigurationImpl();
+// config.configure(metadata);
+//
+// factory = config.buildIdentitySessionFactory();
+ }
+
+ //@Inject Instance<EntityManager> entityManagerInstance;
+
+// @Produces @RequestScoped IdentitySession createIdentitySession()
+// throws IdentityException
+// {
+// Map<String,Object> sessionOptions = new HashMap<String,Object>();
+// sessionOptions.put("ENTITY_MANAGER", entityManagerInstance.get());
+//
+// IdentitySession session = factory.createIdentitySession(getDefaultRealm(), sessionOptions);
+// session.registerListener(this);
+// return session;
+// }
+
+ public String getDefaultRealm()
+ {
+ return defaultRealm;
+ }
+
+ public void setDefaultRealm(String defaultRealm)
+ {
+ this.defaultRealm = defaultRealm;
+ }
+
+ public String getDefaultAttributeStoreId()
+ {
+ return defaultAttributeStoreId;
+ }
+
+ public void setDefaultAttributeStoreId(String defaultAttributeStoreId)
+ {
+ this.defaultAttributeStoreId = defaultAttributeStoreId;
+ }
+
+ public String getDefaultIdentityStoreId()
+ {
+ return defaultIdentityStoreId;
+ }
+
+ public void setDefaultIdentityStoreId(String defaultIdentityStoreId)
+ {
+ this.defaultIdentityStoreId = defaultIdentityStoreId;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityStoreConfiguration.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityStoreConfiguration.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/IdentityStoreConfiguration.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,48 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl;
+
+/**
+ * Abstract bean for configuring identity stores
+ *
+ * @author Shane Bryzak
+ */
+public abstract class IdentityStoreConfiguration
+{
+ private String id;
+ private Class<?> identityStoreClass;
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public Class<?> getIdentityStoreClass()
+ {
+ return identityStoreClass;
+ }
+
+ public void setIdentityStoreClass(Class<?> identityStoreClass)
+ {
+ this.identityStoreClass = identityStoreClass;
+ }
+
+ public void configure(IdentityStoreConfigurationMetaDataImpl store)
+ {
+ store.setId(getId());
+
+ if (getIdentityStoreClass() != null)
+ {
+ store.setClassName(getIdentityStoreClass().getName());
+ }
+
+ doConfigure(store);
+ }
+
+ public abstract void doConfigure(IdentityStoreConfigurationMetaDataImpl store);
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,2090 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.persistence.Entity;
+import javax.persistence.EntityManager;
+import javax.persistence.Id;
+import javax.persistence.NoResultException;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import org.jboss.seam.solder.properties.Property;
+import org.jboss.seam.solder.properties.query.AnnotatedPropertyCriteria;
+import org.jboss.seam.solder.properties.query.NamedPropertyCriteria;
+import org.jboss.seam.solder.properties.query.PropertyCriteria;
+import org.jboss.seam.solder.properties.query.PropertyQueries;
+import org.jboss.seam.solder.properties.query.TypedPropertyCriteria;
+import org.jboss.seam.solder.reflection.Reflections;
+import org.picketlink.idm.common.exception.IdentityException;
+import org.picketlink.idm.impl.api.SimpleAttribute;
+import org.picketlink.idm.impl.store.FeaturesMetaDataImpl;
+import org.picketlink.idm.spi.configuration.IdentityStoreConfigurationContext;
+import org.picketlink.idm.spi.configuration.metadata.IdentityObjectAttributeMetaData;
+import org.picketlink.idm.spi.exception.OperationNotSupportedException;
+import org.picketlink.idm.spi.model.IdentityObject;
+import org.picketlink.idm.spi.model.IdentityObjectAttribute;
+import org.picketlink.idm.spi.model.IdentityObjectCredential;
+import org.picketlink.idm.spi.model.IdentityObjectRelationship;
+import org.picketlink.idm.spi.model.IdentityObjectRelationshipType;
+import org.picketlink.idm.spi.model.IdentityObjectType;
+import org.picketlink.idm.spi.search.IdentityObjectSearchCriteria;
+import org.picketlink.idm.spi.store.FeaturesMetaData;
+import org.picketlink.idm.spi.store.IdentityObjectSearchCriteriaType;
+import org.picketlink.idm.spi.store.IdentityStore;
+import org.picketlink.idm.spi.store.IdentityStoreInvocationContext;
+import org.picketlink.idm.spi.store.IdentityStoreSession;
+
+/**
+ * IdentityStore implementation that allows identity related data to be
+ * persisted in a database via JPA
+ *
+ * @author Shane Bryzak
+ */
+public class JpaIdentityStore implements IdentityStore, Serializable
+{
+ private static final long serialVersionUID = 7729139146633529501L;
+
+ public static final String OPTION_IDENTITY_CLASS_NAME = "identityEntityClassName";
+ public static final String OPTION_CREDENTIAL_CLASS_NAME = "credentialEntityClassName";
+ public static final String OPTION_RELATIONSHIP_CLASS_NAME = "relationshipEntityClassName";
+ public static final String OPTION_ROLE_TYPE_CLASS_NAME = "roleTypeEntityClassName";
+
+ private static final String DEFAULT_USER_IDENTITY_TYPE = "USER";
+ private static final String DEFAULT_ROLE_IDENTITY_TYPE = "ROLE";
+ private static final String DEFAULT_GROUP_IDENTITY_TYPE = "GROUP";
+
+ private static final String DEFAULT_RELATIONSHIP_TYPE_MEMBERSHIP = "MEMBERSHIP";
+ private static final String DEFAULT_RELATIONSHIP_TYPE_ROLE = "ROLE";
+
+ // Property keys
+
+ private static final String PROPERTY_IDENTITY_ID = "IDENTITY_ID";
+ private static final String PROPERTY_IDENTITY_NAME = "IDENTITY_NAME";
+ private static final String PROPERTY_IDENTITY_TYPE = "IDENTITY_TYPE";
+ private static final String PROPERTY_IDENTITY_TYPE_NAME = "IDENTITY_TYPE_NAME";
+ private static final String PROPERTY_CREDENTIAL_VALUE = "CREDENTIAL_VALUE";
+ private static final String PROPERTY_CREDENTIAL_TYPE = "CREDENTIAL_TYPE";
+ private static final String PROPERTY_CREDENTIAL_TYPE_NAME = "CREDENTIAL_TYPE_NAME";
+ private static final String PROPERTY_CREDENTIAL_IDENTITY = "CREDENTIAL_IDENTITY";
+ private static final String PROPERTY_RELATIONSHIP_FROM = "RELATIONSHIP_FROM";
+ private static final String PROPERTY_RELATIONSHIP_TO = "RELATIONSHIP_TO";
+ private static final String PROPERTY_RELATIONSHIP_TYPE = "RELATIONSHIP_TYPE";
+ private static final String PROPERTY_RELATIONSHIP_TYPE_NAME = "RELATIONSHIP_TYPE_NAME";
+ private static final String PROPERTY_RELATIONSHIP_NAME = "RELATIONSHIP_NAME";
+
+ private static final String PROPERTY_ROLE_TYPE_NAME = "RELATIONSHIP_NAME_NAME";
+
+ private static final String PROPERTY_ATTRIBUTE_NAME = "ATTRIBUTE_NAME";
+ private static final String PROPERTY_ATTRIBUTE_VALUE = "ATTRIBUTE_VALUE";
+ private static final String PROPERTY_ATTRIBUTE_IDENTITY = "ATTRIBUTE_IDENTITY";
+
+ private class EntityToSpiConverter
+ {
+ private static final String IDENTITY_TYPE_CACHE_PREFIX = "identity_type:";
+ private static final String RELATIONSHIP_TYPE_CACHE_PREFIX = "relationship_type:";
+
+ private Map<Object,Object> cache = new HashMap<Object,Object>();
+
+ private Property<?> identityIdProperty = modelProperties.get(PROPERTY_IDENTITY_ID);
+ private Property<?> identityNameProperty = modelProperties.get(PROPERTY_IDENTITY_NAME);
+ private Property<?> identityTypeProperty = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+ private Property<?> identityTypeNameProperty = modelProperties.get(PROPERTY_IDENTITY_TYPE_NAME);
+ private Property<?> relationshipTypeNameProperty = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE_NAME);
+
+ public IdentityObject convertToIdentityObject(Object entity)
+ {
+ if (!identityClass.isAssignableFrom(entity.getClass()))
+ {
+ throw new IllegalArgumentException("Invalid identity entity");
+ }
+
+ if (cache.containsKey(entity))
+ {
+ return (IdentityObject) cache.get(entity);
+ }
+ else
+ {
+ IdentityObject obj = new IdentityObjectImpl(
+ identityIdProperty.getValue(entity).toString(),
+ identityNameProperty.getValue(entity).toString(),
+ convertToIdentityObjectType(identityTypeProperty.getValue(entity)));
+ cache.put(entity, obj);
+
+ return obj;
+ }
+ }
+
+ public IdentityObjectType convertToIdentityObjectType(Object value)
+ {
+ if (value instanceof String)
+ {
+ String key = IDENTITY_TYPE_CACHE_PREFIX + (String) value;
+ if (cache.containsKey(key)) return (IdentityObjectType) cache.get(key);
+
+ IdentityObjectType type = new IdentityObjectTypeImpl((String) value);
+ cache.put(key, type);
+ return type;
+ }
+ else
+ {
+ if (cache.containsKey(value)) return (IdentityObjectType) cache.get(value);
+ IdentityObjectType type = new IdentityObjectTypeImpl(
+ (String) identityTypeNameProperty.getValue(value));
+ cache.put(value, type);
+ return type;
+ }
+ }
+
+ public IdentityObjectRelationshipType convertToRelationshipType(Object value)
+ {
+ if (value instanceof String)
+ {
+ String key = RELATIONSHIP_TYPE_CACHE_PREFIX + (String) value;
+ if (cache.containsKey(key)) return (IdentityObjectRelationshipType) cache.get(key);
+
+ IdentityObjectRelationshipType type = new IdentityObjectRelationshipTypeImpl((String) value);
+ cache.put(key, type);
+ return type;
+ }
+ else
+ {
+ if (cache.containsKey(value)) return (IdentityObjectRelationshipType) cache.get(value);
+ IdentityObjectRelationshipType type = new IdentityObjectRelationshipTypeImpl(
+ (String) relationshipTypeNameProperty.getValue(value));
+ cache.put(value, type);
+ return type;
+ }
+ }
+ }
+
+
+ private String id;
+
+ // Entity classes
+ private Class<?> identityClass;
+ private Class<?> credentialClass;
+ private Class<?> relationshipClass;
+ private Class<?> attributeClass;
+ private Class<?> roleTypeClass;
+
+ private String userIdentityType = DEFAULT_USER_IDENTITY_TYPE;
+ private String roleIdentityType = DEFAULT_ROLE_IDENTITY_TYPE;
+ private String groupIdentityType = DEFAULT_GROUP_IDENTITY_TYPE;
+
+ private String relationshipTypeMembership = DEFAULT_RELATIONSHIP_TYPE_MEMBERSHIP;
+ private String relationshipTypeRole = DEFAULT_RELATIONSHIP_TYPE_ROLE;
+
+ /**
+ * Model properties
+ */
+ private Map<String,Property<Object>> modelProperties = new HashMap<String,Property<Object>>();
+
+ /**
+ * Attribute properties
+ */
+ private Map<String,Property<Object>> attributeProperties = new HashMap<String,Property<Object>>();
+
+ private FeaturesMetaData featuresMetaData;
+
+ private class PropertyTypeCriteria implements PropertyCriteria
+ {
+ private PropertyType pt;
+
+ public PropertyTypeCriteria(PropertyType pt)
+ {
+ this.pt = pt;
+ }
+
+ public boolean fieldMatches(Field f)
+ {
+ return f.isAnnotationPresent(IdentityProperty.class) &&
+ f.getAnnotation(IdentityProperty.class).value().equals(pt);
+ }
+
+ public boolean methodMatches(Method m)
+ {
+ return m.isAnnotationPresent(IdentityProperty.class) &&
+ m.getAnnotation(IdentityProperty.class).value().equals(pt);
+ }
+ }
+
+ public JpaIdentityStore(String id)
+ {
+ this.id = id;
+ }
+
+ public void bootstrap(IdentityStoreConfigurationContext configurationContext)
+ throws IdentityException
+ {
+ String clsName = configurationContext.getStoreConfigurationMetaData()
+ .getOptionSingleValue(OPTION_IDENTITY_CLASS_NAME);
+
+ if (clsName == null)
+ {
+ throw new IdentityException("Error bootstrapping JpaIdentityStore - identity entity class cannot be null");
+ }
+
+ try
+ {
+ identityClass = Reflections.classForName(clsName);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IdentityException("Error bootstrapping JpaIdentityStore - invalid identity entity class: " + clsName);
+ }
+
+ if (identityClass == null)
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - identityClass not set");
+ }
+
+ clsName = configurationContext.getStoreConfigurationMetaData()
+ .getOptionSingleValue(OPTION_CREDENTIAL_CLASS_NAME);
+
+ if (clsName != null)
+ {
+ try
+ {
+ credentialClass = Class.forName(clsName);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IdentityException("Error bootstrapping JpaIdentityStore - invalid credential entity class: " + clsName);
+ }
+ }
+
+ clsName = configurationContext.getStoreConfigurationMetaData()
+ .getOptionSingleValue(OPTION_RELATIONSHIP_CLASS_NAME);
+
+ try
+ {
+ relationshipClass = Class.forName(clsName);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IdentityException("Error bootstrapping JpaIdentityStore - invalid relationship entity class: " + clsName);
+ }
+
+ boolean namedRelationshipsSupported = false;
+
+ clsName = configurationContext.getStoreConfigurationMetaData()
+ .getOptionSingleValue(OPTION_ROLE_TYPE_CLASS_NAME);
+
+ if (clsName != null)
+ {
+ try
+ {
+ roleTypeClass = Class.forName(clsName);
+ namedRelationshipsSupported = true;
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IdentityException("Error bootstrapping JpaIdentityStore - invalid role type entity class: " + clsName);
+ }
+ }
+
+ configureIdentityId();
+ configureIdentityName();
+ configureIdentityType();
+
+ configureCredentials();
+ configureRelationships();
+ configureAttributes();
+
+ if (namedRelationshipsSupported)
+ {
+ configureRoleTypeName();
+ }
+
+ featuresMetaData = new FeaturesMetaDataImpl(
+ configurationContext.getStoreConfigurationMetaData(),
+ new HashSet<IdentityObjectSearchCriteriaType>(),
+ false,
+ namedRelationshipsSupported,
+ new HashSet<String>()
+ );
+ }
+
+ protected void configureIdentityId() throws IdentityException
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new AnnotatedPropertyCriteria(Id.class))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_ID, props.get(0));
+ }
+ else
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no Identity ID found.");
+ }
+ }
+
+ protected void configureIdentityName() throws IdentityException
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_NAME, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous identity name property in identity class " + identityClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(identityClass, "username", "userName", "name");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_NAME, p);
+ }
+ else
+ {
+ // Last resort - check whether the entity class exposes a single String property
+ // if so, let's assume it's the identity name
+ props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .getResultList();
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_NAME, props.get(0));
+ }
+ }
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_IDENTITY_NAME))
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no valid identity name property found.");
+ }
+ }
+
+ protected void configureIdentityType() throws IdentityException
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.TYPE))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_TYPE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous identity type property in identity class " + identityClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(identityClass, "identityObjectType",
+ "identityType", "identityObjectTypeName", "identityTypeName",
+ "typeName", "discriminator", "accountType", "userType", "type");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_TYPE, props.get(0));
+ }
+ else
+ {
+ // Last resort - let's check all properties, and try to find one
+ // with an entity type that has "type" in its name
+ props = PropertyQueries.createQuery(identityClass).getResultList();
+ search: for (Property<Object> typeProp : props)
+ {
+ if (typeProp.getJavaClass().isAnnotationPresent(Entity.class) &&
+ (typeProp.getJavaClass().getSimpleName().contains("type") ||
+ typeProp.getJavaClass().getSimpleName().contains("Type")))
+ {
+ // we have a potential match, let's check if this entity has a name property
+ Property<Object> nameProp = findNamedProperty(typeProp.getJavaClass(),
+ "identityObjectTypeName", "identityTypeName", "typeName", "name");
+ if (nameProp != null)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_TYPE, typeProp);
+ modelProperties.put(PROPERTY_IDENTITY_TYPE_NAME, nameProp);
+ break search;
+ }
+ }
+ }
+ }
+ }
+
+ Property<?> typeProp = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+
+ if (typeProp == null)
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no valid identity type property found.");
+ }
+
+ if (!String.class.equals(typeProp.getJavaClass()) &&
+ !modelProperties.containsKey(PROPERTY_IDENTITY_TYPE_NAME))
+ {
+ // We're not dealing with a simple type name - validate the lookup type
+ Property<Object> nameProp = findNamedProperty(typeProp.getJavaClass(),
+ "identityObjectTypeName", "identityTypeName", "typeName", "name");
+ if (nameProp != null)
+ {
+ modelProperties.put(PROPERTY_IDENTITY_TYPE_NAME, nameProp);
+ }
+ else
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no valid identity type name property found.");
+ }
+ }
+ }
+
+ protected Property<Object> findNamedProperty(Class<?> targetClass, String... allowedNames)
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(targetClass)
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ return props.get(0);
+ }
+ else
+ {
+ props = PropertyQueries.createQuery(targetClass)
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .addCriteria(new NamedPropertyCriteria(allowedNames))
+ .getResultList();
+
+ for (String name : allowedNames)
+ {
+ for (Property<Object> prop : props)
+ {
+ if (name.equals(prop.getName())) return prop;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ protected void configureCredentials() throws IdentityException
+ {
+ // If a credential entity has been explicitly configured, scan it
+ if (credentialClass != null)
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.VALUE))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_VALUE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous credential value property in credential class " +
+ credentialClass.getName());
+ }
+ else
+ {
+ // Try scanning for a credential property also
+ props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.CREDENTIAL))
+ .getResultList();
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_VALUE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous credential value property in credential class " +
+ credentialClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(credentialClass, "credentialValue",
+ "password", "passwordHash", "credential", "value");
+ if (p != null) modelProperties.put(PROPERTY_CREDENTIAL_VALUE, p);
+ }
+ }
+
+ // Scan for the credential identity property
+ props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .getResultList();
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_IDENTITY, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous identity property in credential class " +
+ credentialClass.getName());
+ }
+ else
+ {
+ // Scan for a named identity property
+ props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new NamedPropertyCriteria("identity", "identityObject"))
+ .getResultList();
+ if (!props.isEmpty())
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_IDENTITY, props.get(0));
+ }
+ else
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no credential identity property found.");
+ }
+ }
+ }
+ else
+ {
+ // The credentials may be stored in the identity class
+ List<Property<Object>> props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.CREDENTIAL))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_VALUE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous credential property in identity class " +
+ identityClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(identityClass, "credentialValue",
+ "password", "passwordHash", "credential", "value");
+ if (p != null) modelProperties.put(PROPERTY_CREDENTIAL_VALUE, p);
+ }
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_CREDENTIAL_VALUE))
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no credential value property found.");
+ }
+
+ // Scan for a credential type property
+ List<Property<Object>> props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.TYPE))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_TYPE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous credential type property in credential class " +
+ credentialClass.getName());
+ }
+ else
+ {
+ props = PropertyQueries.createQuery(credentialClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.CREDENTIAL_TYPE))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_TYPE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous credential type property in credential class " +
+ credentialClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(credentialClass, "credentialType",
+ "identityObjectCredentialType", "type");
+ if (p != null) modelProperties.put(PROPERTY_CREDENTIAL_TYPE, p);
+ }
+ }
+
+ Property<?> typeProp = modelProperties.get(PROPERTY_CREDENTIAL_TYPE);
+
+ // If the credential type property isn't a String, then validate the lookup type
+ if (!String.class.equals(typeProp.getJavaClass()))
+ {
+ Property<Object> nameProp = findNamedProperty(typeProp.getJavaClass(),
+ "credentialObjectTypeName", "credentialTypeName", "typeName", "name");
+ if (nameProp != null)
+ {
+ modelProperties.put(PROPERTY_CREDENTIAL_TYPE_NAME, nameProp);
+ }
+ else
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - no valid credential type name property found.");
+ }
+ }
+ }
+
+ protected void configureRelationships() throws IdentityException
+ {
+ if (relationshipClass == null)
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - relationshipClass not set.");
+ }
+
+ List<Property<Object>> props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .addCriteria(new PropertyTypeCriteria(PropertyType.RELATIONSHIP_FROM))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_FROM, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous relationshipFrom property in relationship class " +
+ relationshipClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(relationshipClass, "relationshipFrom",
+ "fromIdentityObject", "fromIdentity");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_FROM, p);
+ }
+ else
+ {
+ // Last resort - search for a property with a type of identityClass
+ // and a "from" in its name
+ props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .getResultList();
+
+ for (Property<Object> prop : props)
+ {
+ if (prop.getName().contains("from"))
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_FROM, prop);
+ break;
+ }
+ }
+ }
+ }
+
+
+ props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .addCriteria(new PropertyTypeCriteria(PropertyType.RELATIONSHIP_TO))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TO, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous relationshipTo property in relationship class " +
+ relationshipClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(relationshipClass, "relationshipTo",
+ "toIdentityObject", "toIdentity");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TO, p);
+ }
+ else
+ {
+ // Last resort - search for a property with a type of identityClass
+ // and a "to" in its name
+ props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .getResultList();
+
+ for (Property<Object> prop : props)
+ {
+ if (prop.getName().contains("to"))
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TO, prop);
+ break;
+ }
+ }
+ }
+ }
+
+ props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.TYPE))
+ .getResultList();
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TYPE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous relationshipType property in relationship class " +
+ relationshipClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(relationshipClass,
+ "identityRelationshipType", "relationshipType", "type");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TYPE, p);
+ }
+ else
+ {
+ props = PropertyQueries.createQuery(relationshipClass)
+ .getResultList();
+ for (Property<Object> prop : props)
+ {
+ if (prop.getName().contains("type"))
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TYPE, prop);
+ break;
+ }
+ }
+ }
+ }
+
+ props = PropertyQueries.createQuery(relationshipClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_NAME, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous relationship name property in relationship class " +
+ relationshipClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(relationshipClass,
+ "relationshipName", "name");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_NAME, p);
+ }
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_RELATIONSHIP_FROM))
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - no valid relationship from property found.");
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_RELATIONSHIP_TO))
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - no valid relationship to property found.");
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_RELATIONSHIP_TYPE))
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - no valid relationship type property found.");
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_RELATIONSHIP_NAME))
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - no valid relationship name property found.");
+ }
+
+ Class<?> typeClass = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE).getJavaClass();
+ if (!String.class.equals(typeClass))
+ {
+ props = PropertyQueries.createQuery(typeClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TYPE_NAME, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous relationship type name property in class " +
+ typeClass.getName());
+ }
+ else
+ {
+ Property<Object> p = findNamedProperty(typeClass, "relationshipTypeName",
+ "typeName", "name");
+ if (p != null)
+ {
+ modelProperties.put(PROPERTY_RELATIONSHIP_TYPE_NAME, p);
+ }
+ }
+
+ if (!modelProperties.containsKey(PROPERTY_RELATIONSHIP_TYPE_NAME))
+ {
+ throw new IdentityException(
+ "Error initializing JpaIdentityStore - no valid relationship type name property found");
+ }
+ }
+ }
+
+ protected void configureAttributes() throws IdentityException
+ {
+ // If an attribute class has been configured, scan it for attributes
+ if (attributeClass != null)
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(attributeClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .addCriteria(new TypedPropertyCriteria(String.class))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_ATTRIBUTE_NAME, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous attribute name property in class " +
+ attributeClass.getName());
+ }
+ else
+ {
+ Property<Object> prop = findNamedProperty(attributeClass,
+ "attributeName", "name");
+ if (prop != null) modelProperties.put(PROPERTY_ATTRIBUTE_NAME, prop);
+ }
+
+ props = PropertyQueries.createQuery(attributeClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.VALUE))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_ATTRIBUTE_VALUE, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous attribute value property in class " +
+ attributeClass.getName());
+ }
+ else
+ {
+ Property<Object> prop = findNamedProperty(attributeClass,
+ "attributeValue", "value");
+ if (prop != null) modelProperties.put(PROPERTY_ATTRIBUTE_VALUE, prop);
+ }
+
+ props = PropertyQueries.createQuery(attributeClass)
+ .addCriteria(new TypedPropertyCriteria(identityClass))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_ATTRIBUTE_IDENTITY, props.get(0));
+ }
+ else if (props.size() > 1)
+ {
+ throw new IdentityException(
+ "Ambiguous identity property in attribute class " +
+ attributeClass.getName());
+ }
+ else
+ {
+ throw new IdentityException("Error initializing JpaIdentityStore - " +
+ "no attribute identity property found.");
+ }
+ }
+
+ // Scan for additional attributes in the identity class also
+ List<Property<Object>> props = PropertyQueries.createQuery(identityClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.ATTRIBUTE))
+ .getResultList();
+
+ for (Property<Object> p : props)
+ {
+ attributeProperties.put(
+ p.getAnnotatedElement().getAnnotation(IdentityProperty.class).attributeName(),
+ p);
+ }
+
+ // scan any entity classes referenced by the identity class also
+ props = PropertyQueries.createQuery(identityClass)
+ .getResultList();
+
+ for (Property<Object> p : props)
+ {
+ if (!p.isReadOnly() && p.getJavaClass().isAnnotationPresent(Entity.class))
+ {
+ List<Property<Object>> pp = PropertyQueries.createQuery(p.getJavaClass())
+ .addCriteria(new PropertyTypeCriteria(PropertyType.ATTRIBUTE))
+ .getResultList();
+
+ for (Property<Object> attributeProperty : pp)
+ {
+ attributeProperties.put(
+ attributeProperty.getAnnotatedElement().getAnnotation(IdentityProperty.class).attributeName(),
+ attributeProperty);
+ }
+ }
+ }
+ }
+
+ protected void configureRoleTypeName()
+ {
+ Property<Object> relationshipNameProp = findNamedProperty(roleTypeClass, "name");
+ if (relationshipNameProp != null)
+ {
+ modelProperties.put(PROPERTY_ROLE_TYPE_NAME, relationshipNameProp);
+ }
+ }
+
+ public String getUserIdentityType()
+ {
+ return userIdentityType;
+ }
+
+ public void setUserIdentityType(String userIdentityType)
+ {
+ this.userIdentityType = userIdentityType;
+ }
+
+ public String getRoleIdentityType()
+ {
+ return roleIdentityType;
+ }
+
+ public void setRoleIdentityType(String roleIdentityType)
+ {
+ this.roleIdentityType = roleIdentityType;
+ }
+
+ public String getGroupIdentityType()
+ {
+ return groupIdentityType;
+ }
+
+ public void setGroupIdentityType(String groupIdentityType)
+ {
+ this.groupIdentityType = groupIdentityType;
+ }
+
+ public String getRelationshipTypeMembership()
+ {
+ return relationshipTypeMembership;
+ }
+
+ public void setRelationshipTypeMembership(String relationshipTypeMembership)
+ {
+ this.relationshipTypeMembership = relationshipTypeMembership;
+ }
+
+ public String getRelationshipTypeRole()
+ {
+ return relationshipTypeRole;
+ }
+
+ public void setRelationshipTypeRole(String relationshipTypeRole)
+ {
+ this.relationshipTypeRole = relationshipTypeRole;
+ }
+
+ public IdentityStoreSession createIdentityStoreSession(
+ Map<String, Object> sessionOptions) throws IdentityException
+ {
+ EntityManager em = (EntityManager) sessionOptions.get("ENTITY_MANAGER");
+
+ return new JpaIdentityStoreSessionImpl(em);
+ }
+
+ public IdentityObject createIdentityObject(
+ IdentityStoreInvocationContext invocationCtx, String name,
+ IdentityObjectType identityObjectType) throws IdentityException
+ {
+ return createIdentityObject(invocationCtx, name, identityObjectType, null);
+ }
+
+ protected Object lookupIdentityType(String identityType, EntityManager em)
+ {
+ try
+ {
+ Property<Object> typeNameProp = modelProperties.get(PROPERTY_IDENTITY_TYPE_NAME);
+
+ // If there is no identity type table, just return the name
+ if (typeNameProp == null) return identityType;
+
+ Object val = em.createQuery(
+ "select t from " + typeNameProp.getDeclaringClass().getName() +
+ " t where t." + typeNameProp.getName() +
+ " = :identityType")
+ .setParameter("identityType", identityType)
+ .getSingleResult();
+ return val;
+ }
+ catch (NoResultException ex)
+ {
+ return null;
+ }
+ }
+
+ public IdentityObject createIdentityObject(
+ IdentityStoreInvocationContext ctx, String name,
+ IdentityObjectType identityObjectType, Map<String, String[]> attributes)
+ throws IdentityException
+ {
+ try
+ {
+ Object identityInstance = identityClass.newInstance();
+ modelProperties.get(PROPERTY_IDENTITY_NAME).setValue(identityInstance, name);
+
+ Property<Object> typeProp = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+
+ if (String.class.equals(typeProp.getJavaClass()))
+ {
+ typeProp.setValue(identityInstance, identityObjectType.getName());
+ }
+ else
+ {
+ typeProp.setValue(identityInstance, lookupIdentityType(identityObjectType.getName(),
+ getEntityManager(ctx)));
+ }
+
+ //beanManager.fireEvent(new PrePersistUserEvent(identityInstance));
+
+ EntityManager em = getEntityManager(ctx);
+
+ em.persist(identityInstance);
+
+ //beanManager.fireEvent(new UserCreatedEvent(identityInstance));
+
+ // TODO persist attributes
+
+ Object id = modelProperties.get(PROPERTY_IDENTITY_ID).getValue(identityInstance);
+ IdentityObject obj = new IdentityObjectImpl(
+ (id != null ? id.toString() : null),
+ name, identityObjectType);
+
+ return obj;
+ }
+ catch (Exception ex)
+ {
+ throw new IdentityException("Error creating identity object", ex);
+ }
+ }
+
+ public IdentityObjectRelationship createRelationship(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType,
+ String relationshipName, boolean createNames) throws IdentityException
+ {
+ try
+ {
+ EntityManager em = getEntityManager(invocationCtx);
+
+ Object relationship = relationshipClass.newInstance();
+
+ modelProperties.get(PROPERTY_RELATIONSHIP_FROM).setValue(relationship,
+ lookupIdentity(fromIdentity, em));
+ modelProperties.get(PROPERTY_RELATIONSHIP_TO).setValue(relationship,
+ lookupIdentity(toIdentity, em));
+
+ Property<Object> type = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE);
+ if (String.class.equals(modelProperties.get(PROPERTY_RELATIONSHIP_TYPE).getJavaClass()))
+ {
+ type.setValue(relationship, relationshipType.getName());
+ }
+ else
+ {
+ type.setValue(relationship, lookupRelationshipType(relationshipType, em));
+ }
+
+ modelProperties.get(PROPERTY_RELATIONSHIP_NAME).setValue(relationship,
+ relationshipName);
+
+ em.persist(relationship);
+
+ return new IdentityObjectRelationshipImpl(fromIdentity, toIdentity,
+ relationshipName, relationshipType);
+ }
+ catch (Exception ex)
+ {
+ throw new IdentityException("Exception creating relationship", ex);
+ }
+ }
+
+ protected Object lookupIdentity(IdentityObject obj, EntityManager em)
+ {
+ Property<?> identityNameProp = modelProperties.get(PROPERTY_IDENTITY_NAME);
+ Property<?> identityTypeProp = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(identityClass);
+ Root<?> root = criteria.from(identityClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(identityNameProp.getName()), obj.getName()));
+ predicates.add(builder.equal(root.get(identityTypeProp.getName()), lookupIdentityType(obj.getIdentityType().getName(), em)));
+
+ // TODO add criteria for identity type
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ return em.createQuery(criteria).getSingleResult();
+ }
+
+ protected Object lookupCredentialTypeEntity(String name, EntityManager em)
+ {
+ Property<?> credentialTypeNameProp = modelProperties.get(PROPERTY_CREDENTIAL_TYPE_NAME);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(credentialTypeNameProp.getDeclaringClass());
+ Root<?> root = criteria.from(credentialTypeNameProp.getDeclaringClass());
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(credentialTypeNameProp.getName()), name));
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ return em.createQuery(criteria).getSingleResult();
+ }
+
+ protected Object lookupRelationshipType(IdentityObjectRelationshipType relationshipType, EntityManager em)
+ {
+ Property<?> relationshipTypeNameProp = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE_NAME);
+
+ if (relationshipTypeNameProp != null)
+ {
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(relationshipTypeNameProp.getDeclaringClass());
+ Root<?> root = criteria.from(relationshipTypeNameProp.getDeclaringClass());
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(relationshipTypeNameProp.getName()), relationshipType.getName()));
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ return em.createQuery(criteria).getSingleResult();
+ }
+ else
+ {
+ return relationshipType.getName();
+ }
+ }
+
+ public String createRelationshipName(IdentityStoreInvocationContext ctx,
+ String name) throws IdentityException, OperationNotSupportedException
+ {
+ try
+ {
+ Property<Object> roleTypeNameProp = modelProperties.get(PROPERTY_ROLE_TYPE_NAME);
+
+ Object roleTypeInstance = roleTypeClass.newInstance();
+ roleTypeNameProp.setValue(roleTypeInstance, name);
+
+ EntityManager em = getEntityManager(ctx);
+
+ em.persist(roleTypeInstance);
+ return name;
+ }
+ catch (Exception ex)
+ {
+ throw new IdentityException("Error creating relationship name", ex);
+ }
+ }
+
+ public EntityManager getEntityManager(IdentityStoreInvocationContext invocationContext)
+ {
+ return ((JpaIdentityStoreSessionImpl) invocationContext.getIdentityStoreSession()).getEntityManager();
+ }
+
+ public IdentityObject findIdentityObject(IdentityStoreInvocationContext invocationContext, String id)
+ throws IdentityException
+ {
+ try
+ {
+ Object identity = getEntityManager(invocationContext).createQuery("select i from " +
+ identityClass.getName() + " i where i." +
+ modelProperties.get(PROPERTY_IDENTITY_ID).getName() +
+ " = :id")
+ .setParameter("id", id)
+ .getSingleResult();
+
+ IdentityObjectType type = modelProperties.containsKey(PROPERTY_IDENTITY_TYPE_NAME) ?
+ new IdentityObjectTypeImpl(
+ modelProperties.get(PROPERTY_IDENTITY_TYPE_NAME).getValue(
+ modelProperties.get(PROPERTY_IDENTITY_TYPE).getValue(identity)).toString()) :
+ new IdentityObjectTypeImpl(modelProperties.get(PROPERTY_IDENTITY_TYPE).getValue(identity).toString());
+
+
+ return new IdentityObjectImpl(
+ modelProperties.get(PROPERTY_IDENTITY_ID).getValue(identity).toString(),
+ modelProperties.get(PROPERTY_IDENTITY_NAME).getValue(identity).toString(),
+ type);
+ }
+ catch (NoResultException ex)
+ {
+ return null;
+ }
+ }
+
+ public IdentityObject findIdentityObject(
+ IdentityStoreInvocationContext invocationContext, String name,
+ IdentityObjectType identityObjectType) throws IdentityException
+ {
+ try
+ {
+ Object identityType = modelProperties.containsKey(PROPERTY_IDENTITY_TYPE_NAME) ?
+ lookupIdentityType(identityObjectType.getName(), getEntityManager(invocationContext)) :
+ identityObjectType.getName();
+
+ Object identity = getEntityManager(invocationContext).createQuery("select i from " +
+ identityClass.getName() + " i where i." +
+ modelProperties.get(PROPERTY_IDENTITY_NAME).getName() +
+ " = :name and i." + modelProperties.get(PROPERTY_IDENTITY_TYPE).getName() +
+ " = :type")
+ .setParameter("name", name)
+ .setParameter("type", identityType)
+ .getSingleResult();
+
+ return new IdentityObjectImpl(
+ modelProperties.get(PROPERTY_IDENTITY_ID).getValue(identity).toString(),
+ modelProperties.get(PROPERTY_IDENTITY_NAME).getValue(identity).toString(),
+ identityObjectType);
+ }
+ catch (NoResultException ex)
+ {
+ return null;
+ }
+ }
+
+ public Collection<IdentityObject> findIdentityObject(
+ IdentityStoreInvocationContext ctx,
+ IdentityObjectType identityType, IdentityObjectSearchCriteria searchCriteria)
+ throws IdentityException
+ {
+ List<IdentityObject> objs = new ArrayList<IdentityObject>();
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(identityClass);
+
+ Root<?> root = criteria.from(identityClass);
+
+ Property<?> identityTypeProp = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+
+ if (identityType != null)
+ {
+ predicates.add(builder.equal(root.get(identityTypeProp.getName()),
+ lookupIdentityType(identityType.getName(), em)));
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ EntityToSpiConverter converter = new EntityToSpiConverter();
+
+ for (Object result : results)
+ {
+ objs.add(converter.convertToIdentityObject(result));
+ }
+
+ return objs;
+ }
+
+ public Collection<IdentityObject> findIdentityObject(
+ IdentityStoreInvocationContext invocationCxt, IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType, boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
+ List<IdentityObject> objs = new ArrayList<IdentityObject>();
+
+ System.out.println("*** Invoked unimplemented method findIdentityObject()");
+
+ // TODO Auto-generated method stub
+ return objs;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public int getIdentityObjectsCount(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityType) throws IdentityException
+ {
+ System.out.println("*** Invoked unimplemented method getIdentityObjectsCount()");
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Map<String, String> getRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name)
+ throws IdentityException, OperationNotSupportedException
+ {
+ System.out.println("*** Invoked unimplemented method getRelationshipNameProperties()");
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx,
+ IdentityObjectSearchCriteria searchCriteria) throws IdentityException,
+ OperationNotSupportedException
+ {
+ Set<String> names = new HashSet<String>();
+
+ Property<Object> roleTypeNameProp = modelProperties.get(PROPERTY_ROLE_TYPE_NAME);
+
+ if (roleTypeClass != null)
+ {
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(roleTypeClass);
+ criteria.from(roleTypeClass);
+
+ List<?> results = em.createQuery(criteria).getResultList();
+ for (Object result : results)
+ {
+ names.add(roleTypeNameProp.getValue(result).toString());
+ }
+ }
+
+ return names;
+ }
+
+ public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx,
+ IdentityObject identity, IdentityObjectSearchCriteria searchCriteria)
+ throws IdentityException, OperationNotSupportedException
+ {
+ Set<String> names = new HashSet<String>();
+
+ if (!featuresMetaData.isNamedRelationshipsSupported()) return names;
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(relationshipClass);
+ Root<?> root = criteria.from(relationshipClass);
+
+ Property<?> identityToProperty = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
+ Property<?> relationshipNameProperty = modelProperties.get(PROPERTY_RELATIONSHIP_NAME);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(identityToProperty.getName()),
+ lookupIdentity(identity, em)));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+ for (Object result : results)
+ {
+ names.add((String) relationshipNameProperty.getValue(result));
+ }
+
+ return names;
+ }
+
+ public Map<String, String> getRelationshipProperties(
+ IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship) throws IdentityException,
+ OperationNotSupportedException
+ {
+ System.out.println("*** Invoked unimplemented method getRelationshipProperties()");
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FeaturesMetaData getSupportedFeatures()
+ {
+ return featuresMetaData;
+ }
+
+ public void removeIdentityObject(
+ IdentityStoreInvocationContext ctx, IdentityObject identity)
+ throws IdentityException
+ {
+ removeRelationships(ctx, identity, null, false);
+
+ Property<?> nameProperty = modelProperties.get(PROPERTY_IDENTITY_NAME);
+ Property<?> typeProperty = modelProperties.get(PROPERTY_IDENTITY_TYPE);
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+
+ CriteriaQuery<?> criteria = builder.createQuery(identityClass);
+ Root<?> root = criteria.from(identityClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(nameProperty.getName()),
+ identity.getName()));
+ predicates.add(builder.equal(root.get(typeProperty.getName()),
+ lookupIdentityType(identity.getIdentityType().getName(), em)));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ try
+ {
+ Object instance = em.createQuery(criteria).getSingleResult();
+
+ // If there is a credential class, delete any credentials
+ if (credentialClass != null)
+ {
+ Property<?> credentialIdentityProp = modelProperties.get(PROPERTY_CREDENTIAL_IDENTITY);
+
+ criteria = builder.createQuery(credentialClass);
+ root = criteria.from(credentialClass);
+
+ predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(credentialIdentityProp.getName()),
+ lookupIdentity(identity, em)));
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+ for (Object result : results)
+ {
+ em.remove(result);
+ }
+ }
+
+ em.remove(instance);
+ }
+ catch (NoResultException ex)
+ {
+ throw new IdentityException(String.format(
+ "Exception removing identity object - [%s] not found.",
+ identity), ex);
+ }
+ }
+
+ public void removeRelationship(IdentityStoreInvocationContext ctx,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType,
+ String relationshipName) throws IdentityException
+ {
+ Property<?> fromProperty = modelProperties.get(PROPERTY_RELATIONSHIP_FROM);
+ Property<?> toProperty = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
+ Property<?> relationshipTypeProp = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE);
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(identityClass);
+ Root<?> root = criteria.from(identityClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(fromProperty.getName()),
+ lookupIdentity(fromIdentity, em)));
+ predicates.add(builder.equal(root.get(toProperty.getName()),
+ lookupIdentity(toIdentity, em)));
+ predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
+ lookupRelationshipType(relationshipType, em)));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ Object relationship = em.createQuery(criteria).getSingleResult();
+ em.remove(relationship);
+ }
+
+ public String removeRelationshipName(IdentityStoreInvocationContext ctx,
+ String name) throws IdentityException, OperationNotSupportedException
+ {
+ Property<?> nameProp = modelProperties.get(PROPERTY_ROLE_TYPE_NAME);
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(roleTypeClass);
+ Root<?> root = criteria.from(roleTypeClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(nameProp.getName()), name));
+ criteria.where(predicates.toArray((new Predicate[0])));
+ Object roleType = em.createQuery(criteria).getSingleResult();
+ em.remove(roleType);
+
+ return null;
+ }
+
+ public void removeRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name, Set<String> properties)
+ throws IdentityException, OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+ System.out.println("*** Invoked unimplemented method removeRelationshipNameProperties()");
+ }
+
+ public void removeRelationshipProperties(IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship, Set<String> properties)
+ throws IdentityException, OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+ System.out.println("*** Invoked unimplemented method removeRelationshipProperties()");
+ }
+
+ public void removeRelationships(
+ IdentityStoreInvocationContext ctx,
+ IdentityObject identity1, IdentityObject identity2, boolean named)
+ throws IdentityException
+ {
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(relationshipClass);
+ Root<?> root = criteria.from(relationshipClass);
+
+ Property<?> relationshipFromProp = modelProperties.get(PROPERTY_RELATIONSHIP_FROM);
+ Property<?> relationshipToProp = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+
+ if (identity1 != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
+ lookupIdentity(identity1, em)));
+ }
+
+ if (identity2 != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipToProp.getName()),
+ lookupIdentity(identity2, em)));
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+ for (Object result : results)
+ {
+ em.remove(result);
+ }
+
+ criteria = builder.createQuery(relationshipClass);
+ criteria.from(relationshipClass);
+
+ predicates = new ArrayList<Predicate>();
+
+ if (identity2 != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
+ lookupIdentity(identity2, em)));
+ }
+
+ if (identity1 != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipToProp.getName()),
+ lookupIdentity(identity1, em)));
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ results = em.createQuery(criteria).getResultList();
+ for (Object result : results)
+ {
+ em.remove(result);
+ }
+ }
+
+ public Set<IdentityObjectRelationship> resolveRelationships(
+ IdentityStoreInvocationContext ctx,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType)
+ throws IdentityException
+ {
+ Set<IdentityObjectRelationship> relationships = new HashSet<IdentityObjectRelationship>();
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(relationshipClass);
+ Root<?> root = criteria.from(relationshipClass);
+
+ Property<?> relationshipFromProp = modelProperties.get(PROPERTY_RELATIONSHIP_FROM);
+ Property<?> relationshipToProp = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
+ Property<?> relationshipTypeProp = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE);
+ Property<?> relationshipNameProp = modelProperties.get(PROPERTY_RELATIONSHIP_NAME);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+
+ if (fromIdentity != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
+ lookupIdentity(fromIdentity, em)));
+ }
+
+ if (toIdentity != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipToProp.getName()),
+ lookupIdentity(toIdentity, em)));
+ }
+
+ if (relationshipType != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
+ lookupRelationshipType(relationshipType, em)));
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ EntityToSpiConverter converter = new EntityToSpiConverter();
+
+ for (Object result : results)
+ {
+ IdentityObjectRelationship relationship = new IdentityObjectRelationshipImpl(
+ converter.convertToIdentityObject(relationshipFromProp.getValue(result)),
+ converter.convertToIdentityObject(relationshipToProp.getValue(result)),
+ (String) relationshipNameProp.getValue(result),
+ converter.convertToRelationshipType(relationshipTypeProp.getValue(result))
+ );
+
+ relationships.add(relationship);
+ }
+
+ return relationships;
+ }
+
+ public Set<IdentityObjectRelationship> resolveRelationships(
+ IdentityStoreInvocationContext ctx, IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType, boolean parent,
+ boolean named, String name) throws IdentityException
+ {
+ Set<IdentityObjectRelationship> relationships = new HashSet<IdentityObjectRelationship>();
+
+ EntityManager em = getEntityManager(ctx);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(relationshipClass);
+ Root<?> root = criteria.from(relationshipClass);
+
+ Property<?> relationshipFromProp = modelProperties.get(PROPERTY_RELATIONSHIP_FROM);
+ Property<?> relationshipToProp = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
+ Property<?> relationshipTypeProp = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE);
+ Property<?> relationshipNameProp = modelProperties.get(PROPERTY_RELATIONSHIP_NAME);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+
+ if (parent)
+ {
+ predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
+ lookupIdentity(identity, em)));
+ }
+ else
+ {
+ predicates.add(builder.equal(root.get(relationshipToProp.getName()),
+ lookupIdentity(identity, em)));
+ }
+
+ if (relationshipType != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
+ lookupRelationshipType(relationshipType, em)));
+ }
+
+ if (named)
+ {
+ if (name != null)
+ {
+ predicates.add(builder.equal(root.get(relationshipNameProp.getName()),
+ name));
+ }
+ else
+ {
+ predicates.add(builder.isNotNull(root.get(relationshipNameProp.getName())));
+ }
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ EntityToSpiConverter converter = new EntityToSpiConverter();
+
+ for (Object result : results)
+ {
+ IdentityObjectRelationship relationship = new IdentityObjectRelationshipImpl(
+ converter.convertToIdentityObject(relationshipFromProp.getValue(result)),
+ converter.convertToIdentityObject(relationshipToProp.getValue(result)),
+ (String) relationshipNameProp.getValue(result),
+ converter.convertToRelationshipType(relationshipTypeProp.getValue(result))
+ );
+
+ relationships.add(relationship);
+ }
+
+ return relationships;
+ }
+
+ public void setRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name,
+ Map<String, String> properties) throws IdentityException,
+ OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+ System.out.println("*** Invoked unimplemented method setRelationshipNameProperties()");
+
+ }
+
+ public void setRelationshipProperties(IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship, Map<String, String> properties)
+ throws IdentityException, OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+ System.out.println("*** Invoked unimplemented method setRelationshipProperties()");
+ }
+
+ public void updateCredential(IdentityStoreInvocationContext ctx,
+ IdentityObject identityObject, IdentityObjectCredential credential)
+ throws IdentityException
+ {
+ EntityManager em = getEntityManager(ctx);
+
+ Property<Object> credentialValue = modelProperties.get(PROPERTY_CREDENTIAL_VALUE);
+
+ if (credentialClass != null)
+ {
+ Property<Object> credentialIdentity = modelProperties.get(PROPERTY_CREDENTIAL_IDENTITY);
+ Property<Object> credentialType = modelProperties.get(PROPERTY_CREDENTIAL_TYPE);
+ Object identity = lookupIdentity(identityObject, em);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(credentialClass);
+ Root<?> root = criteria.from(credentialClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(credentialIdentity.getName()),
+ identity));
+
+ if (credentialType != null)
+ {
+ if (String.class.equals(credentialType.getJavaClass()))
+ {
+ predicates.add(builder.equal(root.get(credentialType.getName()),
+ credential.getType().getName()));
+ }
+ else
+ {
+ predicates.add(builder.equal(root.get(credentialType.getName()),
+ lookupCredentialTypeEntity(credential.getType().getName(), em)));
+ }
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ if (results.isEmpty())
+ {
+ // The credential doesn't exist, let's create it
+ try
+ {
+ Object newCredential = credentialClass.newInstance();
+ credentialIdentity.setValue(newCredential, identity);
+ credentialValue.setValue(newCredential, credential.getValue());
+ credentialType.setValue(newCredential,
+ lookupCredentialTypeEntity(credential.getType().getName(), em));
+
+ em.persist(newCredential);
+ }
+ catch (IllegalAccessException ex)
+ {
+ throw new IdentityException("Error updating credential - could " +
+ "not create credential instance", ex);
+ }
+ catch (InstantiationException ex)
+ {
+ throw new IdentityException("Error updating credential - could " +
+ "not create credential instance", ex);
+ }
+ }
+ else
+ {
+ // TODO there shouldn't be multiple credentials with the same type,
+ // but if there are, we need to deal with it somehow.. for now just use the first one
+
+ Object result = results.get(0);
+ credentialValue.setValue(result, credential.getValue());
+
+ em.merge(result);
+ }
+ }
+ else
+ {
+ // The credential is stored in the identity class, update it there
+
+ Property<Object> credentialProp = modelProperties.get(PROPERTY_CREDENTIAL_VALUE);
+ Object identity = lookupIdentity(identityObject, em);
+
+ credentialProp.setValue(identity, credential.getValue());
+
+ em.merge(identity);
+ }
+
+ }
+
+ public boolean validateCredential(IdentityStoreInvocationContext ctx,
+ IdentityObject identityObject, IdentityObjectCredential credential)
+ throws IdentityException
+ {
+ EntityManager em = getEntityManager(ctx);
+
+ Property<?> credentialValue = modelProperties.get(PROPERTY_CREDENTIAL_VALUE);
+
+ // Either credentials are stored in their own class...
+ if (credentialClass != null)
+ {
+ Property<?> credentialIdentity = modelProperties.get(PROPERTY_CREDENTIAL_IDENTITY);
+ Property<?> credentialType = modelProperties.get(PROPERTY_CREDENTIAL_TYPE);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(credentialClass);
+ Root<?> root = criteria.from(credentialClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(credentialIdentity.getName()),
+ lookupIdentity(identityObject, em)));
+
+ if (credentialType != null)
+ {
+ if (String.class.equals(credentialType.getJavaClass()))
+ {
+ predicates.add(builder.equal(root.get(credentialType.getName()),
+ credential.getType().getName()));
+ }
+ else
+ {
+ predicates.add(builder.equal(root.get(credentialType.getName()),
+ lookupCredentialTypeEntity(credential.getType().getName(), em)));
+ }
+ }
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ if (results.isEmpty()) return false;
+
+ // TODO this only supports plain text passwords
+
+ for (Object result : results)
+ {
+ Object val = credentialValue.getValue(result);
+ if (val.equals(credential.getValue())) return true;
+ }
+ }
+ // or they're stored in the identity class
+ else
+ {
+ Property<?> identityNameProp = modelProperties.get(PROPERTY_IDENTITY_NAME);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(credentialValue.getDeclaringClass());
+
+ Root<?> root = criteria.from(credentialValue.getDeclaringClass());
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(identityNameProp.getName()),
+ identityObject.getName()));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ Object result = em.createQuery(criteria).getSingleResult();
+
+ Object val = credentialValue.getValue(result);
+ if (val.equals(credential.getValue())) return true;
+ }
+
+ return false;
+ }
+
+ public void addAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, IdentityObjectAttribute[] attributes)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public IdentityObject findIdentityObjectByUniqueAttribute(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityObjectType,
+ IdentityObjectAttribute attribute) throws IdentityException
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IdentityObjectAttribute getAttribute(IdentityStoreInvocationContext ctx,
+ IdentityObject identity, String name) throws IdentityException
+ {
+ EntityManager em = getEntityManager(ctx);
+
+ Property<?> attributeProperty = attributeProperties.get(name);
+ if (attributeProperty != null)
+ {
+ // TODO implement attribute search for attributes scattered across the model
+
+
+ return new SimpleAttribute(name);
+ }
+ else
+ {
+ // If there is no attributeClass set, we have nowhere else to look - return an empty attribute
+ if (attributeClass == null) return new SimpleAttribute(name);
+
+ Property<?> attributeIdentityProp = modelProperties.get(PROPERTY_ATTRIBUTE_IDENTITY);
+ Property<?> attributeNameProp = modelProperties.get(PROPERTY_ATTRIBUTE_NAME);
+ Property<?> attributeValueProp = modelProperties.get(PROPERTY_ATTRIBUTE_VALUE);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(attributeClass);
+ Root<?> root = criteria.from(attributeClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(attributeIdentityProp.getName()),
+ lookupIdentity(identity, em)));
+ predicates.add(builder.equal(root.get(attributeNameProp.getName()),
+ name));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ if (results.size() == 0)
+ {
+ // No results found, return an empty attribute value
+ return new SimpleAttribute(name);
+ }
+ else if (results.size() == 1)
+ {
+ return new SimpleAttribute(name, attributeValueProp.getValue(results.get(0)));
+ }
+ else
+ {
+ Collection<Object> values = new ArrayList<Object>();
+ for (Object result : results)
+ {
+ values.add(attributeValueProp.getValue(result));
+ }
+
+ return new SimpleAttribute(name, values.toArray());
+ }
+ }
+ }
+
+ public Map<String, IdentityObjectAttribute> getAttributes(
+ IdentityStoreInvocationContext ctx,
+ IdentityObject identityObject) throws IdentityException
+ {
+ Map<String, IdentityObjectAttribute> attributes = new HashMap<String,IdentityObjectAttribute>();
+
+ EntityManager em = getEntityManager(ctx);
+
+ Object identity = lookupIdentity(identityObject, em);
+
+ // TODO iterate through attributeProperties
+
+ if (attributeClass != null)
+ {
+ Property<?> attributeIdentityProp = modelProperties.get(PROPERTY_ATTRIBUTE_IDENTITY);
+ Property<?> attributeNameProp = modelProperties.get(PROPERTY_ATTRIBUTE_NAME);
+ Property<?> attributeValueProp = modelProperties.get(PROPERTY_ATTRIBUTE_VALUE);
+
+ CriteriaBuilder builder = em.getCriteriaBuilder();
+ CriteriaQuery<?> criteria = builder.createQuery(attributeClass);
+ Root<?> root = criteria.from(attributeClass);
+
+ List<Predicate> predicates = new ArrayList<Predicate>();
+ predicates.add(builder.equal(root.get(attributeIdentityProp.getName()),
+ identity));
+
+ criteria.where(predicates.toArray(new Predicate[0]));
+
+ List<?> results = em.createQuery(criteria).getResultList();
+
+ for (Object result : results)
+ {
+ String name = attributeNameProp.getValue(result).toString();
+ Object value = attributeValueProp.getValue(result);
+
+ if (attributes.containsKey(name))
+ {
+ IdentityObjectAttribute attr = attributes.get(name);
+ attr.addValue(value);
+ }
+ else
+ {
+ attributes.put(name, new SimpleAttribute(name, value));
+ }
+ }
+ }
+
+ return attributes;
+ }
+
+ public Map<String, IdentityObjectAttributeMetaData> getAttributesMetaData(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObjectType identityType)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<String> getSupportedAttributeNames(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObjectType identityType) throws IdentityException
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, String[] attributeNames)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, IdentityObjectAttribute[] attributes)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public IdentityStoreSession createIdentityStoreSession()
+ throws IdentityException
+ {
+ return createIdentityStoreSession(null);
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreConfiguration.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreConfiguration.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreConfiguration.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,127 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl;
+
+/**
+ * A convenience class for setting JpaIdentityStore configuration options.
+ *
+ * @author Shane Bryzak
+ */
+public class JpaIdentityStoreConfiguration extends IdentityStoreConfiguration
+{
+ private Class<?> identityClass;
+ private Class<?> credentialClass;
+ private Class<?> relationshipClass;
+ private Class<?> roleTypeClass;
+ private Class<?> attributeClass;
+
+ @Override
+ public String getId()
+ {
+ return (super.getId() == null) ? "jpa" : super.getId();
+ }
+
+ /**
+ * If the identityStoreClass hasn't been set, then return JpaIdentityStore
+ * by default.
+ */
+ @Override
+ public Class<?> getIdentityStoreClass()
+ {
+ return (super.getIdentityStoreClass() == null) ?
+ JpaIdentityStore.class : super.getIdentityStoreClass();
+ }
+
+ public Class<?> getIdentityClass()
+ {
+ return identityClass;
+ }
+
+ public void setIdentityClass(Class<?> identityClass)
+ {
+ this.identityClass = identityClass;
+ }
+
+ public Class<?> getCredentialClass()
+ {
+ return credentialClass;
+ }
+
+ public void setCredentialClass(Class<?> credentialClass)
+ {
+ this.credentialClass = credentialClass;
+ }
+
+ public Class<?> getRelationshipClass()
+ {
+ return relationshipClass;
+ }
+
+ public void setRelationshipClass(Class<?> relationshipClass)
+ {
+ this.relationshipClass = relationshipClass;
+ }
+
+ public Class<?> getRoleTypeClass()
+ {
+ return roleTypeClass;
+ }
+
+ public void setRoleTypeClass(Class<?> roleTypeClass)
+ {
+ this.roleTypeClass = roleTypeClass;
+ }
+
+ public Class<?> getAttributeClass()
+ {
+ return attributeClass;
+ }
+
+ public void setAttributeClass(Class<?> attributeClass)
+ {
+ this.attributeClass = attributeClass;
+ }
+
+ public void doConfigure(IdentityStoreConfigurationMetaDataImpl store)
+ {
+ Map<String,List<String>> options = new HashMap<String,List<String>>();
+
+ if (identityClass != null)
+ {
+ options.put(JpaIdentityStore.OPTION_IDENTITY_CLASS_NAME,
+ createOptionList(identityClass.getName()));
+ }
+
+ if (credentialClass != null)
+ {
+ options.put(JpaIdentityStore.OPTION_CREDENTIAL_CLASS_NAME,
+ createOptionList(credentialClass.getName()));
+ }
+
+ if (relationshipClass != null)
+ {
+ options.put(JpaIdentityStore.OPTION_RELATIONSHIP_CLASS_NAME,
+ createOptionList(relationshipClass.getName()));
+ }
+
+ if (roleTypeClass != null)
+ {
+ options.put(JpaIdentityStore.OPTION_ROLE_TYPE_CLASS_NAME,
+ createOptionList(roleTypeClass.getName()));
+ }
+
+ store.setOptions(options);
+ }
+
+ private List<String> createOptionList(String... values)
+ {
+ List<String> vals = new ArrayList<String>();
+ for (String v : values) vals.add(v);
+ return vals;
+ }
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreSessionImpl.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreSessionImpl.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStoreSessionImpl.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,78 @@
+package org.picketlink.idm.impl.store.jpa;
+
+import javax.persistence.EntityManager;
+
+import org.picketlink.idm.common.exception.IdentityException;
+import org.picketlink.idm.spi.store.IdentityStoreSession;
+
+/**
+ * JPA-specific implementation of IdentityStoreSession, based on an EntityManager.
+ *
+ * @author Shane Bryzak
+ *
+ */
+public class JpaIdentityStoreSessionImpl implements IdentityStoreSession
+{
+ private EntityManager em;
+
+ public JpaIdentityStoreSessionImpl(EntityManager em)
+ {
+ this.em = em;
+ }
+
+ public EntityManager getEntityManager()
+ {
+ return em;
+ }
+
+ public void clear() throws IdentityException
+ {
+ em.clear();
+ }
+
+ public void close() throws IdentityException
+ {
+ em.close();
+ }
+
+ public void commitTransaction()
+ {
+ em.getTransaction().commit();
+ }
+
+ public Object getSessionContext() throws IdentityException
+ {
+ return em;
+ }
+
+ public boolean isOpen()
+ {
+ return em.isOpen();
+ }
+
+ public boolean isTransactionActive()
+ {
+ return em.getTransaction().isActive();
+ }
+
+ public boolean isTransactionSupported()
+ {
+ return true;
+ }
+
+ public void rollbackTransaction()
+ {
+ em.getTransaction().rollback();
+ }
+
+ public void save() throws IdentityException
+ {
+ em.flush();
+ }
+
+ public void startTransaction()
+ {
+ em.getTransaction().begin();
+ }
+
+}
Added: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/PropertyType.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/PropertyType.java (rev 0)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/PropertyType.java 2011-02-07 10:18:43 UTC (rev 740)
@@ -0,0 +1,10 @@
+package org.picketlink.idm.impl.store.jpa;
+
+/**
+ *
+ * @author Shane Bryzak
+ */
+public enum PropertyType {
+ NAME, TYPE, VALUE, RELATIONSHIP_FROM, RELATIONSHIP_TO, CREDENTIAL,
+ CREDENTIAL_TYPE, ATTRIBUTE
+}
Modified: idm/trunk/pom.xml
===================================================================
--- idm/trunk/pom.xml 2011-02-05 18:39:26 UTC (rev 739)
+++ idm/trunk/pom.xml 2011-02-07 10:18:43 UTC (rev 740)
@@ -34,6 +34,7 @@
<module>picketlink-idm-api</module>
<module>picketlink-idm-core</module>
<module>picketlink-idm-hibernate</module>
+ <module>picketlink-idm-jpa</module>
<module>picketlink-idm-ldap</module>
<module>picketlink-idm-cache</module>
<module>picketlink-idm-auth</module>
@@ -51,6 +52,7 @@
<module>picketlink-idm-api</module>
<module>picketlink-idm-core</module>
<module>picketlink-idm-hibernate</module>
+ <module>picketlink-idm-jpa</module>
<module>picketlink-idm-ldap</module>
<module>picketlink-idm-cache</module>
<module>picketlink-idm-auth</module>
@@ -80,6 +82,7 @@
<module>picketlink-idm-api</module>
<module>picketlink-idm-core</module>
<module>picketlink-idm-hibernate</module>
+ <module>picketlink-idm-jpa</module>
<module>picketlink-idm-ldap</module>
<module>picketlink-idm-cache</module>
<module>picketlink-idm-auth</module>
14 years, 10 months
Picketlink SVN: r739 - in idm/trunk: picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-02-05 13:39:26 -0500 (Sat, 05 Feb 2011)
New Revision: 739
Modified:
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java
Log:
- simple build fix
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-02-05 11:09:34 UTC (rev 738)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-02-05 18:39:26 UTC (rev 739)
@@ -814,14 +814,16 @@
try
{
- List<IdentityStore> mappedStores = resolveIdentityStores(identity.getIdentityType());
+ //List<IdentityStore> mappedStores = resolveIdentityStores(identity.getIdentityType());
+ IdentityStore mappedStore = resolveIdentityStore(identity.getIdentityType());
IdentityStoreInvocationContext mappedCtx = resolveInvocationContext(mappedStore, invocationCxt);
IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultIdentityStore, invocationCxt);
- if (mappedStores.size() == 1 && mappedStores.contains(defaultIdentityStore));
+ //if (mappedStores.size() == 1 && mappedStores.contains(defaultIdentityStore))
+ if (mappedStore.equals(defaultIdentityStore))
{
return defaultIdentityStore.findIdentityObject(defaultCtx, identity, relationshipType, parent, criteria);
}
Modified: idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java
===================================================================
--- idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java 2011-02-05 11:09:34 UTC (rev 738)
+++ idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java 2011-02-05 18:39:26 UTC (rev 739)
@@ -30,7 +30,10 @@
public class ManyLDAPStoresTestCase extends LDAPTestPOJO
{
-
+ public void testSimple() throws Exception
+ {
+ assertTrue(true);
+ }
14 years, 10 months
Picketlink SVN: r737 - in federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml: protocol and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-04 17:46:25 -0500 (Fri, 04 Feb 2011)
New Revision: 737
Removed:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/ObjectFactory.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLAuthzDecisionStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLPolicyStatementType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/package-info.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/ObjectFactory.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLAuthzDecisionQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLPolicyQueryType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/package-info.java
Log:
rid of jaxb
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/ObjectFactory.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/ObjectFactory.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,78 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:07:00 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.assertion;
-
-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 oasis.xacml._2_0.saml.assertion.schema.os 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 {
-
- private final static QName _XACMLAuthzDecisionStatement_QNAME = new QName("urn:oasis:xacml:2.0:saml:assertion:schema:os", "XACMLAuthzDecisionStatement");
- private final static QName _XACMLPolicyStatement_QNAME = new QName("urn:oasis:xacml:2.0:saml:assertion:schema:os", "XACMLPolicyStatement");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: oasis.xacml._2_0.saml.assertion.schema.os
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link XACMLAuthzDecisionStatementType }
- *
- */
- public XACMLAuthzDecisionStatementType createXACMLAuthzDecisionStatementType() {
- return new XACMLAuthzDecisionStatementType();
- }
-
- /**
- * Create an instance of {@link XACMLPolicyStatementType }
- *
- */
- public XACMLPolicyStatementType createXACMLPolicyStatementType() {
- return new XACMLPolicyStatementType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link XACMLAuthzDecisionStatementType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:oasis:xacml:2.0:saml:assertion:schema:os", name = "XACMLAuthzDecisionStatement")
- public JAXBElement<XACMLAuthzDecisionStatementType> createXACMLAuthzDecisionStatement(XACMLAuthzDecisionStatementType value) {
- return new JAXBElement<XACMLAuthzDecisionStatementType>(_XACMLAuthzDecisionStatement_QNAME, XACMLAuthzDecisionStatementType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link XACMLPolicyStatementType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:oasis:xacml:2.0:saml:assertion:schema:os", name = "XACMLPolicyStatement")
- public JAXBElement<XACMLPolicyStatementType> createXACMLPolicyStatement(XACMLPolicyStatementType value) {
- return new JAXBElement<XACMLPolicyStatementType>(_XACMLPolicyStatement_QNAME, XACMLPolicyStatementType.class, null, value);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLAuthzDecisionStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLAuthzDecisionStatementType.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLAuthzDecisionStatementType.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,103 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:07:00 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.assertion;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-//import org.picketlink.identity.federation.saml.v2.assertion.StatementAbstractType;
-import org.jboss.security.xacml.core.model.context.RequestType;
-import org.jboss.security.xacml.core.model.context.ResponseType;
-
-
-/**
- * <p>Java class for XACMLAuthzDecisionStatementType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="XACMLAuthzDecisionStatementType">
- * <complexContent>
- * <extension base="{urn:oasis:names:tc:SAML:2.0:assertion}StatementAbstractType">
- * <sequence>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:context:schema:os}Response"/>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:context:schema:os}Request" minOccurs="0"/>
- * </sequence>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "XACMLAuthzDecisionStatementType", propOrder = {
- "response",
- "request"
-})
-public class XACMLAuthzDecisionStatementType
- // extends StatementAbstractType
-{
-
- @XmlElement(name = "Response", namespace = "urn:oasis:names:tc:xacml:2.0:context:schema:os", required = true)
- protected ResponseType response;
- @XmlElement(name = "Request", namespace = "urn:oasis:names:tc:xacml:2.0:context:schema:os")
- protected RequestType request;
-
- /**
- * Gets the value of the response property.
- *
- * @return
- * possible object is
- * {@link ResponseType }
- *
- */
- public ResponseType getResponse() {
- return response;
- }
-
- /**
- * Sets the value of the response property.
- *
- * @param value
- * allowed object is
- * {@link ResponseType }
- *
- */
- public void setResponse(ResponseType value) {
- this.response = value;
- }
-
- /**
- * Gets the value of the request property.
- *
- * @return
- * possible object is
- * {@link RequestType }
- *
- */
- public RequestType getRequest() {
- return request;
- }
-
- /**
- * Sets the value of the request property.
- *
- * @param value
- * allowed object is
- * {@link RequestType }
- *
- */
- public void setRequest(RequestType value) {
- this.request = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLPolicyStatementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLPolicyStatementType.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/XACMLPolicyStatementType.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,88 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:07:00 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.assertion;
-
-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.XmlElements;
-import javax.xml.bind.annotation.XmlType;
-
-//import org.picketlink.identity.federation.saml.v2.assertion.StatementAbstractType;
-import org.jboss.security.xacml.core.model.policy.PolicySetType;
-import org.jboss.security.xacml.core.model.policy.PolicyType;
-
-/**
- * <p>Java class for XACMLPolicyStatementType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="XACMLPolicyStatementType">
- * <complexContent>
- * <extension base="{urn:oasis:names:tc:SAML:2.0:assertion}StatementAbstractType">
- * <choice maxOccurs="unbounded" minOccurs="0">
- * <element ref="{urn:oasis:names:tc:xacml:2.0:policy:schema:os}Policy"/>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:policy:schema:os}PolicySet"/>
- * </choice>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "XACMLPolicyStatementType", propOrder = {
- "policyOrPolicySet"
-})
-public class XACMLPolicyStatementType
- // extends StatementAbstractType
-{
-
- @XmlElements({
- @XmlElement(name = "PolicySet", namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os", type = PolicySetType.class),
- @XmlElement(name = "Policy", namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os", type = PolicyType.class)
- })
- protected List<Object> policyOrPolicySet;
-
- /**
- * Gets the value of the policyOrPolicySet 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 policyOrPolicySet property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getPolicyOrPolicySet().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link PolicySetType }
- * {@link PolicyType }
- *
- *
- */
- public List<Object> getPolicyOrPolicySet() {
- if (policyOrPolicySet == null) {
- policyOrPolicySet = new ArrayList<Object>();
- }
- return this.policyOrPolicySet;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/package-info.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/assertion/package-info.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,9 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:07:00 PM CST
-//
-
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "urn:oasis:xacml:2.0:saml:assertion:schema:os", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.assertion;
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/ObjectFactory.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/ObjectFactory.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,78 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:14:41 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.protocol;
-
-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 oasis.xacml._2_0.saml.protocol.schema.os 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 {
-
- private final static QName _XACMLAuthzDecisionQuery_QNAME = new QName("urn:oasis:xacml:2.0:saml:protocol:schema:os", "XACMLAuthzDecisionQuery");
- private final static QName _XACMLPolicyQuery_QNAME = new QName("urn:oasis:xacml:2.0:saml:protocol:schema:os", "XACMLPolicyQuery");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: oasis.xacml._2_0.saml.protocol.schema.os
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link XACMLAuthzDecisionQueryType }
- *
- */
- public XACMLAuthzDecisionQueryType createXACMLAuthzDecisionQueryType() {
- return new XACMLAuthzDecisionQueryType();
- }
-
- /**
- * Create an instance of {@link XACMLPolicyQueryType }
- *
- */
- public XACMLPolicyQueryType createXACMLPolicyQueryType() {
- return new XACMLPolicyQueryType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link XACMLAuthzDecisionQueryType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:oasis:xacml:2.0:saml:protocol:schema:os", name = "XACMLAuthzDecisionQuery")
- public JAXBElement<XACMLAuthzDecisionQueryType> createXACMLAuthzDecisionQuery(XACMLAuthzDecisionQueryType value) {
- return new JAXBElement<XACMLAuthzDecisionQueryType>(_XACMLAuthzDecisionQuery_QNAME, XACMLAuthzDecisionQueryType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link XACMLPolicyQueryType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:oasis:xacml:2.0:saml:protocol:schema:os", name = "XACMLPolicyQuery")
- public JAXBElement<XACMLPolicyQueryType> createXACMLPolicyQuery(XACMLPolicyQueryType value) {
- return new JAXBElement<XACMLPolicyQueryType>(_XACMLPolicyQuery_QNAME, XACMLPolicyQueryType.class, null, value);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLAuthzDecisionQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLAuthzDecisionQueryType.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLAuthzDecisionQueryType.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,137 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:14:41 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.protocol;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-//import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
-import org.jboss.security.xacml.core.model.context.RequestType;
-
-
-/**
- * <p>Java class for XACMLAuthzDecisionQueryType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="XACMLAuthzDecisionQueryType">
- * <complexContent>
- * <extension base="{urn:oasis:names:tc:SAML:2.0:protocol}RequestAbstractType">
- * <sequence>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:context:schema:os}Request"/>
- * </sequence>
- * <attribute name="InputContextOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
- * <attribute name="ReturnContext" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "XACMLAuthzDecisionQueryType", propOrder = {
- "request"
-})
-public class XACMLAuthzDecisionQueryType
- //extends RequestAbstractType
-{
-
- @XmlElement(name = "Request", namespace = "urn:oasis:names:tc:xacml:2.0:context:schema:os", required = true)
- protected RequestType request;
- @XmlAttribute(name = "InputContextOnly")
- protected Boolean inputContextOnly;
- @XmlAttribute(name = "ReturnContext")
- protected Boolean returnContext;
-
- /**
- * Gets the value of the request property.
- *
- * @return
- * possible object is
- * {@link RequestType }
- *
- */
- public RequestType getRequest() {
- return request;
- }
-
- /**
- * Sets the value of the request property.
- *
- * @param value
- * allowed object is
- * {@link RequestType }
- *
- */
- public void setRequest(RequestType value) {
- this.request = value;
- }
-
- /**
- * Gets the value of the inputContextOnly property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isInputContextOnly() {
- if (inputContextOnly == null) {
- return false;
- } else {
- return inputContextOnly;
- }
- }
-
- /**
- * Sets the value of the inputContextOnly property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setInputContextOnly(Boolean value) {
- this.inputContextOnly = value;
- }
-
- /**
- * Gets the value of the returnContext property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isReturnContext() {
- if (returnContext == null) {
- return false;
- } else {
- return returnContext;
- }
- }
-
- /**
- * Sets the value of the returnContext property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setReturnContext(Boolean value) {
- this.returnContext = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLPolicyQueryType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLPolicyQueryType.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/XACMLPolicyQueryType.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,96 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:14:41 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlType;
-
-//import org.picketlink.identity.federation.saml.v2.protocol.RequestAbstractType;
-import org.jboss.security.xacml.core.model.policy.IdReferenceType;
-import org.jboss.security.xacml.core.model.policy.TargetType;
-
-
-/**
- * <p>Java class for XACMLPolicyQueryType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="XACMLPolicyQueryType">
- * <complexContent>
- * <extension base="{urn:oasis:names:tc:SAML:2.0:protocol}RequestAbstractType">
- * <choice maxOccurs="unbounded" minOccurs="0">
- * <element ref="{urn:oasis:names:tc:xacml:2.0:context:schema:os}Request"/>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:policy:schema:os}Target"/>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:policy:schema:os}PolicySetIdReference"/>
- * <element ref="{urn:oasis:names:tc:xacml:2.0:policy:schema:os}PolicyIdReference"/>
- * </choice>
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "XACMLPolicyQueryType", propOrder = {
- "requestOrTargetOrPolicySetIdReference"
-})
-public class XACMLPolicyQueryType
- //extends RequestAbstractType
-{
-
- @XmlElementRefs({
- @XmlElementRef(name = "Request", namespace = "urn:oasis:names:tc:xacml:2.0:context:schema:os", type = JAXBElement.class),
- @XmlElementRef(name = "Target", namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os", type = JAXBElement.class),
- @XmlElementRef(name = "PolicyIdReference", namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os", type = JAXBElement.class),
- @XmlElementRef(name = "PolicySetIdReference", namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os", type = JAXBElement.class)
- })
- protected List<JAXBElement<?>> requestOrTargetOrPolicySetIdReference;
-
- /**
- * Gets the value of the requestOrTargetOrPolicySetIdReference 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 requestOrTargetOrPolicySetIdReference property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getRequestOrTargetOrPolicySetIdReference().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link IdReferenceType }{@code >}
- * {@link JAXBElement }{@code <}{@link IdReferenceType }{@code >}
- * {@link JAXBElement }{@code <}{@link RequestType }{@code >}
- * {@link JAXBElement }{@code <}{@link TargetType }{@code >}
- *
- *
- */
- public List<JAXBElement<?>> getRequestOrTargetOrPolicySetIdReference() {
- if (requestOrTargetOrPolicySetIdReference == null) {
- requestOrTargetOrPolicySetIdReference = new ArrayList<JAXBElement<?>>();
- }
- return this.requestOrTargetOrPolicySetIdReference;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/package-info.java 2011-02-04 22:45:33 UTC (rev 736)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/profiles/xacml/protocol/package-info.java 2011-02-04 22:46:25 UTC (rev 737)
@@ -1,9 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.01.08 at 03:14:41 PM CST
-//
-
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "urn:oasis:xacml:2.0:saml:protocol:schema:os", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.saml.v2.profiles.xacml.protocol;
14 years, 10 months
Picketlink SVN: r736 - in federation/trunk: picketlink-bindings/src/test/resources/saml2/logout/idp/WEB-INF and 15 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-04 17:45:33 -0500 (Fri, 04 Feb 2011)
New Revision: 736
Removed:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitDurationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitSessionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitUsagesType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationPinType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AlphabetType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorBaseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorTransportProtocolType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnContextDeclarationBaseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnMethodBaseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/BooleanType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ComplexAuthenticatorType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/DeviceTypeType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionOnlyType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/Generation.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementRefType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementsType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/IdentificationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyActivationType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeySharingType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyStorageType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/LengthType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/MediumType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/NymType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ObjectFactory.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/OperationalProtectionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PasswordType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PhysicalVerification.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrincipalAuthenticationMechanismType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrivateKeyProtectionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PublicKeyType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedLengthType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedPasswordType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecretKeyProtectionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecurityAuditType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SharedSecretChallengeResponseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TechnicalProtectionBaseType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TimeSyncTokenType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TokenType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/runtime/ZeroOneBooleanAdapter.java
Modified:
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/config/MetadataConfigUnitTestCase.java
federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/sales/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/idp/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/employee/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/sales/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/util/KeyUtil.java
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ConfigurationUtil.java
federation/trunk/picketlink-web/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-web/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-web/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml
federation/trunk/picketlink-web/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml
Log:
PLFED-126: stax parsing of PL config
Modified: federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/config/MetadataConfigUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/config/MetadataConfigUnitTestCase.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/config/MetadataConfigUnitTestCase.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -24,17 +24,13 @@
import java.io.InputStream;
import java.util.List;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-
import junit.framework.TestCase;
import org.picketlink.identity.federation.core.config.IDPType;
import org.picketlink.identity.federation.core.config.KeyValueType;
import org.picketlink.identity.federation.core.config.MetadataProviderType;
import org.picketlink.identity.federation.core.config.TrustType;
-import org.picketlink.identity.federation.core.constants.PicketLinkFederationConstants;
-import org.picketlink.identity.federation.core.util.JAXBUtil;
+import org.picketlink.identity.federation.core.parsers.config.SAMLConfigParser;
/**
@@ -45,14 +41,12 @@
public class MetadataConfigUnitTestCase extends TestCase
{
String config = "config/test-metadata-config-";
-
- @SuppressWarnings("unchecked")
+
public void testMetadata() throws Exception
{
Object object = this.unmarshall(config + "1.xml");
- assertNotNull("IDP is not null", object);
- assertTrue(object instanceof JAXBElement);
- IDPType idp = ((JAXBElement<IDPType>) object).getValue();
+ assertNotNull("IDP is not null", object);
+ IDPType idp = (IDPType) object;
assertEquals("20000", 20000L, idp.getAssertionValidity());
assertEquals("somefqn", idp.getRoleGenerator());
@@ -75,15 +69,12 @@
private Object unmarshall(String configFile) throws Exception
{
- String schema = PicketLinkFederationConstants.SCHEMA_IDFED;
+ //String schema = PicketLinkFederationConstants.SCHEMA_IDFED;
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
InputStream is = tcl.getResourceAsStream(configFile);
assertNotNull("Inputstream not null", is);
- Unmarshaller un =
- JAXBUtil.getValidatingUnmarshaller("org.picketlink.identity.federation.core.config",
- schema);
- return un.unmarshal(is);
+ return (new SAMLConfigParser()).parse( is );
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager=""
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager"
RoleGenerator="org.picketlink.identity.federation.core.impl.EmptyRoleGenerator">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<Trust>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/employee/</ServiceURL>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/sales/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/sales/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/logout/sp/sales/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/sales/</ServiceURL>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<Trust>
<Domains>localhost,jboss.com,jboss.org</Domains>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/employee/</ServiceURL>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/idp/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager=""
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager"
RoleGenerator="org.picketlink.identity.federation.core.impl.EmptyRoleGenerator">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<Trust>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/employee/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/employee/</ServiceURL>
Modified: federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/sales/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/sales/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-bindings/src/test/resources/saml2/redirect/sp/sales/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/sales/</ServiceURL>
Modified: federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/util/KeyUtil.java
===================================================================
--- federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/util/KeyUtil.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/api/util/KeyUtil.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -29,15 +29,12 @@
import java.security.cert.X509Certificate;
import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.util.Base64;
-import org.picketlink.identity.federation.core.util.JAXBUtil;
import org.w3c.dom.Element;
/**
@@ -98,28 +95,8 @@
return DocumentUtil.getDocument(builder.toString()).getDocumentElement();
}
-
- /**
- * Get the Unmarshaller for the W3 XMLDSIG
- * @return
- * @throws JAXBException
- */
- public static Unmarshaller getUnmarshaller() throws JAXBException
- {
- return JAXBUtil.getUnmarshaller("org.picketlink.identity.xmlsec.w3.xmldsig");
- }
/**
- * Get the marshaller for the W3 XMLDSig
- * @return
- * @throws JAXBException
- */
- public static Marshaller getMarshaller() throws JAXBException
- {
- return JAXBUtil.getMarshaller("org.picketlink.identity.xmlsec.w3.xmldsig");
- }
-
- /**
* Get the system property
* @param key
* @param defaultValue
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitDurationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitDurationType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitDurationType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,66 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.datatype.Duration;
-
-
-/**
- * <p>Java class for ActivationLimitDurationType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ActivationLimitDurationType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="duration" use="required" type="{http://www.w3.org/2001/XMLSchema}duration" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ActivationLimitDurationType")
-public class ActivationLimitDurationType {
-
- @XmlAttribute(required = true)
- protected Duration duration;
-
- /**
- * Gets the value of the duration property.
- *
- * @return
- * possible object is
- * {@link Duration }
- *
- */
- public Duration getDuration() {
- return duration;
- }
-
- /**
- * Sets the value of the duration property.
- *
- * @param value
- * allowed object is
- * {@link Duration }
- *
- */
- public void setDuration(Duration value) {
- this.duration = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitSessionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitSessionType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitSessionType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,37 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for ActivationLimitSessionType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ActivationLimitSessionType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ActivationLimitSessionType")
-public class ActivationLimitSessionType {
-
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,125 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 ActivationLimitType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ActivationLimitType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <choice>
- * <element ref="{}ActivationLimitDuration"/>
- * <element ref="{}ActivationLimitUsages"/>
- * <element ref="{}ActivationLimitSession"/>
- * </choice>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ActivationLimitType", propOrder = {
- "activationLimitDuration",
- "activationLimitUsages",
- "activationLimitSession"
-})
-public class ActivationLimitType {
-
- @XmlElement(name = "ActivationLimitDuration")
- protected ActivationLimitDurationType activationLimitDuration;
- @XmlElement(name = "ActivationLimitUsages")
- protected ActivationLimitUsagesType activationLimitUsages;
- @XmlElement(name = "ActivationLimitSession")
- protected ActivationLimitSessionType activationLimitSession;
-
- /**
- * Gets the value of the activationLimitDuration property.
- *
- * @return
- * possible object is
- * {@link ActivationLimitDurationType }
- *
- */
- public ActivationLimitDurationType getActivationLimitDuration() {
- return activationLimitDuration;
- }
-
- /**
- * Sets the value of the activationLimitDuration property.
- *
- * @param value
- * allowed object is
- * {@link ActivationLimitDurationType }
- *
- */
- public void setActivationLimitDuration(ActivationLimitDurationType value) {
- this.activationLimitDuration = value;
- }
-
- /**
- * Gets the value of the activationLimitUsages property.
- *
- * @return
- * possible object is
- * {@link ActivationLimitUsagesType }
- *
- */
- public ActivationLimitUsagesType getActivationLimitUsages() {
- return activationLimitUsages;
- }
-
- /**
- * Sets the value of the activationLimitUsages property.
- *
- * @param value
- * allowed object is
- * {@link ActivationLimitUsagesType }
- *
- */
- public void setActivationLimitUsages(ActivationLimitUsagesType value) {
- this.activationLimitUsages = value;
- }
-
- /**
- * Gets the value of the activationLimitSession property.
- *
- * @return
- * possible object is
- * {@link ActivationLimitSessionType }
- *
- */
- public ActivationLimitSessionType getActivationLimitSession() {
- return activationLimitSession;
- }
-
- /**
- * Sets the value of the activationLimitSession property.
- *
- * @param value
- * allowed object is
- * {@link ActivationLimitSessionType }
- *
- */
- public void setActivationLimitSession(ActivationLimitSessionType value) {
- this.activationLimitSession = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitUsagesType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitUsagesType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationLimitUsagesType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,67 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.math.BigInteger;
-
-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 ActivationLimitUsagesType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ActivationLimitUsagesType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="number" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ActivationLimitUsagesType")
-public class ActivationLimitUsagesType {
-
- @XmlAttribute(required = true)
- protected BigInteger number;
-
- /**
- * Gets the value of the number property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getNumber() {
- return number;
- }
-
- /**
- * Sets the value of the number property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setNumber(BigInteger value) {
- this.number = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationPinType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationPinType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ActivationPinType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,189 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 ActivationPinType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ActivationPinType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Length" minOccurs="0"/>
- * <element ref="{}Alphabet" minOccurs="0"/>
- * <element ref="{}Generation" minOccurs="0"/>
- * <element ref="{}ActivationLimit" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ActivationPinType", propOrder = {
- "length",
- "alphabet",
- "generation",
- "activationLimit",
- "extension"
-})
-public class ActivationPinType {
-
- @XmlElement(name = "Length")
- protected LengthType length;
- @XmlElement(name = "Alphabet")
- protected AlphabetType alphabet;
- @XmlElement(name = "Generation")
- protected Generation generation;
- @XmlElement(name = "ActivationLimit")
- protected ActivationLimitType activationLimit;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the length property.
- *
- * @return
- * possible object is
- * {@link LengthType }
- *
- */
- public LengthType getLength() {
- return length;
- }
-
- /**
- * Sets the value of the length property.
- *
- * @param value
- * allowed object is
- * {@link LengthType }
- *
- */
- public void setLength(LengthType value) {
- this.length = value;
- }
-
- /**
- * Gets the value of the alphabet property.
- *
- * @return
- * possible object is
- * {@link AlphabetType }
- *
- */
- public AlphabetType getAlphabet() {
- return alphabet;
- }
-
- /**
- * Sets the value of the alphabet property.
- *
- * @param value
- * allowed object is
- * {@link AlphabetType }
- *
- */
- public void setAlphabet(AlphabetType value) {
- this.alphabet = value;
- }
-
- /**
- * Gets the value of the generation property.
- *
- * @return
- * possible object is
- * {@link Generation }
- *
- */
- public Generation getGeneration() {
- return generation;
- }
-
- /**
- * Sets the value of the generation property.
- *
- * @param value
- * allowed object is
- * {@link Generation }
- *
- */
- public void setGeneration(Generation value) {
- this.generation = value;
- }
-
- /**
- * Gets the value of the activationLimit property.
- *
- * @return
- * possible object is
- * {@link ActivationLimitType }
- *
- */
- public ActivationLimitType getActivationLimit() {
- return activationLimit;
- }
-
- /**
- * Sets the value of the activationLimit property.
- *
- * @param value
- * allowed object is
- * {@link ActivationLimitType }
- *
- */
- public void setActivationLimit(ActivationLimitType value) {
- this.activationLimit = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AlphabetType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AlphabetType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AlphabetType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,119 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 AlphabetType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="AlphabetType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="requiredChars" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="excludedChars" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="case" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AlphabetType")
-public class AlphabetType {
-
- @XmlAttribute(required = true)
- protected String requiredChars;
- @XmlAttribute
- protected String excludedChars;
- @XmlAttribute(name = "case")
- protected String _case;
-
- /**
- * Gets the value of the requiredChars property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRequiredChars() {
- return requiredChars;
- }
-
- /**
- * Sets the value of the requiredChars property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRequiredChars(String value) {
- this.requiredChars = value;
- }
-
- /**
- * Gets the value of the excludedChars property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getExcludedChars() {
- return excludedChars;
- }
-
- /**
- * Sets the value of the excludedChars property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setExcludedChars(String value) {
- this.excludedChars = value;
- }
-
- /**
- * Gets the value of the case property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getCase() {
- return _case;
- }
-
- /**
- * Sets the value of the case property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setCase(String value) {
- this._case = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorBaseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorBaseType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorBaseType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,120 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for AuthenticatorBaseType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="AuthenticatorBaseType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <group ref="{}AuthenticatorChoiceGroup"/>
- * <group ref="{}AuthenticatorSequenceGroup"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AuthenticatorBaseType", propOrder = {
- "content"
-})
-public class AuthenticatorBaseType {
-
- @XmlElementRefs({
- @XmlElementRef(name = "PreviousSession", type = JAXBElement.class),
- @XmlElementRef(name = "SharedSecretDynamicPlaintext", type = JAXBElement.class),
- @XmlElementRef(name = "AsymmetricDecryption", type = JAXBElement.class),
- @XmlElementRef(name = "ResumeSession", type = JAXBElement.class),
- @XmlElementRef(name = "RestrictedPassword", type = JAXBElement.class),
- @XmlElementRef(name = "SubscriberLineNumber", type = JAXBElement.class),
- @XmlElementRef(name = "UserSuffix", type = JAXBElement.class),
- @XmlElementRef(name = "DigSig", type = JAXBElement.class),
- @XmlElementRef(name = "ComplexAuthenticator", type = JAXBElement.class),
- @XmlElementRef(name = "Password", type = JAXBElement.class),
- @XmlElementRef(name = "Extension", type = JAXBElement.class),
- @XmlElementRef(name = "SharedSecretChallengeResponse", type = JAXBElement.class),
- @XmlElementRef(name = "AsymmetricKeyAgreement", type = JAXBElement.class),
- @XmlElementRef(name = "ZeroKnowledge", type = JAXBElement.class),
- @XmlElementRef(name = "IPAddress", type = JAXBElement.class)
- })
- protected List<JAXBElement<?>> content;
-
- /**
- * Gets the rest of the content model.
- *
- * <p>
- * You are getting this "catch-all" property because of the following reason:
- * The field name "PreviousSession" is used by two different parts of a schema. See:
- * line 575 of file:/home/anil/saml2/saml-schema-authn-context-types-2.0.xsd
- * line 556 of file:/home/anil/saml2/saml-schema-authn-context-types-2.0.xsd
- * <p>
- * To get rid of this property, apply a property customization to one
- * of both of the following declarations to change their names:
- * Gets the value of the content 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 content property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getContent().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link RestrictedPasswordType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ComplexAuthenticatorType }{@code >}
- * {@link JAXBElement }{@code <}{@link PasswordType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionType }{@code >}
- * {@link JAXBElement }{@code <}{@link SharedSecretChallengeResponseType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- *
- *
- */
- public List<JAXBElement<?>> getContent() {
- if (content == null) {
- content = new ArrayList<JAXBElement<?>>();
- }
- return this.content;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorTransportProtocolType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorTransportProtocolType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthenticatorTransportProtocolType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,359 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 AuthenticatorTransportProtocolType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="AuthenticatorTransportProtocolType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <choice minOccurs="0">
- * <element ref="{}HTTP"/>
- * <element ref="{}SSL"/>
- * <element ref="{}MobileNetworkNoEncryption"/>
- * <element ref="{}MobileNetworkRadioEncryption"/>
- * <element ref="{}MobileNetworkEndToEndEncryption"/>
- * <element ref="{}WTLS"/>
- * <element ref="{}IPSec"/>
- * <element ref="{}PSTN"/>
- * <element ref="{}ISDN"/>
- * <element ref="{}ADSL"/>
- * </choice>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AuthenticatorTransportProtocolType", propOrder = {
- "http",
- "ssl",
- "mobileNetworkNoEncryption",
- "mobileNetworkRadioEncryption",
- "mobileNetworkEndToEndEncryption",
- "wtls",
- "ipSec",
- "pstn",
- "isdn",
- "adsl",
- "extension"
-})
-public class AuthenticatorTransportProtocolType {
-
- @XmlElement(name = "HTTP")
- protected ExtensionOnlyType http;
- @XmlElement(name = "SSL")
- protected ExtensionOnlyType ssl;
- @XmlElement(name = "MobileNetworkNoEncryption")
- protected ExtensionOnlyType mobileNetworkNoEncryption;
- @XmlElement(name = "MobileNetworkRadioEncryption")
- protected ExtensionOnlyType mobileNetworkRadioEncryption;
- @XmlElement(name = "MobileNetworkEndToEndEncryption")
- protected ExtensionOnlyType mobileNetworkEndToEndEncryption;
- @XmlElement(name = "WTLS")
- protected ExtensionOnlyType wtls;
- @XmlElement(name = "IPSec")
- protected ExtensionOnlyType ipSec;
- @XmlElement(name = "PSTN")
- protected ExtensionOnlyType pstn;
- @XmlElement(name = "ISDN")
- protected ExtensionOnlyType isdn;
- @XmlElement(name = "ADSL")
- protected ExtensionOnlyType adsl;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the http property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getHTTP() {
- return http;
- }
-
- /**
- * Sets the value of the http property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setHTTP(ExtensionOnlyType value) {
- this.http = value;
- }
-
- /**
- * Gets the value of the ssl property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getSSL() {
- return ssl;
- }
-
- /**
- * Sets the value of the ssl property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setSSL(ExtensionOnlyType value) {
- this.ssl = value;
- }
-
- /**
- * Gets the value of the mobileNetworkNoEncryption property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getMobileNetworkNoEncryption() {
- return mobileNetworkNoEncryption;
- }
-
- /**
- * Sets the value of the mobileNetworkNoEncryption property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setMobileNetworkNoEncryption(ExtensionOnlyType value) {
- this.mobileNetworkNoEncryption = value;
- }
-
- /**
- * Gets the value of the mobileNetworkRadioEncryption property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getMobileNetworkRadioEncryption() {
- return mobileNetworkRadioEncryption;
- }
-
- /**
- * Sets the value of the mobileNetworkRadioEncryption property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setMobileNetworkRadioEncryption(ExtensionOnlyType value) {
- this.mobileNetworkRadioEncryption = value;
- }
-
- /**
- * Gets the value of the mobileNetworkEndToEndEncryption property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getMobileNetworkEndToEndEncryption() {
- return mobileNetworkEndToEndEncryption;
- }
-
- /**
- * Sets the value of the mobileNetworkEndToEndEncryption property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setMobileNetworkEndToEndEncryption(ExtensionOnlyType value) {
- this.mobileNetworkEndToEndEncryption = value;
- }
-
- /**
- * Gets the value of the wtls property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getWTLS() {
- return wtls;
- }
-
- /**
- * Sets the value of the wtls property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setWTLS(ExtensionOnlyType value) {
- this.wtls = value;
- }
-
- /**
- * Gets the value of the ipSec property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getIPSec() {
- return ipSec;
- }
-
- /**
- * Sets the value of the ipSec property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setIPSec(ExtensionOnlyType value) {
- this.ipSec = value;
- }
-
- /**
- * Gets the value of the pstn property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getPSTN() {
- return pstn;
- }
-
- /**
- * Sets the value of the pstn property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setPSTN(ExtensionOnlyType value) {
- this.pstn = value;
- }
-
- /**
- * Gets the value of the isdn property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getISDN() {
- return isdn;
- }
-
- /**
- * Sets the value of the isdn property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setISDN(ExtensionOnlyType value) {
- this.isdn = value;
- }
-
- /**
- * Gets the value of the adsl property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getADSL() {
- return adsl;
- }
-
- /**
- * Sets the value of the adsl property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setADSL(ExtensionOnlyType value) {
- this.adsl = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnContextDeclarationBaseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnContextDeclarationBaseType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnContextDeclarationBaseType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,252 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlElement;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-
-/**
- * <p>Java class for AuthnContextDeclarationBaseType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="AuthnContextDeclarationBaseType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Identification" minOccurs="0"/>
- * <element ref="{}TechnicalProtection" minOccurs="0"/>
- * <element ref="{}OperationalProtection" minOccurs="0"/>
- * <element ref="{}AuthnMethod" minOccurs="0"/>
- * <element ref="{}GoverningAgreements" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AuthnContextDeclarationBaseType", propOrder = {
- "identification",
- "technicalProtection",
- "operationalProtection",
- "authnMethod",
- "governingAgreements",
- "extension"
-})
-public class AuthnContextDeclarationBaseType {
-
- @XmlElement(name = "Identification")
- protected IdentificationType identification;
- @XmlElement(name = "TechnicalProtection")
- protected TechnicalProtectionBaseType technicalProtection;
- @XmlElement(name = "OperationalProtection")
- protected OperationalProtectionType operationalProtection;
- @XmlElement(name = "AuthnMethod")
- protected AuthnMethodBaseType authnMethod;
- @XmlElement(name = "GoverningAgreements")
- protected GoverningAgreementsType governingAgreements;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute(name = "ID")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- @XmlID
- @XmlSchemaType(name = "ID")
- protected String id;
-
- /**
- * Gets the value of the identification property.
- *
- * @return
- * possible object is
- * {@link IdentificationType }
- *
- */
- public IdentificationType getIdentification() {
- return identification;
- }
-
- /**
- * Sets the value of the identification property.
- *
- * @param value
- * allowed object is
- * {@link IdentificationType }
- *
- */
- public void setIdentification(IdentificationType value) {
- this.identification = value;
- }
-
- /**
- * Gets the value of the technicalProtection property.
- *
- * @return
- * possible object is
- * {@link TechnicalProtectionBaseType }
- *
- */
- public TechnicalProtectionBaseType getTechnicalProtection() {
- return technicalProtection;
- }
-
- /**
- * Sets the value of the technicalProtection property.
- *
- * @param value
- * allowed object is
- * {@link TechnicalProtectionBaseType }
- *
- */
- public void setTechnicalProtection(TechnicalProtectionBaseType value) {
- this.technicalProtection = value;
- }
-
- /**
- * Gets the value of the operationalProtection property.
- *
- * @return
- * possible object is
- * {@link OperationalProtectionType }
- *
- */
- public OperationalProtectionType getOperationalProtection() {
- return operationalProtection;
- }
-
- /**
- * Sets the value of the operationalProtection property.
- *
- * @param value
- * allowed object is
- * {@link OperationalProtectionType }
- *
- */
- public void setOperationalProtection(OperationalProtectionType value) {
- this.operationalProtection = value;
- }
-
- /**
- * Gets the value of the authnMethod property.
- *
- * @return
- * possible object is
- * {@link AuthnMethodBaseType }
- *
- */
- public AuthnMethodBaseType getAuthnMethod() {
- return authnMethod;
- }
-
- /**
- * Sets the value of the authnMethod property.
- *
- * @param value
- * allowed object is
- * {@link AuthnMethodBaseType }
- *
- */
- public void setAuthnMethod(AuthnMethodBaseType value) {
- this.authnMethod = value;
- }
-
- /**
- * Gets the value of the governingAgreements property.
- *
- * @return
- * possible object is
- * {@link GoverningAgreementsType }
- *
- */
- public GoverningAgreementsType getGoverningAgreements() {
- return governingAgreements;
- }
-
- /**
- * Sets the value of the governingAgreements property.
- *
- * @param value
- * allowed object is
- * {@link GoverningAgreementsType }
- *
- */
- public void setGoverningAgreements(GoverningAgreementsType value) {
- this.governingAgreements = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * 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;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnMethodBaseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnMethodBaseType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/AuthnMethodBaseType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,161 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 AuthnMethodBaseType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="AuthnMethodBaseType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}PrincipalAuthenticationMechanism" minOccurs="0"/>
- * <element ref="{}Authenticator" minOccurs="0"/>
- * <element ref="{}AuthenticatorTransportProtocol" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AuthnMethodBaseType", propOrder = {
- "principalAuthenticationMechanism",
- "authenticator",
- "authenticatorTransportProtocol",
- "extension"
-})
-public class AuthnMethodBaseType {
-
- @XmlElement(name = "PrincipalAuthenticationMechanism")
- protected PrincipalAuthenticationMechanismType principalAuthenticationMechanism;
- @XmlElement(name = "Authenticator")
- protected AuthenticatorBaseType authenticator;
- @XmlElement(name = "AuthenticatorTransportProtocol")
- protected AuthenticatorTransportProtocolType authenticatorTransportProtocol;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the principalAuthenticationMechanism property.
- *
- * @return
- * possible object is
- * {@link PrincipalAuthenticationMechanismType }
- *
- */
- public PrincipalAuthenticationMechanismType getPrincipalAuthenticationMechanism() {
- return principalAuthenticationMechanism;
- }
-
- /**
- * Sets the value of the principalAuthenticationMechanism property.
- *
- * @param value
- * allowed object is
- * {@link PrincipalAuthenticationMechanismType }
- *
- */
- public void setPrincipalAuthenticationMechanism(PrincipalAuthenticationMechanismType value) {
- this.principalAuthenticationMechanism = value;
- }
-
- /**
- * Gets the value of the authenticator property.
- *
- * @return
- * possible object is
- * {@link AuthenticatorBaseType }
- *
- */
- public AuthenticatorBaseType getAuthenticator() {
- return authenticator;
- }
-
- /**
- * Sets the value of the authenticator property.
- *
- * @param value
- * allowed object is
- * {@link AuthenticatorBaseType }
- *
- */
- public void setAuthenticator(AuthenticatorBaseType value) {
- this.authenticator = value;
- }
-
- /**
- * Gets the value of the authenticatorTransportProtocol property.
- *
- * @return
- * possible object is
- * {@link AuthenticatorTransportProtocolType }
- *
- */
- public AuthenticatorTransportProtocolType getAuthenticatorTransportProtocol() {
- return authenticatorTransportProtocol;
- }
-
- /**
- * Sets the value of the authenticatorTransportProtocol property.
- *
- * @param value
- * allowed object is
- * {@link AuthenticatorTransportProtocolType }
- *
- */
- public void setAuthenticatorTransportProtocol(AuthenticatorTransportProtocolType value) {
- this.authenticatorTransportProtocol = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/BooleanType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/BooleanType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/BooleanType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,58 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for booleanType.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * <simpleType name="booleanType">
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="true"/>
- * <enumeration value="false"/>
- * </restriction>
- * </simpleType>
- * </pre>
- *
- */
-@XmlType(name = "booleanType")
-@XmlEnum
-public enum BooleanType {
-
- @XmlEnumValue("true")
- TRUE("true"),
- @XmlEnumValue("false")
- FALSE("false");
- private final String value;
-
- BooleanType(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static BooleanType fromValue(String v) {
- for (BooleanType c: BooleanType.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ComplexAuthenticatorType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ComplexAuthenticatorType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ComplexAuthenticatorType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,120 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for ComplexAuthenticatorType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ComplexAuthenticatorType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <group ref="{}AuthenticatorChoiceGroup"/>
- * <group ref="{}AuthenticatorSequenceGroup"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ComplexAuthenticatorType", propOrder = {
- "content"
-})
-public class ComplexAuthenticatorType {
-
- @XmlElementRefs({
- @XmlElementRef(name = "PreviousSession", type = JAXBElement.class),
- @XmlElementRef(name = "SharedSecretDynamicPlaintext", type = JAXBElement.class),
- @XmlElementRef(name = "ResumeSession", type = JAXBElement.class),
- @XmlElementRef(name = "AsymmetricDecryption", type = JAXBElement.class),
- @XmlElementRef(name = "RestrictedPassword", type = JAXBElement.class),
- @XmlElementRef(name = "SubscriberLineNumber", type = JAXBElement.class),
- @XmlElementRef(name = "UserSuffix", type = JAXBElement.class),
- @XmlElementRef(name = "DigSig", type = JAXBElement.class),
- @XmlElementRef(name = "ComplexAuthenticator", type = JAXBElement.class),
- @XmlElementRef(name = "Password", type = JAXBElement.class),
- @XmlElementRef(name = "Extension", type = JAXBElement.class),
- @XmlElementRef(name = "SharedSecretChallengeResponse", type = JAXBElement.class),
- @XmlElementRef(name = "AsymmetricKeyAgreement", type = JAXBElement.class),
- @XmlElementRef(name = "ZeroKnowledge", type = JAXBElement.class),
- @XmlElementRef(name = "IPAddress", type = JAXBElement.class)
- })
- protected List<JAXBElement<?>> content;
-
- /**
- * Gets the rest of the content model.
- *
- * <p>
- * You are getting this "catch-all" property because of the following reason:
- * The field name "PreviousSession" is used by two different parts of a schema. See:
- * line 575 of file:/home/anil/saml2/saml-schema-authn-context-types-2.0.xsd
- * line 556 of file:/home/anil/saml2/saml-schema-authn-context-types-2.0.xsd
- * <p>
- * To get rid of this property, apply a property customization to one
- * of both of the following declarations to change their names:
- * Gets the value of the content 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 content property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getContent().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link RestrictedPasswordType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ComplexAuthenticatorType }{@code >}
- * {@link JAXBElement }{@code <}{@link PasswordType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionType }{@code >}
- * {@link JAXBElement }{@code <}{@link SharedSecretChallengeResponseType }{@code >}
- * {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- * {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}
- *
- *
- */
- public List<JAXBElement<?>> getContent() {
- if (content == null) {
- content = new ArrayList<JAXBElement<?>>();
- }
- return this.content;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/DeviceTypeType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/DeviceTypeType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/DeviceTypeType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,58 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for DeviceTypeType.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * <simpleType name="DeviceTypeType">
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="hardware"/>
- * <enumeration value="software"/>
- * </restriction>
- * </simpleType>
- * </pre>
- *
- */
-@XmlType(name = "DeviceTypeType")
-@XmlEnum
-public enum DeviceTypeType {
-
- @XmlEnumValue("hardware")
- HARDWARE("hardware"),
- @XmlEnumValue("software")
- SOFTWARE("software");
- private final String value;
-
- DeviceTypeType(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static DeviceTypeType fromValue(String v) {
- for (DeviceTypeType c: DeviceTypeType.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionOnlyType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionOnlyType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionOnlyType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,77 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 ExtensionOnlyType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ExtensionOnlyType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ExtensionOnlyType", propOrder = {
- "extension"
-})
-public class ExtensionOnlyType {
-
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ExtensionType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,80 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.w3c.dom.Element;
-
-
-/**
- * <p>Java class for ExtensionType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="ExtensionType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <any/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ExtensionType", propOrder = {
- "any"
-})
-public class ExtensionType {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
-
- /**
- * Gets the value of the any 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 any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/Generation.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/Generation.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/Generation.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,77 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-
-/**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="mechanism" use="required">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="principalchosen"/>
- * <enumeration value="automatic"/>
- * </restriction>
- * </simpleType>
- * </attribute>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "Generation")
-public class Generation {
-
- @XmlAttribute(required = true)
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- protected String mechanism;
-
- /**
- * Gets the value of the mechanism property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMechanism() {
- return mechanism;
- }
-
- /**
- * Sets the value of the mechanism property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMechanism(String value) {
- this.mechanism = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementRefType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementRefType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementRefType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,67 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for GoverningAgreementRefType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="GoverningAgreementRefType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="governingAgreementRef" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "GoverningAgreementRefType")
-public class GoverningAgreementRefType {
-
- @XmlAttribute(required = true)
- @XmlSchemaType(name = "anyURI")
- protected String governingAgreementRef;
-
- /**
- * Gets the value of the governingAgreementRef property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getGoverningAgreementRef() {
- return governingAgreementRef;
- }
-
- /**
- * Sets the value of the governingAgreementRef property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setGoverningAgreementRef(String value) {
- this.governingAgreementRef = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementsType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementsType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/GoverningAgreementsType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,77 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 GoverningAgreementsType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="GoverningAgreementsType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}GoverningAgreementRef" maxOccurs="unbounded"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "GoverningAgreementsType", propOrder = {
- "governingAgreementRef"
-})
-public class GoverningAgreementsType {
-
- @XmlElement(name = "GoverningAgreementRef", required = true)
- protected List<GoverningAgreementRefType> governingAgreementRef;
-
- /**
- * Gets the value of the governingAgreementRef 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 governingAgreementRef property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getGoverningAgreementRef().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link GoverningAgreementRefType }
- *
- *
- */
- public List<GoverningAgreementRefType> getGoverningAgreementRef() {
- if (governingAgreementRef == null) {
- governingAgreementRef = new ArrayList<GoverningAgreementRefType>();
- }
- return this.governingAgreementRef;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/IdentificationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/IdentificationType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/IdentificationType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,189 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for IdentificationType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="IdentificationType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}PhysicalVerification" minOccurs="0"/>
- * <element ref="{}WrittenConsent" minOccurs="0"/>
- * <element ref="{}GoverningAgreements" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="nym" type="{}nymType" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "IdentificationType", propOrder = {
- "physicalVerification",
- "writtenConsent",
- "governingAgreements",
- "extension"
-})
-public class IdentificationType {
-
- @XmlElement(name = "PhysicalVerification")
- protected PhysicalVerification physicalVerification;
- @XmlElement(name = "WrittenConsent")
- protected ExtensionOnlyType writtenConsent;
- @XmlElement(name = "GoverningAgreements")
- protected GoverningAgreementsType governingAgreements;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute
- protected NymType nym;
-
- /**
- * Gets the value of the physicalVerification property.
- *
- * @return
- * possible object is
- * {@link PhysicalVerification }
- *
- */
- public PhysicalVerification getPhysicalVerification() {
- return physicalVerification;
- }
-
- /**
- * Sets the value of the physicalVerification property.
- *
- * @param value
- * allowed object is
- * {@link PhysicalVerification }
- *
- */
- public void setPhysicalVerification(PhysicalVerification value) {
- this.physicalVerification = value;
- }
-
- /**
- * Gets the value of the writtenConsent property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getWrittenConsent() {
- return writtenConsent;
- }
-
- /**
- * Sets the value of the writtenConsent property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setWrittenConsent(ExtensionOnlyType value) {
- this.writtenConsent = value;
- }
-
- /**
- * Gets the value of the governingAgreements property.
- *
- * @return
- * possible object is
- * {@link GoverningAgreementsType }
- *
- */
- public GoverningAgreementsType getGoverningAgreements() {
- return governingAgreements;
- }
-
- /**
- * Sets the value of the governingAgreements property.
- *
- * @param value
- * allowed object is
- * {@link GoverningAgreementsType }
- *
- */
- public void setGoverningAgreements(GoverningAgreementsType value) {
- this.governingAgreements = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * Gets the value of the nym property.
- *
- * @return
- * possible object is
- * {@link NymType }
- *
- */
- public NymType getNym() {
- return nym;
- }
-
- /**
- * Sets the value of the nym property.
- *
- * @param value
- * allowed object is
- * {@link NymType }
- *
- */
- public void setNym(NymType value) {
- this.nym = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyActivationType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyActivationType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyActivationType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,105 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 KeyActivationType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="KeyActivationType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}ActivationPin" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "KeyActivationType", propOrder = {
- "activationPin",
- "extension"
-})
-public class KeyActivationType {
-
- @XmlElement(name = "ActivationPin")
- protected ActivationPinType activationPin;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the activationPin property.
- *
- * @return
- * possible object is
- * {@link ActivationPinType }
- *
- */
- public ActivationPinType getActivationPin() {
- return activationPin;
- }
-
- /**
- * Sets the value of the activationPin property.
- *
- * @param value
- * allowed object is
- * {@link ActivationPinType }
- *
- */
- public void setActivationPin(ActivationPinType value) {
- this.activationPin = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeySharingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeySharingType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeySharingType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,57 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 KeySharingType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="KeySharingType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="sharing" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "KeySharingType")
-public class KeySharingType {
-
- @XmlAttribute(required = true)
- protected boolean sharing;
-
- /**
- * Gets the value of the sharing property.
- *
- */
- public boolean isSharing() {
- return sharing;
- }
-
- /**
- * Sets the value of the sharing property.
- *
- */
- public void setSharing(boolean value) {
- this.sharing = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyStorageType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyStorageType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/KeyStorageType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,65 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 KeyStorageType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="KeyStorageType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="medium" use="required" type="{}mediumType" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "KeyStorageType")
-public class KeyStorageType {
-
- @XmlAttribute(required = true)
- protected MediumType medium;
-
- /**
- * Gets the value of the medium property.
- *
- * @return
- * possible object is
- * {@link MediumType }
- *
- */
- public MediumType getMedium() {
- return medium;
- }
-
- /**
- * Sets the value of the medium property.
- *
- * @param value
- * allowed object is
- * {@link MediumType }
- *
- */
- public void setMedium(MediumType value) {
- this.medium = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/LengthType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/LengthType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/LengthType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,98 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.math.BigInteger;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for LengthType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="LengthType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="min" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "LengthType")
-@XmlSeeAlso({
- RestrictedLengthType.class
-})
-public class LengthType {
-
- @XmlAttribute(required = true)
- protected BigInteger min;
- @XmlAttribute
- protected BigInteger max;
-
- /**
- * Gets the value of the min property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getMin() {
- return min;
- }
-
- /**
- * Sets the value of the min property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setMin(BigInteger value) {
- this.min = value;
- }
-
- /**
- * Gets the value of the max property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getMax() {
- return max;
- }
-
- /**
- * Sets the value of the max property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setMax(BigInteger value) {
- this.max = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/MediumType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/MediumType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/MediumType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,67 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for mediumType.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * <simpleType name="mediumType">
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="memory"/>
- * <enumeration value="smartcard"/>
- * <enumeration value="token"/>
- * <enumeration value="MobileDevice"/>
- * <enumeration value="MobileAuthCard"/>
- * </restriction>
- * </simpleType>
- * </pre>
- *
- */
-@XmlType(name = "mediumType")
-@XmlEnum
-public enum MediumType {
-
- @XmlEnumValue("memory")
- MEMORY("memory"),
- @XmlEnumValue("smartcard")
- SMARTCARD("smartcard"),
- @XmlEnumValue("token")
- TOKEN("token"),
- @XmlEnumValue("MobileDevice")
- MOBILE_DEVICE("MobileDevice"),
- @XmlEnumValue("MobileAuthCard")
- MOBILE_AUTH_CARD("MobileAuthCard");
- private final String value;
-
- MediumType(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static MediumType fromValue(String v) {
- for (MediumType c: MediumType.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/NymType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/NymType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/NymType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,61 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for nymType.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * <simpleType name="nymType">
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="anonymity"/>
- * <enumeration value="verinymity"/>
- * <enumeration value="pseudonymity"/>
- * </restriction>
- * </simpleType>
- * </pre>
- *
- */
-@XmlType(name = "nymType")
-@XmlEnum
-public enum NymType {
-
- @XmlEnumValue("anonymity")
- ANONYMITY("anonymity"),
- @XmlEnumValue("verinymity")
- VERINYMITY("verinymity"),
- @XmlEnumValue("pseudonymity")
- PSEUDONYMITY("pseudonymity");
- private final String value;
-
- NymType(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static NymType fromValue(String v) {
- for (NymType c: NymType.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ObjectFactory.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/ObjectFactory.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,862 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 generated 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 {
-
- private final static QName _ZeroKnowledge_QNAME = new QName("", "ZeroKnowledge");
- private final static QName _GoverningAgreements_QNAME = new QName("", "GoverningAgreements");
- private final static QName _SubscriberLineNumber_QNAME = new QName("", "SubscriberLineNumber");
- private final static QName _DigSig_QNAME = new QName("", "DigSig");
- private final static QName _AsymmetricKeyAgreement_QNAME = new QName("", "AsymmetricKeyAgreement");
- private final static QName _AuthnMethod_QNAME = new QName("", "AuthnMethod");
- private final static QName _ActivationPin_QNAME = new QName("", "ActivationPin");
- private final static QName _GoverningAgreementRef_QNAME = new QName("", "GoverningAgreementRef");
- private final static QName _PrincipalAuthenticationMechanism_QNAME = new QName("", "PrincipalAuthenticationMechanism");
- private final static QName _AuthenticatorTransportProtocol_QNAME = new QName("", "AuthenticatorTransportProtocol");
- private final static QName _SwitchAudit_QNAME = new QName("", "SwitchAudit");
- private final static QName _RestrictedPassword_QNAME = new QName("", "RestrictedPassword");
- private final static QName _TechnicalProtection_QNAME = new QName("", "TechnicalProtection");
- private final static QName _KeyStorage_QNAME = new QName("", "KeyStorage");
- private final static QName _TimeSyncToken_QNAME = new QName("", "TimeSyncToken");
- private final static QName _MobileNetworkRadioEncryption_QNAME = new QName("", "MobileNetworkRadioEncryption");
- private final static QName _SharedSecretChallengeResponse_QNAME = new QName("", "SharedSecretChallengeResponse");
- private final static QName _WrittenConsent_QNAME = new QName("", "WrittenConsent");
- private final static QName _AuthenticationContextDeclaration_QNAME = new QName("", "AuthenticationContextDeclaration");
- private final static QName _Identification_QNAME = new QName("", "Identification");
- private final static QName _OperationalProtection_QNAME = new QName("", "OperationalProtection");
- private final static QName _Authenticator_QNAME = new QName("", "Authenticator");
- private final static QName _SSL_QNAME = new QName("", "SSL");
- private final static QName _IPSec_QNAME = new QName("", "IPSec");
- private final static QName _SharedSecretDynamicPlaintext_QNAME = new QName("", "SharedSecretDynamicPlaintext");
- private final static QName _ResumeSession_QNAME = new QName("", "ResumeSession");
- private final static QName _IPAddress_QNAME = new QName("", "IPAddress");
- private final static QName _WTLS_QNAME = new QName("", "WTLS");
- private final static QName _PreviousSession_QNAME = new QName("", "PreviousSession");
- private final static QName _ActivationLimit_QNAME = new QName("", "ActivationLimit");
- private final static QName _DeactivationCallCenter_QNAME = new QName("", "DeactivationCallCenter");
- private final static QName _Extension_QNAME = new QName("", "Extension");
- private final static QName _Password_QNAME = new QName("", "Password");
- private final static QName _Token_QNAME = new QName("", "Token");
- private final static QName _ActivationLimitUsages_QNAME = new QName("", "ActivationLimitUsages");
- private final static QName _PSTN_QNAME = new QName("", "PSTN");
- private final static QName _SecurityAudit_QNAME = new QName("", "SecurityAudit");
- private final static QName _AsymmetricDecryption_QNAME = new QName("", "AsymmetricDecryption");
- private final static QName _SecretKeyProtection_QNAME = new QName("", "SecretKeyProtection");
- private final static QName _ActivationLimitDuration_QNAME = new QName("", "ActivationLimitDuration");
- private final static QName _PrivateKeyProtection_QNAME = new QName("", "PrivateKeyProtection");
- private final static QName _Alphabet_QNAME = new QName("", "Alphabet");
- private final static QName _ActivationLimitSession_QNAME = new QName("", "ActivationLimitSession");
- private final static QName _Smartcard_QNAME = new QName("", "Smartcard");
- private final static QName _KeySharing_QNAME = new QName("", "KeySharing");
- private final static QName _ComplexAuthenticator_QNAME = new QName("", "ComplexAuthenticator");
- private final static QName _ADSL_QNAME = new QName("", "ADSL");
- private final static QName _ISDN_QNAME = new QName("", "ISDN");
- private final static QName _MobileNetworkNoEncryption_QNAME = new QName("", "MobileNetworkNoEncryption");
- private final static QName _MobileNetworkEndToEndEncryption_QNAME = new QName("", "MobileNetworkEndToEndEncryption");
- private final static QName _UserSuffix_QNAME = new QName("", "UserSuffix");
- private final static QName _Length_QNAME = new QName("", "Length");
- private final static QName _HTTP_QNAME = new QName("", "HTTP");
- private final static QName _KeyActivation_QNAME = new QName("", "KeyActivation");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link AuthnContextDeclarationBaseType }
- *
- */
- public AuthnContextDeclarationBaseType createAuthnContextDeclarationBaseType() {
- return new AuthnContextDeclarationBaseType();
- }
-
- /**
- * Create an instance of {@link KeyActivationType }
- *
- */
- public KeyActivationType createKeyActivationType() {
- return new KeyActivationType();
- }
-
- /**
- * Create an instance of {@link SecretKeyProtectionType }
- *
- */
- public SecretKeyProtectionType createSecretKeyProtectionType() {
- return new SecretKeyProtectionType();
- }
-
- /**
- * Create an instance of {@link RestrictedLengthType }
- *
- */
- public RestrictedLengthType createRestrictedLengthType() {
- return new RestrictedLengthType();
- }
-
- /**
- * Create an instance of {@link TechnicalProtectionBaseType }
- *
- */
- public TechnicalProtectionBaseType createTechnicalProtectionBaseType() {
- return new TechnicalProtectionBaseType();
- }
-
- /**
- * Create an instance of {@link PrivateKeyProtectionType }
- *
- */
- public PrivateKeyProtectionType createPrivateKeyProtectionType() {
- return new PrivateKeyProtectionType();
- }
-
- /**
- * Create an instance of {@link ActivationLimitDurationType }
- *
- */
- public ActivationLimitDurationType createActivationLimitDurationType() {
- return new ActivationLimitDurationType();
- }
-
- /**
- * Create an instance of {@link SharedSecretChallengeResponseType }
- *
- */
- public SharedSecretChallengeResponseType createSharedSecretChallengeResponseType() {
- return new SharedSecretChallengeResponseType();
- }
-
- /**
- * Create an instance of {@link AuthenticatorTransportProtocolType }
- *
- */
- public AuthenticatorTransportProtocolType createAuthenticatorTransportProtocolType() {
- return new AuthenticatorTransportProtocolType();
- }
-
- /**
- * Create an instance of {@link LengthType }
- *
- */
- public LengthType createLengthType() {
- return new LengthType();
- }
-
- /**
- * Create an instance of {@link ActivationLimitUsagesType }
- *
- */
- public ActivationLimitUsagesType createActivationLimitUsagesType() {
- return new ActivationLimitUsagesType();
- }
-
- /**
- * Create an instance of {@link AuthnMethodBaseType }
- *
- */
- public AuthnMethodBaseType createAuthnMethodBaseType() {
- return new AuthnMethodBaseType();
- }
-
- /**
- * Create an instance of {@link TimeSyncTokenType }
- *
- */
- public TimeSyncTokenType createTimeSyncTokenType() {
- return new TimeSyncTokenType();
- }
-
- /**
- * Create an instance of {@link ActivationLimitSessionType }
- *
- */
- public ActivationLimitSessionType createActivationLimitSessionType() {
- return new ActivationLimitSessionType();
- }
-
- /**
- * Create an instance of {@link AuthenticatorBaseType }
- *
- */
- public AuthenticatorBaseType createAuthenticatorBaseType() {
- return new AuthenticatorBaseType();
- }
-
- /**
- * Create an instance of {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType createExtensionOnlyType() {
- return new ExtensionOnlyType();
- }
-
- /**
- * Create an instance of {@link Generation }
- *
- */
- public Generation createGeneration() {
- return new Generation();
- }
-
- /**
- * Create an instance of {@link PublicKeyType }
- *
- */
- public PublicKeyType createPublicKeyType() {
- return new PublicKeyType();
- }
-
- /**
- * Create an instance of {@link RestrictedPasswordType }
- *
- */
- public RestrictedPasswordType createRestrictedPasswordType() {
- return new RestrictedPasswordType();
- }
-
- /**
- * Create an instance of {@link IdentificationType }
- *
- */
- public IdentificationType createIdentificationType() {
- return new IdentificationType();
- }
-
- /**
- * Create an instance of {@link GoverningAgreementRefType }
- *
- */
- public GoverningAgreementRefType createGoverningAgreementRefType() {
- return new GoverningAgreementRefType();
- }
-
- /**
- * Create an instance of {@link AlphabetType }
- *
- */
- public AlphabetType createAlphabetType() {
- return new AlphabetType();
- }
-
- /**
- * Create an instance of {@link ExtensionType }
- *
- */
- public ExtensionType createExtensionType() {
- return new ExtensionType();
- }
-
- /**
- * Create an instance of {@link PasswordType }
- *
- */
- public PasswordType createPasswordType() {
- return new PasswordType();
- }
-
- /**
- * Create an instance of {@link SecurityAuditType }
- *
- */
- public SecurityAuditType createSecurityAuditType() {
- return new SecurityAuditType();
- }
-
- /**
- * Create an instance of {@link PrincipalAuthenticationMechanismType }
- *
- */
- public PrincipalAuthenticationMechanismType createPrincipalAuthenticationMechanismType() {
- return new PrincipalAuthenticationMechanismType();
- }
-
- /**
- * Create an instance of {@link ComplexAuthenticatorType }
- *
- */
- public ComplexAuthenticatorType createComplexAuthenticatorType() {
- return new ComplexAuthenticatorType();
- }
-
- /**
- * Create an instance of {@link ActivationLimitType }
- *
- */
- public ActivationLimitType createActivationLimitType() {
- return new ActivationLimitType();
- }
-
- /**
- * Create an instance of {@link KeyStorageType }
- *
- */
- public KeyStorageType createKeyStorageType() {
- return new KeyStorageType();
- }
-
- /**
- * Create an instance of {@link OperationalProtectionType }
- *
- */
- public OperationalProtectionType createOperationalProtectionType() {
- return new OperationalProtectionType();
- }
-
- /**
- * Create an instance of {@link GoverningAgreementsType }
- *
- */
- public GoverningAgreementsType createGoverningAgreementsType() {
- return new GoverningAgreementsType();
- }
-
- /**
- * Create an instance of {@link PhysicalVerification }
- *
- */
- public PhysicalVerification createPhysicalVerification() {
- return new PhysicalVerification();
- }
-
- /**
- * Create an instance of {@link ActivationPinType }
- *
- */
- public ActivationPinType createActivationPinType() {
- return new ActivationPinType();
- }
-
- /**
- * Create an instance of {@link KeySharingType }
- *
- */
- public KeySharingType createKeySharingType() {
- return new KeySharingType();
- }
-
- /**
- * Create an instance of {@link TokenType }
- *
- */
- public TokenType createTokenType() {
- return new TokenType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ZeroKnowledge")
- public JAXBElement<ExtensionOnlyType> createZeroKnowledge(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_ZeroKnowledge_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link GoverningAgreementsType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "GoverningAgreements")
- public JAXBElement<GoverningAgreementsType> createGoverningAgreements(GoverningAgreementsType value) {
- return new JAXBElement<GoverningAgreementsType>(_GoverningAgreements_QNAME, GoverningAgreementsType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SubscriberLineNumber")
- public JAXBElement<ExtensionOnlyType> createSubscriberLineNumber(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_SubscriberLineNumber_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "DigSig")
- public JAXBElement<PublicKeyType> createDigSig(PublicKeyType value) {
- return new JAXBElement<PublicKeyType>(_DigSig_QNAME, PublicKeyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "AsymmetricKeyAgreement")
- public JAXBElement<PublicKeyType> createAsymmetricKeyAgreement(PublicKeyType value) {
- return new JAXBElement<PublicKeyType>(_AsymmetricKeyAgreement_QNAME, PublicKeyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AuthnMethodBaseType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "AuthnMethod")
- public JAXBElement<AuthnMethodBaseType> createAuthnMethod(AuthnMethodBaseType value) {
- return new JAXBElement<AuthnMethodBaseType>(_AuthnMethod_QNAME, AuthnMethodBaseType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ActivationPinType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ActivationPin")
- public JAXBElement<ActivationPinType> createActivationPin(ActivationPinType value) {
- return new JAXBElement<ActivationPinType>(_ActivationPin_QNAME, ActivationPinType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link GoverningAgreementRefType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "GoverningAgreementRef")
- public JAXBElement<GoverningAgreementRefType> createGoverningAgreementRef(GoverningAgreementRefType value) {
- return new JAXBElement<GoverningAgreementRefType>(_GoverningAgreementRef_QNAME, GoverningAgreementRefType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PrincipalAuthenticationMechanismType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "PrincipalAuthenticationMechanism")
- public JAXBElement<PrincipalAuthenticationMechanismType> createPrincipalAuthenticationMechanism(PrincipalAuthenticationMechanismType value) {
- return new JAXBElement<PrincipalAuthenticationMechanismType>(_PrincipalAuthenticationMechanism_QNAME, PrincipalAuthenticationMechanismType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticatorTransportProtocolType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "AuthenticatorTransportProtocol")
- public JAXBElement<AuthenticatorTransportProtocolType> createAuthenticatorTransportProtocol(AuthenticatorTransportProtocolType value) {
- return new JAXBElement<AuthenticatorTransportProtocolType>(_AuthenticatorTransportProtocol_QNAME, AuthenticatorTransportProtocolType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SwitchAudit")
- public JAXBElement<ExtensionOnlyType> createSwitchAudit(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_SwitchAudit_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link RestrictedPasswordType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "RestrictedPassword")
- public JAXBElement<RestrictedPasswordType> createRestrictedPassword(RestrictedPasswordType value) {
- return new JAXBElement<RestrictedPasswordType>(_RestrictedPassword_QNAME, RestrictedPasswordType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link TechnicalProtectionBaseType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "TechnicalProtection")
- public JAXBElement<TechnicalProtectionBaseType> createTechnicalProtection(TechnicalProtectionBaseType value) {
- return new JAXBElement<TechnicalProtectionBaseType>(_TechnicalProtection_QNAME, TechnicalProtectionBaseType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link KeyStorageType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "KeyStorage")
- public JAXBElement<KeyStorageType> createKeyStorage(KeyStorageType value) {
- return new JAXBElement<KeyStorageType>(_KeyStorage_QNAME, KeyStorageType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link TimeSyncTokenType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "TimeSyncToken")
- public JAXBElement<TimeSyncTokenType> createTimeSyncToken(TimeSyncTokenType value) {
- return new JAXBElement<TimeSyncTokenType>(_TimeSyncToken_QNAME, TimeSyncTokenType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "MobileNetworkRadioEncryption")
- public JAXBElement<ExtensionOnlyType> createMobileNetworkRadioEncryption(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_MobileNetworkRadioEncryption_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link SharedSecretChallengeResponseType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SharedSecretChallengeResponse")
- public JAXBElement<SharedSecretChallengeResponseType> createSharedSecretChallengeResponse(SharedSecretChallengeResponseType value) {
- return new JAXBElement<SharedSecretChallengeResponseType>(_SharedSecretChallengeResponse_QNAME, SharedSecretChallengeResponseType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "WrittenConsent")
- public JAXBElement<ExtensionOnlyType> createWrittenConsent(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_WrittenConsent_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AuthnContextDeclarationBaseType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "AuthenticationContextDeclaration")
- public JAXBElement<AuthnContextDeclarationBaseType> createAuthenticationContextDeclaration(AuthnContextDeclarationBaseType value) {
- return new JAXBElement<AuthnContextDeclarationBaseType>(_AuthenticationContextDeclaration_QNAME, AuthnContextDeclarationBaseType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link IdentificationType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Identification")
- public JAXBElement<IdentificationType> createIdentification(IdentificationType value) {
- return new JAXBElement<IdentificationType>(_Identification_QNAME, IdentificationType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link OperationalProtectionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "OperationalProtection")
- public JAXBElement<OperationalProtectionType> createOperationalProtection(OperationalProtectionType value) {
- return new JAXBElement<OperationalProtectionType>(_OperationalProtection_QNAME, OperationalProtectionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticatorBaseType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Authenticator")
- public JAXBElement<AuthenticatorBaseType> createAuthenticator(AuthenticatorBaseType value) {
- return new JAXBElement<AuthenticatorBaseType>(_Authenticator_QNAME, AuthenticatorBaseType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SSL")
- public JAXBElement<ExtensionOnlyType> createSSL(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_SSL_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "IPSec")
- public JAXBElement<ExtensionOnlyType> createIPSec(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_IPSec_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SharedSecretDynamicPlaintext")
- public JAXBElement<ExtensionOnlyType> createSharedSecretDynamicPlaintext(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_SharedSecretDynamicPlaintext_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ResumeSession")
- public JAXBElement<ExtensionOnlyType> createResumeSession(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_ResumeSession_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "IPAddress")
- public JAXBElement<ExtensionOnlyType> createIPAddress(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_IPAddress_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "WTLS")
- public JAXBElement<ExtensionOnlyType> createWTLS(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_WTLS_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "PreviousSession")
- public JAXBElement<ExtensionOnlyType> createPreviousSession(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_PreviousSession_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ActivationLimitType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ActivationLimit")
- public JAXBElement<ActivationLimitType> createActivationLimit(ActivationLimitType value) {
- return new JAXBElement<ActivationLimitType>(_ActivationLimit_QNAME, ActivationLimitType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "DeactivationCallCenter")
- public JAXBElement<ExtensionOnlyType> createDeactivationCallCenter(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_DeactivationCallCenter_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Extension")
- public JAXBElement<ExtensionType> createExtension(ExtensionType value) {
- return new JAXBElement<ExtensionType>(_Extension_QNAME, ExtensionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PasswordType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Password")
- public JAXBElement<PasswordType> createPassword(PasswordType value) {
- return new JAXBElement<PasswordType>(_Password_QNAME, PasswordType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link TokenType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Token")
- public JAXBElement<TokenType> createToken(TokenType value) {
- return new JAXBElement<TokenType>(_Token_QNAME, TokenType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ActivationLimitUsagesType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ActivationLimitUsages")
- public JAXBElement<ActivationLimitUsagesType> createActivationLimitUsages(ActivationLimitUsagesType value) {
- return new JAXBElement<ActivationLimitUsagesType>(_ActivationLimitUsages_QNAME, ActivationLimitUsagesType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "PSTN")
- public JAXBElement<ExtensionOnlyType> createPSTN(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_PSTN_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link SecurityAuditType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SecurityAudit")
- public JAXBElement<SecurityAuditType> createSecurityAudit(SecurityAuditType value) {
- return new JAXBElement<SecurityAuditType>(_SecurityAudit_QNAME, SecurityAuditType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PublicKeyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "AsymmetricDecryption")
- public JAXBElement<PublicKeyType> createAsymmetricDecryption(PublicKeyType value) {
- return new JAXBElement<PublicKeyType>(_AsymmetricDecryption_QNAME, PublicKeyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link SecretKeyProtectionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "SecretKeyProtection")
- public JAXBElement<SecretKeyProtectionType> createSecretKeyProtection(SecretKeyProtectionType value) {
- return new JAXBElement<SecretKeyProtectionType>(_SecretKeyProtection_QNAME, SecretKeyProtectionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ActivationLimitDurationType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ActivationLimitDuration")
- public JAXBElement<ActivationLimitDurationType> createActivationLimitDuration(ActivationLimitDurationType value) {
- return new JAXBElement<ActivationLimitDurationType>(_ActivationLimitDuration_QNAME, ActivationLimitDurationType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link PrivateKeyProtectionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "PrivateKeyProtection")
- public JAXBElement<PrivateKeyProtectionType> createPrivateKeyProtection(PrivateKeyProtectionType value) {
- return new JAXBElement<PrivateKeyProtectionType>(_PrivateKeyProtection_QNAME, PrivateKeyProtectionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AlphabetType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Alphabet")
- public JAXBElement<AlphabetType> createAlphabet(AlphabetType value) {
- return new JAXBElement<AlphabetType>(_Alphabet_QNAME, AlphabetType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ActivationLimitSessionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ActivationLimitSession")
- public JAXBElement<ActivationLimitSessionType> createActivationLimitSession(ActivationLimitSessionType value) {
- return new JAXBElement<ActivationLimitSessionType>(_ActivationLimitSession_QNAME, ActivationLimitSessionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Smartcard")
- public JAXBElement<ExtensionOnlyType> createSmartcard(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_Smartcard_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link KeySharingType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "KeySharing")
- public JAXBElement<KeySharingType> createKeySharing(KeySharingType value) {
- return new JAXBElement<KeySharingType>(_KeySharing_QNAME, KeySharingType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ComplexAuthenticatorType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ComplexAuthenticator")
- public JAXBElement<ComplexAuthenticatorType> createComplexAuthenticator(ComplexAuthenticatorType value) {
- return new JAXBElement<ComplexAuthenticatorType>(_ComplexAuthenticator_QNAME, ComplexAuthenticatorType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ADSL")
- public JAXBElement<ExtensionOnlyType> createADSL(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_ADSL_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "ISDN")
- public JAXBElement<ExtensionOnlyType> createISDN(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_ISDN_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "MobileNetworkNoEncryption")
- public JAXBElement<ExtensionOnlyType> createMobileNetworkNoEncryption(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_MobileNetworkNoEncryption_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "MobileNetworkEndToEndEncryption")
- public JAXBElement<ExtensionOnlyType> createMobileNetworkEndToEndEncryption(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_MobileNetworkEndToEndEncryption_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "UserSuffix")
- public JAXBElement<ExtensionOnlyType> createUserSuffix(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_UserSuffix_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link LengthType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "Length")
- public JAXBElement<LengthType> createLength(LengthType value) {
- return new JAXBElement<LengthType>(_Length_QNAME, LengthType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ExtensionOnlyType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "HTTP")
- public JAXBElement<ExtensionOnlyType> createHTTP(ExtensionOnlyType value) {
- return new JAXBElement<ExtensionOnlyType>(_HTTP_QNAME, ExtensionOnlyType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link KeyActivationType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "", name = "KeyActivation")
- public JAXBElement<KeyActivationType> createKeyActivation(KeyActivationType value) {
- return new JAXBElement<KeyActivationType>(_KeyActivation_QNAME, KeyActivationType.class, null, value);
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/OperationalProtectionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/OperationalProtectionType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/OperationalProtectionType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,133 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 OperationalProtectionType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="OperationalProtectionType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}SecurityAudit" minOccurs="0"/>
- * <element ref="{}DeactivationCallCenter" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "OperationalProtectionType", propOrder = {
- "securityAudit",
- "deactivationCallCenter",
- "extension"
-})
-public class OperationalProtectionType {
-
- @XmlElement(name = "SecurityAudit")
- protected SecurityAuditType securityAudit;
- @XmlElement(name = "DeactivationCallCenter")
- protected ExtensionOnlyType deactivationCallCenter;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the securityAudit property.
- *
- * @return
- * possible object is
- * {@link SecurityAuditType }
- *
- */
- public SecurityAuditType getSecurityAudit() {
- return securityAudit;
- }
-
- /**
- * Sets the value of the securityAudit property.
- *
- * @param value
- * allowed object is
- * {@link SecurityAuditType }
- *
- */
- public void setSecurityAudit(SecurityAuditType value) {
- this.securityAudit = value;
- }
-
- /**
- * Gets the value of the deactivationCallCenter property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getDeactivationCallCenter() {
- return deactivationCallCenter;
- }
-
- /**
- * Sets the value of the deactivationCallCenter property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setDeactivationCallCenter(ExtensionOnlyType value) {
- this.deactivationCallCenter = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PasswordType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PasswordType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PasswordType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,195 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for PasswordType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="PasswordType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Length" minOccurs="0"/>
- * <element ref="{}Alphabet" minOccurs="0"/>
- * <element ref="{}Generation" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="ExternalVerification" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PasswordType", propOrder = {
- "length",
- "alphabet",
- "generation",
- "extension"
-})
-@XmlSeeAlso({
- RestrictedPasswordType.class
-})
-public class PasswordType {
-
- @XmlElement(name = "Length")
- protected LengthType length;
- @XmlElement(name = "Alphabet")
- protected AlphabetType alphabet;
- @XmlElement(name = "Generation")
- protected Generation generation;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute(name = "ExternalVerification")
- @XmlSchemaType(name = "anyURI")
- protected String externalVerification;
-
- /**
- * Gets the value of the length property.
- *
- * @return
- * possible object is
- * {@link LengthType }
- *
- */
- public LengthType getLength() {
- return length;
- }
-
- /**
- * Sets the value of the length property.
- *
- * @param value
- * allowed object is
- * {@link LengthType }
- *
- */
- public void setLength(LengthType value) {
- this.length = value;
- }
-
- /**
- * Gets the value of the alphabet property.
- *
- * @return
- * possible object is
- * {@link AlphabetType }
- *
- */
- public AlphabetType getAlphabet() {
- return alphabet;
- }
-
- /**
- * Sets the value of the alphabet property.
- *
- * @param value
- * allowed object is
- * {@link AlphabetType }
- *
- */
- public void setAlphabet(AlphabetType value) {
- this.alphabet = value;
- }
-
- /**
- * Gets the value of the generation property.
- *
- * @return
- * possible object is
- * {@link Generation }
- *
- */
- public Generation getGeneration() {
- return generation;
- }
-
- /**
- * Sets the value of the generation property.
- *
- * @param value
- * allowed object is
- * {@link Generation }
- *
- */
- public void setGeneration(Generation value) {
- this.generation = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * Gets the value of the externalVerification property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getExternalVerification() {
- return externalVerification;
- }
-
- /**
- * Sets the value of the externalVerification property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setExternalVerification(String value) {
- this.externalVerification = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PhysicalVerification.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PhysicalVerification.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PhysicalVerification.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,77 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-
-/**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="credentialLevel">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
- * <enumeration value="primary"/>
- * <enumeration value="secondary"/>
- * </restriction>
- * </simpleType>
- * </attribute>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "PhysicalVerification")
-public class PhysicalVerification {
-
- @XmlAttribute
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- protected String credentialLevel;
-
- /**
- * Gets the value of the credentialLevel property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getCredentialLevel() {
- return credentialLevel;
- }
-
- /**
- * Sets the value of the credentialLevel property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setCredentialLevel(String value) {
- this.credentialLevel = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrincipalAuthenticationMechanismType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrincipalAuthenticationMechanismType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrincipalAuthenticationMechanismType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,246 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.math.BigInteger;
-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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for PrincipalAuthenticationMechanismType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="PrincipalAuthenticationMechanismType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Password" minOccurs="0"/>
- * <element ref="{}RestrictedPassword" minOccurs="0"/>
- * <element ref="{}Token" minOccurs="0"/>
- * <element ref="{}Smartcard" minOccurs="0"/>
- * <element ref="{}ActivationPin" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="preauth" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PrincipalAuthenticationMechanismType", propOrder = {
- "password",
- "restrictedPassword",
- "token",
- "smartcard",
- "activationPin",
- "extension"
-})
-public class PrincipalAuthenticationMechanismType {
-
- @XmlElement(name = "Password")
- protected PasswordType password;
- @XmlElement(name = "RestrictedPassword")
- protected RestrictedPasswordType restrictedPassword;
- @XmlElement(name = "Token")
- protected TokenType token;
- @XmlElement(name = "Smartcard")
- protected ExtensionOnlyType smartcard;
- @XmlElement(name = "ActivationPin")
- protected ActivationPinType activationPin;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute
- protected BigInteger preauth;
-
- /**
- * Gets the value of the password property.
- *
- * @return
- * possible object is
- * {@link PasswordType }
- *
- */
- public PasswordType getPassword() {
- return password;
- }
-
- /**
- * Sets the value of the password property.
- *
- * @param value
- * allowed object is
- * {@link PasswordType }
- *
- */
- public void setPassword(PasswordType value) {
- this.password = value;
- }
-
- /**
- * Gets the value of the restrictedPassword property.
- *
- * @return
- * possible object is
- * {@link RestrictedPasswordType }
- *
- */
- public RestrictedPasswordType getRestrictedPassword() {
- return restrictedPassword;
- }
-
- /**
- * Sets the value of the restrictedPassword property.
- *
- * @param value
- * allowed object is
- * {@link RestrictedPasswordType }
- *
- */
- public void setRestrictedPassword(RestrictedPasswordType value) {
- this.restrictedPassword = value;
- }
-
- /**
- * Gets the value of the token property.
- *
- * @return
- * possible object is
- * {@link TokenType }
- *
- */
- public TokenType getToken() {
- return token;
- }
-
- /**
- * Sets the value of the token property.
- *
- * @param value
- * allowed object is
- * {@link TokenType }
- *
- */
- public void setToken(TokenType value) {
- this.token = value;
- }
-
- /**
- * Gets the value of the smartcard property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getSmartcard() {
- return smartcard;
- }
-
- /**
- * Sets the value of the smartcard property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setSmartcard(ExtensionOnlyType value) {
- this.smartcard = value;
- }
-
- /**
- * Gets the value of the activationPin property.
- *
- * @return
- * possible object is
- * {@link ActivationPinType }
- *
- */
- public ActivationPinType getActivationPin() {
- return activationPin;
- }
-
- /**
- * Sets the value of the activationPin property.
- *
- * @param value
- * allowed object is
- * {@link ActivationPinType }
- *
- */
- public void setActivationPin(ActivationPinType value) {
- this.activationPin = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * Gets the value of the preauth property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getPreauth() {
- return preauth;
- }
-
- /**
- * Sets the value of the preauth property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setPreauth(BigInteger value) {
- this.preauth = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrivateKeyProtectionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrivateKeyProtectionType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PrivateKeyProtectionType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,161 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 PrivateKeyProtectionType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="PrivateKeyProtectionType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}KeyActivation" minOccurs="0"/>
- * <element ref="{}KeyStorage" minOccurs="0"/>
- * <element ref="{}KeySharing" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PrivateKeyProtectionType", propOrder = {
- "keyActivation",
- "keyStorage",
- "keySharing",
- "extension"
-})
-public class PrivateKeyProtectionType {
-
- @XmlElement(name = "KeyActivation")
- protected KeyActivationType keyActivation;
- @XmlElement(name = "KeyStorage")
- protected KeyStorageType keyStorage;
- @XmlElement(name = "KeySharing")
- protected KeySharingType keySharing;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the keyActivation property.
- *
- * @return
- * possible object is
- * {@link KeyActivationType }
- *
- */
- public KeyActivationType getKeyActivation() {
- return keyActivation;
- }
-
- /**
- * Sets the value of the keyActivation property.
- *
- * @param value
- * allowed object is
- * {@link KeyActivationType }
- *
- */
- public void setKeyActivation(KeyActivationType value) {
- this.keyActivation = value;
- }
-
- /**
- * Gets the value of the keyStorage property.
- *
- * @return
- * possible object is
- * {@link KeyStorageType }
- *
- */
- public KeyStorageType getKeyStorage() {
- return keyStorage;
- }
-
- /**
- * Sets the value of the keyStorage property.
- *
- * @param value
- * allowed object is
- * {@link KeyStorageType }
- *
- */
- public void setKeyStorage(KeyStorageType value) {
- this.keyStorage = value;
- }
-
- /**
- * Gets the value of the keySharing property.
- *
- * @return
- * possible object is
- * {@link KeySharingType }
- *
- */
- public KeySharingType getKeySharing() {
- return keySharing;
- }
-
- /**
- * Sets the value of the keySharing property.
- *
- * @param value
- * allowed object is
- * {@link KeySharingType }
- *
- */
- public void setKeySharing(KeySharingType value) {
- this.keySharing = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PublicKeyType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PublicKeyType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/PublicKeyType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,107 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for PublicKeyType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="PublicKeyType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="keyValidation" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PublicKeyType", propOrder = {
- "extension"
-})
-public class PublicKeyType {
-
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute
- @XmlSchemaType(name = "anySimpleType")
- protected String keyValidation;
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * Gets the value of the keyValidation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKeyValidation() {
- return keyValidation;
- }
-
- /**
- * Sets the value of the keyValidation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKeyValidation(String value) {
- this.keyValidation = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedLengthType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedLengthType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedLengthType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,47 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for RestrictedLengthType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="RestrictedLengthType">
- * <complexContent>
- * <restriction base="{}LengthType">
- * <attribute name="min" use="required">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}integer">
- * <minInclusive value="3"/>
- * </restriction>
- * </simpleType>
- * </attribute>
- * <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "RestrictedLengthType")
-public class RestrictedLengthType
- extends LengthType
-{
-
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedPasswordType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedPasswordType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/RestrictedPasswordType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,45 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for RestrictedPasswordType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="RestrictedPasswordType">
- * <complexContent>
- * <restriction base="{}PasswordType">
- * <sequence>
- * <element name="Length" type="{}RestrictedLengthType"/>
- * <element ref="{}Generation" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="ExternalVerification" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "RestrictedPasswordType")
-public class RestrictedPasswordType
- extends PasswordType
-{
-
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecretKeyProtectionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecretKeyProtectionType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecretKeyProtectionType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,133 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 SecretKeyProtectionType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="SecretKeyProtectionType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}KeyActivation" minOccurs="0"/>
- * <element ref="{}KeyStorage" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SecretKeyProtectionType", propOrder = {
- "keyActivation",
- "keyStorage",
- "extension"
-})
-public class SecretKeyProtectionType {
-
- @XmlElement(name = "KeyActivation")
- protected KeyActivationType keyActivation;
- @XmlElement(name = "KeyStorage")
- protected KeyStorageType keyStorage;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the keyActivation property.
- *
- * @return
- * possible object is
- * {@link KeyActivationType }
- *
- */
- public KeyActivationType getKeyActivation() {
- return keyActivation;
- }
-
- /**
- * Sets the value of the keyActivation property.
- *
- * @param value
- * allowed object is
- * {@link KeyActivationType }
- *
- */
- public void setKeyActivation(KeyActivationType value) {
- this.keyActivation = value;
- }
-
- /**
- * Gets the value of the keyStorage property.
- *
- * @return
- * possible object is
- * {@link KeyStorageType }
- *
- */
- public KeyStorageType getKeyStorage() {
- return keyStorage;
- }
-
- /**
- * Sets the value of the keyStorage property.
- *
- * @param value
- * allowed object is
- * {@link KeyStorageType }
- *
- */
- public void setKeyStorage(KeyStorageType value) {
- this.keyStorage = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecurityAuditType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecurityAuditType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SecurityAuditType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,105 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 SecurityAuditType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="SecurityAuditType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}SwitchAudit" minOccurs="0"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SecurityAuditType", propOrder = {
- "switchAudit",
- "extension"
-})
-public class SecurityAuditType {
-
- @XmlElement(name = "SwitchAudit")
- protected ExtensionOnlyType switchAudit;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the switchAudit property.
- *
- * @return
- * possible object is
- * {@link ExtensionOnlyType }
- *
- */
- public ExtensionOnlyType getSwitchAudit() {
- return switchAudit;
- }
-
- /**
- * Sets the value of the switchAudit property.
- *
- * @param value
- * allowed object is
- * {@link ExtensionOnlyType }
- *
- */
- public void setSwitchAudit(ExtensionOnlyType value) {
- this.switchAudit = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SharedSecretChallengeResponseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SharedSecretChallengeResponseType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/SharedSecretChallengeResponseType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,113 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- *
- * This element indicates that the Principal has been
- * authenticated by a challenge-response protocol utilizing shared secret
- * keys and symmetric cryptography.
- *
- *
- * <p>Java class for SharedSecretChallengeResponseType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="SharedSecretChallengeResponseType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="method" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SharedSecretChallengeResponseType", propOrder = {
- "extension"
-})
-public class SharedSecretChallengeResponseType {
-
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- protected String method;
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
- /**
- * Gets the value of the method property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMethod() {
- return method;
- }
-
- /**
- * Sets the value of the method property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMethod(String value) {
- this.method = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TechnicalProtectionBaseType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TechnicalProtectionBaseType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TechnicalProtectionBaseType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,135 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 TechnicalProtectionBaseType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TechnicalProtectionBaseType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <choice minOccurs="0">
- * <element ref="{}PrivateKeyProtection"/>
- * <element ref="{}SecretKeyProtection"/>
- * </choice>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TechnicalProtectionBaseType", propOrder = {
- "privateKeyProtection",
- "secretKeyProtection",
- "extension"
-})
-public class TechnicalProtectionBaseType {
-
- @XmlElement(name = "PrivateKeyProtection")
- protected PrivateKeyProtectionType privateKeyProtection;
- @XmlElement(name = "SecretKeyProtection")
- protected SecretKeyProtectionType secretKeyProtection;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the privateKeyProtection property.
- *
- * @return
- * possible object is
- * {@link PrivateKeyProtectionType }
- *
- */
- public PrivateKeyProtectionType getPrivateKeyProtection() {
- return privateKeyProtection;
- }
-
- /**
- * Sets the value of the privateKeyProtection property.
- *
- * @param value
- * allowed object is
- * {@link PrivateKeyProtectionType }
- *
- */
- public void setPrivateKeyProtection(PrivateKeyProtectionType value) {
- this.privateKeyProtection = value;
- }
-
- /**
- * Gets the value of the secretKeyProtection property.
- *
- * @return
- * possible object is
- * {@link SecretKeyProtectionType }
- *
- */
- public SecretKeyProtectionType getSecretKeyProtection() {
- return secretKeyProtection;
- }
-
- /**
- * Sets the value of the secretKeyProtection property.
- *
- * @param value
- * allowed object is
- * {@link SecretKeyProtectionType }
- *
- */
- public void setSecretKeyProtection(SecretKeyProtectionType value) {
- this.secretKeyProtection = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TimeSyncTokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TimeSyncTokenType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TimeSyncTokenType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,121 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-import java.math.BigInteger;
-
-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 TimeSyncTokenType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TimeSyncTokenType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="DeviceType" use="required" type="{}DeviceTypeType" />
- * <attribute name="SeedLength" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
- * <attribute name="DeviceInHand" use="required" type="{}booleanType" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TimeSyncTokenType")
-public class TimeSyncTokenType {
-
- @XmlAttribute(name = "DeviceType", required = true)
- protected DeviceTypeType deviceType;
- @XmlAttribute(name = "SeedLength", required = true)
- protected BigInteger seedLength;
- @XmlAttribute(name = "DeviceInHand", required = true)
- protected BooleanType deviceInHand;
-
- /**
- * Gets the value of the deviceType property.
- *
- * @return
- * possible object is
- * {@link DeviceTypeType }
- *
- */
- public DeviceTypeType getDeviceType() {
- return deviceType;
- }
-
- /**
- * Sets the value of the deviceType property.
- *
- * @param value
- * allowed object is
- * {@link DeviceTypeType }
- *
- */
- public void setDeviceType(DeviceTypeType value) {
- this.deviceType = value;
- }
-
- /**
- * Gets the value of the seedLength property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getSeedLength() {
- return seedLength;
- }
-
- /**
- * Sets the value of the seedLength property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setSeedLength(BigInteger value) {
- this.seedLength = value;
- }
-
- /**
- * Gets the value of the deviceInHand property.
- *
- * @return
- * possible object is
- * {@link BooleanType }
- *
- */
- public BooleanType getDeviceInHand() {
- return deviceInHand;
- }
-
- /**
- * Sets the value of the deviceInHand property.
- *
- * @param value
- * allowed object is
- * {@link BooleanType }
- *
- */
- public void setDeviceInHand(BooleanType value) {
- this.deviceInHand = value;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TokenType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TokenType.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/TokenType.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,105 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2008.12.08 at 05:45:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.saml.v2.generated;
-
-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 TokenType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="TokenType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{}TimeSyncToken"/>
- * <element ref="{}Extension" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TokenType", propOrder = {
- "timeSyncToken",
- "extension"
-})
-public class TokenType {
-
- @XmlElement(name = "TimeSyncToken", required = true)
- protected TimeSyncTokenType timeSyncToken;
- @XmlElement(name = "Extension")
- protected List<ExtensionType> extension;
-
- /**
- * Gets the value of the timeSyncToken property.
- *
- * @return
- * possible object is
- * {@link TimeSyncTokenType }
- *
- */
- public TimeSyncTokenType getTimeSyncToken() {
- return timeSyncToken;
- }
-
- /**
- * Sets the value of the timeSyncToken property.
- *
- * @param value
- * allowed object is
- * {@link TimeSyncTokenType }
- *
- */
- public void setTimeSyncToken(TimeSyncTokenType value) {
- this.timeSyncToken = value;
- }
-
- /**
- * Gets the value of the extension 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 extension property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getExtension().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ExtensionType }
- *
- *
- */
- public List<ExtensionType> getExtension() {
- if (extension == null) {
- extension = new ArrayList<ExtensionType>();
- }
- return this.extension;
- }
-
-}
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/runtime/ZeroOneBooleanAdapter.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/runtime/ZeroOneBooleanAdapter.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/saml/v2/generated/runtime/ZeroOneBooleanAdapter.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,62 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License"). You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- *
- * Contributor(s):
- *
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license." If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above. However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package org.picketlink.identity.federation.saml.v2.generated.runtime;
-
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * Serializes <tt>boolean</tt> as 0 or 1.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0
- */
-public class ZeroOneBooleanAdapter extends XmlAdapter<String,Boolean> {
- public Boolean unmarshal(String v) {
- if(v==null) return null;
- return DatatypeConverter.parseBoolean(v);
- }
-
- public String marshal(Boolean v) {
- if(v==null) return null;
- if(v) {
- return "1";
- } else {
- return "0";
- }
- }
-}
Modified: federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ConfigurationUtil.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ConfigurationUtil.java 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ConfigurationUtil.java 2011-02-04 22:45:33 UTC (rev 736)
@@ -21,19 +21,13 @@
*/
package org.picketlink.identity.federation.web.util;
-import java.io.IOException;
import java.io.InputStream;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-
import org.picketlink.identity.federation.core.config.IDPType;
import org.picketlink.identity.federation.core.config.SPType;
-import org.picketlink.identity.federation.core.constants.PicketLinkFederationConstants;
+import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.handler.config.Handlers;
-import org.picketlink.identity.federation.core.util.JAXBUtil;
-import org.xml.sax.SAXException;
+import org.picketlink.identity.federation.core.parsers.config.SAMLConfigParser;
/**
* Deals with Configuration
@@ -46,22 +40,22 @@
* Get the IDP Configuration
* from the passed configuration
* @param is
- * @return
- * @throws JAXBException
- * @throws SAXException
- * @throws IOException
- */
- @SuppressWarnings("unchecked")
- public static IDPType getIDPConfiguration(InputStream is) throws JAXBException, SAXException, IOException
+ * @return
+ * @throws ParsingException
+ */
+ public static IDPType getIDPConfiguration(InputStream is) throws ParsingException
{
if(is == null)
throw new IllegalArgumentException("inputstream is null");
- String schema = PicketLinkFederationConstants.SCHEMA_IDFED;
+ /*String schema = PicketLinkFederationConstants.SCHEMA_IDFED;
Unmarshaller un = getUnmarshaller(schema);
JAXBElement<IDPType> jaxbSp = (JAXBElement<IDPType>) un.unmarshal(is);
- return jaxbSp.getValue();
+ return jaxbSp.getValue(); */
+
+ SAMLConfigParser parser = new SAMLConfigParser();
+ return (IDPType) parser.parse(is);
}
@@ -69,60 +63,40 @@
* Get the SP Configuration from the
* passed inputstream
* @param is
- * @return
- * @throws JAXBException
- * @throws SAXException
- * @throws IOException
- */
- @SuppressWarnings("unchecked")
- public static SPType getSPConfiguration(InputStream is) throws JAXBException, SAXException, IOException
+ * @return
+ * @throws ParsingException
+ */
+ public static SPType getSPConfiguration(InputStream is) throws ParsingException
{
if(is == null)
throw new IllegalArgumentException("inputstream is null");
+ /*
String schema = PicketLinkFederationConstants.SCHEMA_IDFED;
Unmarshaller un = getUnmarshaller(schema);
JAXBElement<SPType> jaxbSp = (JAXBElement<SPType>) un.unmarshal(is);
return jaxbSp.getValue();
+ */
+ return (SPType) (new SAMLConfigParser()).parse(is);
}
/**
* Get the Handlers from the configuration
* @param is
- * @return
- * @throws JAXBException
- * @throws SAXException
- * @throws IOException
+ * @return
+ * @throws ParsingException
*/
- @SuppressWarnings("unchecked")
- public static Handlers getHandlers(InputStream is) throws JAXBException, SAXException, IOException
+ public static Handlers getHandlers(InputStream is) throws ParsingException
{
if(is == null)
- throw new IllegalArgumentException("inputstream is null");
+ throw new IllegalArgumentException("inputstream is null");/*
String[] schemas = new String[] { PicketLinkFederationConstants.SCHEMA_IDFED,
PicketLinkFederationConstants.SCHEMA_IDFED_HANDLER};
Unmarshaller un = getUnmarshaller(schemas);
JAXBElement<Handlers> handlers = (JAXBElement<Handlers>) un.unmarshal(is);
- return handlers.getValue();
+ return handlers.getValue(); */
+ return (Handlers) (new SAMLConfigParser()).parse(is);
}
-
-
- private static Unmarshaller getUnmarshaller(String... schema) throws JAXBException, SAXException, IOException
- {
- String key = PicketLinkFederationConstants.JAXB_SCHEMA_VALIDATION;
- boolean validate = Boolean.parseBoolean(SecurityActions.getSystemProperty(key, "false"));
-
- String[] pkgName = new String[] { IDPType.class.getPackage().getName(),
- Handlers.class.getPackage().getName()
- } ;
-
- Unmarshaller un = null;
- if(validate)
- un = JAXBUtil.getValidatingUnmarshaller(pkgName, schema);
- else
- un = JAXBUtil.getUnmarshaller(pkgName);
- return un;
- }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-web/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-web/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-web/src/test/resources/saml2/logout/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager=""
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager"
RoleGenerator="org.picketlink.identity.federation.core.impl.EmptyRoleGenerator">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<Trust>
Modified: federation/trunk/picketlink-web/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-web/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-web/src/test/resources/saml2/logout/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/employee/</ServiceURL>
Modified: federation/trunk/picketlink-web/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-web/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-web/src/test/resources/saml2/post/idp/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<Trust>
<Domains>localhost,jboss.com,jboss.org</Domains>
Modified: federation/trunk/picketlink-web/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml
===================================================================
--- federation/trunk/picketlink-web/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:44:25 UTC (rev 735)
+++ federation/trunk/picketlink-web/src/test/resources/saml2/post/sp/employee/WEB-INF/picketlink-idfed.xml 2011-02-04 22:45:33 UTC (rev 736)
@@ -1,5 +1,5 @@
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
- AttributeManager="">
+ AttributeManager="org.picketlink.identity.federation.core.impl.EmptyAttributeManager">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/employee/</ServiceURL>
14 years, 10 months
Picketlink SVN: r735 - in federation/trunk/picketlink-fed-core/src: main/java/org/picketlink/identity/federation/core/handler/config and 5 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-02-04 17:44:25 -0500 (Fri, 04 Feb 2011)
New Revision: 735
Added:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/config/
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/config/SAMLConfigParser.java
Removed:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ObjectFactory.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/ObjectFactory.java
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/AuthPropertyType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorsType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncAlgoType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncryptionType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/IDPType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyProviderType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyValueType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/MetadataProviderType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ProviderType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/SPType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/STSType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProviderType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProvidersType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProviderType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProvidersType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TrustType.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/package-info.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handler.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handlers.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/package-info.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/sts/STSConfigParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java
Log:
PLFED-126: stax parsing of PL config
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/AuthPropertyType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/AuthPropertyType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/AuthPropertyType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,17 +1,5 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
/**
* <p>Java class for AuthPropertyType complex type.
*
@@ -28,11 +16,7 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AuthPropertyType")
public class AuthPropertyType
extends KeyValueType
-{
-
-
-}
+{
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,22 +1,9 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
-// 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: 2009.10.30 at 03:20:31 PM GMT-03:00
-//
-
-
package org.picketlink.identity.federation.core.config;
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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
+import java.util.Collections;
+import java.util.List;
-
/**
* <p>Java class for ClaimsProcessorType complex type.
*
@@ -37,47 +24,33 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ClaimsProcessorType", propOrder = {
- "property"
-})
+ */
public class ClaimsProcessorType {
- @XmlElement(name = "Property")
- protected List<KeyValueType> property;
- @XmlAttribute(name = "ProcessorClass", required = true)
+ protected List<KeyValueType> property = new ArrayList<KeyValueType>();
protected String processorClass;
- @XmlAttribute(name = "Dialect", required = true)
protected String dialect;
+ public void add( KeyValueType kv )
+ {
+ this.property.add(kv);
+ }
+
+ public void remove( KeyValueType kv )
+ {
+ this.property.remove(kv);
+ }
+
/**
* Gets the value of the property 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 property property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getProperty().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyValueType }
*
*
*/
- public List<KeyValueType> getProperty() {
- if (property == null) {
- property = new ArrayList<KeyValueType>();
- }
- return this.property;
+ public List<KeyValueType> getProperty() {
+ return Collections.unmodifiableList( this.property );
}
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorsType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorsType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ClaimsProcessorsType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,21 +1,9 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
-// 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: 2009.10.30 at 02:46:25 PM GMT-03:00
-//
-
-
package org.picketlink.identity.federation.core.config;
import java.util.ArrayList;
+import java.util.Collections;
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;
-
/**
*
* The claims processors specify the classes that are capable of processing specific claims dialects.
@@ -38,43 +26,31 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ClaimsProcessorsType", propOrder = {
- "claimsProcessor"
-})
+ */
public class ClaimsProcessorsType {
- @XmlElement(name = "ClaimsProcessor", required = true)
- protected List<ClaimsProcessorType> claimsProcessor;
+ protected List<ClaimsProcessorType> claimsProcessor = new ArrayList<ClaimsProcessorType>();
+ public void add( ClaimsProcessorType claim )
+ {
+ this.claimsProcessor.add( claim);
+ }
+
+ public void remove( ClaimsProcessorType claim )
+ {
+ this.claimsProcessor.remove( claim);
+ }
+
/**
* Gets the value of the claimsProcessor 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 claimsProcessor property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getClaimsProcessor().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link ClaimsProcessorType }
*
*
*/
- public List<ClaimsProcessorType> getClaimsProcessor() {
- if (claimsProcessor == null) {
- claimsProcessor = new ArrayList<ClaimsProcessorType>();
- }
- return this.claimsProcessor;
+ public List<ClaimsProcessorType> getClaimsProcessor() {
+ return Collections.unmodifiableList( this.claimsProcessor );
}
-}
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncAlgoType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncAlgoType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncAlgoType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,16 +1,5 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
/**
* <p>Java class for EncAlgoType.
*
@@ -26,14 +15,11 @@
* </simpleType>
* </pre>
*
- */
-@XmlType(name = "EncAlgoType")
-@XmlEnum
+ */
public enum EncAlgoType {
AES("AES"),
- DES("DES"),
- @XmlEnumValue("DESede")
+ DES("DES"),
DE_SEDE("DESede");
private final String value;
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncryptionType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncryptionType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/EncryptionType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,17 +1,6 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-
package org.picketlink.identity.federation.core.config;
+
-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 EncryptionType complex type.
*
@@ -31,17 +20,10 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "EncryptionType", propOrder = {
- "encAlgo",
- "keySize"
-})
+ */
public class EncryptionType {
-
- @XmlElement(name = "EncAlgo", required = true)
- protected EncAlgoType encAlgo;
- @XmlElement(name = "KeySize")
+
+ protected EncAlgoType encAlgo;
protected int keySize;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/IDPType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/IDPType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/IDPType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,6 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
+
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
/**
*
* IDP Type defines the configuration for an Identity
@@ -42,24 +28,15 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "IDPType", propOrder = {
- "encryption"
-})
+ */
public class IDPType
extends ProviderType
{
- @XmlElement(name = "Encryption")
protected EncryptionType encryption;
- @XmlAttribute(name = "AssertionValidity")
protected Long assertionValidity;
- @XmlAttribute(name = "RoleGenerator")
protected String roleGenerator;
- @XmlAttribute(name = "AttributeManager")
protected String attributeManager;
- @XmlAttribute(name = "Encrypt")
protected Boolean encrypt;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyProviderType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyProviderType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyProviderType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,9 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
import java.util.ArrayList;
+import java.util.Collections;
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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
+
/**
@@ -42,80 +31,54 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "KeyProviderType", propOrder = {
- "auth",
- "validatingAlias",
- "signingAlias"
-})
+ */
public class KeyProviderType {
-
- @XmlElement(name = "Auth")
- protected List<AuthPropertyType> auth;
- @XmlElement(name = "ValidatingAlias")
- protected List<KeyValueType> validatingAlias;
- @XmlElement(name = "SigningAlias")
+
+ protected List<AuthPropertyType> auth = new ArrayList<AuthPropertyType>();
+ protected List<KeyValueType> validatingAlias = new ArrayList<KeyValueType>();
protected String signingAlias;
- @XmlAttribute(name = "ClassName")
protected String className;
+ public void add( AuthPropertyType kv)
+ {
+ this.auth.add(kv);
+ }
+ public void remove( AuthPropertyType kv)
+ {
+ this.auth.remove(kv);
+ }
+
/**
* Gets the value of the auth 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 auth property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAuth().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link AuthPropertyType }
*
*
*/
- public List<AuthPropertyType> getAuth() {
- if (auth == null) {
- auth = new ArrayList<AuthPropertyType>();
- }
- return this.auth;
+ public List<AuthPropertyType> getAuth() {
+ return Collections.unmodifiableList( this.auth );
}
+
+ public void add(KeyValueType kv)
+ {
+ this.validatingAlias.add(kv);
+ }
+ public void remove(KeyValueType kv)
+ {
+ this.validatingAlias.remove(kv);
+ }
/**
* Gets the value of the validatingAlias 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 validatingAlias property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getValidatingAlias().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyValueType }
*
*
*/
- public List<KeyValueType> getValidatingAlias() {
- if (validatingAlias == null) {
- validatingAlias = new ArrayList<KeyValueType>();
- }
- return this.validatingAlias;
+ public List<KeyValueType> getValidatingAlias() {
+ return Collections.unmodifiableList( this.validatingAlias );
}
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyValueType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyValueType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/KeyValueType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,5 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
/**
* <p>Java class for KeyValueType complex type.
*
@@ -32,17 +17,10 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "KeyValueType")
-@XmlSeeAlso({
- AuthPropertyType.class
-})
+ */
public class KeyValueType {
-
- @XmlAttribute(name = "Key")
- protected String key;
- @XmlAttribute(name = "Value")
+
+ protected String key;
protected String value;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/MetadataProviderType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/MetadataProviderType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/MetadataProviderType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,8 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
import java.util.ArrayList;
+import java.util.Collections;
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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
/**
@@ -36,45 +24,32 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "MetadataProviderType", propOrder = {
- "option"
-})
+ */
public class MetadataProviderType {
-
- @XmlElement(name = "Option")
- protected List<KeyValueType> option;
- @XmlAttribute(name = "ClassName")
+
+ protected List<KeyValueType> option = new ArrayList<KeyValueType>();
protected String className;
+ public void add( KeyValueType kv )
+ {
+ this.option.add(kv);
+ }
+ public void remove( KeyValueType kv )
+ {
+ this.option.remove(kv);
+ }
+
/**
* Gets the value of the option 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 option property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getOption().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyValueType }
*
*
*/
- public List<KeyValueType> getOption() {
- if (option == null) {
- option = new ArrayList<KeyValueType>();
- }
- return this.option;
+ public List<KeyValueType> getOption() {
+ return Collections.unmodifiableList( this.option );
}
/**
Deleted: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ObjectFactory.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ObjectFactory.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,200 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
-// 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: 2009.10.30 at 02:46:25 PM GMT-03:00
-//
-
-
-package org.picketlink.identity.federation.core.config;
-
-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 picketlink.identity_federation.config._1 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 {
-
- private final static QName _picketlinkIDP_QNAME = new QName("urn:picketlink:identity-federation:config:1.0", "PicketLinkIDP");
- private final static QName _PicketLinkSTS_QNAME = new QName("urn:picketlink:identity-federation:config:1.0", "PicketLinkSTS");
- private final static QName _picketlinkSP_QNAME = new QName("urn:picketlink:identity-federation:config:1.0", "PicketLinkSP");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: picketlink.identity_federation.config._1
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link SPType }
- *
- */
- public SPType createSPType() {
- return new SPType();
- }
-
- /**
- * Create an instance of {@link AuthPropertyType }
- *
- */
- public AuthPropertyType createAuthPropertyType() {
- return new AuthPropertyType();
- }
-
- /**
- * Create an instance of {@link ServiceProviderType }
- *
- */
- public ServiceProviderType createServiceProviderType() {
- return new ServiceProviderType();
- }
-
- /**
- * Create an instance of {@link TrustType }
- *
- */
- public TrustType createTrustType() {
- return new TrustType();
- }
-
- /**
- * Create an instance of {@link STSType }
- *
- */
- public STSType createSTSType() {
- return new STSType();
- }
-
- /**
- * Create an instance of {@link MetadataProviderType }
- *
- */
- public MetadataProviderType createMetadataProviderType() {
- return new MetadataProviderType();
- }
-
- /**
- * Create an instance of {@link TokenProvidersType }
- *
- */
- public TokenProvidersType createTokenProvidersType() {
- return new TokenProvidersType();
- }
-
- /**
- * Create an instance of {@link ClaimsProcessorType }
- *
- */
- public ClaimsProcessorType createClaimsProcessorType() {
- return new ClaimsProcessorType();
- }
-
- /**
- * Create an instance of {@link ServiceProvidersType }
- *
- */
- public ServiceProvidersType createServiceProvidersType() {
- return new ServiceProvidersType();
- }
-
- /**
- * Create an instance of {@link ClaimsProcessorsType }
- *
- */
- public ClaimsProcessorsType createClaimsProcessorsType() {
- return new ClaimsProcessorsType();
- }
-
- /**
- * Create an instance of {@link KeyProviderType }
- *
- */
- public KeyProviderType createKeyProviderType() {
- return new KeyProviderType();
- }
-
- /**
- * Create an instance of {@link TokenProviderType }
- *
- */
- public TokenProviderType createTokenProviderType() {
- return new TokenProviderType();
- }
-
- /**
- * Create an instance of {@link ProviderType }
- *
- */
- public ProviderType createProviderType() {
- return new ProviderType();
- }
-
- /**
- * Create an instance of {@link IDPType }
- *
- */
- public IDPType createIDPType() {
- return new IDPType();
- }
-
- /**
- * Create an instance of {@link EncryptionType }
- *
- */
- public EncryptionType createEncryptionType() {
- return new EncryptionType();
- }
-
- /**
- * Create an instance of {@link KeyValueType }
- *
- */
- public KeyValueType createKeyValueType() {
- return new KeyValueType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link IDPType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:picketlink:identity-federation:config:1.0", name = "PicketLinkIDP")
- public JAXBElement<IDPType> createpicketlinkIDP(IDPType value) {
- return new JAXBElement<IDPType>(_picketlinkIDP_QNAME, IDPType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link STSType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:picketlink:identity-federation:config:1.0", name = "PicketLinkSTS")
- public JAXBElement<STSType> createPicketLinkSTS(STSType value) {
- return new JAXBElement<STSType>(_PicketLinkSTS_QNAME, STSType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link SPType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:picketlink:identity-federation:config:1.0", name = "PicketLinkSP")
- public JAXBElement<SPType> createpicketlinkSP(SPType value) {
- return new JAXBElement<SPType>(_picketlinkSP_QNAME, SPType.class, null, value);
- }
-
-}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ProviderType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ProviderType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ProviderType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,5 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.crypto.dsig.CanonicalizationMethod;
@@ -51,31 +37,14 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ProviderType", propOrder = {
- "identityURL",
- "trust",
- "keyProvider",
- "metaDataProvider"
-})
-@XmlSeeAlso({
- SPType.class,
- IDPType.class
-})
+ */
public class ProviderType {
- @XmlElement(name = "IdentityURL", required = true)
protected String identityURL;
- @XmlElement(name = "Trust")
protected TrustType trust;
- @XmlElement(name = "KeyProvider")
protected KeyProviderType keyProvider;
- @XmlElement(name = "MetaDataProvider")
protected MetadataProviderType metaDataProvider;
- @XmlAttribute(name = "ServerEnvironment")
protected String serverEnvironment;
- @XmlAttribute(name = "CanonicalizationMethod")
protected String canonicalizationMethod;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/SPType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/SPType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/SPType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,6 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
/**
* Service Provider Type
*
@@ -34,16 +21,11 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SPType", propOrder = {
- "serviceURL"
-})
+ */
public class SPType
extends ProviderType
{
-
- @XmlElement(name = "ServiceURL", required = true)
+
protected String serviceURL;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/STSType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/STSType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/STSType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,21 +1,9 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
-// 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: 2009.10.30 at 02:46:25 PM GMT-03:00
-//
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.crypto.dsig.CanonicalizationMethod;
+
/**
* <p>Java class for STSType complex type.
*
@@ -44,36 +32,18 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "STSType", propOrder = {
- "keyProvider",
- "requestHandler",
- "claimsProcessors",
- "tokenProviders",
- "serviceProviders"
-})
+ */
public class STSType {
-
- @XmlElement(name = "KeyProvider")
- protected KeyProviderType keyProvider;
- @XmlElement(name = "RequestHandler")
- protected String requestHandler;
- @XmlElement(name = "ClaimsProcessors")
- protected ClaimsProcessorsType claimsProcessors;
- @XmlElement(name = "TokenProviders")
- protected TokenProvidersType tokenProviders;
- @XmlElement(name = "ServiceProviders")
- protected ServiceProvidersType serviceProviders;
- @XmlAttribute(name = "STSName")
- protected String stsName;
- @XmlAttribute(name = "TokenTimeout")
- protected Integer tokenTimeout;
- @XmlAttribute(name = "SignToken")
- protected Boolean signToken;
- @XmlAttribute(name = "EncryptToken")
- protected Boolean encryptToken;
- @XmlAttribute(name = "CanonicalizationMethod")
+
+ protected KeyProviderType keyProvider;
+ protected String requestHandler;
+ protected ClaimsProcessorsType claimsProcessors;
+ protected TokenProvidersType tokenProviders;
+ protected ServiceProvidersType serviceProviders;
+ protected String stsName;
+ protected Integer tokenTimeout;
+ protected Boolean signToken;
+ protected Boolean encryptToken;
protected String canonicalizationMethod;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProviderType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProviderType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProviderType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,6 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
/**
*
* The service provider type contains information about a specific service provider. In particular,
@@ -29,14 +16,10 @@
* <pre>
* <complexType name="ServiceProviderType">
* <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-<<<<<<< .mine
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="Endpoint" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="TruststoreAlias" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
-=======
- * <attribute name="Endpoint" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
->>>>>>> .r772
- * <attribute name="TokenType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ <attribute name="TokenType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="TruststoreAlias" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -44,16 +27,11 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ServiceProviderType")
+ */
public class ServiceProviderType {
-
- @XmlAttribute(name = "Endpoint", required = true)
- protected String endpoint;
- @XmlAttribute(name = "TokenType", required = true)
- protected String tokenType;
- @XmlAttribute(name = "TruststoreAlias")
+
+ protected String endpoint;
+ protected String tokenType;
protected String truststoreAlias;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProvidersType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProvidersType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/ServiceProvidersType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,21 +1,9 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
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;
+import java.util.Collections;
+import java.util.List;
-
/**
*
* The service providers specify the token type expected by each service provider.
@@ -38,43 +26,32 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ServiceProvidersType", propOrder = {
- "serviceProvider"
-})
+ */
public class ServiceProvidersType {
+
+ protected List<ServiceProviderType> serviceProvider = new ArrayList<ServiceProviderType>();
- @XmlElement(name = "ServiceProvider", required = true)
- protected List<ServiceProviderType> serviceProvider;
-
+ public void add( ServiceProviderType sp )
+ {
+ this.serviceProvider.add(sp);
+ }
+
+ public void remove( ServiceProviderType sp )
+ {
+ this.serviceProvider.remove(sp);
+ }
+
/**
* Gets the value of the serviceProvider 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 serviceProvider property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getServiceProvider().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link ServiceProviderType }
*
*
*/
- public List<ServiceProviderType> getServiceProvider() {
- if (serviceProvider == null) {
- serviceProvider = new ArrayList<ServiceProviderType>();
- }
- return this.serviceProvider;
+ public List<ServiceProviderType> getServiceProvider() {
+ return Collections.unmodifiableList( this.serviceProvider );
}
-}
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProviderType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProviderType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProviderType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,8 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
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.XmlElement;
-import javax.xml.bind.annotation.XmlType;
+import java.util.Collections;
+import java.util.List;
/**
@@ -39,51 +27,35 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TokenProviderType", propOrder = {
- "property"
-})
+ */
public class TokenProviderType {
-
- @XmlElement(name = "Property")
- protected List<KeyValueType> property;
- @XmlAttribute(name = "ProviderClass", required = true)
- protected String providerClass;
- @XmlAttribute(name = "TokenType", required = true)
- protected String tokenType;
- @XmlAttribute(name = "TokenElement", required = true)
- protected String tokenElement;
- @XmlAttribute(name = "TokenElementNS", required = true)
+
+ protected List<KeyValueType> property = new ArrayList<KeyValueType>();
+ protected String providerClass;
+ protected String tokenType;
+ protected String tokenElement;
protected String tokenElementNS;
+ public void add( KeyValueType kv )
+ {
+ property.add(kv);
+ }
+
+ public void remove( KeyValueType kv )
+ {
+ this.remove(kv);
+ }
+
/**
* Gets the value of the property 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 property property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getProperty().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyValueType }
*
*
*/
- public List<KeyValueType> getProperty() {
- if (property == null) {
- property = new ArrayList<KeyValueType>();
- }
- return this.property;
+ public List<KeyValueType> getProperty() {
+ return Collections.unmodifiableList( this.property );
}
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProvidersType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProvidersType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TokenProvidersType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,8 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
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;
+import java.util.Collections;
+import java.util.List;
/**
@@ -40,43 +29,31 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TokenProvidersType", propOrder = {
- "tokenProvider"
-})
+ */
public class TokenProvidersType {
+
+ protected List<TokenProviderType> tokenProvider = new ArrayList<TokenProviderType>();
- @XmlElement(name = "TokenProvider", required = true)
- protected List<TokenProviderType> tokenProvider;
-
+ public void add( TokenProviderType tp )
+ {
+ this.tokenProvider.add(tp);
+ }
+
+ public void remove( TokenProviderType tp )
+ {
+ this.tokenProvider.remove(tp);
+ }
+
/**
* Gets the value of the tokenProvider 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 tokenProvider property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getTokenProvider().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link TokenProviderType }
*
*
*/
- public List<TokenProviderType> getTokenProvider() {
- if (tokenProvider == null) {
- tokenProvider = new ArrayList<TokenProviderType>();
- }
- return this.tokenProvider;
+ public List<TokenProviderType> getTokenProvider() {
+ return Collections.unmodifiableList( this.tokenProvider );
}
}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TrustType.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TrustType.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/TrustType.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,5 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-
package org.picketlink.identity.federation.core.config;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
+
/**
* Aspects involved in trust decisions such as the domains that the IDP or the Service Provider trusts.
*
@@ -34,14 +20,9 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TrustType", propOrder = {
- "domains"
-})
+ */
public class TrustType {
-
- @XmlElement(name = "Domains", required = true)
+
protected String domains;
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/package-info.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/config/package-info.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,9 +1 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
-// 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: 2009.09.03 at 01:21:42 PM BRT
-//
-
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "urn:picketlink:identity-federation:config:1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.picketlink.identity.federation.core.config;
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handler.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handler.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handler.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,20 +1,8 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.10.06 at 01:13:30 PM CDT
-//
-
-
package org.picketlink.identity.federation.core.handler.config;
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;
-
+import java.util.Collections;
+import java.util.List;
import org.picketlink.identity.federation.core.config.KeyValueType;
@@ -38,46 +26,33 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "Handler", propOrder = {
- "Option"
-})
+ */
public class Handler {
- protected List<KeyValueType> Option;
- @XmlAttribute
+ protected List<KeyValueType> option = new ArrayList<KeyValueType>();
protected String name;
- @XmlAttribute(name = "class")
protected String clazz;
+ public void add( KeyValueType kv )
+ {
+ this.option.add(kv);
+ }
+
+ public void remove( KeyValueType kv )
+ {
+ this.option.remove(kv);
+ }
+
/**
* Gets the value of the option 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 option property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getOption().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyValueType }
*
*
*/
- public List<KeyValueType> getOption() {
- if (Option == null) {
- Option = new ArrayList<KeyValueType>();
- }
- return this.Option;
+ public List<KeyValueType> getOption() {
+ return Collections.unmodifiableList( this.option );
}
/**
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handlers.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handlers.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/Handlers.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,19 +1,8 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.10.06 at 01:13:30 PM CDT
-//
-
-
package org.picketlink.identity.federation.core.handler.config;
import java.util.ArrayList;
+import java.util.Collections;
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;
/**
@@ -34,43 +23,31 @@
* </pre>
*
*
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "Handlers", propOrder = {
- "handler"
-})
+ */
public class Handlers {
+
+ protected List<Handler> handler = new ArrayList<Handler>();
- @XmlElement(name = "Handler", required = true)
- protected List<Handler> handler;
-
+ public void add( Handler h )
+ {
+ this.handler.add( h );
+ }
+
+ public void remove( Handler h )
+ {
+ this.handler.remove( h );
+ }
+
/**
* Gets the value of the handler 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 handler property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getHandler().add(newItem);
- * </pre>
- *
- *
- * <p>
* Objects of the following type(s) are allowed in the list
* {@link Handler }
*
*
*/
- public List<Handler> getHandler() {
- if (handler == null) {
- handler = new ArrayList<Handler>();
- }
- return this.handler;
+ public List<Handler> getHandler() {
+ return Collections.unmodifiableList( this.handler );
}
-}
+}
\ No newline at end of file
Deleted: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/ObjectFactory.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/ObjectFactory.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,68 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.10.06 at 02:14:55 PM CDT
-//
-
-
-package org.picketlink.identity.federation.core.handler.config;
-
-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 picketlink.identity_federation.handler.config._1 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 {
-
- private final static QName _Handlers_QNAME = new QName("urn:picketlink:identity-federation:handler:config:1.0", "Handlers");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: picketlink.identity_federation.handler.config._1
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link Handler }
- *
- */
- public Handler createHandler() {
- return new Handler();
- }
-
- /**
- * Create an instance of {@link Handlers }
- *
- */
- public Handlers createHandlers() {
- return new Handlers();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link Handlers }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "urn:picketlink:identity-federation:handler:config:1.0", name = "Handlers")
- public JAXBElement<Handlers> createHandlers(Handlers value) {
- return new JAXBElement<Handlers>(_Handlers_QNAME, Handlers.class, null, value);
- }
-
-}
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/package-info.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/handler/config/package-info.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -1,9 +1 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// 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: 2009.10.06 at 01:13:30 PM CDT
-//
-
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "urn:picketlink:identity-federation:handler:config:1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.picketlink.identity.federation.core.handler.config;
Added: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/config/SAMLConfigParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/config/SAMLConfigParser.java (rev 0)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/config/SAMLConfigParser.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -0,0 +1,421 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.picketlink.identity.federation.core.parsers.config;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.events.Attribute;
+import javax.xml.stream.events.EndElement;
+import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
+
+import org.picketlink.identity.federation.core.config.AuthPropertyType;
+import org.picketlink.identity.federation.core.config.IDPType;
+import org.picketlink.identity.federation.core.config.KeyProviderType;
+import org.picketlink.identity.federation.core.config.KeyValueType;
+import org.picketlink.identity.federation.core.config.MetadataProviderType;
+import org.picketlink.identity.federation.core.config.SPType;
+import org.picketlink.identity.federation.core.config.TrustType;
+import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.handler.config.Handler;
+import org.picketlink.identity.federation.core.handler.config.Handlers;
+import org.picketlink.identity.federation.core.parsers.AbstractParser;
+import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+
+/**
+ * Parse the SAML IDP/SP config as well as the handlers
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Feb 4, 2011
+ */
+public class SAMLConfigParser extends AbstractParser
+{
+ public static final String IDP = "PicketLinkIDP";
+ public static final String SP = "PicketLinkSP";
+
+ public static final String IDENTITY_URL = "IdentityURL";
+ public static final String SERVICE_URL = "ServiceURL";
+
+ public static final String TRUST = "Trust";
+
+ public static final String DOMAINS = "Domains";
+
+ public static final String KEY_PROVIDER = "KeyProvider";
+ public static final String META_PROVIDER = "MetaDataProvider";
+ public static final String CLASS_NAME = "ClassName";
+ public static final String CLASS = "class";
+ public static final String AUTH = "Auth";
+ public static final String KEY = "Key";
+ public static final String VALUE = "Value";
+ public static final String VALIDATING_ALIAS = "ValidatingAlias";
+ public static final String ASSERTION_VALIDITY = "AssertionValidity";
+
+ public static final String ROLE_GENERATOR = "RoleGenerator";
+
+ public static final String ENCRYPT = "Encrypt";
+
+
+ public static final String ATTRIBUTE_MANAGER = "AttributeManager";
+ public static final String CANONICALIZATION_METHOD = "CanonicalizationMethod";
+
+ public static final String HANDLERS = "Handlers";
+ public static final String HANDLER = "Handler";
+ public static final String OPTION = "Option";
+
+
+ public Object parse(XMLEventReader xmlEventReader) throws ParsingException
+ {
+ StartElement startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
+
+ if( StaxParserUtil.getStartElementName(startElement).equals( IDP ))
+ return parseIDPConfiguration( xmlEventReader );
+ if( StaxParserUtil.getStartElementName(startElement).equals( SP ))
+ return parseSPConfiguration(xmlEventReader);
+
+ return parseHandlers(xmlEventReader);
+ }
+
+ public boolean supports(QName qname)
+ {
+ return false;
+ }
+
+ protected Handlers parseHandlers( XMLEventReader xmlEventReader ) throws ParsingException
+ {
+ Handlers handlers = new Handlers();
+
+ StartElement startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ StaxParserUtil.validate( startElement, HANDLERS );
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
+ break;
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName(endElement);
+ if (endElementName.equals( HANDLERS ))
+ break;
+ else
+ throw new RuntimeException("Unknown End Element:" + endElementName);
+ }
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ if ( startElement == null)
+ break;
+ String elementName = StaxParserUtil.getStartElementName( startElement );
+ if( elementName.equals( HANDLER ))
+ {
+ Handler handler = parseHandler(xmlEventReader, startElement);
+ handlers.add(handler);
+ }
+ }
+
+ return handlers;
+ }
+
+ protected IDPType parseIDPConfiguration( XMLEventReader xmlEventReader ) throws ParsingException
+ {
+ IDPType idp = new IDPType();
+ StartElement startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ StaxParserUtil.validate( startElement, IDP );
+
+ // parse and set the root element attributes.
+ QName attributeQName = new QName("", ASSERTION_VALIDITY);
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ idp.setAssertionValidity( Long.parseLong( StaxParserUtil.getAttributeValue( attribute )) );
+
+ attributeQName = new QName("", ROLE_GENERATOR);
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ idp.setRoleGenerator( StaxParserUtil.getAttributeValue( attribute )) ;
+
+ attributeQName = new QName("", ENCRYPT);
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ idp.setEncrypt( Boolean.parseBoolean( StaxParserUtil.getAttributeValue( attribute )) ) ;
+
+ attributeQName = new QName("", CANONICALIZATION_METHOD );
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ idp.setCanonicalizationMethod( StaxParserUtil.getAttributeValue( attribute ));
+
+ attributeQName = new QName("", ATTRIBUTE_MANAGER );
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ idp.setAttributeManager( StaxParserUtil.getAttributeValue( attribute ));
+
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
+ break;
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName(endElement);
+ if (endElementName.equals( IDP ))
+ break;
+ else
+ throw new RuntimeException("Unknown End Element:" + endElementName);
+ }
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ if ( startElement == null)
+ break;
+ String elementName = StaxParserUtil.getStartElementName( startElement );
+ if( elementName.equals( IDENTITY_URL ))
+ {
+ idp.setIdentityURL( StaxParserUtil.getElementText(xmlEventReader) );
+ }
+ else if( elementName.equals( TRUST ))
+ {
+ TrustType trustType = new TrustType();
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, DOMAINS);
+ trustType.setDomains( StaxParserUtil.getElementText(xmlEventReader) );
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, TRUST);
+ idp.setTrust(trustType);
+ }
+ else if( elementName.equals( KEY_PROVIDER) )
+ {
+ KeyProviderType keyProviderType = this.parseKeyProvider(xmlEventReader, startElement);
+ idp.setKeyProvider(keyProviderType);
+ }
+ else if( elementName.equals( META_PROVIDER) )
+ {
+ MetadataProviderType mdProviderType = parseMDProvider( xmlEventReader, startElement);
+ idp.setMetaDataProvider( mdProviderType );
+ }
+ }
+ return idp;
+ }
+
+ protected SPType parseSPConfiguration( XMLEventReader xmlEventReader ) throws ParsingException
+ {
+ SPType sp = new SPType();
+ StartElement startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ StaxParserUtil.validate( startElement, SP );
+
+
+ QName attributeQName = new QName("", CANONICALIZATION_METHOD );
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ sp.setCanonicalizationMethod( StaxParserUtil.getAttributeValue( attribute ));
+
+
+ while (xmlEventReader.hasNext())
+ {
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
+ break;
+ if (xmlEvent instanceof EndElement)
+ {
+ EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName(endElement);
+ if (endElementName.equals( SP ))
+ break;
+ else
+ throw new RuntimeException("Unknown End Element:" + endElementName);
+ }
+
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ if ( startElement == null)
+ break;
+ String elementName = StaxParserUtil.getStartElementName( startElement );
+ if( elementName.equals( IDENTITY_URL ))
+ {
+ sp.setIdentityURL( StaxParserUtil.getElementText(xmlEventReader) );
+ }
+ else if( elementName.equals( SERVICE_URL ))
+ {
+ sp.setServiceURL( StaxParserUtil.getElementText(xmlEventReader) );
+ }
+ else if( elementName.equals( TRUST ))
+ {
+ TrustType trustType = new TrustType();
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(startElement, DOMAINS);
+ trustType.setDomains( StaxParserUtil.getElementText(xmlEventReader) );
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, TRUST);
+ sp.setTrust(trustType);
+ }
+ else if( elementName.equals( KEY_PROVIDER) )
+ {
+ KeyProviderType keyProviderType = parseKeyProvider(xmlEventReader, startElement);
+ sp.setKeyProvider(keyProviderType);
+ }
+ else if( elementName.equals( META_PROVIDER) )
+ {
+ MetadataProviderType mdProviderType = parseMDProvider( xmlEventReader, startElement);
+ sp.setMetaDataProvider( mdProviderType );
+ }
+ }
+ return sp;
+ }
+
+ protected KeyProviderType parseKeyProvider(XMLEventReader xmlEventReader, StartElement startElement ) throws ParsingException
+ {
+ XMLEvent xmlEvent = null;
+ KeyProviderType keyProviderType = new KeyProviderType();
+
+ // parse and set the ClassName element attributes.
+ QName attributeQName = new QName("", CLASS_NAME );
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ keyProviderType.setClassName( StaxParserUtil.getAttributeValue( attribute ) );
+
+ while( xmlEventReader.hasNext() )
+ {
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if( xmlEvent == null )
+ break;
+ if( xmlEvent instanceof EndElement )
+ {
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName( endElement );
+ if( endElementName.equals( KEY_PROVIDER ))
+ break;
+ else
+ continue;
+ }
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String startElementName = StaxParserUtil.getStartElementName(startElement);
+ if( startElementName.equals( AUTH ))
+ {
+ AuthPropertyType auth = new AuthPropertyType();
+ populateKeyValueType(auth, startElement);
+
+ keyProviderType.add(auth);
+ }
+ else if( startElementName.equals( VALIDATING_ALIAS ))
+ {
+ KeyValueType auth = new KeyValueType();
+ populateKeyValueType(auth, startElement);
+
+ keyProviderType.add(auth);
+ }
+ }
+ return keyProviderType;
+ }
+
+ protected Handler parseHandler(XMLEventReader xmlEventReader, StartElement startElement ) throws ParsingException
+ {
+ XMLEvent xmlEvent = null;
+ Handler handlerType = new Handler();
+
+ // parse and set the ClassName element attributes.
+ QName attributeQName = new QName("", CLASS );
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ handlerType.setClazz( StaxParserUtil.getAttributeValue( attribute ) );
+
+ while( xmlEventReader.hasNext() )
+ {
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if( xmlEvent == null )
+ break;
+ if( xmlEvent instanceof EndElement )
+ {
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName( endElement );
+ if( endElementName.equals( HANDLER ))
+ break;
+ else
+ continue;
+ }
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String startElementName = StaxParserUtil.getStartElementName(startElement);
+
+ if( startElementName.equals( OPTION ))
+ {
+ KeyValueType auth = new KeyValueType();
+ populateKeyValueType(auth, startElement);
+
+ handlerType.add(auth);
+ }
+ }
+ return handlerType;
+ }
+
+ protected MetadataProviderType parseMDProvider(XMLEventReader xmlEventReader, StartElement startElement ) throws ParsingException
+ {
+ XMLEvent xmlEvent = null;
+ MetadataProviderType metaProviderType = new MetadataProviderType();
+
+ // parse and set the ClassName element attributes.
+ QName attributeQName = new QName("", CLASS_NAME );
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ metaProviderType.setClassName( StaxParserUtil.getAttributeValue( attribute ) );
+
+ while( xmlEventReader.hasNext() )
+ {
+ xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if( xmlEvent == null )
+ break;
+ if( xmlEvent instanceof EndElement )
+ {
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ String endElementName = StaxParserUtil.getEndElementName( endElement );
+ if( endElementName.equals( META_PROVIDER ))
+ break;
+ else
+ continue;
+ }
+ startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
+ String startElementName = StaxParserUtil.getStartElementName(startElement);
+ if( startElementName.equals( OPTION ))
+ {
+ KeyValueType auth = new KeyValueType();
+ populateKeyValueType(auth, startElement);
+
+ metaProviderType.add(auth);
+ }
+ }
+ return metaProviderType;
+ }
+
+ protected void populateKeyValueType( KeyValueType kvt, StartElement startElement )
+ {
+ QName attributeQName = new QName("", KEY );
+ Attribute attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ kvt.setKey( StaxParserUtil.getAttributeValue( attribute ) );
+
+ attributeQName = new QName("", OPTION );
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ kvt.setKey( StaxParserUtil.getAttributeValue( attribute ) );
+
+
+ attributeQName = new QName("", VALUE );
+ attribute = startElement.getAttributeByName(attributeQName);
+ if (attribute != null)
+ kvt.setValue( StaxParserUtil.getAttributeValue( attribute ) );
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/sts/STSConfigParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/sts/STSConfigParser.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/sts/STSConfigParser.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -88,7 +88,6 @@
*
* @see org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport#parse(javax.xml.stream.XMLEventReader)
*/
- @Override
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
{
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
@@ -174,8 +173,7 @@
* (non-Javadoc)
*
* @see org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport#supports(javax.xml.namespace.QName)
- */
- @Override
+ */
public boolean supports(QName qname)
{
return CONFIG_NS.equals(qname.getNamespaceURI());
@@ -248,7 +246,7 @@
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(endElement, VALIDATING_ALIAS_ELEMENT);
- keyProvider.getValidatingAlias().add(keyValue);
+ keyProvider.add( keyValue );
}
else if (AUTH_ELEMENT.equalsIgnoreCase(elementName))
{
@@ -266,7 +264,7 @@
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(endElement, AUTH_ELEMENT);
- keyProvider.getAuth().add(authProperty);
+ keyProvider.add(authProperty);
}
else
throw new ParsingException("Unknown Element: " + elementName);
@@ -364,12 +362,12 @@
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(endElement, PROPERTY_ELEMENT);
- claimsProcessor.getProperty().add(keyValue);
+ claimsProcessor.add(keyValue);
}
else
throw new ParsingException("Unknown Element: " + elementName);
}
- claimsProcessors.getClaimsProcessor().add(claimsProcessor);
+ claimsProcessors.add( claimsProcessor );
}
else
throw new ParsingException("Unknown Element: " + elementName);
@@ -475,12 +473,12 @@
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(endElement, PROPERTY_ELEMENT);
- tokenProvider.getProperty().add(keyValue);
+ tokenProvider.add(keyValue);
}
else
throw new ParsingException("Unknown Element: " + elementName);
}
- tokenProviders.getTokenProvider().add(tokenProvider);
+ tokenProviders.add( tokenProvider );
}
else
throw new ParsingException("Unknown Element: " + elementName);
@@ -547,7 +545,7 @@
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(endElement, SERVICE_PROVIDER_ELEMENT);
- serviceProviders.getServiceProvider().add(serviceProvider);
+ serviceProviders.add(serviceProvider);
}
else
throw new ParsingException("Unknown Element: " + elementName);
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -289,11 +289,13 @@
*/
public static void persistSTSConfiguration(STSType stsConfiguration, OutputStream outputStream) throws JAXBException
{
- String pkgName = "org.picketlink.identity.federation.core.config";
+ throw new RuntimeException();
+
+ /*String pkgName = "org.picketlink.identity.federation.core.config";
Marshaller marshaller = JAXBUtil.getMarshaller(pkgName);
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
org.picketlink.identity.federation.core.config.ObjectFactory objectFactory = new org.picketlink.identity.federation.core.config.ObjectFactory();
- marshaller.marshal(objectFactory.createPicketLinkSTS(stsConfiguration), outputStream);
+ marshaller.marshal(objectFactory.createPicketLinkSTS(stsConfiguration), outputStream);*/
}
/**
Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java 2011-02-04 21:28:40 UTC (rev 734)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java 2011-02-04 22:44:25 UTC (rev 735)
@@ -21,15 +21,16 @@
*/
package org.picketlink.test.identity.federation.core.config;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import java.io.InputStream;
import java.util.List;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
import javax.xml.crypto.dsig.CanonicalizationMethod;
-import junit.framework.TestCase;
-
+import org.junit.Test;
import org.picketlink.identity.federation.core.config.AuthPropertyType;
import org.picketlink.identity.federation.core.config.IDPType;
import org.picketlink.identity.federation.core.config.KeyProviderType;
@@ -43,7 +44,8 @@
import org.picketlink.identity.federation.core.config.TrustType;
import org.picketlink.identity.federation.core.handler.config.Handler;
import org.picketlink.identity.federation.core.handler.config.Handlers;
-import org.picketlink.identity.federation.core.util.JAXBUtil;
+import org.picketlink.identity.federation.core.parsers.config.SAMLConfigParser;
+import org.picketlink.identity.federation.core.parsers.sts.STSConfigParser;
/**
* Unit Test the various config
@@ -51,18 +53,19 @@
* @author Anil.Saldhana(a)redhat.com
* @since Jan 21, 2009
*/
-public class ConfigUnitTestCase extends TestCase
+public class ConfigUnitTestCase
{
String config = "config/test-config-";
- @SuppressWarnings("unchecked")
+ @Test
public void test01() throws Exception
{
Object object = this.unmarshall(config + "1.xml");
assertNotNull("IDP is not null", object);
- assertTrue(object instanceof JAXBElement);
+ /*assertTrue(object instanceof JAXBElement);
- IDPType idp = ((JAXBElement<IDPType>) object).getValue();
+ IDPType idp = ((JAXBElement<IDPType>) object).getValue();*/
+ IDPType idp = (IDPType) object;
assertEquals("300000", 300000L, idp.getAssertionValidity());
assertEquals("org.picketlink.identity.federation.bindings.tomcat.TomcatRoleGenerator", idp.getRoleGenerator());
@@ -73,14 +76,13 @@
assertTrue("jboss.com trusted", domains.indexOf("jboss.com") > -1);
}
- @SuppressWarnings("unchecked")
+ @Test
public void test02() throws Exception
{
Object object = this.unmarshall(config + "2.xml");
- assertNotNull("IDP is not null", object);
- assertTrue(object instanceof JAXBElement);
+ assertNotNull("IDP is not null", object);
- IDPType idp = ((JAXBElement<IDPType>) object).getValue();
+ IDPType idp = (IDPType) object;
assertEquals("20000", 20000L, idp.getAssertionValidity());
assertEquals("somefqn", idp.getRoleGenerator());
assertTrue(idp.isEncrypt());
@@ -115,14 +117,13 @@
assertTrue("jboss.com trusted", domains.indexOf("jboss.com") > -1);
}
- @SuppressWarnings("unchecked")
+ @Test
public void test03() throws Exception
{
Object object = this.unmarshall(config + "3.xml");
- assertNotNull("SP is null", object);
- assertTrue(object instanceof JAXBElement);
+ assertNotNull("SP is null", object);
- SPType sp = ((JAXBElement<SPType>) object).getValue();
+ SPType sp = (SPType) object;
assertEquals("http://localhost:8080/idp", sp.getIdentityURL());
assertEquals("http://localhost:8080/sales", sp.getServiceURL());
assertEquals( CanonicalizationMethod.EXCLUSIVE , sp.getCanonicalizationMethod() );
@@ -135,14 +136,19 @@
*
* @throws Exception if an error occurs while running the test.
*/
- @SuppressWarnings("unchecked")
+ @Test
public void test04() throws Exception
{
- Object object = this.unmarshall(this.config + "4.xml");
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream is = tcl.getResourceAsStream( this.config + "4.xml" );
+ assertNotNull("Inputstream not null for config file:" + this.config + "4.xml", is);
+
+ STSConfigParser parser = new STSConfigParser();
+
+ Object object = parser.parse(is);
assertNotNull("Found a null STS configuration", object);
- assertTrue("Unexpected configuration type", object instanceof JAXBElement);
- STSType stsType = ((JAXBElement<STSType>) object).getValue();
+ STSType stsType = (STSType) object;
// general STS configurations.
assertEquals("Unexpected STS name", "Test STS", stsType.getSTSName());
assertEquals("Unexpected token timeout value", 7200, stsType.getTokenTimeout());
@@ -175,13 +181,10 @@
assertEquals("Unexpected token type", "specialToken", serviceProvider.getTokenType());
}
- @SuppressWarnings("unchecked")
+ @Test
public void test05() throws Exception
- {
- JAXBElement<Handlers> handlersJaxb = (JAXBElement<Handlers>) this.unmarshall(config + "5.xml");
- assertNotNull("Handlers not null", handlersJaxb);
-
- Handlers handlers = handlersJaxb.getValue();
+ {
+ Handlers handlers = (Handlers) this.unmarshall(config + "5.xml");
List<Handler> handlerList = handlers.getHandler();
assertEquals("1 handler",1, handlerList.size());
@@ -199,17 +202,21 @@
private Object unmarshall(String configFile) throws Exception
{
- String[] schemas = new String[] { "schema/config/picketlink-fed.xsd",
- "schema/config/picketlink-fed-handler.xsd"};
+
+ /*String[] schemas = new String[] { "schema/config/picketlink-fed.xsd",
+ "schema/config/picketlink-fed-handler.xsd"};*/
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
InputStream is = tcl.getResourceAsStream(configFile);
assertNotNull("Inputstream not null for config file:" + configFile, is);
+
+ SAMLConfigParser parser = new SAMLConfigParser();
+ return parser.parse( is );
- String[] pkgNames = new String[] {"org.picketlink.identity.federation.core.config",
+ /* String[] pkgNames = new String[] {"org.picketlink.identity.federation.core.config",
"org.picketlink.identity.federation.core.handler.config"};
Unmarshaller un = JAXBUtil.getValidatingUnmarshaller(pkgNames,
schemas);
- return un.unmarshal(is);
+ return un.unmarshal(is);*/
}
}
\ No newline at end of file
14 years, 10 months
Picketlink SVN: r734 - in idm/trunk: assembly and 21 other directories.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-02-04 16:28:40 -0500 (Fri, 04 Feb 2011)
New Revision: 734
Added:
idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java
Modified:
idm/trunk/assembly/pom.xml
idm/trunk/example/auth-simple/pom.xml
idm/trunk/example/auth/pom.xml
idm/trunk/example/simple/pom.xml
idm/trunk/integration/deployer/pom.xml
idm/trunk/integration/jboss5/pom.xml
idm/trunk/integration/pom.xml
idm/trunk/parent/pom.xml
idm/trunk/picketlink-idm-api/pom.xml
idm/trunk/picketlink-idm-auth/pom.xml
idm/trunk/picketlink-idm-cache/pom.xml
idm/trunk/picketlink-idm-common/pom.xml
idm/trunk/picketlink-idm-core/pom.xml
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/AbstractIdentityStoreRepository.java
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml
idm/trunk/picketlink-idm-docs/pom.xml
idm/trunk/picketlink-idm-hibernate/pom.xml
idm/trunk/picketlink-idm-ldap/pom.xml
idm/trunk/picketlink-idm-spi/pom.xml
idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/repository/IdentityStoreRepository.java
idm/trunk/picketlink-idm-testsuite/pom.xml
idm/trunk/pom.xml
Log:
- switch version to 1.3.0.Alpha01-SNAPSHOT
- push some local work on multi LDAP support for users
Modified: idm/trunk/assembly/pom.xml
===================================================================
--- idm/trunk/assembly/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/assembly/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
Modified: idm/trunk/example/auth/pom.xml
===================================================================
--- idm/trunk/example/auth/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/example/auth/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.example</groupId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<artifactId>example-auth</artifactId>
<packaging>jar</packaging>
<name>Example - JEE authentication</name>
Modified: idm/trunk/example/auth-simple/pom.xml
===================================================================
--- idm/trunk/example/auth-simple/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/example/auth-simple/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.example</groupId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<artifactId>example-auth-simple</artifactId>
<packaging>jar</packaging>
<name>Example - JEE authentication (using deployer)</name>
Modified: idm/trunk/example/simple/pom.xml
===================================================================
--- idm/trunk/example/simple/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/example/simple/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.example</groupId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<artifactId>example-simple</artifactId>
<packaging>jar</packaging>
<name>Example - Simple PicketLink IDM Maven2 project</name>
Modified: idm/trunk/integration/deployer/pom.xml
===================================================================
--- idm/trunk/integration/deployer/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/integration/deployer/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
</parent>
<properties>
Modified: idm/trunk/integration/jboss5/pom.xml
===================================================================
--- idm/trunk/integration/jboss5/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/integration/jboss5/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
</parent>
<dependencies>
Modified: idm/trunk/integration/pom.xml
===================================================================
--- idm/trunk/integration/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/integration/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -6,14 +6,14 @@
<description>PicketLink IDM Integration</description>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- Parent -->
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: idm/trunk/parent/pom.xml
===================================================================
--- idm/trunk/parent/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/parent/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -8,7 +8,7 @@
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
<packaging>pom</packaging>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<name>PicketLink IDM- Parent</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
<description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
Modified: idm/trunk/picketlink-idm-api/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-api/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-api/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-api</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM API</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-auth/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-auth/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-auth/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-auth</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Auth</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-cache/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-cache/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-cache/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-cache</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Cache</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-common/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-common/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-common/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-common</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Common</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-core/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-core/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-core/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-core</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Implementation</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/AbstractIdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/AbstractIdentityStoreRepository.java 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/AbstractIdentityStoreRepository.java 2011-02-04 21:28:40 UTC (rev 734)
@@ -36,6 +36,7 @@
import org.picketlink.idm.impl.helper.SecurityActions;
import org.picketlink.idm.impl.cache.JBossCacheIdentityStoreWrapper;
+import java.util.LinkedList;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
@@ -56,10 +57,14 @@
private static Logger log = Logger.getLogger(AbstractIdentityStoreRepository.class.getName());
- protected Map<String, IdentityStore> identityStoreMappings = new HashMap<String, IdentityStore>();
+ protected Map<String, List<IdentityStore>> identityStoreMappings = new HashMap<String, List<IdentityStore>>();
- protected Map<String, AttributeStore> attributeStoreMappings = new HashMap<String, AttributeStore>();
+ protected Map<String, List<AttributeStore>> attributeStoreMappings = new HashMap<String, List<AttributeStore>>();
+ protected Set<IdentityStore> configuredIdentityStores = new HashSet<IdentityStore>();
+
+ protected Set<AttributeStore> configuredAttributeStores = new HashSet<AttributeStore>();
+
protected IdentityStore defaultIdentityStore;
protected AttributeStore defaultAttributeStore;
@@ -95,6 +100,7 @@
if (asId != null && bootstrappedAttributeStores.keySet().contains(asId))
{
defaultAttributeStore = bootstrappedAttributeStores.get(asId);
+ configuredAttributeStores.add(defaultAttributeStore);
//TODO: cache wrap support
}
@@ -109,6 +115,7 @@
if (isId != null && bootstrappedIdentityStores.keySet().contains(isId))
{
defaultIdentityStore = bootstrappedIdentityStores.get(isId);
+ configuredIdentityStores.add(defaultIdentityStore);
String cacheOption = configurationMD.getOptionSingleValue(CACHE_OPTION);
@@ -282,8 +289,24 @@
for (String mapping : identityObjectTypeMappings)
{
- identityStoreMappings.put(mapping, store);
- attributeStoreMappings.put(mapping, store);
+ List<IdentityStore> mappedIS = identityStoreMappings.get(mapping);
+ if (mappedIS == null)
+ {
+ mappedIS = new LinkedList<IdentityStore>();
+ identityStoreMappings.put(mapping, mappedIS);
+ }
+ mappedIS.add(store);
+ configuredIdentityStores.add(store);
+
+ List<AttributeStore> mappedAS = attributeStoreMappings.get(mapping);
+ if (mappedAS == null)
+ {
+ mappedAS = new LinkedList<AttributeStore>();
+ attributeStoreMappings.put(mapping, mappedAS);
+ }
+ mappedAS.add(store);
+ configuredAttributeStores.add(store);
+
}
}
@@ -292,27 +315,73 @@
public Set<IdentityStore> getConfiguredIdentityStores()
{
- return new HashSet<IdentityStore>(identityStoreMappings.values());
+ return new HashSet<IdentityStore>(configuredIdentityStores);
}
public Set<AttributeStore> getConfiguredAttributeStores()
{
- return new HashSet<AttributeStore>(attributeStoreMappings.values());
+ return new HashSet<AttributeStore>(configuredIdentityStores);
}
public Map<String, IdentityStore> getIdentityStoreMappings()
{
- return identityStoreMappings;
+ Map<String, IdentityStore> firstInTheList = new HashMap<String, IdentityStore>();
+
+ for (Map.Entry<String, List<IdentityStore>> entry : identityStoreMappings.entrySet())
+ {
+ if(entry.getValue().size() > 0)
+ {
+ firstInTheList.put(entry.getKey(), entry.getValue().get(0));
+ }
+ }
+
+ return firstInTheList;
}
public Map<String, AttributeStore> getAttributeStoreMappings()
{
- return attributeStoreMappings;
+ Map<String, AttributeStore> firstInTheList = new HashMap<String, AttributeStore>();
+
+ for (Map.Entry<String, List<AttributeStore>> entry : attributeStoreMappings.entrySet())
+ {
+ if(entry.getValue().size() > 0)
+ {
+ firstInTheList.put(entry.getKey(), entry.getValue().get(0));
+ }
+ }
+
+ return firstInTheList;
}
+ public List<IdentityStore> getIdentityStores(IdentityObjectType identityObjectType) throws IdentityException
+ {
+ if (identityStoreMappings.keySet().contains(identityObjectType.getName()))
+ {
+ return identityStoreMappings.get(identityObjectType.getName());
+ }
+ else
+ {
+ return new LinkedList<IdentityStore>();
+ }
+
+ }
+
+ public List<AttributeStore> getAttributeStores(IdentityObjectType identityObjectType) throws IdentityException
+ {
+ if (attributeStoreMappings.keySet().contains(identityObjectType.getName()))
+ {
+ return attributeStoreMappings.get(identityObjectType.getName());
+ }
+ else
+ {
+ return new LinkedList<AttributeStore>();
+ }
+
+ }
+
public IdentityStore getIdentityStore(IdentityObjectType identityObjectType) throws IdentityException
{
- IdentityStore store = identityStoreMappings.get(identityObjectType.getName());
+ IdentityStore store = getIdentityStoreMappings().get(identityObjectType.getName());
if (store == null)
{
@@ -333,7 +402,7 @@
public AttributeStore getAttributeStore(IdentityObjectType identityObjectType) throws IdentityException
{
- AttributeStore store = attributeStoreMappings.get(identityObjectType.getName());
+ AttributeStore store = getAttributeStoreMappings().get(identityObjectType.getName());
if (store == null)
{
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-02-04 21:28:40 UTC (rev 734)
@@ -274,12 +274,12 @@
{
Map<String, IdentityStoreSession> sessions = new HashMap<String, IdentityStoreSession>();
- for (IdentityStore identityStore : identityStoreMappings.values())
+ for (IdentityStore identityStore : configuredIdentityStores)
{
sessions.put(identityStore.getId(), identityStore.createIdentityStoreSession());
}
- for (AttributeStore attributeStore : attributeStoreMappings.values())
+ for (AttributeStore attributeStore : configuredIdentityStores)
{
if (!sessions.containsKey(attributeStore.getId()))
{
@@ -305,12 +305,12 @@
{
Map<String, IdentityStoreSession> sessions = new HashMap<String, IdentityStoreSession>();
- for (IdentityStore identityStore : identityStoreMappings.values())
+ for (IdentityStore identityStore : configuredIdentityStores)
{
sessions.put(identityStore.getId(), identityStore.createIdentityStoreSession(sessionOptions));
}
- for (AttributeStore attributeStore : attributeStoreMappings.values())
+ for (AttributeStore attributeStore : configuredIdentityStores)
{
if (!sessions.containsKey(attributeStore.getId()))
{
@@ -377,6 +377,40 @@
return ids;
}
+ List<IdentityStore> resolveIdentityStores(IdentityObjectType iot)
+ {
+
+ List<IdentityStore> ids = null;
+ try
+ {
+ ids = getIdentityStores(iot);
+ }
+ catch (IdentityException e)
+ {
+ if (isAllowNotDefinedAttributes())
+ {
+ ids = new LinkedList<IdentityStore>();
+ ids.add(defaultIdentityStore);
+ return ids;
+ }
+
+ if (log.isLoggable(Level.FINER))
+ {
+ log.log(Level.FINER, "Exception occurred: ", e);
+ }
+
+ throw new IllegalStateException("Used IdentityObjectType not mapped. Consider using " + ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION +
+ " repository option switch: " + iot );
+ }
+
+ if (ids == null || ids.size() == 0)
+ {
+ ids = new LinkedList<IdentityStore>();
+ ids.add(defaultIdentityStore);
+ }
+ return ids;
+ }
+
AttributeStore resolveAttributeStore(IdentityObjectType iot)
{
AttributeStore ads = null;
@@ -505,31 +539,36 @@
public void removeIdentityObject(IdentityStoreInvocationContext invocationCtx, IdentityObject identity) throws IdentityException
{
- IdentityStore targetStore = resolveIdentityStore(identity);
- IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
+ List<IdentityStore> targetStores = resolveIdentityStores(identity.getIdentityType());
IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultIdentityStore, invocationCtx);
- if (isIdentityStoreReadOnly(targetStore))
+ for (IdentityStore targetStore : targetStores)
{
- targetStore = defaultIdentityStore;
- targetCtx = resolveInvocationContext(defaultIdentityStore, invocationCtx);
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
- }
+ if (isIdentityStoreReadOnly(targetStore))
+ {
+ targetStore = defaultIdentityStore;
+ targetCtx = resolveInvocationContext(defaultIdentityStore, invocationCtx);
- try
- {
- targetStore.removeIdentityObject(targetCtx, identity);
- }
- catch (IdentityException e)
- {
- if (log.isLoggable(Level.INFO))
+ }
+
+ try
{
- log.log(Level.INFO, "Failed to remove IdentityObject from target store: ", e);
+ targetStore.removeIdentityObject(targetCtx, identity);
}
+ catch (IdentityException e)
+ {
+ if (log.isLoggable(Level.INFO))
+ {
+ log.log(Level.INFO, "Failed to remove IdentityObject from target store: ", e);
+ }
+ }
}
+
// Sync remove in default store
- if (targetStore != defaultIdentityStore && hasIdentityObject(defaultCtx, defaultIdentityStore, identity))
+ if (!targetStores.contains(defaultIdentityStore) && hasIdentityObject(defaultCtx, defaultIdentityStore, identity))
{
try
@@ -548,61 +587,67 @@
public int getIdentityObjectsCount(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityType) throws IdentityException
{
- IdentityStore targetStore = resolveIdentityStore(identityType);
- IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
+ List<IdentityStore> targetStores = resolveIdentityStores(identityType);
//TODO: Result may be inaccurate - at least try to check if both stores don't match and return bigger count;
int result = 0;
- try
+ for (IdentityStore targetStore : targetStores)
{
- result = targetStore.getIdentityObjectsCount(targetCtx, identityType);
- }
- catch (IdentityException e)
- {
- if (log.isLoggable(Level.FINER))
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
+ try
{
- log.log(Level.INFO, "Failed to obtain IdentityObject count: ", e);
+ result += targetStore.getIdentityObjectsCount(targetCtx, identityType);
}
+ catch (IdentityException e)
+ {
+ if (log.isLoggable(Level.FINER))
+ {
+ log.log(Level.INFO, "Failed to obtain IdentityObject count: ", e);
+ }
+ }
}
+
return result;
}
public IdentityObject findIdentityObject(IdentityStoreInvocationContext invocationContext, String name, IdentityObjectType identityObjectType) throws IdentityException
{
- IdentityStore targetStore = resolveIdentityStore(identityObjectType);
- IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationContext);
+ List<IdentityStore> targetStores = resolveIdentityStores(identityObjectType);
IdentityObject io = null;
- try
+ for (IdentityStore targetStore : targetStores)
{
- io = targetStore.findIdentityObject(targetCtx, name, identityObjectType);
- }
- catch (IdentityException e)
- {
- if (log.isLoggable(Level.INFO))
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationContext);
+
+ try
{
- log.log(Level.INFO, "Failed to create IdentityObject: ", e);
+ io = targetStore.findIdentityObject(targetCtx, name, identityObjectType);
}
- }
+ catch (IdentityException e)
+ {
+ if (log.isLoggable(Level.INFO))
+ {
+ log.log(Level.INFO, "Failed to create IdentityObject: ", e);
+ }
+ }
- if (io != null)
- {
- return io;
+ if (io != null)
+ {
+ return io;
+ }
+
}
- else
- {
- targetStore = defaultIdentityStore;
- targetCtx = resolveInvocationContext(defaultIdentityStore, invocationContext);
- }
+
try
{
- io = targetStore.findIdentityObject(targetCtx, name, identityObjectType);
+ io = defaultIdentityStore.
+ findIdentityObject(resolveInvocationContext(defaultIdentityStore, invocationContext), name, identityObjectType);
}
catch (IdentityException e)
{
@@ -633,21 +678,25 @@
return defaultIdentityStore.findIdentityObject(invocationContext, id);
}
- public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityType, IdentityObjectSearchCriteria criteria) throws IdentityException
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityType,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
- IdentityStore targetStore = resolveIdentityStore(identityType);
- IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
+ List<IdentityStore> targetStores = resolveIdentityStores(identityType);
Collection<IdentityObject> results = new LinkedList<IdentityObject>();
Collection<IdentityObject> defaultIOs = new LinkedList<IdentityObject>();
- if (targetStore == defaultIdentityStore)
+
+
+ if (targetStores.size() == 1 && targetStores.contains(defaultIdentityStore))
{
Collection<IdentityObject> resx = new LinkedList<IdentityObject>();
try
{
- resx = targetStore.findIdentityObject(targetCtx, identityType, criteria);
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(defaultIdentityStore, invocationCtx);
+ resx = defaultIdentityStore.findIdentityObject(targetCtx, identityType, criteria);
}
catch (IdentityException e)
{
@@ -661,25 +710,28 @@
}
else
{
+
+
IdentitySearchCriteriaImpl c = null;
if (criteria != null)
{
c = new IdentitySearchCriteriaImpl(criteria);
c.setPaged(false);
}
-
// Get results from default store with not paged criteria
defaultIOs = defaultIdentityStore.
findIdentityObject(resolveInvocationContext(defaultIdentityStore, invocationCtx), identityType, c);
// if default store results are not present then apply criteria. Otherwise apply criteria without page
// as result need to be merged
- if (defaultIOs.size() == 0)
+ if (defaultIOs.size() == 0 && targetStores.size() == 1)
{
Collection<IdentityObject> resx = new LinkedList<IdentityObject>();
try
{
+ IdentityStore targetStore = targetStores.get(0);
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
resx = targetStore.findIdentityObject(targetCtx, identityType, criteria);
}
catch (IdentityException e)
@@ -695,17 +747,22 @@
else
{
- try
+ for (IdentityStore targetStore : targetStores)
{
- results = targetStore.findIdentityObject(targetCtx, identityType, c);
- }
- catch (IdentityException e)
- {
- if (log.isLoggable(Level.FINER))
+ try
{
- log.log(Level.FINER, "Exception occurred: ", e);
+ IdentityStoreInvocationContext targetCtx = resolveInvocationContext(targetStore, invocationCtx);
+ results.addAll(targetStore.findIdentityObject(targetCtx, identityType, c));
}
+ catch (IdentityException e)
+ {
+ if (log.isLoggable(Level.FINER))
+ {
+ log.log(Level.FINER, "Exception occurred: ", e);
+ }
+ }
}
+
}
}
@@ -757,14 +814,14 @@
try
{
- IdentityStore mappedStore = resolveIdentityStore(identity);
+ List<IdentityStore> mappedStores = resolveIdentityStores(identity.getIdentityType());
IdentityStoreInvocationContext mappedCtx = resolveInvocationContext(mappedStore, invocationCxt);
IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultIdentityStore, invocationCxt);
- if (mappedStore == defaultIdentityStore)
+ if (mappedStores.size() == 1 && mappedStores.contains(defaultIdentityStore));
{
return defaultIdentityStore.findIdentityObject(defaultCtx, identity, relationshipType, parent, criteria);
}
Modified: idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,14 +2,14 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Reference-Guide-${translation}</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>User Guide (${translation})</name>
Modified: idm/trunk/picketlink-idm-docs/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-docs/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-docs/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.docs</groupId>
<artifactId>picketlink-idm-docs</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>pom</packaging>
<name>PicketLink IDM Docs</name>
<url>http://www.jboss.com/products/jbossidentity</url>
Modified: idm/trunk/picketlink-idm-hibernate/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-hibernate/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-hibernate</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Hibernate</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-ldap/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-ldap/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-ldap/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-ldap</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM LDAP</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-spi/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-spi/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-spi/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-spi</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM SPI</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/repository/IdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/repository/IdentityStoreRepository.java 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/repository/IdentityStoreRepository.java 2011-02-04 21:28:40 UTC (rev 734)
@@ -21,6 +21,7 @@
*/
package org.picketlink.idm.spi.repository;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -74,17 +75,30 @@
*/
IdentityStore getIdentityStore(IdentityObjectType identityObjectType) throws IdentityException;
+ /**
+ * @param identityObjectType
+ * @return proper identity store collection configured to store given identity type
+ */
+ List<IdentityStore> getIdentityStores(IdentityObjectType identityObjectType) throws IdentityException;
+
+
/**
* @param identityObjectType
- * @return proper identity store to store given identity type
+ * @return proper attribute store to store given identity type
*/
AttributeStore getAttributeStore(IdentityObjectType identityObjectType) throws IdentityException;
+ /**
+ * @param identityObjectType
+ * @return proper attribute store to store given identity type
+ */
+ List<AttributeStore> getAttributeStores(IdentityObjectType identityObjectType) throws IdentityException;
+
/**
* Return a list of relationship policies
* @return
*/
//List<RelationshipPolicy<IdentityObjectType, IdentityObjectType>> getRelationshipPolicies(IdentityObjectType identityObjectType);
-}
\ No newline at end of file
+}
Modified: idm/trunk/picketlink-idm-testsuite/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/picketlink-idm-testsuite/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-testsuite</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PicketLink IDM Testsuite</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Added: idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java
===================================================================
--- idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java (rev 0)
+++ idm/trunk/picketlink-idm-testsuite/src/test/java/org/picketlink/idm/impl/store/ldap/ManyLDAPStoresTestCase.java 2011-02-04 21:28:40 UTC (rev 734)
@@ -0,0 +1,38 @@
+/*
+* 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.picketlink.idm.impl.store.ldap;
+
+import org.picketlink.idm.impl.LDAPTestPOJO;
+
+/**
+ * Simulate config with 3 LDAP Stores. To simplify testing it uses one LDAP server with 3 different organization DNs
+ */
+public class ManyLDAPStoresTestCase extends LDAPTestPOJO
+{
+
+
+
+
+
+
+}
Modified: idm/trunk/pom.xml
===================================================================
--- idm/trunk/pom.xml 2011-02-04 20:55:39 UTC (rev 733)
+++ idm/trunk/pom.xml 2011-02-04 21:28:40 UTC (rev 734)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<relativePath>parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm</groupId>
<artifactId>jboss-identity-idm-pom</artifactId>
- <version>1.2.0.CR02-SNAPSHOT</version>
+ <version>1.3.0.Alpha01-SNAPSHOT</version>
<packaging>pom</packaging>
<name>PicketLink IDM - Aggregator</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
14 years, 10 months
Picketlink SVN: r733 - idm.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-02-04 15:55:39 -0500 (Fri, 04 Feb 2011)
New Revision: 733
Added:
idm/trunk/
Log:
make new trunk from branch 1.2.0
Copied: idm/trunk (from rev 732, idm/branches/1.2.0)
14 years, 10 months