You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fc...@us...> - 2007-02-02 08:58:21
|
Revision: 189 http://svn.sourceforge.net/openutils/?rev=189&view=rev Author: fcarone Date: 2007-02-02 00:58:20 -0800 (Fri, 02 Feb 2007) Log Message: ----------- checkstyle fix. Modified Paths: -------------- trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java Modified: trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java =================================================================== --- trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java 2007-02-02 08:53:26 UTC (rev 188) +++ trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java 2007-02-02 08:58:20 UTC (rev 189) @@ -6,6 +6,7 @@ /** * Dialetto di derby modificato in modo da permettere l'inserimento in tabelle identity durante i tests. Patch inviata * ad hibernate http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347 + * @author */ public class DerbyDialectWithIdentities extends DerbyDialect { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-02 08:53:26
|
Revision: 188 http://svn.sourceforge.net/openutils/?rev=188&view=rev Author: fcarone Date: 2007-02-02 00:53:26 -0800 (Fri, 02 Feb 2007) Log Message: ----------- fix for dao tests and manager tests added Modified Paths: -------------- trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml Added Paths: ----------- trunk/openutils-configuration/src/test/resources/ConfigurationManagerTest-load.xml trunk/openutils-configuration/src/test/resources/ReferenceManagerTest-load.xml Modified: trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml 2007-02-01 17:43:12 UTC (rev 187) +++ trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -1,6 +1,6 @@ <!DOCTYPE dataset SYSTEM "dataset.dtd"> <dataset> - <table name="CONFIGURATION_DOMAIN"> + <table name="APP_CONFIGURATION_DOMAIN"> <column>ID_CONFIGURATIONDOMAIN</column> <column>DESCRIPTION</column> <row> @@ -12,7 +12,7 @@ <value>Application server configuration</value> </row> </table> - <table name="CONFIGURATION_CODE"> + <table name="APP_CONFIGURATION_CODE"> <column>ID_CONFIGURATIONCODE</column> <column>ID_CONFIGURATIONDOMAIN</column> <column>CODE</column> Modified: trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml 2007-02-01 17:43:12 UTC (rev 187) +++ trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -1,6 +1,6 @@ <!DOCTYPE dataset SYSTEM "dataset.dtd"> <dataset> - <table name="CONFIGURATION_DOMAIN"> + <table name="APP_CONFIGURATION_DOMAIN"> <column>ID_CONFIGURATIONDOMAIN</column> <column>DESCRIPTION</column> <row> Added: trunk/openutils-configuration/src/test/resources/ConfigurationManagerTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ConfigurationManagerTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ConfigurationManagerTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -0,0 +1,39 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="APP_CONFIGURATION_DOMAIN"> + <column>ID_CONFIGURATIONDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>CONFIG_DOMAIN</value> + <value>DESCRIZIONE</value> + </row> + <row> + <value>CONFIG_DOMAIN_2</value> + <value>DESCRIZIONE_2</value> + </row> + </table> + <table name="APP_CONFIGURATION_CODE"> + <column>ID_CONFIGURATIONCODE</column> + <column>ID_CONFIGURATIONDOMAIN</column> + <column>CODE</column> + <column>DESCRIPTION</column> + <column>TYPE</column> + <column>VALUE</column> + <row> + <value>5</value> + <value>CONFIG_DOMAIN</value> + <value>CODICE</value> + <value>DESCRIZIONE</value> + <value>TIPO</value> + <value>VALORE</value> + </row> + <row> + <value>6</value> + <value>CONFIG_DOMAIN_2</value> + <value>CODICE</value> + <value>DESCRIZIONE</value> + <value>TIPO</value> + <value>VALORE</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ConfigurationManagerTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Modified: trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml 2007-02-01 17:43:12 UTC (rev 187) +++ trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -1,6 +1,6 @@ <!DOCTYPE dataset SYSTEM "dataset.dtd"> <dataset> - <table name="REFERENCE_DOMAIN"> + <table name="APP_REFERENCE_DOMAIN"> <column>ID_REFERENCEDOMAIN</column> <column>DESCRIPTION</column> <row> @@ -8,7 +8,7 @@ <value>DESCRIZIONE</value> </row> </table> - <table name="REFERENCE_CODE"> + <table name="APP_REFERENCE_CODE"> <column>ID_REFERENCECODE</column> <column>ID_REFERENCEDOMAIN</column> <column>CODE</column> Modified: trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml 2007-02-01 17:43:12 UTC (rev 187) +++ trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -1,6 +1,6 @@ <!DOCTYPE dataset SYSTEM "dataset.dtd"> <dataset> - <table name="REFERENCE_DOMAIN"> + <table name="APP_REFERENCE_DOMAIN"> <column>ID_REFERENCEDOMAIN</column> <column>DESCRIPTION</column> <row> Added: trunk/openutils-configuration/src/test/resources/ReferenceManagerTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ReferenceManagerTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ReferenceManagerTest-load.xml 2007-02-02 08:53:26 UTC (rev 188) @@ -0,0 +1,25 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="APP_REFERENCE_DOMAIN"> + <column>ID_REFERENCEDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>CURVE_DOMAIN</value> + <value>DESCRIZIONE</value> + </row> + </table> + <table name="APP_REFERENCE_CODE"> + <column>ID_REFERENCECODE</column> + <column>ID_REFERENCEDOMAIN</column> + <column>CODE</column> + <column>DESCRIPTION</column> + <column>ACTIVE</column> + <row> + <value>7</value> + <value>CURVE_DOMAIN</value> + <value>CODICE</value> + <value>DESCRIZIONE</value> + <value>1</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ReferenceManagerTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:43:17
|
Revision: 187 http://svn.sourceforge.net/openutils/?rev=187&view=rev Author: fcarone Date: 2007-02-01 09:43:12 -0800 (Thu, 01 Feb 2007) Log Message: ----------- added derby dialect with identities Modified Paths: -------------- trunk/openutils-configuration/src/test/resources/database.properties trunk/pom.xml Added Paths: ----------- trunk/openutils-configuration/src/test/java/org/ trunk/openutils-configuration/src/test/java/org/hibernate/ trunk/openutils-configuration/src/test/java/org/hibernate/dialect/ trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java Added: trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java =================================================================== --- trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java (rev 0) +++ trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java 2007-02-01 17:43:12 UTC (rev 187) @@ -0,0 +1,31 @@ +package org.hibernate.dialect; + +import org.hibernate.id.IdentityGenerator; + + +/** + * Dialetto di derby modificato in modo da permettere l'inserimento in tabelle identity durante i tests. Patch inviata + * ad hibernate http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347 + */ +public class DerbyDialectWithIdentities extends DerbyDialect +{ + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityColumnString() + { + return "generated by default as identity"; //$NON-NLS-1 + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Class getNativeIdentifierGeneratorClass() + { + return IdentityGenerator.class; + } +} Property changes on: trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-configuration/src/test/resources/database.properties =================================================================== --- trunk/openutils-configuration/src/test/resources/database.properties 2007-02-01 17:16:27 UTC (rev 186) +++ trunk/openutils-configuration/src/test/resources/database.properties 2007-02-01 17:43:12 UTC (rev 187) @@ -1,11 +1,6 @@ -# ATTENZIONE: queste propriet\xE0 sono utilizzate solo per gli unit tests -# i file per la configurazione del db utilizzati dall'applicazione web sono in -# src/main/web-app/WEB-INF - hibernate.connection.driver=org.apache.derby.jdbc.EmbeddedDriver -hibernate.dialect=org.hibernate.dialect.DerbyDialect -hibernate.connection.username=ikam +hibernate.dialect=org.hibernate.dialect.DerbyDialectWithIdentities +hibernate.connection.username=configuration hibernate.connection.password= -hibernate.connection.url=jdbc:derby:target/db/openutils-usermanagement-db-test;create=true -hibernate.hbm2ddl.auto=update - +hibernate.connection.url=jdbc:derby:target/db/configuration-db-test;create=true +hibernate.hbm2ddl.auto=create Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-02-01 17:16:27 UTC (rev 186) +++ trunk/pom.xml 2007-02-01 17:43:12 UTC (rev 187) @@ -158,25 +158,4 @@ <module>openutils-configuration-dataobjects</module> <module>openutils-configuration</module> </modules> - <repositories> - <repository> - <id>repository.openmindonline.it</id> - <name>openmind repository</name> - <url>http://repository.openmindonline.it</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>snapshots.openmindonline.it</id> - <name>openmind snapshots repository</name> - <url>http://snapshots.openmindonline.it</url> - <snapshots> - <enabled>true</enabled> - </snapshots> - <releases> - <enabled>false</enabled> - </releases> - </repository> - </repositories> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:18:36
|
Revision: 186 http://svn.sourceforge.net/openutils/?rev=186&view=rev Author: fcarone Date: 2007-02-01 09:16:27 -0800 (Thu, 01 Feb 2007) Log Message: ----------- more changes to pom files Modified Paths: -------------- trunk/openutils-configuration/pom.xml trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java trunk/openutils-dbmigration/pom.xml trunk/openutils-deployment/pom.xml trunk/openutils-testing/pom.xml trunk/openutils-usermanagement/pom.xml trunk/pom.xml Modified: trunk/openutils-configuration/pom.xml =================================================================== --- trunk/openutils-configuration/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-configuration/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -42,6 +42,12 @@ <version>1.0.1</version> </dependency> <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.2.0.ga</version> Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 17:16:27 UTC (rev 186) @@ -24,7 +24,7 @@ { List<ConfigurationCode> all = instance.findAll(); Assert.assertNotNull(all, "Nothing returned by findAll"); - Assert.assertEquals(2, all.size()); + Assert.assertEquals(all.size(), 2); } /** @@ -83,7 +83,7 @@ { instance.delete(new Long("1")); List<ConfigurationCode> all = instance.findAll(); - Assert.assertEquals(1, all.size()); + Assert.assertEquals(all.size(), 1); } } Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-dbmigration/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -81,7 +81,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-deployment/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -53,7 +53,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-testing/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -1,60 +1,68 @@ -<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> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing</artifactId> - <name>openutils test utils</name> - <version>1.1-SNAPSHOT</version> - <description>openutils test utils</description> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>2.0.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.2</version> - </dependency> - <dependency> - <groupId>dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - <optional>true</optional> - </dependency> - </dependencies> +<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> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing</artifactId> + <name>openutils test utils</name> + <version>1.1-SNAPSHOT</version> + <description>openutils test utils</description> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.0.1</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>2.0.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>2.0.1</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>2.0.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <optional>true</optional> + </dependency> + </dependencies> </project> \ No newline at end of file Modified: trunk/openutils-usermanagement/pom.xml =================================================================== --- trunk/openutils-usermanagement/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/openutils-usermanagement/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -103,7 +103,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> <dependency> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-02-01 17:14:59 UTC (rev 185) +++ trunk/pom.xml 2007-02-01 17:16:27 UTC (rev 186) @@ -158,4 +158,25 @@ <module>openutils-configuration-dataobjects</module> <module>openutils-configuration</module> </modules> + <repositories> + <repository> + <id>repository.openmindonline.it</id> + <name>openmind repository</name> + <url>http://repository.openmindonline.it</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>snapshots.openmindonline.it</id> + <name>openmind snapshots repository</name> + <url>http://snapshots.openmindonline.it</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </repository> + </repositories> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:15:21
|
Revision: 185 http://svn.sourceforge.net/openutils/?rev=185&view=rev Author: fcarone Date: 2007-02-01 09:14:59 -0800 (Thu, 01 Feb 2007) Log Message: ----------- projects dependencies fixed. Modified Paths: -------------- trunk/openutils-tags-spring/pom.xml Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-02-01 17:14:43 UTC (rev 184) +++ trunk/openutils-tags-spring/pom.xml 2007-02-01 17:14:59 UTC (rev 185) @@ -73,7 +73,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:15:03
|
Revision: 182 http://svn.sourceforge.net/openutils/?rev=182&view=rev Author: fcarone Date: 2007-02-01 09:14:33 -0800 (Thu, 01 Feb 2007) Log Message: ----------- projects dependencies fixed. Modified Paths: -------------- trunk/openutils-backup/pom.xml Modified: trunk/openutils-backup/pom.xml =================================================================== --- trunk/openutils-backup/pom.xml 2007-02-01 17:09:32 UTC (rev 181) +++ trunk/openutils-backup/pom.xml 2007-02-01 17:14:33 UTC (rev 182) @@ -30,7 +30,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:15:01
|
Revision: 184 http://svn.sourceforge.net/openutils/?rev=184&view=rev Author: fcarone Date: 2007-02-01 09:14:43 -0800 (Thu, 01 Feb 2007) Log Message: ----------- projects dependencies fixed. Modified Paths: -------------- trunk/openutils-web/pom.xml Modified: trunk/openutils-web/pom.xml =================================================================== --- trunk/openutils-web/pom.xml 2007-02-01 17:14:38 UTC (rev 183) +++ trunk/openutils-web/pom.xml 2007-02-01 17:14:43 UTC (rev 184) @@ -36,7 +36,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 17:14:48
|
Revision: 183 http://svn.sourceforge.net/openutils/?rev=183&view=rev Author: fcarone Date: 2007-02-01 09:14:38 -0800 (Thu, 01 Feb 2007) Log Message: ----------- projects dependencies fixed. Modified Paths: -------------- trunk/openutils-log4j/pom.xml Modified: trunk/openutils-log4j/pom.xml =================================================================== --- trunk/openutils-log4j/pom.xml 2007-02-01 17:14:33 UTC (rev 182) +++ trunk/openutils-log4j/pom.xml 2007-02-01 17:14:38 UTC (rev 183) @@ -45,7 +45,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>3.8.1</version> + <version>4.0</version> <scope>test</scope> </dependency> </dependencies> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-01 17:09:39
|
Revision: 181 http://svn.sourceforge.net/openutils/?rev=181&view=rev Author: fgiust Date: 2007-02-01 09:09:32 -0800 (Thu, 01 Feb 2007) Log Message: ----------- exclude avalon and logkit from commons-logging Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-02-01 17:08:06 UTC (rev 180) +++ trunk/openutils-dbmigration/pom.xml 2007-02-01 17:09:32 UTC (rev 181) @@ -26,16 +26,46 @@ <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>2.0.1</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>2.0.1</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>2.0.1</version> + <exclusions> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.slf4j</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-02-01 17:09:01
|
Revision: 180 http://svn.sourceforge.net/openutils/?rev=180&view=rev Author: fgiust Date: 2007-02-01 09:08:06 -0800 (Thu, 01 Feb 2007) Log Message: ----------- new excel configuration task Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Added Paths: ----------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-02-01 16:35:22 UTC (rev 179) +++ trunk/openutils-dbmigration/pom.xml 2007-02-01 17:08:06 UTC (rev 180) @@ -43,6 +43,12 @@ <version>1.2</version> </dependency> <dependency> + <groupId>poi</groupId> + <artifactId>poi</artifactId> + <version>2.5.1-final-20040804</version> + <optional>true</optional> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> Added: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java (rev 0) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java 2007-02-01 17:08:06 UTC (rev 180) @@ -0,0 +1,261 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.migration.task.setup; + + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.BadSqlGrammarException; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * @author fgiust + * @version $Id$ + */ +public class ExcelConfigurationTask extends BaseDbTask implements DbTask +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(ScriptBasedUnconditionalTask.class); + + private Resource script; + + private Map<String, ExcelConfigurationTask.QueryConfig> config; + + /** + * Sets the script. + * @param script the script to set + */ + public void setScript(Resource script) + { + this.script = script; + } + + /** + * Sets the config. + * @param config the config to set + */ + public void setConfig(Map<String, ExcelConfigurationTask.QueryConfig> config) + { + this.config = config; + } + + /** + * {@inheritDoc} + */ + public void execute(DataSource dataSource) + { + if (script == null || !script.exists()) + { + log.error("Unable to execute db task \"{}\", script \"{}\" not found.", getDescription(), script); + return; + } + + InputStream is = null; + try + { + is = script.getInputStream(); + POIFSFileSystem fs = new POIFSFileSystem(is); + HSSFWorkbook hssfworkbook = new HSSFWorkbook(fs); + int sheetNums = hssfworkbook.getNumberOfSheets(); + for (int j = 0; j < sheetNums; j++) + { + HSSFSheet sheet = hssfworkbook.getSheetAt(j); + String tableName = hssfworkbook.getSheetName(j); + + QueryConfig conf = config.get(tableName); + if (conf == null) + { + log.error("Unable to handle table {}", tableName); + continue; + } + processSheet(sheet, tableName, conf, dataSource); + + } + + } + catch (IOException e) + { + log.error(e.getMessage(), e); + } + finally + { + IOUtils.closeQuietly(is); + } + + } + + /** + * @param sheet + * @param tableName + */ + private void processSheet(HSSFSheet sheet, String tableName, QueryConfig con, DataSource dataSource) + { + List<String> columns = new ArrayList<String>(); + + HSSFRow row = sheet.getRow(0); + for (short k = 0; k < row.getLastCellNum(); k++) + { + String columnName = row.getCell(k).getStringCellValue(); + if (StringUtils.isNotBlank(columnName)) + { + columns.add(columnName); + } + else + { + break; + } + } + + log.debug("Table: {}, Columns: {}", tableName, columns); + + String checkStatement = con.getCheckQuery(); + String insertStatement = con.getInsertQuery(); + + processRecords(sheet, columns, checkStatement, insertStatement, dataSource); + } + + /** + * @param sheet + * @param columns + * @param checkStatement + * @param insertStatement + */ + private void processRecords(HSSFSheet sheet, List<String> columns, String checkStatement, String insertStatement, + DataSource dataSource) + { + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + int checkNum = StringUtils.countMatches(checkStatement, "?"); + int insertNum = StringUtils.countMatches(insertStatement, "?"); + + HSSFRow row; + for (short u = 1; u <= sheet.getLastRowNum(); u++) + { + row = sheet.getRow(u); + if (row == null) + { + return; + } + + List<String> values = new ArrayList<String>(); + + for (short k = 0; k < columns.size() && k <= row.getLastCellNum(); k++) + { + HSSFCell cell = row.getCell(k); + if (cell == null) + { + return; + } + + String value = null; + if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) + { + value = cell.getStringCellValue(); + } + else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) + { + double valueDouble = cell.getNumericCellValue(); + value = Double.toString(valueDouble); + } + + if (StringUtils.isEmpty(value)) + { + return; + } + values.add(value); + } + + Object[] checkParams = ArrayUtils.subarray(values.toArray(), 0, checkNum); + + int existing; + try + { + existing = jdbcTemplate.queryForInt(checkStatement, checkParams); + } + catch (BadSqlGrammarException bsge) + { + log.error("Error executing check query, current sheet will be skipped. {} Query in error: {}", bsge + .getMessage(), checkStatement); + return; + } + + if (existing == 0) + { + Object[] insertParams = ArrayUtils.subarray(values.toArray(), 0, insertNum); + log.debug("Missing record with key {}; inserting {}", ArrayUtils.toString(checkParams), ArrayUtils + .toString(insertParams)); + jdbcTemplate.update(insertStatement, insertParams); + } + + } + } + + /** + * @author fgiust + * @version $Id$ + */ + public static class QueryConfig + { + + private String checkQuery; + + private String insertQuery; + + /** + * Returns the checkQuery. + * @return the checkQuery + */ + public String getCheckQuery() + { + return checkQuery; + } + + /** + * Sets the checkQuery. + * @param checkQuery the checkQuery to set + */ + public void setCheckQuery(String checkQuery) + { + this.checkQuery = checkQuery; + } + + /** + * Returns the insertQuery. + * @return the insertQuery + */ + public String getInsertQuery() + { + return insertQuery; + } + + /** + * Sets the insertQuery. + * @param insertQuery the insertQuery to set + */ + public void setInsertQuery(String insertQuery) + { + this.insertQuery = insertQuery; + } + } +} Property changes on: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/ExcelConfigurationTask.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 16:49:41
|
Revision: 179 http://svn.sourceforge.net/openutils/?rev=179&view=rev Author: fcarone Date: 2007-02-01 08:35:22 -0800 (Thu, 01 Feb 2007) Log Message: ----------- configuration managers added Modified Paths: -------------- trunk/openutils-configuration/pom.xml trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java trunk/openutils-configuration-dataobjects/pom.xml Added Paths: ----------- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAOImpl.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAOImpl.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAOImpl.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAOImpl.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ConfigurationDomainDeleteException.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeDeleteException.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeSaveException.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManager.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManagerImpl.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManager.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManagerImpl.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ConfigurationManagerTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ReferenceManagerTest.java trunk/openutils-configuration/src/test/resources/database.properties trunk/openutils-configuration/src/test/resources/dataset.dtd trunk/openutils-configuration/src/test/resources/hibernate.cfg.xml trunk/openutils-configuration/src/test/resources/log4j.dtd trunk/openutils-configuration/src/test/resources/log4j.xml trunk/openutils-configuration/src/test/resources/spring-dao.xml trunk/openutils-configuration/src/test/resources/spring-database.xml trunk/openutils-configuration/src/test/resources/spring-hibernate.xml trunk/openutils-configuration/src/test/resources/spring-managers.xml trunk/openutils-configuration/src/test/resources/spring-tests.xml Modified: trunk/openutils-configuration/pom.xml =================================================================== --- trunk/openutils-configuration/pom.xml 2007-02-01 15:35:55 UTC (rev 178) +++ trunk/openutils-configuration/pom.xml 2007-02-01 16:35:22 UTC (rev 179) @@ -11,7 +11,7 @@ <artifactId>openutils-configuration</artifactId> <packaging>jar</packaging> <name>openutils-configuration</name> - <version>1.0.0</version> + <version>1.0-SNAPSHOT</version> <description>Configuration classes</description> <dependencies> <dependency> @@ -23,7 +23,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-configuration-dataobjects</artifactId> - <version>1.0.0</version> + <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAOImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAOImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAOImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,24 @@ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.dao.hibernate.HibernateDAOImpl; + + +/** + * @author fcarone + * @version $Id$ + */ + +public class ConfigurationCodeDAOImpl extends HibernateDAOImpl<ConfigurationCode, Long> implements ConfigurationCodeDAO +{ + + /** + * {@inheritDoc} + */ + @Override + protected Class<ConfigurationCode> getReferenceClass() + { + return ConfigurationCode.class; + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAOImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAOImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAOImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAOImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,29 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationDomain; +import it.openutils.dao.hibernate.HibernateDAOImpl; + + +/** + * @author fcarone + * @version $Id$ + */ + +public class ConfigurationDomainDAOImpl extends HibernateDAOImpl<ConfigurationDomain, String> + implements + ConfigurationDomainDAO +{ + + /** + * {@inheritDoc} + */ + @Override + protected Class<ConfigurationDomain> getReferenceClass() + { + return ConfigurationDomain.class; + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAOImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAOImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAOImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAOImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,54 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.dao.hibernate.HibernateDAOImpl; + +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.springframework.orm.hibernate3.HibernateCallback; + + +/** + * @author fcarone + * @version $Id$ + */ + +public class ReferenceCodeDAOImpl extends HibernateDAOImpl<ReferenceCode, Long> implements ReferenceCodeDAO +{ + + /** + * {@inheritDoc} + */ + @Override + protected Class<ReferenceCode> getReferenceClass() + { + return ReferenceCode.class; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean delete(final Long key) + { + + return (Boolean) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + + ReferenceCode code = (ReferenceCode) ses.load(getReferenceClass(), key); + ses.delete(code); + // Hibernate doesn't automatically flush the session after delete and we don't know why + ses.flush(); + return true; + } + }); + + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAOImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAOImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAOImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAOImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,27 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceDomain; +import it.openutils.dao.hibernate.HibernateDAOImpl; + + +/** + * @author fcarone + * @version $Id$ + */ + +public class ReferenceDomainDAOImpl extends HibernateDAOImpl<ReferenceDomain, String> implements ReferenceDomainDAO +{ + + /** + * {@inheritDoc} + */ + @Override + protected Class<ReferenceDomain> getReferenceClass() + { + return ReferenceDomain.class; + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAOImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ConfigurationDomainDeleteException.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ConfigurationDomainDeleteException.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ConfigurationDomainDeleteException.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,37 @@ +package it.openutils.configuration.exceptions; + +/** + * @author collins + * @version $Id$ + */ +public class ConfigurationDomainDeleteException extends RuntimeException +{ + + private static final long serialVersionUID = 0202L; + + /** + * @param message The error message. + * @param cause The error cause. + */ + public ConfigurationDomainDeleteException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * @param message The error message. + */ + public ConfigurationDomainDeleteException(String message) + { + super(message); + } + + /** + * @param cause The error cause. + */ + public ConfigurationDomainDeleteException(Throwable cause) + { + super(cause); + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ConfigurationDomainDeleteException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeDeleteException.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeDeleteException.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeDeleteException.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,37 @@ +package it.openutils.configuration.exceptions; + +/** + * @author collins + * @version $Id$ + */ +public class ReferenceCodeDeleteException extends RuntimeException +{ + + private static final long serialVersionUID = 0202L; + + /** + * @param message The error message. + * @param cause The error cause. + */ + public ReferenceCodeDeleteException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * @param message The error message. + */ + public ReferenceCodeDeleteException(String message) + { + super(message); + } + + /** + * @param cause The error cause. + */ + public ReferenceCodeDeleteException(Throwable cause) + { + super(cause); + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeDeleteException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeSaveException.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeSaveException.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeSaveException.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,37 @@ +package it.openutils.configuration.exceptions; + +/** + * @author collins + * @version $Id$ + */ +public class ReferenceCodeSaveException extends RuntimeException +{ + + private static final long serialVersionUID = 0202L; + + /** + * @param message The error message. + * @param cause The error cause. + */ + public ReferenceCodeSaveException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * @param message The error message. + */ + public ReferenceCodeSaveException(String message) + { + super(message); + } + + /** + * @param cause The error cause. + */ + public ReferenceCodeSaveException(Throwable cause) + { + super(cause); + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/exceptions/ReferenceCodeSaveException.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManager.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManager.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManager.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,74 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.configuration.dataobjects.ConfigurationDomain; + +import java.util.List; + +/** + * @author fgiust + * @version $Id$ + */ +public interface ConfigurationManager +{ + + /** + * Returns the list of all esisting ConfigurationDomain + * @return a list of ConfigurationDomain. + */ + List<ConfigurationDomain> getConfigurationDomains(); + + /** + * Returns the list of ConfigurationCode associated to a given domain + * @param domain domain + * @return configuration configuration. + */ + List<ConfigurationCode> getConfigurationCodes(String domain); + + /** + * Returns the list of ConfigurationCode associated to a given domain + * @param domain domain + * @return configuration configuration. + */ + List<String> getConfigurationCodesAsString(String domain); + + /** + * Save a ConfigurationDomain + * @param domain domain + * @return domain ConfigurationDomain's instance. + */ + ConfigurationDomain saveOrUpdateConfigurationDomain(ConfigurationDomain domain); + + /** + * Save a ConfigurationCode + * @param configurationCode configurationCode + * @return configurationCode ConfigurationCode instance. + */ + ConfigurationCode saveOrUpdateConfigurationCode(ConfigurationCode configurationCode); + + /** + * Remove a ConfigurationDomain + * @param domain domain + */ + void removeConfigurationDomain(String domain); + + /** + * Remove a ConfigurationCode + * @param configurationCode configurationCode + */ + void removeConfigurationCode(ConfigurationCode configurationCode); + + /** + * @param domainId The configuration domani you want configuration codes for. + * @return configuration domain by id + */ + ConfigurationDomain getConfigurationDomain(String domainId); + + /** + * @param domainId The configuration domani you want configuration codes for. + * @param codeId The configuration code id. + * @return The ConfigurationCode identified by the configuration code id. + */ + ConfigurationCode getConfigurationCode(String domainId, String codeId); + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManager.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManagerImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManagerImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManagerImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,172 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dao.ConfigurationCodeDAO; +import it.openutils.configuration.dao.ConfigurationDomainDAO; +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.configuration.dataobjects.ConfigurationDomain; +import it.openutils.configuration.exceptions.ConfigurationDomainDeleteException; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang.StringUtils; + + +/** + * @author fgiust + * @version $Id$ + */ +public class ConfigurationManagerImpl implements ConfigurationManager +{ + + /** + * Data access object for ConfigurationCode. + */ + private ConfigurationCodeDAO configurationCodeDAO; + + /** + * Data access object for ConfigurationDomain. + */ + private ConfigurationDomainDAO configurationDomainDAO; + + /** + * Sets the configurationCodeDAO. + * @param configurationCodeDAO the configurationCodeDAO to set + */ + public void setConfigurationCodeDAO(ConfigurationCodeDAO configurationCodeDAO) + { + this.configurationCodeDAO = configurationCodeDAO; + } + + /** + * Sets the configurationDomainDAO. + * @param configurationDomainDAO the configurationDomainDAO to set + */ + public void setConfigurationDomainDAO(ConfigurationDomainDAO configurationDomainDAO) + { + this.configurationDomainDAO = configurationDomainDAO; + } + + /** + * {@inheritDoc} + */ + public List<ConfigurationDomain> getConfigurationDomains() + { + + return configurationDomainDAO.findAll(); + } + + /** + * {@inheritDoc} + */ + public List<ConfigurationCode> getConfigurationCodes(String domain) + { + ConfigurationDomain configurationDomain = configurationDomainDAO.loadIfAvailable(domain); + if (configurationDomain == null) + { + return new ArrayList<ConfigurationCode>(); + } + + ConfigurationCode filter = new ConfigurationCode(); + filter.setConfigurationdomain(configurationDomain); + + return configurationCodeDAO.findFiltered(filter); + } + + /** + * {@inheritDoc} + */ + public List<String> getConfigurationCodesAsString(String domain) + { + ConfigurationDomain configurationDomain = configurationDomainDAO.loadIfAvailable(domain); + if (configurationDomain == null) + { + return new ArrayList<String>(); + } + + List<String> configurationCodes = new ArrayList<String>(); + List<ConfigurationCode> configurationCodesList = new ArrayList<ConfigurationCode>(); + + ConfigurationCode filter = new ConfigurationCode(); + filter.setConfigurationdomain(configurationDomain); + configurationCodesList = configurationCodeDAO.findFiltered(filter); + + for (ConfigurationCode code : configurationCodesList) + { + configurationCodes.add(code.getCode()); + } + + return configurationCodes; + } + + /** + * {@inheritDoc} + */ + public ConfigurationDomain saveOrUpdateConfigurationDomain(ConfigurationDomain domain) + { + configurationDomainDAO.saveOrUpdate(domain); + + return domain; + } + + /** + * {@inheritDoc} + */ + public ConfigurationCode saveOrUpdateConfigurationCode(ConfigurationCode configurationCode) + { + configurationDomainDAO.saveOrUpdate(configurationCode.getConfigurationdomain()); + configurationCodeDAO.saveOrUpdate(configurationCode); + + return configurationCode; + } + + /** + * {@inheritDoc} + */ + public void removeConfigurationCode(ConfigurationCode configurationCode) + { + configurationCodeDAO.delete(configurationCode.getId()); + } + + /** + * {@inheritDoc} + */ + public void removeConfigurationDomain(String domain) + { + List<ConfigurationCode> configurationCodes = getConfigurationCodes(domain); + if (configurationCodes.isEmpty()) + { + configurationDomainDAO.delete(domain); + } + else + { + throw new ConfigurationDomainDeleteException("Cannot delete ConfigurationDomain with ConfigurationCodes."); + } + } + + /** + * {@inheritDoc} + */ + public ConfigurationDomain getConfigurationDomain(String domainId) + { + ConfigurationDomain domain = configurationDomainDAO.load(domainId); + return domain; + } + + /** + * {@inheritDoc} + */ + public ConfigurationCode getConfigurationCode(String domainId, String codeId) + { + List<ConfigurationCode> configurationCodes = getConfigurationCodes(domainId); + for (ConfigurationCode configurationCode : configurationCodes) + { + if (StringUtils.equals(configurationCode.getCode(), codeId)) + { + return configurationCode; + } + } + return null; + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ConfigurationManagerImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManager.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManager.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManager.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,84 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.configuration.dataobjects.ReferenceDomain; + +import java.util.List; +import java.util.Map; + +/** + * Manages reference code and domains. + * @author fgiust + * @version $Id$ + */ +public interface ReferenceManager +{ + + /** + * Returns the list of all esisting ReferenceDomain + * @return a list of ReferenceDomain. + */ + List<ReferenceDomain> getReferenceDomains(); + + /** + * Returns the list of Active reference codes associated to a given domain + * @param domainId ReferenceDomain code + * @return reference code values as an array of strings. + */ + List<String> getReferenceCodesAsString(String domainId); + + /** + * Return the domain with the given id + * @param domainId ReferenceDomain code + * @return ReferenceDomain + */ + ReferenceDomain getReferenceDomain(String domainId); + + /** + * Returns the list of all reference codes associated to a given domain referenceCodes + * @param domainId ReferenceDomain code + * @return reference codes. + */ + List<ReferenceCode> getReferenceCodes(String domainId); + + /** + * Returns the list of Active reference codes associated to a given domain + * @param domainId ReferenceDomain code + * @return reference codes. + */ + Map<String, String> getReferenceCodesAsMap(String domainId); + + /** + * Saves a given reference code. + * @param code ReferenceCode instance + * @return saved ReferenceCode instance. + */ + ReferenceCode saveOrUpdateReferenceCode(ReferenceCode code); + + /** + * Saves a given reference domain. + * @param domain ReferenceDomain instance + * @return saved ReferenceDomain instance. + */ + ReferenceDomain saveOrUpdateReferenceDomain(ReferenceDomain domain); + + /** + * Remove a ReferenceCode + * @param referenceCode ReferenceCode instance + */ + void removeReferenceCode(ReferenceCode referenceCode); + + /** + * Remove a ReferenceCode by id + * @param referenceCodeId ReferenceCode instance id + */ + void removeReferenceCode(Long referenceCodeId); + + /** + * @param domain belonging domain + * @param code code to search + * @return referenceCode instance + */ + ReferenceCode getReferenceCode(String domain, String code); + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManager.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManagerImpl.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManagerImpl.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManagerImpl.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,212 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dao.ReferenceCodeDAO; +import it.openutils.configuration.dao.ReferenceDomainDAO; +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.configuration.dataobjects.ReferenceDomain; +import it.openutils.configuration.exceptions.ReferenceCodeSaveException; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + + +/** + * @author fgiust + * @version $Id$ + */ +public class ReferenceManagerImpl implements ReferenceManager +{ + + /** + * Data access object for reference codes. + */ + private ReferenceCodeDAO referenceCodeDAO; + + /** + * Data access object for reference domains. + */ + private ReferenceDomainDAO referenceDomainDAO; + + /** + * IOC setter. + * @param referenceCodeDAO the referenceCodeDAO to set + */ + public void setReferenceCodeDAO(ReferenceCodeDAO referenceCodeDAO) + { + this.referenceCodeDAO = referenceCodeDAO; + } + + /** + * IOC setter. + * @param referenceDomainDAO the referenceDomainDAO to set + */ + public void setReferenceDomainDAO(ReferenceDomainDAO referenceDomainDAO) + { + this.referenceDomainDAO = referenceDomainDAO; + } + + /** + * {@inheritDoc} + */ + public List<ReferenceDomain> getReferenceDomains() + { + return referenceDomainDAO.findAll(); + } + + + /** + * {@inheritDoc} + */ + public ReferenceCode saveOrUpdateReferenceCode(ReferenceCode referenceCode) + { + ReferenceDomain transientDomain = referenceCode.getReferencedomain(); + if (transientDomain == null || (transientDomain.getId() == null)) + { + throw new ReferenceCodeSaveException("Cannot save a ReferenceCode with an unknown ReferenceDomain."); + } + + ReferenceCode filter = new ReferenceCode(); + ReferenceDomain dbDomain = referenceDomainDAO.loadIfAvailable(transientDomain.getId()); + if (dbDomain == null) + { + referenceDomainDAO.save(transientDomain); + } + else + { + filter.setReferencedomain(dbDomain); + } + + filter.setCode(referenceCode.getCode()); + + ReferenceCode dbCode = referenceCodeDAO.findFilteredFirst(filter); + if (dbCode == null) + { + referenceCodeDAO.save(referenceCode); + return referenceCode; + } + dbCode.setActive(referenceCode.getActive()); + dbCode.setCode(referenceCode.getCode()); + dbCode.setDescription(referenceCode.getDescription()); + dbCode.setReferencedomain(referenceCode.getReferencedomain()); + referenceCodeDAO.update(dbCode); + return dbCode; + } + + /** + * {@inheritDoc} + */ + public void removeReferenceCode(ReferenceCode referenceCode) + { + referenceCodeDAO.delete(referenceCode.getId()); + } + + /** + * {@inheritDoc} + */ + public List<ReferenceCode> getReferenceCodes(String domainId) + { + ReferenceDomain referenceDomain = referenceDomainDAO.loadIfAvailable(domainId); + if (referenceDomain == null) + { + return new ArrayList<ReferenceCode>(); + } + + ReferenceCode filter = new ReferenceCode(); + filter.setReferencedomain(referenceDomain); + + List<ReferenceCode> referenceCodes = referenceCodeDAO.findFiltered(filter); + Collections.sort(referenceCodes); + return referenceCodes; + } + + /** + * {@inheritDoc} + */ + public List<String> getReferenceCodesAsString(String domainId) + { + ReferenceDomain referenceDomain = referenceDomainDAO.loadIfAvailable(domainId); + if (referenceDomain == null) + { + return new ArrayList<String>(); + } + List<String> codeIds = new ArrayList<String>(); + + ReferenceCode filter = new ReferenceCode(); + filter.setReferencedomain(referenceDomain); + filter.setActive(Boolean.TRUE); + + List<ReferenceCode> codes = referenceCodeDAO.findFiltered(filter); + + for (ReferenceCode code : codes) + { + codeIds.add(code.getCode()); + } + + return codeIds; + } + + /** + * {@inheritDoc} + */ + public ReferenceDomain getReferenceDomain(String domainId) + { + return referenceDomainDAO.load(domainId); + } + + /** + * {@inheritDoc} + */ + public ReferenceDomain saveOrUpdateReferenceDomain(ReferenceDomain domain) + { + if (domain.getId() == null || referenceDomainDAO.loadIfAvailable(domain.getId()) == null) + { + referenceDomainDAO.save(domain); + return domain; + } + ReferenceDomain dbDomain = referenceDomainDAO.loadIfAvailable(domain.getId()); + dbDomain.setDescription(domain.getDescription()); + referenceDomainDAO.update(dbDomain); + return dbDomain; + } + + /** + * {@inheritDoc} + */ + public Map<String, String> getReferenceCodesAsMap(String domainId) + { + List<ReferenceCode> codes = getReferenceCodes(domainId); + Map<String, String> map = new LinkedHashMap<String, String>(codes.size()); + for (ReferenceCode code : codes) + { + if (code.getActive()) + { + map.put(code.getCode(), code.getDescription()); + } + } + return map; + } + + /** + * {@inheritDoc} + */ + public void removeReferenceCode(Long referenceCodeId) + { + referenceCodeDAO.delete(referenceCodeId); + + } + + /** + * {@inheritDoc} + */ + public ReferenceCode getReferenceCode(String domain, String code) + { + ReferenceCode filterCode = new ReferenceCode(); + filterCode.setCode(code); + filterCode.setReferencedomain(getReferenceDomain(domain)); + return referenceCodeDAO.findFilteredFirst(filterCode); + } + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/services/ReferenceManagerImpl.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dao; import it.openutils.configuration.dataobjects.ConfigurationCode; @@ -85,7 +82,7 @@ public void testDelete() { instance.delete(new Long("1")); - List all = instance.findAll(); + List<ConfigurationCode> all = instance.findAll(); Assert.assertEquals(1, all.size()); } Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dao; import it.openutils.configuration.dataobjects.ConfigurationDomain; @@ -13,7 +10,8 @@ /** - * @author collins + * @author fcarone + * @version $Id$ */ public class ConfigurationDomainDAOTest extends GenericsDbUnitTestCase<ConfigurationDomainDAO> { @@ -68,7 +66,7 @@ public void testDelete() { instance.delete("DOMINIO1"); - List all = instance.findAll(); + List<ConfigurationDomain> all = instance.findAll(); Assert.assertEquals(0, all.size()); } Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dao; import it.openutils.configuration.dataobjects.ReferenceCode; @@ -13,7 +10,8 @@ /** - * @author collins + * @author fcarone + * @version $Id$ */ public class ReferenceCodeDAOTest extends GenericsDbUnitTestCase<ReferenceCodeDAO> { @@ -72,7 +70,7 @@ public void testDelete() { instance.delete(1L); - List all = instance.findAll(); + List<ReferenceCode> all = instance.findAll(); Assert.assertEquals(0, all.size()); } Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dao; import it.openutils.configuration.dataobjects.ReferenceDomain; @@ -13,7 +10,8 @@ /** - * @author collins + * @author fcarone + * @version $Id$ */ public class ReferenceDomainDAOTest extends GenericsDbUnitTestCase<ReferenceDomainDAO> { @@ -68,7 +66,7 @@ public void testDelete() { instance.delete("DOMINIO1"); - List all = instance.findAll(); + List<ReferenceDomain> all = instance.findAll(); Assert.assertEquals(0, all.size()); } Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ConfigurationManagerTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ConfigurationManagerTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ConfigurationManagerTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,88 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.configuration.dataobjects.ConfigurationDomain; +import it.openutils.configuration.exceptions.ConfigurationDomainDeleteException; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author fcarone + * @version $Id$ + */ +public class ConfigurationManagerTest extends GenericsDbUnitTestCase<ConfigurationManager> +{ + + /** + * Test for the getConfigurationDomains method. + */ + @Test + public void testGetConfigurationDomains() + { + List<ConfigurationDomain> configurationDomains = instance.getConfigurationDomains(); + Assert.assertNotNull(configurationDomains, "Referenced object is null"); + Assert.assertEquals(((configurationDomains.get(0).getId())), "CONFIG_DOMAIN"); + Assert.assertEquals(((configurationDomains.get(0).getDescription())), "DESCRIZIONE"); + } + + /** + * Test for the getConfigurationCodes method. + */ + @Test + public void testGetConfigurationCodes() + { + List<ConfigurationCode> configurationCodes = instance.getConfigurationCodes("CONFIG_DOMAIN"); + Assert.assertNotNull(configurationCodes, "Referenced object is null"); + Assert.assertEquals(((configurationCodes.get(0).getConfigurationdomain())).getId(), "CONFIG_DOMAIN"); + Assert.assertEquals(((configurationCodes.get(0).getValue())), "VALORE"); + } + + /** + * Test for the saveOrUpdateConfigurationCode method. + */ + @Test + public void testSaveOrUpdateConfigurationCode() + { + + ConfigurationCode cc = new ConfigurationCode(); + cc.setDescription("descrizione"); + cc.setCode("codice"); + cc.setType("tipo"); + cc.setValue("valore"); + + ConfigurationDomain cd = new ConfigurationDomain(); + cd.setId("NEW_DOMAIN"); + cd.setDescription("DESCRIZIONE"); + + cc.setConfigurationdomain(cd); + instance.saveOrUpdateConfigurationCode(cc); + + List<ConfigurationDomain> configurationDomains = instance.getConfigurationDomains(); + Assert.assertNotNull(configurationDomains, "Referenced object is null"); + Assert.assertEquals(((configurationDomains.size())), 3); + + List<ConfigurationCode> configurationCodes = instance.getConfigurationCodes("NEW_DOMAIN"); + Assert.assertNotNull(configurationCodes, "Referenced object is null"); + Assert.assertEquals(((configurationCodes.get(0).getType())), "tipo"); + } + + /** + * Test for the removeConfigurationDomain method. + */ + @Test(expectedExceptions = ConfigurationDomainDeleteException.class) + public void testRemoveConfigurationDomain() + { + + List<ConfigurationDomain> configurationDomains = instance.getConfigurationDomains(); + Assert.assertNotNull(configurationDomains, "Referenced object is null"); + Assert.assertEquals(((configurationDomains.get(1).getId())), "CONFIG_DOMAIN_2"); + + ConfigurationDomain configurationDomain = configurationDomains.get(1); + instance.removeConfigurationDomain(configurationDomain.getId()); + } +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ConfigurationManagerTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ReferenceManagerTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ReferenceManagerTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ReferenceManagerTest.java 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,128 @@ +package it.openutils.configuration.services; + +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.configuration.dataobjects.ReferenceDomain; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; +import java.util.Map; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author fgiust + * @version $Id$ + */ +public class ReferenceManagerTest extends GenericsDbUnitTestCase<ReferenceManager> +{ + + /** + * Test for the getReferenceDomains method. + */ + @Test + public void testGetReferenceDomains() + { + List<ReferenceDomain> referenceDomains = instance.getReferenceDomains(); + Assert.assertNotNull(referenceDomains, "Referenced object is null"); + Assert.assertEquals(((referenceDomains.get(0).getId())), "CURVE_DOMAIN"); + } + + /** + * Test for the getReferenceCodes method. + */ + @Test + public void testGetReferenceCodesNotExisting() + { + List<ReferenceCode> referenceCodes = instance.getReferenceCodes("pippo"); + Assert.assertNotNull(referenceCodes, "Referenced object is null"); + Assert.assertTrue(referenceCodes.isEmpty()); + } + + /** + * Test for the getReferenceCodesAsString method. + */ + @Test + public void testGetReferenceCodesAsStringNotExisting() + { + List<String> referenceCodes = instance.getReferenceCodesAsString("pippo"); + Assert.assertNotNull(referenceCodes, "Referenced object is null"); + Assert.assertTrue(referenceCodes.isEmpty()); + } + + /** + * Test for the saveReferenceCode method. + */ + @Test + public void testSaveReferenceCode() + { + + List<ReferenceDomain> referenceDomains = instance.getReferenceDomains(); + Assert.assertNotNull(referenceDomains, "Referenced object is null"); + Assert.assertEquals(((referenceDomains.get(0).getId())), "CURVE_DOMAIN"); + + ReferenceCode rc = new ReferenceCode(); + rc.setCode("codice"); + rc.setDescription("descrizione"); + rc.setActive(Boolean.FALSE); + + ReferenceDomain rd = new ReferenceDomain(); + rd.setId("NEW_DOMAIN"); + rd.setDescription("DESCRIZIONE"); + + rc.setReferencedomain(rd); + ReferenceCode referenceCodeSaved = instance.saveOrUpdateReferenceCode(rc); + Assert.assertNotNull(referenceCodeSaved, "Saved object is null"); + } + + /** + * Test for the getReferenceCodesAsString method. + */ + @Test + public void testGetReferenceCodesAsMap() + { + Map<String, String> result = instance.getReferenceCodesAsMap("CURVE_DOMAIN"); + Assert.assertNotNull(result, "Referenced object is null"); + Assert.assertEquals(result.get("CODICE"), "DESCRIZIONE"); + } + + /** + * Test for the getReferenceCodesAsString method. + */ + @Test + public void testGetReferenceCodesAsMapNotExisting() + { + Map<String, String> result = instance.getReferenceCodesAsMap("pippo"); + Assert.assertNotNull(result, "Referenced object is null"); + Assert.assertTrue(result.isEmpty()); + } + + /** + * Test for the getetReferenceDomain method. + */ + @Test + public void testGetReferenceDomainWithCode() + { + List<ReferenceDomain> referenceDomains = instance.getReferenceDomains(); + Assert.assertNotNull(referenceDomains, "Referenced object is null"); + Assert.assertEquals(((referenceDomains.get(0).getId())), "CURVE_DOMAIN"); + } + + /** + * Test for the saveOrUpdateReferenceDomain method. + */ + @Test + public void testSaveOrUpdateReferenceDomain() + { + + ReferenceDomain rd = new ReferenceDomain(); + rd.setId("NEW_DOMAIN"); + rd.setDescription("DESCRIZIONE"); + + instance.saveOrUpdateReferenceDomain(rd); + + Assert.assertEquals(instance.getReferenceDomains().size(), 2); + } + +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/services/ReferenceManagerTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/database.properties =================================================================== --- trunk/openutils-configuration/src/test/resources/database.properties (rev 0) +++ trunk/openutils-configuration/src/test/resources/database.properties 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,11 @@ +# ATTENZIONE: queste propriet\xE0 sono utilizzate solo per gli unit tests +# i file per la configurazione del db utilizzati dall'applicazione web sono in +# src/main/web-app/WEB-INF + +hibernate.connection.driver=org.apache.derby.jdbc.EmbeddedDriver +hibernate.dialect=org.hibernate.dialect.DerbyDialect +hibernate.connection.username=ikam +hibernate.connection.password= +hibernate.connection.url=jdbc:derby:target/db/openutils-usermanagement-db-test;create=true +hibernate.hbm2ddl.auto=update + Added: trunk/openutils-configuration/src/test/resources/dataset.dtd =================================================================== --- trunk/openutils-configuration/src/test/resources/dataset.dtd (rev 0) +++ trunk/openutils-configuration/src/test/resources/dataset.dtd 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,13 @@ +<!ELEMENT dataset (table*)> +<!ELEMENT table (column+,row+)> +<!ATTLIST table + name CDATA #REQUIRED +> +<!ELEMENT row (value|null)+> +<!ELEMENT column (#PCDATA)> +<!ELEMENT value (#PCDATA)> +<!ELEMENT null EMPTY> +<!-- +nb una tabella senza righe sarebbe valida (per cancellare tutto il contenuto), +ma NON DEVE ESISTERE NEI NOSTRI TEST IN QUANTO TUTTE LE TABELLE VENGONO SVUOTATE PRIMA DEL CARICAMENTO +--> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/dataset.dtd ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/hibernate.cfg.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/hibernate.cfg.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/hibernate.cfg.xml 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,11 @@ +<!DOCTYPE hibernate-configuration PUBLIC + "-//Hibernate/Hibernate Configuration DTD 3.0//EN" + "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + <mapping class="it.openutils.configuration.dataobjects.ConfigurationCode" /> + <mapping class="it.openutils.configuration.dataobjects.ConfigurationDomain" /> + <mapping class="it.openutils.configuration.dataobjects.ReferenceCode" /> + <mapping class="it.openutils.configuration.dataobjects.ReferenceDomain" /> + </session-factory> +</hibernate-configuration> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/hibernate.cfg.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/log4j.dtd =================================================================== --- trunk/openutils-configuration/src/test/resources/log4j.dtd (rev 0) +++ trunk/openutils-configuration/src/test/resources/log4j.dtd 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- Authors: Chris Taylor, Ceki Gulcu. --> + +<!-- Version: 1.2 --> + +<!-- A configuration element consists of optional renderer +elements,appender elements, categories and an optional root +element. --> + +<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, + categoryFactory?)> + +<!-- The "threshold" attribute takes a level value such that all --> +<!-- logging statements with a level equal or below this value are --> +<!-- disabled. --> + +<!-- Setting the "debug" enable the printing of internal log4j logging --> +<!-- statements. --> + +<!-- By default, debug attribute is "null", meaning that we not do touch --> +<!-- internal log4j logging settings. The "null" value for the threshold --> +<!-- attribute can be misleading. The threshold field of a repository --> +<!-- cannot be set to null. The "null" value for the threshold attribute --> +<!-- simply means don't touch the threshold field, the threshold field --> +<!-- keeps its old value. --> + +<!ATTLIST log4j:configuration + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + threshold (all|debug|info|warn|error|fatal|off|null) "null" + debug (true|false|null) "null" +> + +<!-- renderer elements allow the user to customize the conversion of --> +<!-- message objects to String. --> + +<!ELEMENT renderer EMPTY> +<!ATTLIST renderer + renderedClass CDATA #REQUIRED + renderingClass CDATA #REQUIRED +> + +<!-- Appenders must have a name and a class. --> +<!-- Appenders may contain an error handler, a layout, optional parameters --> +<!-- and filters. They may also reference (or include) other appenders. --> +<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> +<!ATTLIST appender + name ID #REQUIRED + class CDATA #REQUIRED +> + +<!ELEMENT layout (param*)> +<!ATTLIST layout + class CDATA #REQUIRED +> + +<!ELEMENT filter (param*)> +<!ATTLIST filter + class CDATA #REQUIRED +> + +<!-- ErrorHandlers can be of any class. They can admit any number of --> +<!-- parameters. --> + +<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> +<!ATTLIST errorHandler + class CDATA #REQUIRED +> + +<!ELEMENT root-ref EMPTY> + +<!ELEMENT logger-ref EMPTY> +<!ATTLIST logger-ref + ref IDREF #REQUIRED +> + +<!ELEMENT param EMPTY> +<!ATTLIST param + name CDATA #REQUIRED + value CDATA #REQUIRED +> + + +<!-- The priority class is org.apache.log4j.Level by default --> +<!ELEMENT priority (param*)> +<!ATTLIST priority + class CDATA #IMPLIED + value CDATA #REQUIRED +> + +<!-- The level class is org.apache.log4j.Level by default --> +<!ELEMENT level (param*)> +<!ATTLIST level + class CDATA #IMPLIED + value CDATA #REQUIRED +> + + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named category. --> +<!ELEMENT category (param*,(priority|level)?,appender-ref*)> +<!ATTLIST category + class CDATA #IMPLIED + name CDATA #REQUIRED + additivity (true|false) "true" +> + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named logger. --> +<!ELEMENT logger (level?,appender-ref*)> +<!ATTLIST logger + name ID #REQUIRED + additivity (true|false) "true" +> + + +<!ELEMENT categoryFactory (param*)> +<!ATTLIST categoryFactory + class CDATA #REQUIRED> + +<!ELEMENT appender-ref EMPTY> +<!ATTLIST appender-ref + ref IDREF #REQUIRED +> + +<!-- If no priority element is specified, then the configurator MUST not --> +<!-- touch the priority of root. --> +<!-- The root category always exists and cannot be subclassed. --> +<!ELEMENT root (param*, (priority|level)?, appender-ref*)> + + +<!-- ==================================================================== --> +<!-- A logging event --> +<!-- ==================================================================== --> +<!ELEMENT log4j:eventSet (log4j:event*)> +<!ATTLIST log4j:eventSet + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + version (1.1|1.2) "1.2" + includesLocationInfo (true|false) "true" +> + + + +<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, + log4j:locationInfo?) > + +<!-- The timestamp format is application dependent. --> +<!ATTLIST log4j:event + logger CDATA #REQUIRED + level CDATA #REQUIRED + thread CDATA #REQUIRED + timestamp CDATA #REQUIRED +> + +<!ELEMENT log4j:message (#PCDATA)> +<!ELEMENT log4j:NDC (#PCDATA)> + +<!ELEMENT log4j:throwable (#PCDATA)> + +<!ELEMENT log4j:locationInfo EMPTY> +<!ATTLIST log4j:locationInfo + class CDATA #REQUIRED + method CDATA #REQUIRED + file CDATA #REQUIRED + line CDATA #REQUIRED +> Property changes on: trunk/openutils-configuration/src/test/resources/log4j.dtd ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/log4j.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/log4j.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/log4j.xml 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<log4j:configuration> + <!-- log4j test configuration --> + <appender name="test-appender" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%-5p %c.%M(%C{1}.java:%L) %m%n" /> + <!-- <param name="ConversionPattern" value="%-5p %m%n" />--> + </layout> + </appender> + <category name="it"> + <priority value="debug" /> + </category> + <category name="org"> + <priority value="warn" /> + </category> + <category name="com"> + <priority value="warn" /> + </category> + <category name="net"> + <priority value="warn" /> + </category> + <category name="org.hibernate"> + <priority value="warn" /> + </category> + <category name="it.openutils.test.ApplicationContextHolder"> + <priority value="info" /> + </category> + <category name="it.openutils.test.BaseDAOTestCase"> + <priority value="INFO" /> + </category> + <category name="it.openutils"> + <priority value="INFO" /> + </category> + <category name="it.openutils.test"> + <priority value="INFO" /> + </category> + <category name="it.faber.AllTests"> + <priority value="info" /> + </category> + <category name="it.openutils.dbupdate.DbSetupManagerImpl"> + <priority value="INFO" /> + </category> + <root> + <priority value="debug" /> + <appender-ref ref="test-appender" /> + </root> +</log4j:configuration> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/log4j.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/spring-dao.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/spring-dao.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/spring-dao.xml 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" +"http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + <bean id="configurationCodeDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.configuration.dao.ConfigurationCodeDAOImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> + </bean> + <bean id="configurationDomainDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.configuration.dao.ConfigurationDomainDAOImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> + </bean> + <bean id="referenceCodeDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.configuration.dao.ReferenceCodeDAOImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> + </bean> + <bean id="referenceDomainDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.configuration.dao.ReferenceDomainDAOImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> + </bean> + +</beans> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/spring-dao.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/spring-database.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/spring-database.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/spring-database.xml 2007-02-01 16:35:22 UTC (rev 179) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding... [truncated message content] |
From: <fc...@us...> - 2007-02-01 15:35:59
|
Revision: 178 http://svn.sourceforge.net/openutils/?rev=178&view=rev Author: fcarone Date: 2007-02-01 07:35:55 -0800 (Thu, 01 Feb 2007) Log Message: ----------- openutils configuration populated Modified Paths: -------------- trunk/openutils-configuration/pom.xml Added Paths: ----------- trunk/openutils-configuration/src/main/java/it/ trunk/openutils-configuration/src/main/java/it/openutils/ trunk/openutils-configuration/src/main/java/it/openutils/configuration/ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAO.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAO.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAO.java trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAO.java trunk/openutils-configuration/src/test/java/it/ trunk/openutils-configuration/src/test/java/it/openutils/ trunk/openutils-configuration/src/test/java/it/openutils/configuration/ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml Modified: trunk/openutils-configuration/pom.xml =================================================================== --- trunk/openutils-configuration/pom.xml 2007-02-01 15:27:29 UTC (rev 177) +++ trunk/openutils-configuration/pom.xml 2007-02-01 15:35:55 UTC (rev 178) @@ -74,16 +74,17 @@ <scope>test</scope> </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>dbunit</groupId> <artifactId>dbunit</artifactId> <version>2.1</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <version>5.1</version> + <classifier>jdk15</classifier> + <scope>test</scope> + </dependency> </dependencies> </project> \ No newline at end of file Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAO.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAO.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAO.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,14 @@ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.dao.hibernate.HibernateDAO; + + +/** + * @author fcarone + * @version $Id$ + */ +public interface ConfigurationCodeDAO extends HibernateDAO<ConfigurationCode, Long> +{ + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationCodeDAO.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAO.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAO.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAO.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,14 @@ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationDomain; +import it.openutils.dao.hibernate.HibernateDAO; + + +/** + * @author fcarone + * @version $Id$ + */ +public interface ConfigurationDomainDAO extends HibernateDAO<ConfigurationDomain, String> +{ + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ConfigurationDomainDAO.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAO.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAO.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAO.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,14 @@ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.dao.hibernate.HibernateDAO; + + +/** + * @author fcarone + * @version $Id$ + */ +public interface ReferenceCodeDAO extends HibernateDAO<ReferenceCode, Long> +{ + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceCodeDAO.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAO.java =================================================================== --- trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAO.java (rev 0) +++ trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAO.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,14 @@ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceDomain; +import it.openutils.dao.hibernate.HibernateDAO; + + +/** + * @author fcarone + * @version $Id$ + */ +public interface ReferenceDomainDAO extends HibernateDAO<ReferenceDomain, String> +{ + +} Property changes on: trunk/openutils-configuration/src/main/java/it/openutils/configuration/dao/ReferenceDomainDAO.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,92 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationCode; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author fcarone + * @version $Id$ + */ +public class ConfigurationCodeDAOTest extends GenericsDbUnitTestCase<ConfigurationCodeDAO> +{ + + /** + * Load the full list + */ + @Test + public void testFindAll() + { + List<ConfigurationCode> all = instance.findAll(); + Assert.assertNotNull(all, "Nothing returned by findAll"); + Assert.assertEquals(2, all.size()); + } + + /** + * load by ID. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testLoad() throws Exception + { + ConfigurationCode bean = instance.load(1L); + Assert.assertNotNull(bean, "Returned object is null"); + log.debug("bean is {}", bean); + Assert.assertEquals(new Long("1"), bean.getId()); + Assert.assertNotNull(bean.getConfigurationdomain()); + Assert.assertEquals("DOMINIO1", bean.getConfigurationdomain().getId()); + Assert.assertEquals("DESCRIZIONE", bean.getConfigurationdomain().getDescription()); + Assert.assertEquals("CODE1", bean.getCode()); + Assert.assertEquals("DESCRIZIONE", bean.getDescription()); + Assert.assertEquals("TIPO", bean.getType()); + Assert.assertEquals("VALORE", bean.getValue()); + + bean = instance.load(2L); + Assert.assertNotNull(bean, "Returned object is null"); + log.debug("bean is {}", bean); + Assert.assertEquals(new Long("2"), bean.getId()); + Assert.assertNotNull(bean.getConfigurationdomain()); + Assert.assertEquals(bean.getConfigurationdomain().getId(), "APPLTEST"); + Assert.assertEquals("Application server configuration", bean.getConfigurationdomain().getDescription()); + Assert.assertEquals("CURVE_SEARCH_LIMIT", bean.getCode()); + Assert.assertEquals("Maximum number of curves returned by a search operation.", bean.getDescription()); + Assert.assertEquals("INT", bean.getType()); + Assert.assertEquals("500", bean.getValue()); + } + + /** + * find. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testFindFiltered() throws Exception + { + + ConfigurationCode filter = new ConfigurationCode(); + filter.setType("TIPO"); + ConfigurationCode bean = instance.findFilteredFirst(filter); + + Assert.assertNotNull(bean, "Returned object is null"); + + } + + /** + * Test delete. + */ + @Test + public void testDelete() + { + instance.delete(new Long("1")); + List all = instance.findAll(); + Assert.assertEquals(1, all.size()); + } + +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,75 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ConfigurationDomain; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author collins + */ +public class ConfigurationDomainDAOTest extends GenericsDbUnitTestCase<ConfigurationDomainDAO> +{ + + /** + * Load the full list + */ + @Test + public void testFindAll() + { + List<ConfigurationDomain> all = instance.findAll(); + Assert.assertNotNull(all, "Nothing returned by findAll"); + Assert.assertEquals(1, all.size()); + } + + /** + * load by ID. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testLoad() throws Exception + { + ConfigurationDomain bean = instance.load("DOMINIO1"); + + Assert.assertNotNull(bean, "Returned object is null"); + log.debug("bean is {}", bean); + + Assert.assertEquals("DOMINIO1", bean.getId()); + Assert.assertEquals("DESCRIZIONE", bean.getDescription()); + } + + /** + * find. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testFindFiltered() throws Exception + { + + ConfigurationDomain filter = new ConfigurationDomain(); + filter.setDescription("DESCRIZIONE"); + ConfigurationDomain bean = instance.findFilteredFirst(filter); + + Assert.assertNotNull(bean, "Returned object is null"); + + } + + /** + * Test delete. + */ + @Test + public void testDelete() + { + instance.delete("DOMINIO1"); + List all = instance.findAll(); + Assert.assertEquals(0, all.size()); + } + +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationDomainDAOTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,79 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceCode; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author collins + */ +public class ReferenceCodeDAOTest extends GenericsDbUnitTestCase<ReferenceCodeDAO> +{ + + /** + * Test findAll + */ + @Test + public void testFindAll() + { + List<ReferenceCode> all = instance.findAll(); + Assert.assertNotNull(all, "Nothing returned by findAll"); + Assert.assertEquals(1, all.size()); + } + + /** + * Test load by ID. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testLoad() throws Exception + { + ReferenceCode bean = instance.load(1L); + Assert.assertNotNull(bean, "Returned object is null"); + log.debug("bean is {}", bean); + + Assert.assertEquals(new Long("1"), bean.getId()); + Assert.assertNotNull(bean.getReferencedomain()); + Assert.assertEquals("DOMINIO1", bean.getReferencedomain().getId()); + Assert.assertEquals("DESCRIZIONE", bean.getReferencedomain().getDescription()); + Assert.assertEquals("DESCRIZIONE", bean.getDescription()); + Assert.assertEquals(Boolean.FALSE, bean.getActive()); + + } + + /** + * Test find. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testFindFiltered() throws Exception + { + + ReferenceCode filter = new ReferenceCode(); + filter.setActive(false); + ReferenceCode bean = instance.findFilteredFirst(filter); + + Assert.assertNotNull(bean, "Returned object is null"); + + } + + /** + * Test delete. + */ + @Test + public void testDelete() + { + instance.delete(1L); + List all = instance.findAll(); + Assert.assertEquals(0, all.size()); + } + +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceCodeDAOTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java =================================================================== --- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java (rev 0) +++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,75 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dao; + +import it.openutils.configuration.dataobjects.ReferenceDomain; +import it.openutils.testing.testng.GenericsDbUnitTestCase; + +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author collins + */ +public class ReferenceDomainDAOTest extends GenericsDbUnitTestCase<ReferenceDomainDAO> +{ + + /** + * Load the full list + */ + @Test + void testFindAll() + { + List<ReferenceDomain> all = instance.findAll(); + Assert.assertNotNull(all, "Nothing returned by findAll"); + Assert.assertEquals(1, all.size()); + } + + /** + * load by ID. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testLoad() throws Exception + { + ReferenceDomain bean = instance.load("DOMINIO1"); + + Assert.assertNotNull(bean, "Returned object is null"); + log.debug("bean is {}", bean); + + Assert.assertEquals("DOMINIO1", bean.getId()); + Assert.assertEquals("DESCRIZIONE", bean.getDescription()); + } + + /** + * find. + * @throws Exception any Exception occurred during test. + */ + @Test + public void testFindFiltered() throws Exception + { + + ReferenceDomain filter = new ReferenceDomain(); + filter.setDescription("DESCRIZIONE"); + ReferenceDomain bean = instance.findFilteredFirst(filter); + + Assert.assertNotNull(bean, "Returned object is null"); + + } + + /** + * Test delete. + */ + @Test + public void testDelete() + { + instance.delete("DOMINIO1"); + List all = instance.findAll(); + Assert.assertEquals(0, all.size()); + } + +} Property changes on: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ReferenceDomainDAOTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,39 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="CONFIGURATION_DOMAIN"> + <column>ID_CONFIGURATIONDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>DOMINIO1</value> + <value>DESCRIZIONE</value> + </row> + <row> + <value>APPLTEST</value> + <value>Application server configuration</value> + </row> + </table> + <table name="CONFIGURATION_CODE"> + <column>ID_CONFIGURATIONCODE</column> + <column>ID_CONFIGURATIONDOMAIN</column> + <column>CODE</column> + <column>DESCRIPTION</column> + <column>TYPE</column> + <column>VALUE</column> + <row> + <value>1</value> + <value>DOMINIO1</value> + <value>CODE1</value> + <value>DESCRIZIONE</value> + <value>TIPO</value> + <value>VALORE</value> + </row> + <row> + <value>2</value> + <value>APPLTEST</value> + <value>CURVE_SEARCH_LIMIT</value> + <value>Maximum number of curves returned by a search operation.</value> + <value>INT</value> + <value>500</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ConfigurationCodeDAOTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,11 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="CONFIGURATION_DOMAIN"> + <column>ID_CONFIGURATIONDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>DOMINIO1</value> + <value>DESCRIZIONE</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ConfigurationDomainDAOTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,25 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="REFERENCE_DOMAIN"> + <column>ID_REFERENCEDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>DOMINIO1</value> + <value>DESCRIZIONE</value> + </row> + </table> + <table name="REFERENCE_CODE"> + <column>ID_REFERENCECODE</column> + <column>ID_REFERENCEDOMAIN</column> + <column>CODE</column> + <column>DESCRIPTION</column> + <column>ACTIVE</column> + <row> + <value>1</value> + <value>DOMINIO1</value> + <value>CODICE</value> + <value>DESCRIZIONE</value> + <value>0</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ReferenceCodeDAOTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Added: trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml =================================================================== --- trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml (rev 0) +++ trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml 2007-02-01 15:35:55 UTC (rev 178) @@ -0,0 +1,11 @@ +<!DOCTYPE dataset SYSTEM "dataset.dtd"> +<dataset> + <table name="REFERENCE_DOMAIN"> + <column>ID_REFERENCEDOMAIN</column> + <column>DESCRIPTION</column> + <row> + <value>DOMINIO1</value> + <value>DESCRIZIONE</value> + </row> + </table> +</dataset> \ No newline at end of file Property changes on: trunk/openutils-configuration/src/test/resources/ReferenceDomainDAOTest-load.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 15:27:31
|
Revision: 177 http://svn.sourceforge.net/openutils/?rev=177&view=rev Author: fcarone Date: 2007-02-01 07:27:29 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Fix table names. Modified Paths: -------------- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java 2007-02-01 15:16:39 UTC (rev 176) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java 2007-02-01 15:27:29 UTC (rev 177) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dataobjects; import java.io.Serializable; Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java 2007-02-01 15:16:39 UTC (rev 176) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java 2007-02-01 15:27:29 UTC (rev 177) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dataobjects; import java.io.Serializable; @@ -19,7 +16,7 @@ */ @Entity -@Table(name = "CONFIGURATION_DOMAIN") +@Table(name = "APP_CONFIGURATION_DOMAIN") @XmlType(name = "") @XmlRootElement(name = "configurationDomain") public class ConfigurationDomain implements Serializable Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java 2007-02-01 15:16:39 UTC (rev 176) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java 2007-02-01 15:27:29 UTC (rev 177) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dataobjects; import java.io.Serializable; @@ -27,7 +24,7 @@ * @version $Id$ */ @Entity -@Table(name = "REFERENCE_CODE") +@Table(name = "APP_REFERENCE_CODE") @XmlType(name = "") @XmlRootElement(name = "referenceCode") public class ReferenceCode implements Comparable<ReferenceCode>, Serializable Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java 2007-02-01 15:16:39 UTC (rev 176) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java 2007-02-01 15:27:29 UTC (rev 177) @@ -1,6 +1,3 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ package it.openutils.configuration.dataobjects; import java.io.Serializable; @@ -22,7 +19,7 @@ */ @Entity -@Table(name = "REFERENCE_DOMAIN") +@Table(name = "APP_REFERENCE_DOMAIN") @XmlType(name = "") @XmlRootElement(name = "referenceDomain") public class ReferenceDomain implements Serializable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 15:16:53
|
Revision: 176 http://svn.sourceforge.net/openutils/?rev=176&view=rev Author: fcarone Date: 2007-02-01 07:16:39 -0800 (Thu, 01 Feb 2007) Log Message: ----------- initial project for configuration services and dao Modified Paths: -------------- trunk/openutils-configuration-dataobjects/pom.xml trunk/pom.xml Added Paths: ----------- trunk/openutils-configuration/ trunk/openutils-configuration/pom.xml trunk/openutils-configuration/src/ trunk/openutils-configuration/src/main/ trunk/openutils-configuration/src/main/java/ trunk/openutils-configuration/src/main/resources/ trunk/openutils-configuration/src/test/ trunk/openutils-configuration/src/test/java/ trunk/openutils-configuration/src/test/resources/ Property changes on: trunk/openutils-configuration ___________________________________________________________________ Name: svn:ignore + .settings target .checkstyle .classpath .project Added: trunk/openutils-configuration/pom.xml =================================================================== --- trunk/openutils-configuration/pom.xml (rev 0) +++ trunk/openutils-configuration/pom.xml 2007-02-01 15:16:39 UTC (rev 176) @@ -0,0 +1,89 @@ +<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> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-configuration</artifactId> + <packaging>jar</packaging> + <name>openutils-configuration</name> + <version>1.0.0</version> + <description>Configuration classes</description> + <dependencies> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-spring</artifactId> + <version>1.0</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-configuration-dataobjects</artifactId> + <version>1.0.0</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-bshd5</artifactId> + <version>1.0.2</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>1.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.0.1</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + <version>3.2.0.ga</version> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>xerces</artifactId> + <groupId>xerces</groupId> + </exclusion> + <exclusion> + <artifactId>xml-apis</artifactId> + <groupId>xml-apis</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <version>10.1.2.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file Property changes on: trunk/openutils-configuration/pom.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Modified: trunk/openutils-configuration-dataobjects/pom.xml =================================================================== --- trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 15:05:37 UTC (rev 175) +++ trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 15:16:39 UTC (rev 176) @@ -10,7 +10,7 @@ <artifactId>openutils-configuration-dataobjects</artifactId> <packaging>jar</packaging> <name>openutils-configuration-dataobjects</name> - <version>1.1.2-SNAPSHOT</version> + <version>1.0.0</version> <description>Configuration dataobjects</description> <dependencies> <dependency> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-02-01 15:05:37 UTC (rev 175) +++ trunk/pom.xml 2007-02-01 15:16:39 UTC (rev 176) @@ -156,5 +156,6 @@ <module>openutils-dbmigration</module> <module>openutils-backup</module> <module>openutils-configuration-dataobjects</module> + <module>openutils-configuration</module> </modules> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 15:05:39
|
Revision: 175 http://svn.sourceforge.net/openutils/?rev=175&view=rev Author: fcarone Date: 2007-02-01 07:05:37 -0800 (Thu, 01 Feb 2007) Log Message: ----------- test folder removed, since it is not useful. Removed Paths: ------------- trunk/openutils-configuration-dataobjects/src/test/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:59:43
|
Revision: 174 http://svn.sourceforge.net/openutils/?rev=174&view=rev Author: fcarone Date: 2007-02-01 06:59:44 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Do not use db specific configuration Modified Paths: -------------- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java 2007-02-01 14:36:13 UTC (rev 173) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java 2007-02-01 14:59:44 UTC (rev 174) @@ -17,9 +17,7 @@ import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.hibernate.annotations.Parameter; - /** * @author fcarone * @version $Id$ @@ -39,7 +37,6 @@ @Id @GeneratedValue(strategy = GenerationType.AUTO) - @org.hibernate.annotations.GenericGenerator(name = "SEQ_CONFIGURATION", strategy = "sequence-identity", parameters = {@Parameter(name = "sequence", value = "SEQ_CONFIGURATION") }) @Column(name = "ID_CONFIGURATIONCODE") private Long id; Modified: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java 2007-02-01 14:36:13 UTC (rev 173) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java 2007-02-01 14:59:44 UTC (rev 174) @@ -20,7 +20,6 @@ import org.apache.commons.lang.builder.CompareToBuilder; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.hibernate.annotations.Parameter; /** @@ -41,7 +40,6 @@ @Id @GeneratedValue(strategy = GenerationType.AUTO) - @org.hibernate.annotations.GenericGenerator(name = "SEQ_REFERENCE", strategy = "sequence-identity", parameters = {@Parameter(name = "sequence", value = "SEQ_REFERENCE") }) @Column(name = "ID_REFERENCECODE") private Long id; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:32
|
Revision: 168 http://svn.sourceforge.net/openutils/?rev=168&view=rev Author: fcarone Date: 2007-02-01 06:34:07 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Dataobjects for configuration code / reference code. Added Paths: ----------- trunk/openutils-configuration-dataobjects/src/main/java/it/ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:26
|
Revision: 170 http://svn.sourceforge.net/openutils/?rev=170&view=rev Author: fcarone Date: 2007-02-01 06:35:54 -0800 (Thu, 01 Feb 2007) Log Message: ----------- svn:ignore specific eclipse files. Property Changed: ---------------- trunk/openutils-backup/ Property changes on: trunk/openutils-backup ___________________________________________________________________ Name: svn:ignore - .checkstyle target + .checkstyle target .settings .classpath .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:26
|
Revision: 169 http://svn.sourceforge.net/openutils/?rev=169&view=rev Author: fcarone Date: 2007-02-01 06:34:15 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Dataobjects for configuration code / reference code. Added Paths: ----------- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java Added: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java (rev 0) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java 2007-02-01 14:34:15 UTC (rev 169) @@ -0,0 +1,162 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dataobjects; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.hibernate.annotations.Parameter; + + +/** + * @author fcarone + * @version $Id$ + */ + +@Entity +@Table(name = "APP_CONFIGURATION_CODE") +@XmlType(name = "") +@XmlRootElement(name = "configurationCode") +public class ConfigurationCode implements Serializable +{ + + /** + * Stable serialVersionUID + */ + private static final long serialVersionUID = 42L; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @org.hibernate.annotations.GenericGenerator(name = "SEQ_CONFIGURATION", strategy = "sequence-identity", parameters = {@Parameter(name = "sequence", value = "SEQ_CONFIGURATION") }) + @Column(name = "ID_CONFIGURATIONCODE") + private Long id; + + @ManyToOne(fetch = FetchType.EAGER, optional = false) + @JoinColumn(name = "ID_CONFIGURATIONDOMAIN") + private ConfigurationDomain configurationdomain; + + @Column(name = "CODE", nullable = false, length = 255) + private String code; + + @Column(name = "DESCRIPTION", nullable = false, length = 255) + private String description; + + @Column(name = "TYPE", nullable = false, length = 255) + private String type; + + @Column(name = "VALUE", nullable = false, length = 255) + private String value; + + /** + * Returns the configurationdomain. + * @return the configurationdomain + */ + public ConfigurationDomain getConfigurationdomain() + { + return configurationdomain; + } + + /** + * Sets the configurationdomain. + * @param configurationdomain the configurationdomain to set + */ + public void setConfigurationdomain(ConfigurationDomain configurationdomain) + { + this.configurationdomain = configurationdomain; + } + + /** + * Returns the description. + * @return the description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the description. + * @param description the description to set + */ + public void setDescription(String description) + { + this.description = description; + } + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + /** + * Returns the type. + * @return the type + */ + public String getType() + { + return type; + } + + /** + * Sets the type. + * @param type the type to set + */ + public void setType(String type) + { + this.type = type; + } + + /** + * Returns the value. + * @return the value + */ + public String getValue() + { + return value; + } + + /** + * Sets the value. + * @param value the value to set + */ + public void setValue(String value) + { + this.value = value; + } + + public String getCode() + { + return code; + } + + public void setCode(String code) + { + this.code = code; + } + +} Property changes on: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationCode.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java (rev 0) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java 2007-02-01 14:34:15 UTC (rev 169) @@ -0,0 +1,76 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dataobjects; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * @author fcarone + * @version $Id$ + */ + +@Entity +@Table(name = "CONFIGURATION_DOMAIN") +@XmlType(name = "") +@XmlRootElement(name = "configurationDomain") +public class ConfigurationDomain implements Serializable +{ + + /** + * Stable serialVersionUID + */ + private static final long serialVersionUID = 42L; + + @Id + @Column(name = "ID_CONFIGURATIONDOMAIN", nullable = false, length = 60) + private String id; + + @Column(name = "DESCRIPTION", length = 255) + private String description; + + /** + * Returns the description. + * @return the description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the description. + * @param description the description to set + */ + public void setDescription(String description) + { + this.description = description; + } + + /** + * Returns the id. + * @return the id + */ + public String getId() + { + return id; + } + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(String id) + { + this.id = id; + } + +} Property changes on: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ConfigurationDomain.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java (rev 0) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java 2007-02-01 14:34:15 UTC (rev 169) @@ -0,0 +1,185 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dataobjects; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.apache.commons.lang.builder.CompareToBuilder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.hibernate.annotations.Parameter; + + +/** + * @author fcarone + * @version $Id$ + */ +@Entity +@Table(name = "REFERENCE_CODE") +@XmlType(name = "") +@XmlRootElement(name = "referenceCode") +public class ReferenceCode implements Comparable<ReferenceCode>, Serializable +{ + + /** + * Stable serialVersionUID + */ + private static final long serialVersionUID = 42L; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @org.hibernate.annotations.GenericGenerator(name = "SEQ_REFERENCE", strategy = "sequence-identity", parameters = {@Parameter(name = "sequence", value = "SEQ_REFERENCE") }) + @Column(name = "ID_REFERENCECODE") + private Long id; + + @ManyToOne(fetch = FetchType.EAGER, optional = false) + @JoinColumn(name = "ID_REFERENCEDOMAIN") + private ReferenceDomain referencedomain; + + @Column(name = "CODE", nullable = false, length = 255) + private String code; + + @Column(name = "DESCRIPTION", nullable = false, length = 255) + private String description; + + @Column(name = "ACTIVE", nullable = false) + private Boolean active; + + /** + * Returns the active. + * @return the active + */ + public Boolean getActive() + { + return active; + } + + /** + * Sets the active. + * @param active the active to set + */ + public void setActive(Boolean active) + { + this.active = active; + } + + /** + * Returns the code. + * @return the code + */ + public String getCode() + { + return code; + } + + /** + * Sets the code. + * @param code the code to set + */ + public void setCode(String code) + { + this.code = code; + } + + /** + * Returns the description. + * @return the description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the description. + * @param description the description to set + */ + public void setDescription(String description) + { + this.description = description; + } + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + /** + * Returns the referencedomain. + * @return the referencedomain + */ + public ReferenceDomain getReferencedomain() + { + return referencedomain; + } + + /** + * Sets the referencedomain. + * @param referencedomain the referencedomain to set + */ + public void setReferencedomain(ReferenceDomain referencedomain) + { + this.referencedomain = referencedomain; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(Object object) + { + if (!(object instanceof ReferenceCode)) + { + return false; + } + ReferenceCode rhs = (ReferenceCode) object; + return new EqualsBuilder() + .append(this.code, rhs.code) + .append(this.referencedomain, rhs.referencedomain) + .isEquals(); + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() + { + return new HashCodeBuilder(1560058887, -1822774051).append(this.code).append(this.referencedomain).toHashCode(); + } + + /** + * {@inheritDoc} + */ + public int compareTo(ReferenceCode o) + { + return new CompareToBuilder().append(this.description, o.description).append(this.code, o.code).toComparison(); + } + +} Property changes on: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceCode.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java =================================================================== --- trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java (rev 0) +++ trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java 2007-02-01 14:34:15 UTC (rev 169) @@ -0,0 +1,102 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.configuration.dataobjects; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; + + +/** + * @author fcarone + * @version $Id$ + */ + +@Entity +@Table(name = "REFERENCE_DOMAIN") +@XmlType(name = "") +@XmlRootElement(name = "referenceDomain") +public class ReferenceDomain implements Serializable +{ + + /** + * Stable serialVersionUID + */ + private static final long serialVersionUID = 42L; + + @Id + @Column(name = "ID_REFERENCEDOMAIN", nullable = false, length = 60) + private String id; + + @Column(name = "DESCRIPTION", length = 255) + private String description; + + /** + * Returns the description. + * @return the description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the description. + * @param description the description to set + */ + public void setDescription(String description) + { + this.description = description; + } + + /** + * Returns the id. + * @return the id + */ + public String getId() + { + return id; + } + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(String id) + { + this.id = id; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(Object object) + { + if (!(object instanceof ReferenceDomain)) + { + return false; + } + ReferenceDomain rhs = (ReferenceDomain) object; + return new EqualsBuilder().append(this.id, rhs.id).isEquals(); + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() + { + return new HashCodeBuilder(1768231601, -884468085).append(this.id).toHashCode(); + } + +} Property changes on: trunk/openutils-configuration-dataobjects/src/main/java/it/openutils/configuration/dataobjects/ReferenceDomain.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:24
|
Revision: 171 http://svn.sourceforge.net/openutils/?rev=171&view=rev Author: fcarone Date: 2007-02-01 06:36:00 -0800 (Thu, 01 Feb 2007) Log Message: ----------- svn:ignore specific eclipse files. Property Changed: ---------------- trunk/openutils-web/ Property changes on: trunk/openutils-web ___________________________________________________________________ Name: svn:ignore - target .checkstyle + target .checkstyle .settings .classpath .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:24
|
Revision: 173 http://svn.sourceforge.net/openutils/?rev=173&view=rev Author: fcarone Date: 2007-02-01 06:36:13 -0800 (Thu, 01 Feb 2007) Log Message: ----------- svn:ignore specific eclipse files. Property Changed: ---------------- trunk/openutils-dbmigration/ Property changes on: trunk/openutils-dbmigration ___________________________________________________________________ Name: svn:ignore - target .checkstyle + target .checkstyle .settings .classpath .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:48:23
|
Revision: 172 http://svn.sourceforge.net/openutils/?rev=172&view=rev Author: fcarone Date: 2007-02-01 06:36:06 -0800 (Thu, 01 Feb 2007) Log Message: ----------- svn:ignore specific eclipse files. Property Changed: ---------------- trunk/openutils-tags-spring/ Property changes on: trunk/openutils-tags-spring ___________________________________________________________________ Name: svn:ignore - target .checkstyle + target .checkstyle .settings .classpath .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:35:04
|
Revision: 165 http://svn.sourceforge.net/openutils/?rev=165&view=rev Author: fcarone Date: 2007-02-01 06:11:57 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Javadocs on UserManager interface. Modified Paths: -------------- trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/manager/UserManager.java Modified: trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/manager/UserManager.java =================================================================== --- trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/manager/UserManager.java 2007-02-01 11:21:27 UTC (rev 164) +++ trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/manager/UserManager.java 2007-02-01 14:11:57 UTC (rev 165) @@ -7,7 +7,17 @@ public interface UserManager { + /** + * @param userid Indicates the user whose password is to reset + * @return The new random generated password + */ String resetPassword(String userid); + /** + * @param userid The user changing password + * @param oldPassword The old password + * @param newPassword The new password + * @return True if the password has been successfully reset, false otherwise. + */ boolean changePassword(String userid, String oldPassword, String newPassword); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:20:22
|
Revision: 167 http://svn.sourceforge.net/openutils/?rev=167&view=rev Author: fcarone Date: 2007-02-01 06:20:19 -0800 (Thu, 01 Feb 2007) Log Message: ----------- initial project for configuration dataobjects Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/openutils-configuration-dataobjects/ trunk/openutils-configuration-dataobjects/pom.xml trunk/openutils-configuration-dataobjects/src/ trunk/openutils-configuration-dataobjects/src/main/ trunk/openutils-configuration-dataobjects/src/main/java/ trunk/openutils-configuration-dataobjects/src/main/resources/ trunk/openutils-configuration-dataobjects/src/test/ trunk/openutils-configuration-dataobjects/src/test/java/ trunk/openutils-configuration-dataobjects/src/test/resources/ Property changes on: trunk/openutils-configuration-dataobjects ___________________________________________________________________ Name: svn:ignore + .settings target .checkstyle .classpath .project Added: trunk/openutils-configuration-dataobjects/pom.xml =================================================================== --- trunk/openutils-configuration-dataobjects/pom.xml (rev 0) +++ trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 14:20:19 UTC (rev 167) @@ -0,0 +1,73 @@ +<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> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-configuration-dataobjects</artifactId> + <packaging>jar</packaging> + <name>openutils-configuration-dataobjects</name> + <version>1.1.2-SNAPSHOT</version> + <description>Configuration dataobjects</description> + <dependencies> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + <version>3.2.0.ga</version> + <exclusions> + <exclusion> + <!-- not needed here, just load annotations --> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>org.acegisecurity</groupId> + <artifactId>acegi-security</artifactId> + <version>1.0.3</version> + <exclusions> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-remoting</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-support</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </exclusion> + <exclusion> + <groupId>oro</groupId> + <artifactId>oro</artifactId> + </exclusion> + <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> +</project> \ No newline at end of file Property changes on: trunk/openutils-configuration-dataobjects/pom.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + native Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-02-01 14:16:10 UTC (rev 166) +++ trunk/pom.xml 2007-02-01 14:20:19 UTC (rev 167) @@ -155,5 +155,6 @@ <module>openutils-tags-spring</module> <module>openutils-dbmigration</module> <module>openutils-backup</module> + <module>openutils-configuration-dataobjects</module> </modules> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-02-01 14:16:16
|
Revision: 166 http://svn.sourceforge.net/openutils/?rev=166&view=rev Author: fcarone Date: 2007-02-01 06:16:10 -0800 (Thu, 01 Feb 2007) Log Message: ----------- It seems we need this dependency Modified Paths: -------------- trunk/openutils-deployment/pom.xml Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-02-01 14:11:57 UTC (rev 165) +++ trunk/openutils-deployment/pom.xml 2007-02-01 14:16:10 UTC (rev 166) @@ -22,10 +22,12 @@ <version>2.0.1</version> <optional>true</optional> <exclusions> + <!-- <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> + --> <exclusion> <groupId>logkit</groupId> <artifactId>logkit</artifactId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |