(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 11 May 2010 08:22:57 +0000 (08:22 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 11 May 2010 08:22:57 +0000 (08:22 +0000)
security/impl/src/main/java/org/wamblee/security/authorization/DefaultAuthorizationService.java
security/impl/src/test/java/org/wamblee/security/authorization/AuthorizationServiceTest.java
security/jpatest/pom.xml
security/jpatest/src/test/java/org/wamblee/security/authentication/jpa/JpaUserSetTest.java
test/enterprise/src/main/java/org/wamblee/support/persistence/DatabaseUtils.java
test/enterprise/src/main/java/org/wamblee/support/persistence/JpaBuilder.java

index 7686c334d7826c1907a1930a3dc39b5495658a4e..8e449b9e9e4ce1a46e4943b9845cbfc77b1c5345 100644 (file)
@@ -96,9 +96,7 @@ public class DefaultAuthorizationService extends AbstractAuthorizationService {
     @Override
     public void setUserAdministration(UserAdministration aUserAdmin) {
         userAdmin = aUserAdmin;
-        System.out.println("Setting userAdmin");
         for (AuthorizationRule rule: rules) { 
-            System.out.println("Setting useradmin on " + rule);
             rule.setUserAdministration(userAdmin);
         }
     }
index 50c73dcace2ebf3b3055c96959353055f0bd2f41..d79ee55f7c2bc77df66a355842be45c9d31bd634 100644 (file)
@@ -86,10 +86,10 @@ public class AuthorizationServiceTest extends TestCase {
      * @return Authorization service.
      */
     protected AuthorizationService createService() {
-        DefaultAuthorizationService service = new DefaultAuthorizationService();
-        service.setUserAccessor(getUserAccessor());
-        service.setUserAdministration(getUserAdministration());
-        return service;
+        DefaultAuthorizationService svc = new DefaultAuthorizationService();
+        svc.setUserAccessor(getUserAccessor());
+        svc.setUserAdministration(getUserAdministration());
+        return svc;
     }
 
     protected AbstractAuthorizationRule createRule(AuthorizationResult aResult,
index 6fc29ff0550e9308b2b1809cf4451c9de86f1571..f12b237ce71942116bceed4f8038c43480fdba52 100644 (file)
@@ -28,7 +28,7 @@
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
-
+       
         <dependency>
             <groupId>org.wamblee</groupId>
             <artifactId>wamblee-test-enterprise</artifactId>
index f5b5fa10b43c6385ae3d742bbe7ac05b23c03880..d981f2b0fe4b03c6a0ab3aae9d22541fb979acc3 100644 (file)
@@ -96,8 +96,8 @@ public class JpaUserSetTest extends InMemoryUserSetTest {
     private GroupSet createGroupSetImpl() {
         TransactionProxyFactory<GroupSet> factory = new TransactionProxyFactory<GroupSet>(
             jpaTester.getJpaBuilder(), GroupSet.class);
-        GroupSet groupset = new JpaGroupSet(factory.getTransactionScopedEntityManager());
-        GroupSet proxy = factory.getProxy(groupset);
+        GroupSet groups = new JpaGroupSet(factory.getTransactionScopedEntityManager());
+        GroupSet proxy = factory.getProxy(groups);
         return proxy;
     }
 
index cd7b3e26dd0bd56cc1d943e37ef8262b478ce8ab..9ad6c9129251c4cd44c5c62c86c431c42ec4d203 100644 (file)
@@ -127,11 +127,11 @@ public class DatabaseUtils {
 
     public void executeOnTables(ITableFilterSimple aTables,
         final TableSetOperation aOperation) throws Exception {
-        final String[] tables = getTableNames(aTables);
+        final String[] tableNames = getTableNames(aTables);
         executeInTransaction(new JdbcUnitOfWork<Void>() {
             public Void execute(Connection aConnection) throws Exception {
-                for (int i = tables.length - 1; i >= 0; i--) {
-                    aOperation.execute(tables[i]);
+                for (int i = tableNames.length - 1; i >= 0; i--) {
+                    aOperation.execute(tableNames[i]);
                 }
                 return null;
             }
@@ -140,16 +140,16 @@ public class DatabaseUtils {
 
     public void cleanDatabase(ITableFilterSimple aSelection) throws Exception {
 
-        final String[] tables = getTableNames(aSelection);
+        final String[] tableNames = getTableNames(aSelection);
         executeInTransaction(new JdbcUnitOfWork<Void>() {
 
             public Void execute(Connection aConnection) throws Exception {
                 IDatabaseConnection connection = new DatabaseConnection(
                     aConnection);
                 ITableFilter filter = new DatabaseSequenceFilter(connection,
-                    tables);
+                    tableNames);
                 IDataSet dataset = new FilteredDataSet(filter, connection
-                    .createDataSet(tables));
+                    .createDataSet(tableNames));
                 DatabaseOperation.DELETE_ALL.execute(connection, dataset);
                 return null;
             }
@@ -186,10 +186,10 @@ public class DatabaseUtils {
 
         Connection connection = dataSource.getConnection();
         try {
-            ResultSet tables = connection.getMetaData().getTables(null,
+            ResultSet tableNames = connection.getMetaData().getTables(null,
                 SCHEMA_PATTERN, "%", new String[] { "TABLE" });
-            while (tables.next()) {
-                String table = tables.getString("TABLE_NAME");
+            while (tableNames.next()) {
+                String table = tableNames.getString("TABLE_NAME");
                 if (aSelection.accept(table)) {
                     result.add(table);
                 }
@@ -234,16 +234,16 @@ public class DatabaseUtils {
     }
 
     public void dropTables(ITableFilterSimple aTables) throws Exception {
-        final String[] tables = getTableNames(aTables);
+        final String[] tableNames = getTableNames(aTables);
         String[] sortedTables = executeInTransaction(new JdbcUnitOfWork<String[]>() {
 
             public String[] execute(Connection aConnection) throws Exception {
                 IDatabaseConnection connection = new DatabaseConnection(
                     aConnection);
                 ITableFilter filter = new DatabaseSequenceFilter(connection,
-                    tables);
+                    tableNames);
                 IDataSet dataset = new FilteredDataSet(filter, connection
-                    .createDataSet(tables));
+                    .createDataSet(tableNames));
                 return dataset.getTableNames();
             }
         });
index d3b7e179f9e0d56ffe781c7c482e1d8f0470365b..8356ea2e52019b1d707df0d9d79ab4189a4eff76 100644 (file)
@@ -128,11 +128,11 @@ public class JpaBuilder {
 
         // jpaProps.put("javax.persistence.provider",
         // HibernatePersistence.class.getName());
-        EntityManagerFactory factory = Persistence.createEntityManagerFactory(
+        EntityManagerFactory emf = Persistence.createEntityManagerFactory(
             persistenceUnit.getUnitName(), jpaProps);
 
-        LOGGER.info("Using " + factory.getClass());
-        return factory;
+        LOGGER.info("Using " + emf.getClass());
+        return emf;
     }
 
     /**