From: <am...@us...> - 2006-04-10 05:56:40
|
Revision: 116 Author: amooy Date: 2006-04-09 22:55:48 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=116&view=rev Log Message: ----------- Renamed all xebia.com packages to net.sf.sensor.sample Cleaned up the project descriptors Attempted to get it working in WTP but no luck yet :( Modified Paths: -------------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/.settings/.component trunk/sensor-sample-app/project.xml trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml trunk/sensor-sample-app/src/web/WEB-INF/applicationContext.xml trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/AbstractDAOTest.java trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDaoTest.java trunk/sensor-sample-app/test/resources/test-context-dao.xml Added Paths: ----------- trunk/sensor-sample-app/src/java/net/ trunk/sensor-sample-app/src/java/net/sf/ trunk/sensor-sample-app/src/java/net/sf/sensor/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ trunk/sensor-sample-app/src/resource/log4j.dtd trunk/sensor-sample-app/src/resource/log4j.xml trunk/sensor-sample-app/test/java/net/ trunk/sensor-sample-app/test/java/net/sf/ trunk/sensor-sample-app/test/java/net/sf/sensor/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/ Removed Paths: ------------- trunk/sensor-sample-app/src/java/com/ trunk/sensor-sample-app/test/java/com/ Modified: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.classpath 2006-04-10 05:55:48 UTC (rev 116) @@ -1,28 +1,31 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="/sensor-core"/> - <classpathentry kind="src" path="/sensor-support"/> - <classpathentry kind="src" path="/sensor-console"/> - <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> - <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="src" path="src/java"/> - <classpathentry output="target/test-classes" kind="src" path="test/java"/> - <classpathentry including="**/*.xml|**/*.txt|**/*.properties" output="target/classes" kind="src" path="src/resource"/> - <classpathentry including="**/*.xml|**/*.sql" output="target/test-classes" kind="src" path="test/resources"/> - <classpathentry kind="output" path="target/classes"/> -</classpath> +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="/sensor-core"/> + <classpathentry kind="src" path="/sensor-support"/> + <classpathentry kind="src" path="/sensor-console"/> + <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.2.jar"/> + <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.3.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry output="target/test-classes" kind="src" path="test/java"/> + <classpathentry including="**/*.xml|**/*.txt|**/*.properties" output="target/classes" kind="src" path="src/resource"/> + <classpathentry including="**/*.xml|**/*.sql" output="target/test-classes" kind="src" path="test/resources"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Modified: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.project 2006-04-10 05:55:48 UTC (rev 116) @@ -3,6 +3,9 @@ <name>sensor-sample-app</name> <comment></comment> <projects> + <project>sensor-core</project> + <project>sensor-support</project> + <project>sensor-console</project> </projects> <buildSpec> <buildCommand> @@ -10,21 +13,16 @@ <arguments> </arguments> </buildCommand> - <buildCommand> +<!-- <buildCommand> <name>nl.inspiring.maviclipse.core.maviclipseBuilder</name> <arguments> </arguments> - </buildCommand> + </buildCommand>--> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> - <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> </buildSpec> <natures> <nature>nl.inspiring.maviclipse.core.maviclipseNature</nature> Modified: trunk/sensor-sample-app/.settings/.component =================================================================== --- trunk/sensor-sample-app/.settings/.component 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.settings/.component 2006-04-10 05:55:48 UTC (rev 116) @@ -1,52 +1,64 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project-modules id="moduleCoreId"> - <wb-module deploy-name="sensor-sample-app"> - <wb-resource source-path="/src/web" deploy-path="/"/> - <wb-resource source-path="/src/java" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/test/java" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/src/resource" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/test/resources" deploy-path="/WEB-INF/classes"/> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-core/sensor-core"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-support/sensor-support"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-console/sensor-console"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/springframework/jars/spring-1.2.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib//sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity/jars/velocity-1.4.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <property name="context-root" value="sensor-sample-app"/> - <property name="java-output-path" value="/build/classes/"/> - </wb-module> -</project-modules> - +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId"> + <wb-module deploy-name="sensor-sample-app"> + <wb-resource deploy-path="/" source-path="/src/web"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/java"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/resource"/> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-core/sensor-core"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-support/sensor-support"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-console/sensor-console"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/springframework/jars/spring-1.2.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/cglib/jars/cglib-full-2.0.2.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib//sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-pool/jars/commons-pool-1.3.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity/jars/velocity-1.4.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> + <property name="context-root" value="sensor-sample-app"/> + <property name="java-output-path" value="/build/classes/"/> + </wb-module> +</project-modules> Modified: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/project.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -8,7 +8,7 @@ <currentVersion>0.1-dev</currentVersion> <inceptionYear>2005</inceptionYear> - <package>com.xebia.springroller</package> + <package>net.sf.sensor.sample.springroller</package> <organization> <name>Xebia</name> @@ -106,8 +106,7 @@ </developers> <dependencies> - - + <!-- Sensor dependencies --> <dependency> <groupId>sensor</groupId> @@ -146,28 +145,25 @@ <artifactId>spring</artifactId> <version>1.2.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> <version>1.0</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring-mock</artifactId> - <version>1.2.6</version> - <type>jar</type> - </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib-full</artifactId> + <version>2.0.2</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <!-- Database Drivers and dependencies --> <!-- use an oracle database driver if you run on an Oracle database --> - <!-- somehow this does not work in Tomcat, so put the jar in the common/lib file of the TOMCAT_HOME directory --> <dependency> <groupId>mysql</groupId> @@ -175,30 +171,44 @@ <version>3.1.12</version> <jar>lib/mysql-connector-java-3.1.12-bin.jar</jar> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> + <dependency> + <groupId>hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>1.8.0.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>commons-pool</groupId> + <artifactId>commons-pool</artifactId> + <version>1.3</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> - <!-- Web application support --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.0.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.0.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <!-- Velocity --> @@ -207,91 +217,68 @@ <artifactId>velocity</artifactId> <version>1.4</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>velocity-tools</groupId> <artifactId>velocity-tools</artifactId> <version>1.2</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <!-- commons --> + <!-- Misc Jakarta Commons --> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.1</version> <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> </dependency> - + + <!-- Logging --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.12</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - - <!--dependency> - <groupId>cglib</groupId> - <artifactId>cglib-full</artifactId> - <version>2.0.2</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency--> - - <!-- unittest dependencies --> + <!-- Unit testing dependencies --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <type>jar</type> </dependency> - - <dependency> <groupId>dbunit</groupId> <artifactId>dbunit</artifactId> <version>2.1</version> <type>jar</type> </dependency> - <dependency> - <groupId>hsqldb</groupId> - <artifactId>hsqldb</artifactId> - <version>1.8.0.1</version> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> <type>jar</type> </dependency> - <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> <dependency> <groupId>servletapi</groupId> Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,65 @@ +package net.sf.sensor.sample.springroller.dao; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.Article; + + +/** + * Interface implements by DAO's for {@link Article} objects. + * + * @author Vincent Partington + */ +public interface ArticleDao { + + /** + * Returns the article with the specified ID. + * + * @param id + * the ID of the article. + * @return the article or <code>null</code> if the article could not be found. + */ + Article getArticle(int articleId); + + /** + * Returns a list of all articles, sorted by publication date. + * + * @return a read-only list containing all articles. + */ + List getAllArticles(); + + /** + * Returns a list of all articles authored by a specific user, sorted by publication date. + * + * @param authorName + * the name of the author of the articles to find. + * @return a read-only list of all articles authored by a specific user. + */ + List getArticlesByAuthor(String authorName); + + /** + * Adds an article. + * + * @param newArticle + * the article to add. The ID of the article is set. + */ + void addArticle(Article newArticle); + + /** + * Updates an article. + * + * @param updatedArticle + * the article to update. The ID of the article is used to determine which article to + * update. + */ + void updateArticle(Article updatedArticle); + + /** + * Deletes an article. + * + * @param articleId + * the ID of the article to delete. + */ + void deleteArticle(int articleId); + +} Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,55 @@ +package net.sf.sensor.sample.springroller.dao; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.User; + + +/** + * Interface implements by DAO's for {@link User} objects. + * + * @author Vincent Partington + */ +public interface UserDao { + + /** + * Returns the user with the specified username. + * + * @param username + * the username. + * @return the user or <code>null</code> if the user could not be found. + */ + User getUser(String username); + + /** + * Returns a list of all users, sorted by username, + * + * @return a read-only list containing all users. + */ + List getAllUsers(); + + /** + * Adds a user. + * + * @param newUser + * the user to add. The username should already have been set. + */ + void addUser(User newUser); + + /** + * Updates a user. + * + * @param updatedUser + * the user to update. The username is used to determine which user to update. + */ + void updateUser(User updatedUser); + + /** + * Deletes a user. + * + * @param username + * the username. + */ + void deleteUser(String username); + +} Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,23 +1,24 @@ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; + import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; /** * - * Class that implements {@link com.xebia.springroller.dao.ArticleDao} by using + * Class that implements {@link net.sf.sensor.sample.springroller.dao.ArticleDao} by using * {@link org.springframework.jdbc.core.JdbcTemplate}. * * This class uses a private RowMapper to map the columns from the resultset to - * the {@link com.xebia.springroller.domain.Article article}. + * the {@link net.sf.sensor.sample.springroller.domain.Article article}. * * Ids are either generated using a sequence or the auto increment. The id * generator is injected by spring. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,16 +1,17 @@ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.User; + import org.springframework.jdbc.core.PreparedStatementSetter; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.User; public class JdbcUserDao extends JdbcDaoSupport implements UserDao { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,7 +1,7 @@ /** * */ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; /** * Implements Oracle specific constructs. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.dao.impl.memory; +package net.sf.sensor.sample.springroller.dao.impl.memory; import java.util.ArrayList; import java.util.Collections; @@ -8,11 +8,12 @@ import java.util.List; import java.util.Map; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.domain.Article; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.domain.Article; + /** - * Implementation of the {@link com.xebia.springroller.dao.ArticleDao} that keeps the articles in memory. + * Implementation of the {@link net.sf.sensor.sample.springroller.dao.ArticleDao} that keeps the articles in memory. * * @author Vincent Partington * Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.dao.impl.memory; +package net.sf.sensor.sample.springroller.dao.impl.memory; import java.util.ArrayList; import java.util.Collections; @@ -8,11 +8,12 @@ import java.util.List; import java.util.Map; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.User; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.User; + /** - * Implementation of the {@link com.xebia.springroller.dao.UserDao} that keeps the users in memory. + * Implementation of the {@link net.sf.sensor.sample.springroller.dao.UserDao} that keeps the users in memory. * @author Vincent Partington * */ Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/domain) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.io.Serializable; import java.net.InetAddress; Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/User.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.io.Serializable; Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/UserPropertyEditor.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,9 +1,10 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.beans.PropertyEditorSupport; -import com.xebia.springroller.service.BlogService; +import net.sf.sensor.sample.springroller.service.BlogService; + public class UserPropertyEditor extends PropertyEditorSupport { private BlogService blogService; Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/exception) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/WordListException.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,7 +1,7 @@ /** * */ -package com.xebia.springroller.exception; +package net.sf.sensor.sample.springroller.exception; /** * Exception that is thrown when the wordlist can not be read from the class path. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/service/BlogService.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,61 @@ +package net.sf.sensor.sample.springroller.service; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; + + +/** + * Interface that defines the blogservice in this application + * @author Lonneke Dikmans + * + */ +public interface BlogService { + + /** + * Returns a list of all articles. + * @return List of {@link net.sf.sensor.sample.springroller.domain.Article} or an empty list if none are found. + */ + public List getAllArticles(); + + /** + * publishes the article + * @param articleToPublish the {@link net.sf.sensor.sample.springroller.domain.Article} to publish. + */ + public void publishArticle(Article articleToPublish); + + /** + * Removes an article + * @param articleToDelete the {@link Article} that needs to be deleted. + */ + public void deleteArticle(Article articleToDelete); + + /** + * Updates an already published article + * @param articleToUpdate the article that is update + */ + public void updateArticle(Article articleToUpdate); + + /** + * Finds an article by its id + * @param id the technical id of the article + * @return {@link Article} or <code>null</code> if none was found. + */ + public Article findArticle(int id); + + /** + * Finds all articles by a certain author + * @param author {@link User author} that published articles + * @return List with {@link Articles} or an empty list if none were published by this author. + */ + public List findArticles(User author); + + /** + * Finds the user by its name + * @param name Name of the user. + * @return {@link User user} with this name or <code>null</code> if none is found. + */ + public User findUser(String name); + +} \ No newline at end of file Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/BlogServiceImpl.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.service.impl; +package net.sf.sensor.sample.springroller.service.impl; import java.util.List; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.beans.factory.InitializingBean; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.service.BlogService; /** * Implementation of the BlogService. Also implements initializingbean. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/util) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ArticleValidator.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.util; +package net.sf.sensor.sample.springroller.util; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -8,6 +8,9 @@ import java.util.Iterator; import java.util.List; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.exception.WordListException; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.core.io.ClassPathResource; @@ -15,8 +18,6 @@ import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.exception.WordListException; /** * This class validates the article by applying some rules. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/util/InetAddressEditor.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.util; +package net.sf.sensor.sample.springroller.util; import java.beans.PropertyEditor; import java.beans.PropertyEditorSupport; Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/web) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.net.InetAddress; import java.text.SimpleDateFormat; @@ -6,14 +6,15 @@ import javax.servlet.http.HttpServletRequest; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.domain.UserPropertyEditor; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.mvc.SimpleFormController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.domain.UserPropertyEditor; -import com.xebia.springroller.service.BlogService; public class AddArticleController extends SimpleFormController { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ArticleCommand.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; public class ArticleCommand { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/BlogWizard.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.net.InetAddress; import java.text.SimpleDateFormat; @@ -7,6 +7,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.domain.UserPropertyEditor; +import net.sf.sensor.sample.springroller.service.BlogService; +import net.sf.sensor.sample.springroller.util.ArticleValidator; + import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.validation.BindException; import org.springframework.validation.Errors; @@ -15,11 +21,6 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractWizardFormController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.domain.UserPropertyEditor; -import com.xebia.springroller.service.BlogService; -import com.xebia.springroller.util.ArticleValidator; public class BlogWizard extends AbstractWizardFormController { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/OverviewController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; -import com.xebia.springroller.service.BlogService; /** * Controller that generates an overview of all articles. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ShowArticleController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.web.bind.RequestUtils; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.service.BlogService; public class ShowArticleController extends AbstractController { Modified: trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -14,8 +14,8 @@ </bean> - <bean name="userDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcUserDao"/> + <bean name="userDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcUserDao"/> - <bean name="articleDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcArticleDao"/> + <bean name="articleDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcArticleDao"/> </beans> \ No newline at end of file Modified: trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -2,17 +2,17 @@ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans default-autowire="byName"> - <bean name="user" class="com.xebia.springroller.domain.User"> + <bean name="user" class="net.sf.sensor.sample.springroller.domain.User"> <property name="name" value="user" /> <property name="password" value="password" /> </bean> - <bean name="admin" class="com.xebia.springroller.domain.User"> + <bean name="admin" class="net.sf.sensor.sample.springroller.domain.User"> <property name="name" value="admin" /> <property name="password" value="secret" /> </bean> - <bean name="memoryUserDao" class="com.xebia.springroller.dao.impl.memory.MemoryUserDao"> + <bean name="memoryUserDao" class="net.sf.sensor.sample.springroller.dao.impl.memory.MemoryUserDao"> <property name="users"> <list> <ref bean="user" /> @@ -21,24 +21,24 @@ </property> </bean> - <bean name="memoryArticleDao" class="com.xebia.springroller.dao.impl.memory.MemoryArticleDao"> + <bean name="memoryArticleDao" class="net.sf.sensor.sample.springroller.dao.impl.memory.MemoryArticleDao"> <property name="articles"> <list> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="The blog is alive" /> <property name="text" value="We've just created this blog. Post away!" /> <property name="publicationDate" value="2006-01-24 12:14:32" /> <property name="publicationIPAddress" value="192.168.1.23" /> <property name="author" ref="user" /> </bean> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="Quark" /> <property name="text" value="A treatise on ferengi and their earlobes." /> <property name="publicationDate" value="2006-01-24 14:54:00" /> <property name="publicationIPAddress" value="192.168.1.62" /> <property name="author" ref="user" /> </bean> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="A message from your friendly neighbourhood admin" /> <property name="text" value="No funny texts on this blog" /> <property name="publicationDate" value="2006-01-25 06:21:02" /> @@ -67,7 +67,7 @@ </bean> </entry> <entry key="java.net.InetAddress"> - <bean class="com.xebia.springroller.util.InetAddressEditor" /> + <bean class="net.sf.sensor.sample.springroller.util.InetAddressEditor" /> </entry> </map> </property> Modified: trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -14,13 +14,13 @@ </bean> - <bean name="userDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcUserDao"> + <bean name="userDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcUserDao"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> </bean> - <bean name="articleDao" class="com.xebia.springroller.dao.impl.jdbc.OracleJdbcArticleDao"> + <bean name="articleDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.OracleJdbcArticleDao"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> Added: trunk/sensor-sample-app/src/resource/log4j.dtd =================================================================== --- trunk/sensor-sample-app/src/resource/log4j.dtd (rev 0) +++ trunk/sensor-sample-app/src/resource/log4j.dtd 2006-04-10 05:55:48 UTC (rev 116) @@ -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 +> Added: trunk/sensor-sample-app/src/resource/log4j.xml =================================================================== --- trunk/sensor-sample-app/src/resource/log4j.xml (rev 0) +++ trunk/sensor-sample-app/src/resource/log4j.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> + + <appender name="logfile" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="sensor-sample-app.log"/> + <param name="MaxFileSize" value="5000KB"/> + <param name="MaxBackupIndex" value="5"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" + value="%d{yyyyMMdd;HH:mm:ss,SSS};%5p;%c{3};%m%n"/> + </layout> + </appender> + + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" + value="%d{yyyyMMdd;HH:mm:ss,SSS};%5p;%c{3};%m%n"/> + </layout> + </appender> + + <logger name="org.hibernate" additivity="false"> + <level value="warn"/> + <appender-ref ref="logfile"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + <appender-ref ref="logfile"/> + </lo... [truncated message content] |