JBoss Identity SVN: r441 - in idm/trunk: example/maven2/src/test/java/org/jboss/identity/idm/example and 8 other directories.
by jboss-identity-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-04-17 05:38:39 -0400 (Fri, 17 Apr 2009)
New Revision: 441
Modified:
idm/trunk/distro/pom.xml
idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/DBTestCase.java
idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/IdentitySessionFactoryImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/IdentitySessionImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/DirectIdentityObjectTypeMapperImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/IdentityObjectTypeMapperImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/IdentitySessionConfigurationContext.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityConfigurationMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityObjectTypeMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityRepositoryConfigurationMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreConfigurationMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreMappingMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RealmConfigurationMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RelationshipMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/FeaturesMetaDataImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
Log:
* Update a set of classes to implement the Serializable, as we need to store the IDSF into jndi.
* Fix the compile failure for example.
Modified: idm/trunk/distro/pom.xml
===================================================================
--- idm/trunk/distro/pom.xml 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/distro/pom.xml 2009-04-17 09:38:39 UTC (rev 441)
@@ -2,7 +2,7 @@
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>
- <artifactId>distro</artifactId>
+ <artifactId>idm-distro</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jboss-sar</packaging>
<name>JBoss Identity IDM Distro </name>
@@ -18,7 +18,7 @@
<hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
<hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
<hsqldb-version>1.8.0.7</hsqldb-version>
- <idm.version>1.0.0.Alpha3</idm.version>
+ <idm.version>1.0.0-SNAPSHOT</idm.version>
</properties>
<dependencies>
Modified: idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/DBTestCase.java
===================================================================
--- idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/DBTestCase.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/DBTestCase.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -29,13 +29,13 @@
import java.util.Collection;
import java.io.File;
+import org.jboss.identity.idm.api.IdentitySearchCriteria;
import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.api.IdentitySession;
import org.jboss.identity.idm.api.Group;
import org.jboss.identity.idm.api.RoleType;
import org.jboss.identity.idm.api.AttributeDescription;
import org.jboss.identity.idm.api.Attribute;
-import org.jboss.identity.idm.api.IdentitySearchControl;
import org.jboss.identity.idm.api.User;
import org.jboss.identity.idm.impl.api.IdentitySessionFactoryImpl;
import org.jboss.identity.idm.impl.api.SimpleAttribute;
@@ -77,8 +77,7 @@
identitySession.beginTransaction();
Collection<User> users = identitySession
- .getPersistenceManager()
- .findUser((IdentitySearchControl[])null);
+ .getPersistenceManager().findUser((IdentitySearchCriteria)null);
String ORGANIZATION = "ORGANIZATION";
String GROUP = "GROUP";
@@ -86,6 +85,9 @@
User johnDoe = identitySession.getPersistenceManager().createUser("John Doe");
User alice = identitySession.getPersistenceManager().createUser("Alice");
User eva = identitySession.getPersistenceManager().createUser("Eva");
+
+ identitySession.getAttributesManager().updatePassword(eva, "oldPassword");
+ identitySession.getAttributesManager().updatePassword(eva, "newPassword");
Group acmeOrg = identitySession.getPersistenceManager().createGroup("ACME", ORGANIZATION);
Modified: idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java
===================================================================
--- idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/example/maven2/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,10 +22,10 @@
package org.jboss.identity.idm.example;
+import org.jboss.identity.idm.api.IdentitySearchCriteria;
import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.api.IdentitySession;
import org.jboss.identity.idm.api.User;
-import org.jboss.identity.idm.api.IdentitySearchControl;
import org.jboss.identity.idm.api.Attribute;
import org.jboss.identity.idm.api.AttributeDescription;
import org.jboss.identity.idm.api.Group;
@@ -83,8 +83,7 @@
identitySession.beginTransaction();
Collection<User> users = identitySession
- .getPersistenceManager()
- .findUser((IdentitySearchControl[])null);
+ .getPersistenceManager().findUser((IdentitySearchCriteria)null);
String ORGANIZATION = "ORGANIZATION";
String GROUP = "GROUP";
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/IdentitySessionFactoryImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/IdentitySessionFactoryImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/IdentitySessionFactoryImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,36 +22,26 @@
package org.jboss.identity.idm.impl.api;
-import org.jboss.identity.idm.api.IdentitySessionFactory;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.spi.configuration.metadata.IdentityConfigurationMetaData;
-import org.jboss.identity.idm.spi.configuration.metadata.IdentityStoreConfigurationMetaData;
-import org.jboss.identity.idm.spi.configuration.metadata.IdentityRepositoryConfigurationMetaData;
-import org.jboss.identity.idm.spi.configuration.metadata.RealmConfigurationMetaData;
-import org.jboss.identity.idm.spi.store.IdentityStore;
-import org.jboss.identity.idm.spi.store.AttributeStore;
-import org.jboss.identity.idm.spi.repository.IdentityStoreRepository;
-import org.jboss.identity.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
-import org.jboss.identity.idm.impl.configuration.IdentitySessionConfigurationContext;
-import org.jboss.identity.idm.impl.api.session.IdentitySessionImpl;
-import org.jboss.identity.idm.impl.api.session.mapper.DirectIdentityObjectTypeMapperImpl;
-import org.jboss.identity.idm.impl.api.session.mapper.IdentityObjectTypeMapper;
-import org.jboss.identity.idm.impl.api.session.mapper.IdentityObjectTypeMapperImpl;
+import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.exception.IdentityException;
+import org.jboss.identity.idm.impl.api.session.IdentitySessionImpl;
+import org.jboss.identity.idm.impl.configuration.IdentitySessionConfigurationContext;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.File;
-import java.lang.reflect.Constructor;
-
/**
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @author Tom Baeyens
* @version : 0.1 $
*/
-public class IdentitySessionFactoryImpl implements IdentitySessionFactory
+public class IdentitySessionFactoryImpl implements IdentitySessionFactory, Serializable
{
+ private static final long serialVersionUID = 3806145082462607359L;
+
private final Map<String, IdentitySession> realmMap = new HashMap<String, IdentitySession>();
private final Map<String, IdentitySessionConfigurationContext> sessionContextMap;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/IdentitySessionImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/IdentitySessionImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/IdentitySessionImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,6 +22,8 @@
package org.jboss.identity.idm.impl.api.session;
+import java.io.Serializable;
+
import org.jboss.identity.idm.api.IdentitySession;
import org.jboss.identity.idm.api.Transaction;
import org.jboss.identity.idm.api.PersistenceManager;
@@ -48,8 +50,11 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentitySessionImpl implements IdentitySession
+public class IdentitySessionImpl implements IdentitySession, Serializable
{
+
+ private static final long serialVersionUID = 7615238887627699243L;
+
private final String realmName;
private final IdentitySessionContext sessionContext;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/DirectIdentityObjectTypeMapperImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/DirectIdentityObjectTypeMapperImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/DirectIdentityObjectTypeMapperImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,6 +22,8 @@
package org.jboss.identity.idm.impl.api.session.mapper;
+import java.io.Serializable;
+
import org.jboss.identity.idm.spi.model.IdentityObjectType;
import org.jboss.identity.idm.impl.types.SimpleIdentityObjectType;
import org.jboss.identity.idm.impl.api.session.mapper.IdentityObjectTypeMapper;
@@ -30,7 +32,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class DirectIdentityObjectTypeMapperImpl implements IdentityObjectTypeMapper
+public class DirectIdentityObjectTypeMapperImpl implements IdentityObjectTypeMapper, Serializable
{
private final String identityTypeName;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/IdentityObjectTypeMapperImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/IdentityObjectTypeMapperImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/api/session/mapper/IdentityObjectTypeMapperImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -26,6 +26,7 @@
import org.jboss.identity.idm.impl.types.SimpleIdentityObjectType;
import org.jboss.identity.idm.impl.api.session.mapper.IdentityObjectTypeMapper;
+import java.io.Serializable;
import java.util.Map;
import java.util.Collections;
@@ -33,7 +34,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityObjectTypeMapperImpl implements IdentityObjectTypeMapper
+public class IdentityObjectTypeMapperImpl implements IdentityObjectTypeMapper, Serializable
{
/**
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/IdentitySessionConfigurationContext.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/IdentitySessionConfigurationContext.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/IdentitySessionConfigurationContext.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,6 +22,8 @@
package org.jboss.identity.idm.impl.configuration;
+import java.io.Serializable;
+
import org.jboss.identity.idm.spi.repository.IdentityStoreRepository;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityConfigurationMetaData;
import org.jboss.identity.idm.impl.api.session.mapper.IdentityObjectTypeMapper;
@@ -30,8 +32,11 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentitySessionConfigurationContext
+public class IdentitySessionConfigurationContext implements Serializable
{
+
+ private static final long serialVersionUID = 3263619777028197717L;
+
private final String realmName;
private final IdentityConfigurationMetaData identityConfigurationMetaData;
private final IdentityStoreRepository repository;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityConfigurationMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityConfigurationMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityConfigurationMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -27,6 +27,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.RealmConfigurationMetaData;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityStoreConfigurationMetaData;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.LinkedList;
@@ -36,7 +37,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityConfigurationMetaDataImpl implements IdentityConfigurationMetaData
+public class IdentityConfigurationMetaDataImpl implements IdentityConfigurationMetaData, Serializable
{
private List<RealmConfigurationMetaData> realms = new LinkedList<RealmConfigurationMetaData>();
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityObjectTypeMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityObjectTypeMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityObjectTypeMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -26,6 +26,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.IdentityObjectTypeMetaData;
import org.jboss.identity.idm.spi.configuration.metadata.RelationshipMetaData;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -33,7 +34,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityObjectTypeMetaDataImpl implements IdentityObjectTypeMetaData
+public class IdentityObjectTypeMetaDataImpl implements IdentityObjectTypeMetaData, Serializable
{
private String name;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityRepositoryConfigurationMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityRepositoryConfigurationMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityRepositoryConfigurationMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -25,6 +25,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.IdentityRepositoryConfigurationMetaData;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityStoreMappingMetaData;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -32,7 +33,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityRepositoryConfigurationMetaDataImpl implements IdentityRepositoryConfigurationMetaData
+public class IdentityRepositoryConfigurationMetaDataImpl implements IdentityRepositoryConfigurationMetaData, Serializable
{
private String id;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreConfigurationMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreConfigurationMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreConfigurationMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -25,6 +25,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.IdentityStoreConfigurationMetaData;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityObjectTypeMetaData;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.LinkedList;
@@ -34,7 +35,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityStoreConfigurationMetaDataImpl implements IdentityStoreConfigurationMetaData
+public class IdentityStoreConfigurationMetaDataImpl implements IdentityStoreConfigurationMetaData, Serializable
{
private String id;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreMappingMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreMappingMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/IdentityStoreMappingMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -24,6 +24,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.IdentityStoreMappingMetaData;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.LinkedList;
@@ -33,7 +34,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class IdentityStoreMappingMetaDataImpl implements IdentityStoreMappingMetaData
+public class IdentityStoreMappingMetaDataImpl implements IdentityStoreMappingMetaData, Serializable
{
private String identityStoreId;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RealmConfigurationMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RealmConfigurationMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RealmConfigurationMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -24,6 +24,7 @@
import org.jboss.identity.idm.spi.configuration.metadata.RealmConfigurationMetaData;
+import java.io.Serializable;
import java.util.Map;
import java.util.List;
@@ -31,7 +32,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class RealmConfigurationMetaDataImpl implements RealmConfigurationMetaData
+public class RealmConfigurationMetaDataImpl implements RealmConfigurationMetaData, Serializable
{
private String id;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RelationshipMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RelationshipMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/configuration/metadata/RelationshipMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,13 +22,15 @@
package org.jboss.identity.idm.impl.configuration.metadata;
+import java.io.Serializable;
+
import org.jboss.identity.idm.spi.configuration.metadata.RelationshipMetaData;
/**
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class RelationshipMetaDataImpl implements RelationshipMetaData
+public class RelationshipMetaDataImpl implements RelationshipMetaData, Serializable
{
private String relationshipTypeRef;
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -42,12 +42,13 @@
import java.util.HashMap;
import java.io.File;
import java.io.InputStream;
+import java.io.Serializable;
/**
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public abstract class AbstractIdentityStoreRepository implements IdentityStoreRepository
+public abstract class AbstractIdentityStoreRepository implements IdentityStoreRepository, Serializable
{
protected Map<String, IdentityStore> identityStoreMappings = new HashMap<String, IdentityStore>();
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/FeaturesMetaDataImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/FeaturesMetaDataImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/FeaturesMetaDataImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,6 +22,7 @@
package org.jboss.identity.idm.impl.store;
+import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -42,7 +43,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class FeaturesMetaDataImpl implements FeaturesMetaData
+public class FeaturesMetaDataImpl implements FeaturesMetaData, Serializable
{
private Set<String> supportedTypeNames = new HashSet<String>();
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-16 15:29:51 UTC (rev 440)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-17 09:38:39 UTC (rev 441)
@@ -22,6 +22,7 @@
package org.jboss.identity.idm.impl.store.hibernate;
+import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -82,7 +83,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public class HibernateIdentityStoreImpl implements IdentityStore
+public class HibernateIdentityStoreImpl implements IdentityStore, Serializable
{
//TODO: logging
15 years, 9 months
JBoss Identity SVN: r440 - identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-04-16 11:29:51 -0400 (Thu, 16 Apr 2009)
New Revision: 440
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java
Log:
localize the constant to fix the tug of war between JDK5 and Stax API in eclipse for javax.xml.XMLConstants
Modified: identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java
===================================================================
--- identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java 2009-04-16 14:40:59 UTC (rev 439)
+++ identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java 2009-04-16 15:29:51 UTC (rev 440)
@@ -23,7 +23,6 @@
import java.net.URL;
-import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
@@ -51,6 +50,8 @@
{
private static ObjectFactory assertionObjectFactory = new ObjectFactory();
+ public static final String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema";
+
public static AssertionType createAssertion()
{
return assertionObjectFactory.createAssertionType();
@@ -195,7 +196,7 @@
URL schemaURL = tcl.getResource(schemaLocation);
if(schemaURL == null)
throw new IllegalStateException("Schema URL is null:" + schemaLocation);
- SchemaFactory scFact = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ SchemaFactory scFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
Schema schema = scFact.newSchema(schemaURL);
marshaller.setSchema(schema);
@@ -232,7 +233,7 @@
URL schemaURL = tcl.getResource(schemaLocation);
if(schemaURL == null)
throw new IllegalStateException("Schema URL is null:" + schemaLocation);
- SchemaFactory scFact = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ SchemaFactory scFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
Schema schema = scFact.newSchema(schemaURL);
unmarshaller.setSchema(schema);
15 years, 9 months
JBoss Identity SVN: r439 - identity-federation/trunk.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-04-16 10:40:59 -0400 (Thu, 16 Apr 2009)
New Revision: 439
Modified:
identity-federation/trunk/pom.xml
Log:
correct module
Modified: identity-federation/trunk/pom.xml
===================================================================
--- identity-federation/trunk/pom.xml 2009-04-16 14:38:29 UTC (rev 438)
+++ identity-federation/trunk/pom.xml 2009-04-16 14:40:59 UTC (rev 439)
@@ -15,7 +15,7 @@
<modules>
<module>parent</module>
- <module>jboss-identity-xmlsecmodel</module>
+ <module>jboss-identity-xmlsec-model</module>
<module>jboss-identity-fed-model</module>
<module>jboss-identity-fed-core</module>
<module>jboss-identity-fed-api</module>
15 years, 9 months
JBoss Identity SVN: r438 - identity-federation/trunk.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-04-16 10:38:29 -0400 (Thu, 16 Apr 2009)
New Revision: 438
Added:
identity-federation/trunk/jboss-identity-xmlsec-model/
Removed:
identity-federation/trunk/jboss-identity-xmlsecmodel/
Log:
correct the module
Copied: identity-federation/trunk/jboss-identity-xmlsec-model (from rev 437, identity-federation/trunk/jboss-identity-xmlsecmodel)
15 years, 9 months
JBoss Identity SVN: r436 - identity-federation/trunk/identity-bindings/src/test/resources.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-04-14 15:05:59 -0400 (Tue, 14 Apr 2009)
New Revision: 436
Modified:
identity-federation/trunk/identity-bindings/src/test/resources/logging.properties
Log:
upd logging properties
Modified: identity-federation/trunk/identity-bindings/src/test/resources/logging.properties
===================================================================
--- identity-federation/trunk/identity-bindings/src/test/resources/logging.properties 2009-04-09 17:00:26 UTC (rev 435)
+++ identity-federation/trunk/identity-bindings/src/test/resources/logging.properties 2009-04-14 19:05:59 UTC (rev 436)
@@ -17,5 +17,5 @@
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
# Set the default logging level for the logger named org.jboss
-org.jboss.security.xacml.sunxacml = FINEST
-com.sun.xml.bind = OFF
+org.jboss.security.xacml.sunxacml.level = FINEST
+com.sun.xml.bind.level = OFF
15 years, 9 months
JBoss Identity SVN: r435 - in idm/trunk: distro and 10 other directories.
by jboss-identity-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-04-09 13:00:26 -0400 (Thu, 09 Apr 2009)
New Revision: 435
Added:
idm/trunk/distro/
idm/trunk/distro/build.properties
idm/trunk/distro/build.xml
idm/trunk/distro/config/
idm/trunk/distro/config/hibernate/
idm/trunk/distro/config/hibernate/cfg/
idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/datasource/
idm/trunk/distro/config/hibernate/datasource/db2.xml
idm/trunk/distro/config/hibernate/datasource/hsqldb.xml
idm/trunk/distro/config/hibernate/datasource/mysql.xml
idm/trunk/distro/config/hibernate/datasource/oracle.xml
idm/trunk/distro/config/hibernate/datasource/postgresql.xml
idm/trunk/distro/config/hibernate/datasource/sybase.xml
idm/trunk/distro/config/hibernate/jdbc.properties
idm/trunk/distro/config/hibernate/jdbc/
idm/trunk/distro/config/hibernate/jdbc/db2.xml
idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml
idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml
idm/trunk/distro/config/hibernate/jdbc/mysql.xml
idm/trunk/distro/config/hibernate/jdbc/oracle.xml
idm/trunk/distro/config/hibernate/jdbc/postgresql.xml
idm/trunk/distro/config/hibernate/jdbc/sybase.xml
idm/trunk/distro/pom.xml
idm/trunk/distro/src/
idm/trunk/distro/src/main/
idm/trunk/distro/src/main/java/
idm/trunk/distro/src/main/resources/
idm/trunk/distro/src/main/resources/META-INF/
idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml
idm/trunk/distro/src/main/resources/jboss-idm-sql/
idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql
idm/trunk/distro/src/test/
Log:
[JBID-70] add the initial implementation.
Added: idm/trunk/distro/build.properties
===================================================================
--- idm/trunk/distro/build.properties (rev 0)
+++ idm/trunk/distro/build.properties 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,7 @@
+config.dir=config
+db.scripts.dir=src/main/resources/jboss-idm-sql
+database=hsqldb
+tmp.dir=target/tmp
+
+connection.type=jdbc
+
Added: idm/trunk/distro/build.xml
===================================================================
--- idm/trunk/distro/build.xml (rev 0)
+++ idm/trunk/distro/build.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,75 @@
+<project name="jboss-identity" default="generateDDL" basedir=".">
+
+ <!-- input properties -->
+ <property file="build.properties" />
+
+ <!-- derived properties -->
+ <property name="resolved.dir" value="${tmp.dir}/resolved" />
+
+ <target name="generateDDL" depends="create.configuration.files">
+ <delete dir="${db.scripts.dir}" />
+ <mkdir dir="${db.scripts.dir}" />
+ <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="maven.compile.classpath"/>
+ <hibernatetool destdir=".">
+ <classpath refid="maven.compile.classpath" />
+ <annotationconfiguration configurationfile="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml"/>
+ <hbm2ddl drop="false" create="true" export="${export}"
+ outputfilename="${db.scripts.dir}/jboss.idm.${database}.create.sql" delimiter=";" format="true" />
+ </hibernatetool>
+ </target>
+
+ <target name="create.configuration.files"
+ depends="internal.load.hibernate.properties"
+ description="creates a full set of jboss identity configuration files">
+
+ <delete file="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml" />
+ <concat destfile="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml">
+ <filelist dir="${resolved.dir}">
+ <file name="hibernate/cfg/head.jboss-idm.cfg.xml" />
+ <file name="hibernate/${connection.type}/${database}.xml"/>
+ <file name="hibernate/cfg/mapping.jboss-idm.cfg.xml"/>
+ <file name="hibernate/cfg/foot.jboss-idm.cfg.xml"/>
+ </filelist>
+ </concat>
+
+ <echo>Created jboss-idm configuration files in ${config.dir}</echo>
+ </target>
+
+
+ <!-- internal tasks -->
+ <target name="internal.prepare">
+ <delete dir="${tmp.dir}" />
+ <mkdir dir="${resolved.dir}" />
+ <copy todir="${tmp.dir}"
+ file="${config.dir}/hibernate/jdbc.properties"
+ failonerror="false"
+ overwrite="true" />
+ <copy todir="${resolved.dir}" filtering="true">
+ <fileset dir="${config.dir}" />
+ <filterset filtersfile="${tmp.dir}/jdbc.properties">
+ <filter token="jboss.bind.address" value="${jboss.bind.address}"/>
+ <filter token="jdbc.hsqldb.url" value="${jdbc.hsqldb.url}" />
+ </filterset>
+ </copy>
+ </target>
+
+ <target name="internal.load.hibernate.properties" depends="internal.prepare">
+ <copy file="${resolved.dir}/hibernate/jdbc/${database}.xml"
+ tofile="${tmp.dir}/hibernate.properties" />
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="">
+ <replacetoken><![CDATA[ <property name="]]></replacetoken>
+ </replace>
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="=">
+ <replacetoken><![CDATA[">]]></replacetoken>
+ </replace>
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="">
+ <replacetoken><![CDATA[</property>]]></replacetoken>
+ </replace>
+ <property file="${tmp.dir}/hibernate.properties" />
+ </target>
+
+</project>
Added: idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,3 @@
+
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="show_sql">false</property>
+ <property name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">false</property>
+
+ <property name="current_session_context_class">thread</property>
+
+
Added: idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,17 @@
+
+
+ <!-- Mapping classes -->
+ <!-- all nessesary mappings are added programatically to the configuration in the store-->
+ <!-- this is for manual SF creation-->
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"/>
+ <mapping class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"/>
+
Added: idm/trunk/distro/config/hibernate/datasource/db2.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/db2.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/db2.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/hsqldb.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/hsqldb.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/hsqldb.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/mysql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/mysql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/mysql.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/oracle.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/oracle.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/oracle.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/postgresql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/postgresql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/postgresql.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/sybase.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/sybase.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/sybase.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/jdbc/db2.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/db2.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/db2.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
+ <property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
+ <property name="hibernate.connection.url">@jdbc.db2.url@</property>
+ <property name="hibernate.connection.username">@jdbc.db2.username@</property>
+ <property name="hibernate.connection.password">@jdbc.db2.password@</property>
Added: idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">@jdbc.hsqldb.url@</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
Added: idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
Added: idm/trunk/distro/config/hibernate/jdbc/mysql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/mysql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/mysql.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
+ <property name="hibernate.connection.url">jdbc:mysql://@jdbc.mysql.server@:@jdbc.mysql.port@/@jdbc.mysql.database@</property>
+ <property name="hibernate.connection.username">@jdbc.mysql.username@</property>
+ <property name="hibernate.connection.password">@jdbc.mysql.password@</property>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/jdbc/oracle.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/oracle.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/oracle.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,6 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+ <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
+ <property name="hibernate.connection.url">jdbc:oracle:thin:@@jdbc.oracle.server@:@jdbc.oracle.port@:@jdbc.oracle.database@</property>
+ <property name="hibernate.connection.username">@jdbc.oracle.username@</property>
+ <property name="hibernate.connection.password">@jdbc.oracle.password@</property>
+ <property name="hibernate.query.substitutions">true 1, false 0</property>
Added: idm/trunk/distro/config/hibernate/jdbc/postgresql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/postgresql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/postgresql.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
+ <property name="hibernate.connection.url">@jdbc.postgresql.url@</property>
+ <property name="hibernate.connection.username">@jdbc.postgresql.username@</property>
+ <property name="hibernate.connection.password">@jdbc.postgresql.password@</property>
Added: idm/trunk/distro/config/hibernate/jdbc/sybase.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/sybase.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/sybase.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
+ <property name="hibernate.connection.url">@jdbc.sybase.url@</property>
+ <property name="hibernate.connection.username">@jdbc.sybase.username@</property>
+ <property name="hibernate.connection.password">@jdbc.sybase.password@</property>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/jdbc.properties
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc.properties (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc.properties 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,29 @@
+jdbc.mysql.server=localhost
+jdbc.mysql.port=3306
+jdbc.mysql.database=jbossIdm
+jdbc.mysql.url=jdbc:mysql://${jdbc.mysql.server}:${jdbc.mysql.port}/${jdbc.mysql.database}
+jdbc.mysql.username=jbossIdm
+jdbc.mysql.password=
+
+jdbc.postgresql.server=localhost
+jdbc.postgresql.port=5432
+jdbc.postgresql.database=jbossIdm
+jdbc.postgresql.url=jdbc:postgresql://${jdbc.postgresql.server}:${jdbc.postgresql.port}/${jdbc.postgresql.database}
+jdbc.postgresql.username=jbossIdm
+jdbc.postgresql.password=
+
+jdbc.sybase.server=localhost
+jdbc.sybase.port=5000
+jdbc.sybase.database=jbossIdm
+jdbc.sybase.url=jdbc:sybase:Tds:${jdbc.sybase.server}:${jdbc.sybase.port}/${jdbc.sybase.database}
+jdbc.sybase.username=jbossIdm
+jdbc.sybase.password=jbossIdm
+jdbc.sybase.driver=com.sybase.jdbc3.jdbc.SybDriver
+jdbc.sybase.datasource=com.sybase.jdbc3.jdbc.SybXADataSource
+
+jdbc.oracle.server=localhost
+jdbc.oracle.port=1521
+jdbc.oracle.database=XE
+jdbc.oracle.username=jbossIdm
+jdbc.oracle.password=jbossIdm
+jdbc.oracle.url=jdbc:oracle:thin:${jdbc.oracle.username}/${jdbc.oracle.password}@${jdbc.oracle.server}:${jdbc.oracle.port}:${jdbc.oracle.database}
Added: idm/trunk/distro/pom.xml
===================================================================
--- idm/trunk/distro/pom.xml (rev 0)
+++ idm/trunk/distro/pom.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,85 @@
+<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>
+ <artifactId>distro</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jboss-sar</packaging>
+ <name>JBoss Identity IDM Distro </name>
+
+ <parent>
+ <groupId>org.jboss.identity</groupId>
+ <artifactId>idm-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <properties>
+ <hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
+ <hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
+ <hsqldb-version>1.8.0.7</hsqldb-version>
+ <idm.version>1.0.0.Alpha3</idm.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.identity</groupId>
+ <artifactId>idm</artifactId>
+ <version>${idm.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>${hibernate-commons-annotations}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>${hibernate-tools-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb-version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>jboss-identity</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-ddl</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="${basedir}/build.xml" inheritRefs="true">
+ <target name="generateDDL" />
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
Added: idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml (rev 0)
+++ idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+</server>
\ No newline at end of file
Added: idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql
===================================================================
--- idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql (rev 0)
+++ idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,218 @@
+
+ create table identity_obj (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ IDENTITY_TYPE bigint not null,
+ REALM bigint not null,
+ primary key (id),
+ unique (NAME, IDENTITY_TYPE, REALM)
+ );
+
+ create table identity_obj_attrs (
+ ATTRIBUTE_ID bigint generated by default as identity (start with 1),
+ NAME varchar(255),
+ IDENTITY_OBJECT_ID bigint not null,
+ primary key (ATTRIBUTE_ID),
+ unique (NAME, IDENTITY_OBJECT_ID)
+ );
+
+ create table identity_obj_attrs_binary (
+ ATTRIBUTE_ID bigint not null,
+ primary key (ATTRIBUTE_ID)
+ );
+
+ create table identity_obj_attrs_binary_values (
+ identity_obj_attrs_binary_ATTRIBUTE_ID bigint not null,
+ element varbinary(255)
+ );
+
+ create table identity_obj_attrs_text (
+ ATTRIBUTE_ID bigint not null,
+ primary key (ATTRIBUTE_ID)
+ );
+
+ create table identity_obj_attrs_text_values (
+ identity_obj_attrs_text_ATTRIBUTE_ID bigint not null,
+ element varchar(255)
+ );
+
+ create table identity_obj_credential (
+ id bigint generated by default as identity (start with 1),
+ BINARY varbinary(255),
+ TEXT varchar(255),
+ IDENTITY_ID bigint not null,
+ IDENTITY_TYPE bigint not null,
+ primary key (id),
+ unique (IDENTITY_TYPE, IDENTITY_ID)
+ );
+
+ create table identity_obj_credential_properties (
+ CREDENTIAL_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (CREDENTIAL_ID, mapkey)
+ );
+
+ create table identity_obj_credential_type (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255),
+ primary key (id),
+ unique (NAME)
+ );
+
+ create table identity_obj_identity_obj_credential (
+ identity_obj_id bigint not null,
+ credentials_id bigint not null,
+ mapkey varchar(255),
+ primary key (identity_obj_id, mapkey),
+ unique (credentials_id)
+ );
+
+ create table identity_obj_properties (
+ IDENTITY_OBJ_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (IDENTITY_OBJ_ID, mapkey)
+ );
+
+ create table identity_obj_type (
+ id bigint generated by default as identity (start with 1),
+ name varchar(255) not null,
+ primary key (id),
+ unique (name)
+ );
+
+ create table identity_realm (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ primary key (id),
+ unique (NAME)
+ );
+
+ create table identity_realm_properties (
+ REALM_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (REALM_ID, mapkey)
+ );
+
+ create table identity_relationship (
+ id bigint generated by default as identity (start with 1),
+ FROM_IDENTITY bigint not null,
+ NAME bigint,
+ TO_IDENTITY bigint not null,
+ TYPE bigint not null,
+ primary key (id),
+ unique (NAME, TYPE, FROM_IDENTITY, TO_IDENTITY)
+ );
+
+ create table identity_relationship_name (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ REALM bigint not null,
+ primary key (id),
+ unique (NAME, REALM),
+ unique (NAME)
+ );
+
+ create table identity_relationship_type (
+ id bigint generated by default as identity (start with 1),
+ name varchar(255) not null,
+ primary key (id),
+ unique (name)
+ );
+
+ alter table identity_obj
+ add constraint FKF8D2BDF6842CE3F0
+ foreign key (REALM)
+ references identity_realm;
+
+ alter table identity_obj
+ add constraint FKF8D2BDF6DA527B00
+ foreign key (IDENTITY_TYPE)
+ references identity_obj_type;
+
+ alter table identity_obj_attrs
+ add constraint FK9F7B519BFDBFEE5
+ foreign key (IDENTITY_OBJECT_ID)
+ references identity_obj;
+
+ alter table identity_obj_attrs_binary
+ add constraint FKCA8615E7D110A16F
+ foreign key (ATTRIBUTE_ID)
+ references identity_obj_attrs;
+
+ alter table identity_obj_attrs_binary_values
+ add constraint FK17ED627A689A8E06
+ foreign key (identity_obj_attrs_binary_ATTRIBUTE_ID)
+ references identity_obj_attrs_binary;
+
+ alter table identity_obj_attrs_text
+ add constraint FKA5AB9093D110A16F
+ foreign key (ATTRIBUTE_ID)
+ references identity_obj_attrs;
+
+ alter table identity_obj_attrs_text_values
+ add constraint FK73D4CE4EE52BFC6E
+ foreign key (identity_obj_attrs_text_ATTRIBUTE_ID)
+ references identity_obj_attrs_text;
+
+ alter table identity_obj_credential
+ add constraint FK53DC4A40B7A4FA37
+ foreign key (IDENTITY_TYPE)
+ references identity_obj_credential_type;
+
+ alter table identity_obj_credential
+ add constraint FK53DC4A40FDE4B747
+ foreign key (IDENTITY_ID)
+ references identity_obj;
+
+ alter table identity_obj_credential_properties
+ add constraint FK3A86B092DF01FC5
+ foreign key (CREDENTIAL_ID)
+ references identity_obj_credential;
+
+ alter table identity_obj_identity_obj_credential
+ add constraint FKAA860AF77FD4BF0F
+ foreign key (identity_obj_id)
+ references identity_obj;
+
+ alter table identity_obj_identity_obj_credential
+ add constraint FKAA860AF7AE83A700
+ foreign key (credentials_id)
+ references identity_obj_credential;
+
+ alter table identity_obj_properties
+ add constraint FK4565EF1C7FD4BF0F
+ foreign key (IDENTITY_OBJ_ID)
+ references identity_obj;
+
+ alter table identity_realm_properties
+ add constraint FKE679EE444A7D622C
+ foreign key (REALM_ID)
+ references identity_realm;
+
+ alter table identity_relationship
+ add constraint FK3EED1419D5BB51F7
+ foreign key (TYPE)
+ references identity_relationship_type;
+
+ alter table identity_relationship
+ add constraint FK3EED1419D5B52899
+ foreign key (NAME)
+ references identity_relationship_name;
+
+ alter table identity_relationship
+ add constraint FK3EED1419B097E0BE
+ foreign key (FROM_IDENTITY)
+ references identity_obj;
+
+ alter table identity_relationship
+ add constraint FK3EED1419C52050D
+ foreign key (TO_IDENTITY)
+ references identity_obj;
+
+ alter table identity_relationship_name
+ add constraint FK5E36C6F1842CE3F0
+ foreign key (REALM)
+ references identity_realm;
15 years, 9 months
JBoss Identity SVN: r434 - in idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl: store/hibernate and 1 other directory.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-04-08 10:47:21 -0400 (Wed, 08 Apr 2009)
New Revision: 434
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectRelationshipName.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
Log:
correct HQL queries to satisfy postgresql 8.3 purism...
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java 2009-04-08 08:43:29 UTC (rev 433)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java 2009-04-08 14:47:21 UTC (rev 434)
@@ -59,21 +59,21 @@
public class HibernateIdentityObject implements IdentityObject
{
public static final String findIdentityObjectByNameAndType =
- "select o from HibernateIdentityObject o where o.realm like :realm and o.name like :name and o.identityType.name like :typeName";
+ "select o from HibernateIdentityObject o where o.realm = :realm and o.name like :name and o.identityType.name like :typeName";
public static final String findIdentityObjectsByType =
- "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm like :realm and o.identityType.name like :typeName";
+ "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm = :realm and o.identityType.name like :typeName";
public static final String findIdentityObjectsByTypeOrderedByNameAsc =
- "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm like :realm and o.identityType.name like :typeName " +
+ "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm = :realm and o.identityType.name like :typeName " +
"order by o.name asc";
public static final String findIdentityObjectsByTypeOrderedByNameDesc =
- "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm like :realm and o.identityType.name like :typeName " +
+ "select o from HibernateIdentityObject o where o.name like :nameFilter and o.realm = :realm and o.identityType.name like :typeName " +
"order by o.name desc";
public static final String countIdentityObjectsByType =
- "select count(o.id) from HibernateIdentityObject o where o.realm like :realm and o.identityType.name like :typeName";
+ "select count(o.id) from HibernateIdentityObject o where o.realm = :realm and o.identityType.name like :typeName";
@Id
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-04-08 08:43:29 UTC (rev 433)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-04-08 14:47:21 UTC (rev 434)
@@ -50,7 +50,7 @@
{
public static final String findIdentityObjectCredentialByIOAndTypeNAme =
- "select c from HibernateIdentityObjectCredential c where c.type.name like :typeName and c.identityObject like :identityObject";
+ "select c from HibernateIdentityObjectCredential c where c.type.name like :typeName and c.identityObject = :identityObject";
@Id
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectRelationshipName.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectRelationshipName.java 2009-04-08 08:43:29 UTC (rev 433)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectRelationshipName.java 2009-04-08 14:47:21 UTC (rev 434)
@@ -43,31 +43,31 @@
{
public static final String findIdentityObjectRelationshipNameByName =
- "select rn from HibernateIdentityObjectRelationshipName rn where rn.name like :name and rn.realm like :realm";
+ "select rn from HibernateIdentityObjectRelationshipName rn where rn.name like :name and rn.realm = :realm";
public static final String findIdentityObjectRelationshipNames =
- "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm like :realm";
+ "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm = :realm";
public static final String findIdentityObjectRelationshipNamesOrderedByNameAsc =
- "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm like :realm " +
+ "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm = :realm " +
"order by rn.name asc";
public static final String findIdentityObjectRelationshipNamesOrderedByNameDesc =
- "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm like :realm " +
+ "select rn.name from HibernateIdentityObjectRelationshipName rn where rn.name like :nameFilter and rn.realm = :realm " +
"order by rn.name desc";
public static final String findIdentityObjectRelationshipNamesForIdentityObject =
"select r.name.name from HibernateIdentityObjectRelationship r where " +
- "r.fromIdentityObject like :identityObject or r.toIdentityObject like :identityObject";
+ "r.fromIdentityObject = :identityObject or r.toIdentityObject = :identityObject";
public static final String findIdentityObjectRelationshipNamesForIdentityObjectOrderedByNameAsc =
"select r.name.name from HibernateIdentityObjectRelationship r where " +
- "r.fromIdentityObject like :identityObject or r.toIdentityObject like :identityObject " +
+ "r.fromIdentityObject = :identityObject or r.toIdentityObject = :identityObject " +
"order by r.name.name asc";
public static final String findIdentityObjectRelationshipNamesForIdentityObjectOrdereByNameDesc =
"select r.name.name from HibernateIdentityObjectRelationship r where " +
- "r.fromIdentityObject like :identityObject or r.toIdentityObject like :identityObject " +
+ "r.fromIdentityObject = :identityObject or r.toIdentityObject = :identityObject " +
"order by r.name.name desc";
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-08 08:43:29 UTC (rev 433)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-08 14:47:21 UTC (rev 434)
@@ -88,21 +88,21 @@
//TODO: logging
private final String QUERY_RELATIONSHIP_BY_FROM_TO =
- "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject like :fromIO and " +
- "r.toIdentityObject like :toIO";
+ "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject = :fromIO and " +
+ "r.toIdentityObject = :toIO";
private final String QUERY_RELATIONSHIP_BY_FROM_TO_TYPE =
- "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject like :fromIO and " +
- "r.toIdentityObject like :toIO and r.type.name like :typeName";
+ "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject = :fromIO and " +
+ "r.toIdentityObject = :toIO and r.type.name like :typeName";
private final String QUERY_RELATIONSHIP_BY_FROM_TO_TYPE_NAME =
- "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject like :fromIO and " +
- "r.toIdentityObject like :toIO and r.type.name like :typeName and r.name.name like :name";
+ "select r from HibernateIdentityObjectRelationship r where r.fromIdentityObject = :fromIO and " +
+ "r.toIdentityObject = :toIO and r.type.name like :typeName and r.name.name like :name";
private final String QUERY_RELATIONSHIP_BY_IDENTITIES =
"select r from HibernateIdentityObjectRelationship r where " +
- "(r.fromIdentityObject like :IO1 and r.toIdentityObject like :IO2) or " +
- "(r.fromIdentityObject like :IO2 and r.toIdentityObject like :IO1)";
+ "(r.fromIdentityObject = :IO1 and r.toIdentityObject = :IO2) or " +
+ "(r.fromIdentityObject = :IO2 and r.toIdentityObject = :IO1)";
public static final String HIBERNATE_SESSION_FACTORY_REGISTRY_NAME = "hibernateSessionFactoryRegistryName";
@@ -725,12 +725,12 @@
{
hqlString.append("select distinct ior.toIdentityObject from HibernateIdentityObjectRelationship ior where " +
- "ior.toIdentityObject.name like :nameFilter and ior.type.name like :relType and ior.fromIdentityObject like :identity");
+ "ior.toIdentityObject.name like :nameFilter and ior.type.name like :relType and ior.fromIdentityObject = :identity");
}
else
{
hqlString.append("select distinct ior.toIdentityObject from HibernateIdentityObjectRelationship ior where " +
- "ior.toIdentityObject.name like :nameFilter and ior.fromIdentityObject like :identity");
+ "ior.toIdentityObject.name like :nameFilter and ior.fromIdentityObject = :identity");
}
if (orderByName)
{
@@ -746,12 +746,12 @@
if (relationshipType != null)
{
hqlString.append("select distinct ior.fromIdentityObject from HibernateIdentityObjectRelationship ior where " +
- "ior.fromIdentityObject.name like :nameFilter and ior.type.name like :relType and ior.toIdentityObject like :identity");
+ "ior.fromIdentityObject.name like :nameFilter and ior.type.name like :relType and ior.toIdentityObject = :identity");
}
else
{
hqlString.append("select distinct ior.fromIdentityObject from HibernateIdentityObjectRelationship ior where " +
- "ior.fromIdentityObject.name like :nameFilter and ior.toIdentityObject like :identity");
+ "ior.fromIdentityObject.name like :nameFilter and ior.toIdentityObject = :identity");
}
if (orderByName)
15 years, 9 months
JBoss Identity SVN: r433 - idm/trunk/idm/src/test/resources/datasources.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-04-08 04:43:29 -0400 (Wed, 08 Apr 2009)
New Revision: 433
Modified:
idm/trunk/idm/src/test/resources/datasources/hibernates.xml
Log:
disable batch processing to have more meaningful error messages from postgresql when test fail...
Modified: idm/trunk/idm/src/test/resources/datasources/hibernates.xml
===================================================================
--- idm/trunk/idm/src/test/resources/datasources/hibernates.xml 2009-04-07 19:19:56 UTC (rev 432)
+++ idm/trunk/idm/src/test/resources/datasources/hibernates.xml 2009-04-08 08:43:29 UTC (rev 433)
@@ -35,10 +35,10 @@
<name>hibernate.cache.use_query_cache</name>
<value>false</value>
</property>
- <!--<property>-->
- <!--<name>hibernate.jdbc.batch_size</name>-->
- <!--<value>0</value>-->
- <!--</property>-->
+ <property>
+ <name>hibernate.jdbc.batch_size</name>
+ <value>0</value>
+ </property>
</properties>
</configuration>
<!-- The hsqldb configuration -->
15 years, 9 months
JBoss Identity SVN: r432 - in idm/trunk: idm and 1 other directories.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-04-07 15:19:56 -0400 (Tue, 07 Apr 2009)
New Revision: 432
Modified:
idm/trunk/example/maven2/pom.xml
idm/trunk/idm/pom.xml
idm/trunk/parent/pom.xml
Log:
specify surefire plugin version to try to workaround hudson issues
Modified: idm/trunk/example/maven2/pom.xml
===================================================================
--- idm/trunk/example/maven2/pom.xml 2009-04-07 18:58:01 UTC (rev 431)
+++ idm/trunk/example/maven2/pom.xml 2009-04-07 19:19:56 UTC (rev 432)
@@ -84,6 +84,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
<printSummary>true</printSummary>
<disableXmlReport>false</disableXmlReport>
Modified: idm/trunk/idm/pom.xml
===================================================================
--- idm/trunk/idm/pom.xml 2009-04-07 18:58:01 UTC (rev 431)
+++ idm/trunk/idm/pom.xml 2009-04-07 19:19:56 UTC (rev 432)
@@ -214,9 +214,10 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
- <!--<skip>true</skip>-->
<systemProperties>
<property>
<name>dataSourceName</name>
Modified: idm/trunk/parent/pom.xml
===================================================================
--- idm/trunk/parent/pom.xml 2009-04-07 18:58:01 UTC (rev 431)
+++ idm/trunk/parent/pom.xml 2009-04-07 19:19:56 UTC (rev 432)
@@ -40,6 +40,7 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
<printSummary>true</printSummary>
<disableXmlReport>false</disableXmlReport>
15 years, 9 months
JBoss Identity SVN: r431 - in idm/trunk/idm/src: main/java/org/jboss/identity/idm/impl/store/hibernate and 2 other directories.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-04-07 14:58:01 -0400 (Tue, 07 Apr 2009)
New Revision: 431
Added:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttributeValue.java
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttribute.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
idm/trunk/idm/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
idm/trunk/idm/src/test/resources/datasources/hibernates.xml
Log:
another binary mapping fix
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttribute.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttribute.java 2009-04-06 20:35:09 UTC (rev 430)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttribute.java 2009-04-07 18:58:01 UTC (rev 431)
@@ -28,6 +28,10 @@
import javax.persistence.Table;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.OneToMany;
+import javax.persistence.Column;
+import javax.persistence.JoinColumn;
+import javax.persistence.FetchType;
+import javax.persistence.CascadeType;
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
@@ -43,8 +47,11 @@
public class HibernateIdentityObjectBinaryAttribute extends HibernateIdentityObjectAttribute
{
- @CollectionOfElements(targetElement = org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType.class)
- private Set<byte[]> values = new HashSet<byte[]>();
+ @OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
+ @org.hibernate.annotations.Cascade(
+ value = {org.hibernate.annotations.CascadeType.DELETE_ORPHAN}
+ )
+ private Set<HibernateIdentityObjectBinaryAttributeValue> values = new HashSet<HibernateIdentityObjectBinaryAttributeValue>();
public HibernateIdentityObjectBinaryAttribute()
{
@@ -53,24 +60,40 @@
public HibernateIdentityObjectBinaryAttribute(HibernateIdentityObject identityObject, String name, Set<byte[]> values)
{
super(identityObject, name);
- this.values = values;
+
+ for (byte[] value : values)
+ {
+ addValue(value);
+ }
+
}
public Set<byte[]> getValues()
{
- return values;
+ Set<byte[]> vals = new HashSet<byte[]>();
+ for (HibernateIdentityObjectBinaryAttributeValue value : values)
+ {
+ vals.add(value.getValue());
+ }
+
+ return vals;
+
}
public void setValues(Set<byte[]> values)
{
- this.values = Collections.unmodifiableSet(values);
+ this.values = new HashSet<HibernateIdentityObjectBinaryAttributeValue>();
+ for (byte[] value : values)
+ {
+ addValue(value);
+ }
}
public byte[] getValue()
{
if (values.size() > 0)
{
- return values.iterator().next();
+ return values.iterator().next().getValue();
}
else
{
@@ -85,10 +108,15 @@
public void addValue(Object value)
{
- if (value instanceof byte[])
+ if (value != null && value instanceof byte[])
{
- values.add((byte[])value);
+ addValue(new HibernateIdentityObjectBinaryAttributeValue((byte[])value));
}
}
+ public void addValue(HibernateIdentityObjectBinaryAttributeValue value)
+ {
+ values.add(value);
+ }
+
}
Copied: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttributeValue.java (from rev 425, idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttribute.java)
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttributeValue.java (rev 0)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectBinaryAttributeValue.java 2009-04-07 18:58:01 UTC (rev 431)
@@ -0,0 +1,86 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.identity.idm.impl.model.hibernate;
+
+import org.hibernate.annotations.CollectionOfElements;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.PrimaryKeyJoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.Column;
+import javax.persistence.JoinColumn;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+
+@Entity
+//The table name need to fit in oracle constrants (ORA-00972: identifier is too long)
+@Table(name = "jbid_io_bin")
+public class HibernateIdentityObjectBinaryAttributeValue
+{
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+
+ @Column(length = 10240000)
+ private byte[] value;
+
+ public HibernateIdentityObjectBinaryAttributeValue()
+ {
+ }
+
+ public HibernateIdentityObjectBinaryAttributeValue(byte[] value)
+ {
+ this.value = value;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public byte[] getValue()
+ {
+ return value;
+ }
+
+ public void setValue(byte[] value)
+ {
+ this.value = value;
+ }
+}
\ No newline at end of file
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-04-06 20:35:09 UTC (rev 430)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-04-07 18:58:01 UTC (rev 431)
@@ -68,8 +68,7 @@
@Column(name= "TEXT", nullable = true)
private String textValue;
- @Column(name= "BINARY_VALUE", nullable = true)
- @Type(type = "org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType")
+ @Column(name= "BINARY_VALUE", nullable = true, length = 10240000)
private byte[] binaryValue;
@CollectionOfElements
Modified: idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
--- idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-06 20:35:09 UTC (rev 430)
+++ idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-04-07 18:58:01 UTC (rev 431)
@@ -52,6 +52,7 @@
import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute;
import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType;
import org.jboss.identity.idm.impl.model.hibernate.HibernateRealm;
+import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue;
import org.jboss.identity.idm.impl.store.FeaturesMetaDataImpl;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityObjectAttributeMetaData;
import org.jboss.identity.idm.spi.configuration.metadata.IdentityObjectTypeMetaData;
@@ -373,6 +374,7 @@
return config.addAnnotatedClass(HibernateIdentityObject.class)
.addAnnotatedClass(HibernateIdentityObjectAttribute.class)
.addAnnotatedClass(HibernateIdentityObjectBinaryAttribute.class)
+ .addAnnotatedClass(HibernateIdentityObjectBinaryAttributeValue.class)
.addAnnotatedClass(HibernateIdentityObjectTextAttribute.class)
.addAnnotatedClass(HibernateIdentityObjectCredential.class)
.addAnnotatedClass(HibernateIdentityObjectCredentialType.class)
Modified: idm/trunk/idm/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
===================================================================
--- idm/trunk/idm/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-04-06 20:35:09 UTC (rev 430)
+++ idm/trunk/idm/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-04-07 18:58:01 UTC (rev 431)
@@ -41,6 +41,7 @@
import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType;
import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType;
import org.jboss.identity.idm.impl.model.hibernate.HibernateRealm;
+import org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue;
import org.jboss.identity.idm.test.HibernateAnnotationsSupport;
import org.jboss.identity.idm.opends.OpenDSService;
import org.opends.server.tools.LDAPModify;
@@ -120,6 +121,7 @@
annotatedClasses.add(HibernateIdentityObject.class.getName());
annotatedClasses.add(HibernateIdentityObjectAttribute.class.getName());
annotatedClasses.add(HibernateIdentityObjectBinaryAttribute.class.getName());
+ annotatedClasses.add(HibernateIdentityObjectBinaryAttributeValue.class.getName());
annotatedClasses.add(HibernateIdentityObjectTextAttribute.class.getName());
annotatedClasses.add(HibernateIdentityObjectCredential.class.getName());
annotatedClasses.add(HibernateIdentityObjectCredentialType.class.getName());
Modified: idm/trunk/idm/src/test/resources/datasources/hibernates.xml
===================================================================
--- idm/trunk/idm/src/test/resources/datasources/hibernates.xml 2009-04-06 20:35:09 UTC (rev 430)
+++ idm/trunk/idm/src/test/resources/datasources/hibernates.xml 2009-04-07 18:58:01 UTC (rev 431)
@@ -35,6 +35,10 @@
<name>hibernate.cache.use_query_cache</name>
<value>false</value>
</property>
+ <!--<property>-->
+ <!--<name>hibernate.jdbc.batch_size</name>-->
+ <!--<value>0</value>-->
+ <!--</property>-->
</properties>
</configuration>
<!-- The hsqldb configuration -->
@@ -85,10 +89,10 @@
<value>org.hibernate.dialect.Oracle9Dialect</value>
</property>
<!-- Needed in order to avoid the bug described in HBX-146 to happen in instance container test case -->
- <property>
- <name>hibernate.cache.use_second_level_cache</name>
- <value>true</value>
- </property>
+ <!--<property>-->
+ <!--<name>hibernate.cache.use_second_level_cache</name>-->
+ <!--<value>true</value>-->
+ <!--</property>-->
</properties>
</configuration>
<configuration>
@@ -99,10 +103,10 @@
<value>org.hibernate.dialect.Oracle9Dialect</value>
</property>
<!-- Needed in order to avoid the bug described in HBX-146 to happen in instance container test case -->
- <property>
- <name>hibernate.cache.use_second_level_cache</name>
- <value>true</value>
- </property>
+ <!--<property>-->
+ <!--<name>hibernate.cache.use_second_level_cache</name>-->
+ <!--<value>true</value>-->
+ <!--</property>-->
</properties>
</configuration>
<!-- The sqlserver configuration -->
15 years, 9 months