From: <ldi...@us...> - 2006-04-02 21:32:26
|
Revision: 102 Author: ldikmans Date: 2006-04-02 14:31:21 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=102&view=rev Log Message: ----------- First version of the sample app, work in progress.... Added Paths: ----------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/conf/ trunk/sensor-sample-app/conf/checkstyle.xml trunk/sensor-sample-app/conf/clover.license trunk/sensor-sample-app/conf/findbugs-excludes.xml trunk/sensor-sample-app/lib/ trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar trunk/sensor-sample-app/maven.xml trunk/sensor-sample-app/project.properties trunk/sensor-sample-app/project.xml trunk/sensor-sample-app/src/ trunk/sensor-sample-app/src/java/ trunk/sensor-sample-app/src/java/META-INF/ trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF trunk/sensor-sample-app/src/java/com/ trunk/sensor-sample-app/src/java/com/xebia/ trunk/sensor-sample-app/src/java/com/xebia/springroller/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/ trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/User.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/UserPropertyEditor.java trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/ trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/WordListException.java trunk/sensor-sample-app/src/java/com/xebia/springroller/service/ trunk/sensor-sample-app/src/java/com/xebia/springroller/service/BlogService.java trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/ trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/BlogServiceImpl.java trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ArticleValidator.java trunk/sensor-sample-app/src/java/com/xebia/springroller/util/InetAddressEditor.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ArticleCommand.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/BlogWizard.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/OverviewController.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ShowArticleController.java trunk/sensor-sample-app/src/log4j.properties trunk/sensor-sample-app/src/resource/ 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/resource/db/ trunk/sensor-sample-app/src/resource/db/mysql/ trunk/sensor-sample-app/src/resource/db/mysql/create_database.sql trunk/sensor-sample-app/src/resource/db/mysql/create_tables.sql trunk/sensor-sample-app/src/resource/db/mysql/insert_test_data.sql trunk/sensor-sample-app/src/resource/db/oracle/ trunk/sensor-sample-app/src/resource/db/oracle/create_sequence.sql trunk/sensor-sample-app/src/resource/db/oracle/create_tables.sql trunk/sensor-sample-app/src/resource/db/oracle/insert_test_data.sql trunk/sensor-sample-app/src/resource/trekwords.txt trunk/sensor-sample-app/src/trekwords.txt trunk/sensor-sample-app/src/web/ trunk/sensor-sample-app/src/web/WEB-INF/ trunk/sensor-sample-app/src/web/WEB-INF/applicationContext.xml trunk/sensor-sample-app/src/web/WEB-INF/jdbc.properties trunk/sensor-sample-app/src/web/WEB-INF/jsp/ trunk/sensor-sample-app/src/web/WEB-INF/jsp/add.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/author.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/confirm.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/overview.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/preamble.jspf trunk/sensor-sample-app/src/web/WEB-INF/jsp/show.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/start.jsp trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml trunk/sensor-sample-app/src/web/WEB-INF/web.xml trunk/sensor-sample-app/src/web/index.jsp trunk/sensor-sample-app/src/web/main.css trunk/sensor-sample-app/test/ trunk/sensor-sample-app/test/java/ trunk/sensor-sample-app/test/java/com/ trunk/sensor-sample-app/test/java/com/xebia/ trunk/sensor-sample-app/test/java/com/xebia/springroller/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/AbstractDAOTest.java trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDaoTest.java trunk/sensor-sample-app/test/resources/ trunk/sensor-sample-app/test/resources/database/ trunk/sensor-sample-app/test/resources/database/jdbc-tables.sql trunk/sensor-sample-app/test/resources/database/springroller-dump.xml trunk/sensor-sample-app/test/resources/test-context-dao.xml Added: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath (rev 0) +++ trunk/sensor-sample-app/.classpath 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="src" path="test/java"/> + <classpathentry kind="src" path="test/resources"/> + <classpathentry kind="src" path="src/resource"/> + <classpathentry kind="src" path="src/web"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <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/commons-logging/jars/commons-logging-1.0.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> + <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.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="output" path="target/classes"/> +</classpath> Added: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project (rev 0) +++ trunk/sensor-sample-app/.project 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>sensor-sample-app</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/sensor-sample-app/conf/checkstyle.xml =================================================================== --- trunk/sensor-sample-app/conf/checkstyle.xml (rev 0) +++ trunk/sensor-sample-app/conf/checkstyle.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="severity" value="warning" /> + <module name="TreeWalker"> + <module name="JavadocMethod"></module> + <module name="JavadocType"></module> + <module name="JavadocVariable"></module> + <module name="JavadocStyle"></module> + <module name="ConstantName"></module> + <module name="LocalFinalVariableName"></module> + <module name="LocalVariableName"></module> + <module name="MemberName"></module> + <module name="MethodName"></module> + <module name="PackageName"></module> + <module name="ParameterName"></module> + <module name="StaticVariableName"></module> + <module name="TypeName"></module> + <module name="AvoidStarImport"></module> + <module name="IllegalImport"></module> + <module name="RedundantImport"></module> + <module name="UnusedImports"></module> + <module name="FileLength"></module> + <module name="LineLength"> + <property name="max" value="150"/> + </module> + <module name="MethodLength"></module> + <module name="ParameterNumber"></module> + <module name="EmptyForIteratorPad"></module> + <module name="MethodParamPad"></module> + <module name="NoWhitespaceAfter"></module> + <module name="NoWhitespaceBefore"></module> + <module name="OperatorWrap"></module> + <module name="ParenPad"></module> + <module name="TypecastParenPad"></module> + <module name="TabCharacter"></module> + <module name="WhitespaceAfter"></module> + <module name="WhitespaceAround"></module> + <module name="ModifierOrder"></module> + <module name="RedundantModifier"> + <property name="severity" value="ignore" /> + </module> + <module name="AvoidNestedBlocks"></module> + <module name="EmptyBlock"></module> + <module name="LeftCurly"></module> + <module name="NeedBraces"></module> + <module name="RightCurly"></module> + <!--<module name="AvoidInlineConditionals"></module>--> + <module name="DoubleCheckedLocking"></module> + <module name="EmptyStatement"></module> + <module name="EqualsHashCode"></module> + <module name="HiddenField"> + <property name="severity" value="ignore" /> + </module> + <module name="IllegalInstantiation"></module> + <module name="InnerAssignment"></module> + <module name="MagicNumber"></module> + <module name="MissingSwitchDefault"></module> + <module name="RedundantThrows"> + <property name="severity" value="ignore" /> + </module> + <module name="SimplifyBooleanExpression"></module> + <module name="SimplifyBooleanReturn"></module> + <module name="DesignForExtension"> + <property name="severity" value="ignore" /> + </module> + <module name="FinalClass"></module> + <module name="HideUtilityClassConstructor"></module> + <module name="InterfaceIsType"></module> + <module name="VisibilityModifier"></module> + <module name="ArrayTypeStyle"></module> + <module name="FinalParameters"> + <property name="severity" value="ignore" /> + </module> + <module name="TodoComment"></module> + <module name="UpperEll"></module> + </module> + <module name="PackageHtml"></module> + <module name="NewlineAtEndOfFile"></module> + <module name="Translation"></module> +</module> Added: trunk/sensor-sample-app/conf/clover.license =================================================================== --- trunk/sensor-sample-app/conf/clover.license (rev 0) +++ trunk/sensor-sample-app/conf/clover.license 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,165 @@ +Product: Clover +License: Open Source License, 0.x, 1.x +Issued: Mon Jan 16 2006 13:46:56 CST +Expiry: Never +Key: ea17f2aa023b03e442fff82b3 +Name: Age Mooy +Org: Sensor +Certificate: AAABym+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW +Ct12PMy0uml0s9xuus5wKngJ9OFk5PFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE +gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/Jeo81QPUmW8XUnUmjTTEQK53Je +uj18MzFd//JI8bs4TKWzM7JuW8dcHs/VfKm9xceT7zqFn7lj8rWQe8XOgjjMH4BbtdHLXi +NdDT1OpjzpVDcVwniyFOEsn+00VGK5Sk8d0Aq2CipNSTwLFuH65xD9FwgEWC38Xvi477Ty +Trzw22Q/7hshIXSybx+CihiJQf76ZIVElm051hr/sbWzQyVEDwRr3liFjvWKCNwjSYw6iq +Tje1WyQMq48Adn7IqvrVRmqhGOGJGOcUpryVL4nQY1LfYEv0YalUziqgmi+W/zth1+dNt8 +6DrNcXqgtCmeQYkMiQB9qSiTlhcrvkYae/ByNZQsRsnEeMieRZu3k0peMFyKv4whOrkS9M +YNKfHQoS1K/v8UZy9RiQ/KXvFObk+XeNnWZDmg0+qQTZZPfH6GOnvo9TEYPfLbde++zG8g +O0a07OKUwwfqg+J+wafxO+phLu3nI6WvYDz7mttP0tWzo3bSHtlJLIkPsxcwX+uuE5185b +VgJ8zU3ZtLhxe/YmznhanP39hPPhyqyvSL3wz/lPv9Hotd4mxxHY36KCDrhNT6BgEm3j7b +eQP3sXMqOwIzHVlkcH6pKZ09sNdH4Y= +License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT + +1. Licenses and Software + +Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company +("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited, +revocable, worldwide, non-exclusive, non-transferable, +non-sublicensable license to use the Clover version 1 (one) software +(the "Software"), including any minor upgrades thereof during the Term +(hereinafter defined) up to, but not including the next major version +of the Software. The licensee shall not, or knowingly allow others to, +reverse engineer, decompile, disassemble, modify, adapt, create +derivative works from or otherwise attempt to derive source code from +the Software provided. And, in accordance with the terms and +conditions of this Software License Agreement (the "Agreement"), the +Software shall be used solely by the licensed users in accordance with +the following edition specific conditions: + +a) Server Edition + +A Server Edition license entitles the Licensee to execute one instance +of Clover Server Edition on one (1) machine for the purposes of +instrumenting source code and generating reports. There are no +limitations on the use of the instrumented source code or generated +reports produced by Server Edition. + +b) Workstation Edition + +A Workstation Edition license entitles the licensee to use Clover +Workstation Edition on one (1) machine by one (1) individual end +user. Workstation Edition does not permit the generation of reports +for distribution. + +c) Team Edition + +A Team Edition license entitles the licensee to use Clover Team +edition on any number of machines solely by the licensed number of +users. Reports generated by Clover Team Edition are strictly for use +only by the licensed number of individual end users. + +2. License Fee + +In exchange for the License(s), the Licensee shall pay to Cenqua a +one-time, up front, non-refundable license fee. At the sole discretion +of Cenqua this fee will be waived for non-commercial +projects. Notwithstanding the Licensee's payment of the License Fee, +Cenqua reserves the right to terminate the License if Cenqua discovers +that the Licensee and/or the Licensee's use of the Software is in +breach of this Agreement. + +3. Proprietary Rights + +Cenqua will retain all right, title and interest in and to the +Software, all copies thereof, and Cenqua website(s), software, and +other intellectual property, including, but not limited to, ownership +of all copyrights, look and feel, trademark rights, design rights, +trade secret rights and any and all other intellectual property and +other proprietary rights therein. The Licensee will not directly or +indirectly obtain or attempt to obtain at any time, any right, title +or interest by registration or otherwise in or to the trademarks, +service marks, copyrights, trade names, symbols, logos or designations +or other intellectual property rights owned or used by Cenqua. All +technical manuals or other information provided by Cenqua to the +Licensee shall be the sole property of Cenqua. + +4. Term and Termination + +Subject to the other provisions hereof, this Agreement shall commence +upon the Licensee's opting into this Agreement and continue until the +Licensee discontinues use of the Software or the Agreement terminates +automatically upon the Licensee's breach of any term or condition of +this Agreement (the "Term"). Upon any such termination, the Licensee +will delete the Software immediately. + +5. Copying & Transfer + +The Licensee may copy the Software for back-up purposes only. The +Licensee may not assign or otherwise transfer the Software to any +third party. + +6. Specific Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA +DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES +ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY, +INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING +BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN +IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Warranties and Representations + +Licensee Indemnification. CENQUA agrees to indemnify, defend and hold +the Licensee harmless from and against any and all liabilities, +damages, losses, claims, costs, and expenses (including reasonable +legal fees) arising out of or resulting from the Software or the use +thereof infringing upon, misappropriating or violating any patents, +copyrights, trademarks, or trade secret rights or other proprietary +rights of persons, firms or entities who are not parties to this +Agreement. + +CENQUA Indemnification. The Licensee warrants and represents that the +Licensee's actions with regard to the Software will be in compliance +with all applicable laws; and the Licensee agrees to indemnify, +defend, and hold CENQUA harmless from and against any and all +liabilities, damages, losses, claims, costs, and expenses (including +reasonable legal fees) arising out of or resulting from the +Licensee's failure to observe the use restrictions set forth herein. + +8. Publicity + +The Licensee grants permission for CENQUA to use Licensee's name +solely in customer lists. CENQUA shall not, without prior consent in +writing, use the Licensee's name, or that of its affiliates, in any +form with the specific exception of customer lists. CENQUA agrees to +remove Licensee's name from any and all materials within 7 days if +notified by the Licensee in writing. + +9. Governing Law + +This Agreement shall be governed by the laws of New South Wales, +Australia. + +10. Independent Contractors + +The parties are independent contractors with respect to each other, +and nothing in this Agreement shall be construed as creating an +employer-employee relationship, a partnership, agency relationship or +a joint venture between the parties. + +11. Assignment + +This Agreement is not assignable or transferable by the Licensee. +CENQUA in its sole discretion may transfer a license to a third party +at the written request of the Licensee. + +12. Entire Agreement + +This Agreement constitutes the entire agreement between the parties +concerning the Licensee's use of the Software. This Agreement +supersedes any prior verbal understanding between the parties and any +Licensee purchase order or other ordering document, regardless of +whether such document is received by CENQUA before or after execution +of this Agreement. This Agreement may be amended only in writing by +CENQUA. Added: trunk/sensor-sample-app/conf/findbugs-excludes.xml =================================================================== --- trunk/sensor-sample-app/conf/findbugs-excludes.xml (rev 0) +++ trunk/sensor-sample-app/conf/findbugs-excludes.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,5 @@ +<FindBugsFilter> + <Match classregex=".*" > + <BugCode name="EI, EI2, UwF" /> + </Match> +</FindBugsFilter> Added: trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar =================================================================== (Binary files differ) Property changes on: trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/sensor-sample-app/maven.xml =================================================================== --- trunk/sensor-sample-app/maven.xml (rev 0) +++ trunk/sensor-sample-app/maven.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,33 @@ +<project xmlns:j="jelly:core" + xmlns:maven="jelly:maven" + xmlns:ant="jelly:ant" + > + + <!-- =============================================================== --> + <!-- Pre/post goals --> + <!-- =============================================================== --> + + <!-- + | Make JUNIT tests run with clover instrumentation, + | so we don't have to run unit tests again + | see: maven.clover.execute.during.report=false + --> + <preGoal name="junit-report:report"> + <attainGoal name="clover:on"/> + </preGoal> + + <postGoal name="clover:report"> + <attainGoal name="clover:off"/> + </postGoal> + + <!-- =============================================================== --> + <!-- Shortcuts. --> + <!-- =============================================================== --> + + <!-- Shortcut for running the unit tests and generating the html report for it. --> + <goal name="test-report" description="" prereqs="junit-report:report, xdoc"/> + + <!-- Shortcut for generating the clover html report for it. --> + <goal name="clover-report" description="" prereqs="clover, xdoc"/> + +</project> \ No newline at end of file Added: trunk/sensor-sample-app/project.properties =================================================================== --- trunk/sensor-sample-app/project.properties (rev 0) +++ trunk/sensor-sample-app/project.properties 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,117 @@ +# ------------------------------------------------------------------------ +# Maven runtime behaviour +# ------------------------------------------------------------------------ + +maven.repo.remote = http://www.ibiblio.org/maven,\ + http://dist.codehaus.org,\ + http://www.codeczar.com/maven,\ + http://mirrors.sunsite.dk/maven/,\ + http://maven-plugins.sourceforge.net/maven + + +# ------------------------------------------------------------------------ +# Java Properties +# ------------------------------------------------------------------------ + +debug = off +maven.compile.target=1.4 +maven.compile.source=1.4 + +maven.javadoc.overview = ${basedir}/src/java/overview.html +maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/ +maven.javadoc.private = false + +maven.war.src = src/web + +# ------------------------------------------------------------------------ +# M A V E N J A R O V E R R I D E +# ------------------------------------------------------------------------ +maven.jar.override = on +maven.jar.mysql=${basedir}/lib/mysql-connector-java-3.1.12-bin.jar + +# ------------------------------------------------------------------------ +# Licenses +# ------------------------------------------------------------------------ + +maven.license.licenseFile=${basedir}/conf/license.txt + + +# ------------------------------------------------------------------------ +# Site look and feel +# ------------------------------------------------------------------------ + +maven.xdoc.date=left +maven.xdoc.date.format=dd MMMM yyyy HH:mm +maven.xdoc.poweredby.image=maven-feather.png + + +# ------------------------------------------------------------------------ +# Unit tests and coverage +# ------------------------------------------------------------------------ + +maven.junit.fork=true +maven.test.skip=false + +maven.clover.execute.during.report=false +maven.clover.report.xml=true + +# The clover license +maven.clover.license.path=${basedir}/conf/clover.license + + +# ------------------------------------------------------------------------ +# Misc plugin settings +# ------------------------------------------------------------------------ +maven.pmd.enable=true +maven.pmd.check.tests=false +maven.findbugs.enable=true +maven.tasklist.taskTag=TODO +maven.simian.includetests=false +maven.checkstyle.properties=${basedir}/conf/checkstyle.xml +maven.findbugs.excludeFilter=${basedir}/conf/findbugs-excludes.xml + + +# ------------------------------------------------------------------------ +# Properties for the dashboard reactor +# ------------------------------------------------------------------------ + +maven.dashboard.basedir=${basedir} +maven.dashboard.includes=project.xml +maven.dashboard.ignoreFailures=true + +# Generated dashboard xml data file +maven.dashboard.report.xml=${maven.build.dir}/dashboard-data.xml + +# Generated dashboard main report xdoc file name (without the extension). +# Note: The value must not include any path as the xdoc will be +# generated in ${maven.gen.docs}. +maven.dashboard.report.xdoc=dashboard-report + +# Generated dashboard legend xdoc file name (without the extension). +# Note: The value must not include any path as the xdoc will be +# generated in ${maven.gen.docs}. +maven.dashboard.report.legend.xdoc=dashboard-report-legend + +# Location of JSL template to generate the main report xdoc file +maven.dashboard.template=${basedir}/conf/vertical-dashboard.jsl + +# Location of JSL template to generate the legend report xdoc file +maven.dashboard.template.legend=${plugin.resources}/templates/legend.jsl + +# If true, do not show projects for which gathered data is empty for all +# aggregators. +maven.dashboard.report.showempty=true + +# ------------------------------------------------------------------------ +# Properties for gathering dashboard data for a single project +# ------------------------------------------------------------------------ + +# Location of default dashboard aggregators +maven.dashboard.aggregators.dir=${plugin.resources}/aggregators + +# Comma-separated list of aggregators to use +maven.dashboard.aggregators=junitpassrate,clovertpc,juniterrors,junitfailures,cloverloc,cloverncloc,cserrors,cswarnings,fbviolations,pmdviolations,simiantdl,scmchangedfiles + +# Generated dashboard data for a single project +maven.dashboard.report.single=${maven.build.dir}/dashboard-single.xml +maven.dashboard.rungoals=false Added: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml (rev 0) +++ trunk/sensor-sample-app/project.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,351 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <pomVersion>3</pomVersion> + + <artifactId>sensor-sample-app</artifactId> + <name>Sensor Sample Application</name> + <groupId>sensor</groupId> + + <currentVersion>0.1-dev</currentVersion> + <inceptionYear>2005</inceptionYear> + <package>com.xebia.springroller</package> + + <organization> + <name>Xebia</name> + <url>http://www.xebia.com/</url> + <logo></logo> + </organization> + + <logo></logo> + <url>http://sensor.sf.net/</url> + + <shortDescription> + Sample application for the sensor project. + This application shows howto configure sensor in a webproject. + </shortDescription> + + <repository> + <connection>scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</connection> + <developerConnection>scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</developerConnection> + <url>https://svn.sourceforge.net/svnroot/sensor</url> + </repository> + + <mailingLists> + <mailingList> + <name>Sensor Developers List (sen...@li...)</name> + <subscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</subscribe> + <unsubscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=45376</archive> + </mailingList> + </mailingLists> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>/license.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <developers> + <developer> + <name>Age Mooy</name> + <id>amooy</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jurjan Woltman</name> + <id>jwoltman</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Richard Swart</name> + <id>rswart</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Lonneke Dikmans</name> + <id>ldikmans</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Silvester van der Bijl</name> + <id>silvester</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jeroen Borgers</name> + <id>jborgers</id> + <timezone>CET</timezone> + </developer> + + <!-- original developers of the sample appliation --> + <developer> + <name>Vincent Partington</name> + <id>vpartington</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Michael Franken</name> + <id>mfranken</id> + <timezone>CET</timezone> + </developer> + </developers> + + <dependencies> + + + <!-- Sensor dependencies --> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-core</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-support</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-console</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Spring --> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring</artifactId> + <version>1.2.6</version> + <type>jar</type> + <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> + </dependency> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> + <type>jar</type> + </dependency> + + <!-- 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> + <artifactId>mysql</artifactId> + <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> + </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> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <!-- Velocity --> + <dependency> + <groupId>velocity</groupId> + <artifactId>velocity</artifactId> + <version>1.4</version> + <type>jar</type> + <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> + </dependency> + + <!-- commons --> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <type>jar</type> + <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> + </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 --> + <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> + <type>jar</type> + </dependency> + + + + <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> + <dependency> + <groupId>servletapi</groupId> + <artifactId>servletapi</artifactId> + <version>2.3</version> + <type>jar</type> + </dependency> + + <!-- Maven Plugins Used by this Project --> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-clover-plugin</artifactId> + <version>1.10</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-dashboard-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-xdoc-plugin</artifactId> + <version>1.9</version> + <type>plugin</type> + </dependency> + </dependencies> + + <build> + <sourceDirectory>${basedir}/src/java</sourceDirectory> + <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> + + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + <resources> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.sql</include> + </includes> + </resource> + </resources> + </unitTest> + + <resources> + <resource> + <directory>${basedir}/src/resource</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.txt</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + </build> + + <reports> + <report>maven-license-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-clover-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + <report>maven-findbugs-plugin</report> + <report>maven-simian-plugin</report> + + <report>maven-dashboard-plugin</report> + </reports> +</project> Added: trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF =================================================================== --- trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF (rev 0) +++ trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,37 @@ +Manifest-Version: 1.0 +Class-Path: META-INF/antlr-2.7.5H3.jar + META-INF/axis.jar + META-INF/burlap-2.1.12.jar + META-INF/cglib-nodep-2.1_3.jar + META-INF/commons-collections.jar + META-INF/commons-dbcp.jar + META-INF/commons-discovery-0.2.jar + META-INF/commons-logging.jar + META-INF/commons-pool.jar + META-INF/dom4j-1.6.jar + META-INF/ehcache-1.1.jar + META-INF/hessian-2.1.12.jar + META-INF/hibernate3.jar + META-INF/ibatis-common-2.jar + META-INF/ibatis-sqlmap-2.jar + META-INF/itext-1.3.jar + META-INF/jaxrpc.jar + META-INF/jta.jar + META-INF/log4j-1.2.9.jar + META-INF/mysql-connector-java-3.1.11-bin.jar + META-INF/saaj.jar + META-INF/spring-mock.jar + META-INF/wsdl4j.jar + META-INF/spring-aop.jar + META-INF/spring-beans.jar + META-INF/spring-context.jar + META-INF/spring-core.jar + META-INF/spring-dao.jar + META-INF/spring-hibernate.jar + META-INF/spring-jdbc.jar + META-INF/spring-orm.jar + META-INF/spring-remoting.jar + META-INF/spring-support.jar + META-INF/spring-web.jar + META-INF/spring-webmvc.jar + Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,64 @@ +package com.xebia.springroller.dao; + +import java.util.List; + +import com.xebia.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); + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,54 @@ +package com.xebia.springroller.dao; + +import java.util.List; + +import com.xebia.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); + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,165 @@ +package com.xebia.springroller.dao.impl.jdbc; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +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 + * {@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}. + * + * Ids are either generated using a sequence or the auto increment. The id + * generator is injected by spring. + * + * @author Vincent Partington + * @author Lonneke Dikmans + * + */ +public class JdbcArticleDao extends JdbcDaoSupport implements ArticleDao { + + /** Query that retrieves all articles. */ + private static final String ALL_ARTICLES_QUERY = "SELECT ID ,TITLE, TEXT, PUBLICATION_DATE, PUBLICATION_IP_ADDRESS, AUTHOR FROM articles"; + + /** Query that updates all the columns of the article. */ + private static final String UPDATE_ARTICLE_QUERY = "UPDATE articles set TITLE=?, TEXT=?, PUBLICATION_DATE=?, PUBLICATION_IP_ADDRESS = ?, author = ? where id = ?"; + + /** Query that inserts the article. */ + private static final String INSERT_ARTICLE_QUERY = "INSERT INTO articles(id, title, text, publication_date, publication_ip_address, author) VALUES(?, ?, ?, ?, ?, ?) "; + + /** Query that retrieves all articles by a particular author. */ + private static final String ARTICLE_BY_AUTHOR_QUERY = ALL_ARTICLES_QUERY + + " WHERE author = ?"; + + /** query that retreives an article by its id. */ + private static final String ARTICLE_BY_ID_QUERY = ALL_ARTICLES_QUERY + + " WHERE id = ?"; + + /** + * @see ArticleDao#getArticle(int) + */ + public Article getArticle(int articleId) { + + Article article = null; + + List results = getJdbcTemplate().query(ARTICLE_BY_ID_QUERY, + new Object[] { new Integer(articleId) }, new ArticleMapper()); + if (results != null && results.size() == 1) { + article = (Article) results.get(0); + } + + return article; + } + + /** + * @see ArticleDao#getAllArticles() + */ + public List getAllArticles() { + + return getJdbcTemplate().query(ALL_ARTICLES_QUERY, + new ArticleMapper()); + } + + /** + * @see ArticleDao#getArticlesByAuthor(String) + */ + public List getArticlesByAuthor(String authorName) { + return getJdbcTemplate().query(ARTICLE_BY_AUTHOR_QUERY, + new Object[] { authorName }, new ArticleMapper()); + } + + /** + * The article that is passed in does not have an Id yet. This is generated + * by fetching a number from the sequence table. + * + * @see ArticleDao#add + */ + public void addArticle(Article newArticle) { + Integer id = getId(newArticle.getId()); + getJdbcTemplate().update( + INSERT_ARTICLE_QUERY, + new Object[] { id, newArticle.getTitle(), newArticle.getText(), + newArticle.getPublicationDate(), + newArticle.getPublicationIPAddressHome(), + newArticle.getAuthor().getName() }); + + } + + /** + * @see ArticleDao#updateArticle(Article) + */ + public void updateArticle(Article updatedArticle) { + getJdbcTemplate().update( + UPDATE_ARTICLE_QUERY, + new Object[] { updatedArticle.getTitle(), + updatedArticle.getText(), + updatedArticle.getPublicationDate(), + updatedArticle.getPublicationIPAddressHome(), + updatedArticle.getAuthor().getName(), + new Integer(updatedArticle.getId()) }); + + } + + public void deleteArticle(int articleId) { + getJdbcTemplate().update("DELETE from articles where id = ?", + new Object[] { new Integer(articleId) }); + + } + + /** + * returns a unique id for this object from the database. This class should + * be overridden if the underlying database has no 'autoincrement' + * functionality. + * + * @return the unique identifier of <code>null</code> if the underlying + * database has an autoincrement functionality and the id passed in + * is 0; + */ + protected Integer getId(int id) { + Integer uniqueId = null; + if (id != 0) { + uniqueId = new Integer(id); + } + return uniqueId; + } + + /** + * private class that mapps the rows in a resultset to the {@link Article} + * article. + * + * + */ + private final class ArticleMapper implements RowMapper { + + /** + * @see RowMapper#mapRow(java.sql.ResultSet, int) + */ + public Object mapRow(ResultSet rs, int rowNr) throws SQLException { + + Article article = new Article(); + + article.setId(rs.getInt("id")); + article.setTitle(rs.getString("title")); + article.setText(rs.getString("text")); + article.setPublicationDate(rs.getDate("publication_date")); + article.setPublicationIPAddress((rs + .getString("publication_ip_address"))); + User author = new User(); + author.setName(rs.getString("author")); + article.setAuthor(author); + + return article; + } + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,69 @@ +package com.xebia.springroller.dao.impl.jdbc; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +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 { + + private final class UserSetter implements PreparedStatementSetter { + private final User user; + + private UserSetter(User user) { + super(); + this.user = user; + } + + public void setValues(PreparedStatement stm) throws SQLException { + stm.setString(1, user.getName()); + stm.setString(2, user.getPassword()); + } + } + + private final class UserMapper implements RowMapper { + public Object mapRow(ResultSet rs, int rowNr) throws SQLException { + User user = new User(); + user.setName(rs.getString("name")); + user.setPassword(rs.getString("password")); + return user; + } + } + + public User getUser(String username) { + + return (User) getJdbcTemplate().query( + "SELECT name, password FROM users WHERE name = ?", + new Object[] { username }, new UserMapper()).get(0); + } + + public List getAllUsers() { + return getJdbcTemplate().query("SELECT * FROM users", new UserMapper()); + } + + public void addUser(final User newUser) { + getJdbcTemplate().update( + "INSERT INTO users (name, password) VALUES (?, ?)", + new UserSetter(newUser)); + } + + public void updateUser(final User updatedUser) { + getJdbcTemplate().update( + "UPDATE users SET name = ?, password = ? WHERE name = ?", + new Object[] { updatedUser.getName(), + updatedUser.getPassword(), updatedUser.getName() }); + + } + + public void deleteUser(String username) { + getJdbcTemplate().update("DELETE FROM users WHERE name = ?", + new Object[] { username }); + } +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,27 @@ +/** + * + */ +package com.xebia.springroller.dao.impl.jdbc; + +/** + * Implements Oracle specific constructs. + * @author Lonneke Dikmans + * + */ +public class OracleJdbcArticleDao extends JdbcArticleDao { + + /** query that retrieves the next value from the article sequence. */ + private static final String NEXT_VAL_QUERY = "select ARTICLE_SEQ.nextval from DUAL"; + + /** + * Returns an Id from the article sequence. + * @see JdbcArticleDao#getId(). + */ + protected Integer getId() { + int id = getJdbcTemplate().queryForInt(NEXT_VAL_QUERY); + return new Integer(id); + } + + + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,133 @@ +package com.xebia.springroller.dao.impl.memory; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import com.xebia.springroller.dao.ArticleDao; +import com.xebia.springroller.domain.Article; + +/** + * Implementation of the {@link com.xebia.springroller.dao.ArticleDao} that keeps the articles in memory. + * + * @author Vincent Partington + * + */ +public class MemoryArticleDao implements ArticleDao { + + /** + * map for articles. Key is the id of the article. Value is of type + * {@link Article}. + */ + private Map articles = new HashMap(); + + /** counter that keeps track of the last id.*/ + private int nextArticleId = 1; + + /** + * @see ArticleDao#getArticle(int) + */ + public Article getArticle(int articleId) { + return (Article) articles.get(new Integer(articleId)); + } + + /** + * @see ArticleDao#getAllArticles(). + */ + public List getAllArticles() { + List articlesToReturn = new ArrayList(articles.values()); + Collections.sort(articlesToReturn, new ArticleComparator()); + return articlesToReturn; + } + + /** + * @see ArticleDao#getArticlesByAuthor(String) + */ + public List getArticlesByAuthor(String authorName) { + List articlesToReturn = new ArrayList(); + for (Iterator i = articles.values().iterator(); i.hasNext();) { + Article article = (Article) i.next(); + if (authorName.equals(article.getAuthor().getName())) { + articlesToReturn.add(article); + } + } + Collections.sort(articlesToReturn, new ArticleComparator()); + return articlesToReturn; + } + + /** + * @see ArticleDao#addArticle(Article). + */ + public void addArticle(Article newArticle) { + newArticle.setId(nextArticleId++); + articles.put(new Integer(newArticle.getId()), newArticle); + } + + /** + * @see ArticleDao#updateArticle(Article) + */ + public void updateArticle(Article updatedArticle) { + articles.put(new Integer(updatedArticle.getId()), updatedArticle); + } + + /** + * @see ArticleDao#deleteArticle(int) + */ + public void deleteArticle(int articleId) { + articles.remove(new Integer(articleId)); + } + + /** + * Sets all article in the dao's memory. To be used for initializion. + */ + public void setArticles(List articlesToAdd) { + articles.clear(); + for (Iterator i = articlesToAdd.iterator(); i.hasNext();) { + Article articleToAdd = (Article) i.next(); + addArticle(articleToAdd); + } + } + + /** + * Comparator for the map. + * @author Vincent Partington + * + */ + public static class ArticleComparator implements Comparator { + + /** + * @see Comparator#compare(java.lang.Object, java.lang.Object) + */ + public int compare(Object leftObject, Object rightObject) { + + if (leftObject instanceof Article && rightObject instanceof Article) { + Article leftArticle = (Article) leftObject; + Article rightArticle = (Article) rightObject; + int order = leftArticle.getPublicationDate().compareTo( + rightArticle.getPublicationDate()); + if (order != 0) { + return -order; // we want the reverse order: newest + // articles first! + } else { + if (leftArticle.getId() < rightArticle.getId()) { + return 1; + } else if (leftArticle.getId() > rightArticle.getId()) { + return -1; + } else { + return 0; + } + } + } + // the objects were not articles + else { + return 0; + } + } + + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,94 @@ +package com.xebia.springroller.dao.impl.memory; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import com.xebia.springroller.dao.UserDao; +import com.xebia.springroller.domain.User; + +/** + * Implementation of the {@link com.xebia.springroller.dao.UserDao} that keeps the users in memory. + * @author Vincent Partington + * + */ +public class MemoryUserDao implements UserDao { + + /** map with key the name of the user, value a {@link User}.*/ + private Map users = new HashMap(); + + /** + * @see UserDao#getUser(String) + */ + public User getUser(String username) { + return (User) users.get(username); + } + + /** + * @see UserDao#getAllUsers() + */ + public List getAllUsers() { + List usersToReturn = new ArrayList(users.values()); + Collections.sort(usersToReturn, new UserComparator()); + return usersToReturn; + } + + /** + * @see UserDao#addUser(User) + */ + public void addUser(User newUser) { + users.put(newUser.getName(), newUser); + } + + /** + * @see UserDao#updateUser(User) + */ + public void updateUser(User updatedUser) { + users.put(updatedUser.getName(), updatedUser); + } + + /** + * @see UserDao#deleteUser(String) + */ + public void deleteUser(String username) { + users.remove(username); + } + + /** + * Sets all users in the dao's memory. To be used for initializion. + */ + public void setUsers(List usersToAdd) { + users.clear(); + for (Iterator i = usersToAdd.iterator(); i.hasNext();){ + User userToAdd = (User) i.next(); + addUser(userToAdd); + } + } + + /** + * Comparotor for user map. + * @author Vincent Partington + * + */ + private static class UserComparator implements Comparator { + + /** + * @see Comparator#compare(java.lang.Object, java.lang.Object) + */ + public int compare(Object leftObject, Object rightObject) { + if (leftObject instanceof User && rightObject instanceof User){ + User leftUser = (User) leftObject; + User rightUser = (User) rightObject; + return leftUser.getName().compareTo(rightUser.getName()); + } else{ + return 0; + } + } + + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,142 @@ +package com.xebia.springroller.domain; + +import java.io.Serializable; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Date; + +/** + * An article in the blog. + * + * @author Vincent Partington + */ +public class Article implements Serializable { + + /** + * generated serialVersionUID. + */ + private static final long serialVersionUID = -1988560852374861470L; + + /** technical id of the article. */ + private int id; + + /** title of the article. */ + private String title; + + /** actual body of the article. */ + private String text; + + /** date this article was published on the internet. */ + private Date publicationDate; + + /** {@link InetAddress Address} it is submitted from. */ + private InetAddress publicationIPAddress; + + /** {@link User author} of the article.*/ + private User author; + + /** + * Returns the ID of the article. + */ + public int getId() { + return id; + } + + /** + * Sets the ID of the article. + */ + public void setId(int id) { + this.id = id; + } + + /** + * Returns the title. + */ + public String getTitle() { + return title; + } + + /** + * Sets the title. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * Returns the text. + */ + public String getText() { + return text; + } + + /** + * Sets the text. + */ + public void setText(String text) { + this.text = text; + } + + /** + * Returns the date and time of publication. + */ + public Date getPublicationDate() { + return publicationDate; + } + + /** + * Sets the date and time of publication. + */ + public void setPublicationDate(Date publicationDate) { + this.publicationDate = publicationDate; + } + + /** + * Sets the IP address. If an UnknownHostException is thrown, the publication address is <code>null</code>. + * @param address that is converted to a {@link InetAddress address}. + */ + public void setPublicationIPAddress(String address){ + try { + this.publicationIPAddress = InetAddress.getByName(address); + } catch (UnknownHostException e) { + publicationIPAddress = null; + e.printStackTrace(); + } + } + + /** + * R... [truncated message content] |
From: <ldi...@us...> - 2006-04-06 18:43:06
|
Revision: 107 Author: ldikmans Date: 2006-04-06 11:42:54 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=107&view=rev Log Message: ----------- enabled maviclipse Added Paths: ----------- trunk/sensor-sample-app/.settings/ trunk/sensor-sample-app/.settings/.component trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml Added: trunk/sensor-sample-app/.settings/.component =================================================================== --- trunk/sensor-sample-app/.settings/.component (rev 0) +++ trunk/sensor-sample-app/.settings/.component 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,52 @@ +<?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> + Added: trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,7 @@ +#Thu Apr 06 18:57:37 CEST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 Added: trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml =================================================================== --- trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0) +++ trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<faceted-project> + <fixed facet="jst.web"/> + <fixed facet="jst.java"/> + <installed facet="jst.web" version="2.4"/> + <installed facet="jst.java" version="1.4"/> +</faceted-project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-06 18:44:12
|
Revision: 110 Author: ldikmans Date: 2006-04-06 11:44:00 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=110&view=rev Log Message: ----------- enabled maviclipse Modified Paths: -------------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/project.xml Modified: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/.classpath 2006-04-06 18:44:00 UTC (rev 110) @@ -1,18 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src/java"/> - <classpathentry kind="src" path="test/java"/> - <classpathentry kind="src" path="test/resources"/> - <classpathentry kind="src" path="src/resource"/> - <classpathentry kind="src" path="src/web"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <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/springframework/jars/spring-mock-1.2.6.jar"/> - <classpathentry kind="var" path="JUNIT_HOME/junit.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/commons-io/jars/commons-io-1.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> Modified: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/.project 2006-04-06 18:44:00 UTC (rev 110) @@ -6,12 +6,31 @@ </projects> <buildSpec> <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>nl.inspiring.maviclipse.core.maviclipseBuilder</name> + <arguments> + </arguments> + </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> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> </natures> </projectDescription> Modified: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/project.xml 2006-04-06 18:44:00 UTC (rev 110) @@ -1,351 +1,391 @@ <?xml version="1.0" encoding="UTF-8"?> <project> - <pomVersion>3</pomVersion> - - <artifactId>sensor-sample-app</artifactId> - <name>Sensor Sample Application</name> - <groupId>sensor</groupId> - - <currentVersion>0.1-dev</currentVersion> - <inceptionYear>2005</inceptionYear> - <package>com.xebia.springroller</package> - - <organization> - <name>Xebia</name> - <url>http://www.xebia.com/</url> - <logo></logo> - </organization> - - <logo></logo> - <url>http://sensor.sf.net/</url> - - <shortDescription> - Sample application for the sensor project. - This application shows howto configure sensor in a webproject. - </shortDescription> + <pomVersion>3</pomVersion> + <artifactId>sensor-sample-app</artifactId> + <name>Sensor Sample Application</name> + <groupId>sensor</groupId> + + <currentVersion>0.1-dev</currentVersion> + <inceptionYear>2005</inceptionYear> + <package>com.xebia.springroller</package> + + <organization> + <name>Xebia</name> + <url>http://www.xebia.com/</url> + <logo></logo> + </organization> + + <logo></logo> + <url>http://sensor.sf.net/</url> + + <shortDescription> + Sample application for the sensor project. This application + shows howto configure sensor in a webproject. + </shortDescription> + <repository> - <connection>scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</connection> - <developerConnection>scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</developerConnection> + <connection> + scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app + </connection> + <developerConnection> + scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app + </developerConnection> <url>https://svn.sourceforge.net/svnroot/sensor</url> </repository> - - <mailingLists> - <mailingList> - <name>Sensor Developers List (sen...@li...)</name> - <subscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</subscribe> - <unsubscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=45376</archive> - </mailingList> - </mailingLists> - - <licenses> - <license> - <name>The Apache Software License, Version 2.0</name> - <url>/license.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - - <developers> - <developer> - <name>Age Mooy</name> - <id>amooy</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Jurjan Woltman</name> - <id>jwoltman</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Richard Swart</name> - <id>rswart</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Lonneke Dikmans</name> - <id>ldikmans</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Silvester van der Bijl</name> - <id>silvester</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Jeroen Borgers</name> - <id>jborgers</id> - <timezone>CET</timezone> - </developer> - - <!-- original developers of the sample appliation --> - <developer> - <name>Vincent Partington</name> - <id>vpartington</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Michael Franken</name> - <id>mfranken</id> - <timezone>CET</timezone> - </developer> - </developers> - <dependencies> + <mailingLists> + <mailingList> + <name> + Sensor Developers List + (sen...@li...) + </name> + <subscribe> + https://lists.sourceforge.net/lists/listinfo/sensor-developer + </subscribe> + <unsubscribe> + https://lists.sourceforge.net/lists/listinfo/sensor-developer + </unsubscribe> + <archive> + http://sourceforge.net/mailarchive/forum.php?forum_id=45376 + </archive> + </mailingList> + </mailingLists> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>/license.txt</url> + <distribution>repo</distribution> + </license> + </licenses> - <!-- Sensor dependencies --> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-core</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-support</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-console</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - - <!-- Spring --> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring</artifactId> - <version>1.2.6</version> - <type>jar</type> - <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> - </dependency> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring-mock</artifactId> - <version>1.2.6</version> - <type>jar</type> - </dependency> - - <!-- 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> - <artifactId>mysql</artifactId> - <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> - </dependency> - + <developers> + <developer> + <name>Age Mooy</name> + <id>amooy</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jurjan Woltman</name> + <id>jwoltman</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Richard Swart</name> + <id>rswart</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Lonneke Dikmans</name> + <id>ldikmans</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Silvester van der Bijl</name> + <id>silvester</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jeroen Borgers</name> + <id>jborgers</id> + <timezone>CET</timezone> + </developer> - <!-- 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> - </dependency> - <dependency> - <groupId>taglibs</groupId> - <artifactId>standard</artifactId> - <version>1.0.6</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> + <!-- original developers of the sample appliation --> + <developer> + <name>Vincent Partington</name> + <id>vpartington</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Michael Franken</name> + <id>mfranken</id> + <timezone>CET</timezone> + </developer> + </developers> - <!-- Velocity --> - <dependency> - <groupId>velocity</groupId> - <artifactId>velocity</artifactId> - <version>1.4</version> - <type>jar</type> - <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> - </dependency> - - <!-- commons --> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.1</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.1</version> - <type>jar</type> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.0.4</version> - <type>jar</type> - <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> - </dependency> - + <dependencies> - <!--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 --> - <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> - <type>jar</type> - </dependency> - - - - <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> - <dependency> - <groupId>servletapi</groupId> - <artifactId>servletapi</artifactId> - <version>2.3</version> - <type>jar</type> - </dependency> - - <!-- Maven Plugins Used by this Project --> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-pmd-plugin</artifactId> - <version>1.7</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven-plugins</groupId> - <artifactId>maven-findbugs-plugin</artifactId> - <version>1.0</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-clover-plugin</artifactId> - <version>1.10</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven-plugins</groupId> - <artifactId>maven-findbugs-plugin</artifactId> - <version>1.0</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-dashboard-plugin</artifactId> - <version>1.7</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-xdoc-plugin</artifactId> - <version>1.9</version> - <type>plugin</type> - </dependency> - </dependencies> - - <build> - <sourceDirectory>${basedir}/src/java</sourceDirectory> - <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> - - <unitTest> - <includes> - <include>**/*Test.java</include> - </includes> - <excludes> - <exclude>**/Abstract*.java</exclude> - </excludes> - <resources> - <resource> - <directory>${basedir}/test/resources</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.sql</include> - </includes> - </resource> - </resources> - </unitTest> - - <resources> - <resource> - <directory>${basedir}/src/resource</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.txt</include> - <include>**/*.properties</include> - </includes> - </resource> - </resources> - </build> - - <reports> - <report>maven-license-plugin</report> - <report>maven-javadoc-plugin</report> - <report>maven-jxr-plugin</report> - <report>maven-junit-report-plugin</report> - <report>maven-clover-plugin</report> - <report>maven-checkstyle-plugin</report> - <report>maven-pmd-plugin</report> - <report>maven-findbugs-plugin</report> - <report>maven-simian-plugin</report> - - <report>maven-dashboard-plugin</report> - </reports> + + <!-- Sensor dependencies --> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-core</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-support</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-console</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Spring --> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring</artifactId> + <version>1.2.6</version> + <type>jar</type> + <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> + </dependency> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> + <type>jar</type> + </dependency> + + <!-- 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> + <artifactId>mysql</artifactId> + <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> + </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> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Velocity --> + <dependency> + <groupId>velocity</groupId> + <artifactId>velocity</artifactId> + <version>1.4</version> + <type>jar</type> + <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> + </dependency> + + <!-- commons --> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <type>jar</type> + <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> + </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 --> + <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> + <type>jar</type> + </dependency> + + + <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> + <dependency> + <groupId>servletapi</groupId> + <artifactId>servletapi</artifactId> + <version>2.3</version> + <type>jar</type> + </dependency> + + <!-- Maven Plugins Used by this Project --> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-clover-plugin</artifactId> + <version>1.10</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-dashboard-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-xdoc-plugin</artifactId> + <version>1.9</version> + <type>plugin</type> + </dependency> + </dependencies> + + <build> + <sourceDirectory>${basedir}/src/java</sourceDirectory> + <unitTestSourceDirectory> + ${basedir}/test/java + </unitTestSourceDirectory> + + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + <resources> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.sql</include> + </includes> + </resource> + </resources> + </unitTest> + + <resources> + <resource> + <directory>${basedir}/src/resource</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.txt</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + </build> + + <reports> + <report>maven-license-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-clover-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + <report>maven-findbugs-plugin</report> + <report>maven-simian-plugin</report> + + <report>maven-dashboard-plugin</report> + </reports> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |