You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(56) |
2007 |
Jan
(131) |
Feb
(26) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(20) |
Oct
|
Nov
|
Dec
(9) |
2012 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(3) |
Feb
(5) |
Mar
(12) |
Apr
(57) |
May
(36) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ps...@us...> - 2017-05-31 18:04:44
|
Revision: 298 http://sourceforge.net/p/vlibrary/code/298 Author: psteitz Date: 2017-05-31 18:04:42 +0000 (Wed, 31 May 2017) Log Message: ----------- Added restore playbook. Added Paths: ----------- trunk/playbooks/roles/restore/ trunk/playbooks/roles/restore/tasks/ trunk/playbooks/roles/restore/tasks/main.yml trunk/playbooks/roles/restore/templates/ trunk/playbooks/roles/restore/templates/restore.ij Added: trunk/playbooks/roles/restore/tasks/main.yml =================================================================== --- trunk/playbooks/roles/restore/tasks/main.yml (rev 0) +++ trunk/playbooks/roles/restore/tasks/main.yml 2017-05-31 18:04:42 UTC (rev 298) @@ -0,0 +1,17 @@ +- name: Deploy restore sript + template: + src: restore.ij + dest: "{{derby_home}}" + become: true + +- name: Restore the database + shell: "{{derby_home}}/bin/ij restore.ij" + args: + chdir: "{{derby_home}}" + become: true + +- name: Remove restore script + file: + dest: "{{derby_home}}/restore.ij" + state: absent + become: true Added: trunk/playbooks/roles/restore/templates/restore.ij =================================================================== --- trunk/playbooks/roles/restore/templates/restore.ij (rev 0) +++ trunk/playbooks/roles/restore/templates/restore.ij 2017-05-31 18:04:42 UTC (rev 298) @@ -0,0 +1,2 @@ +connect 'jdbc:derby://localhost:1527/VLIBRARY;user={{app_user}};password={{app_pass}};shutdown=true'; +connect 'jdbc:derby://localhost:1527/VLIBRARY;user={{app_user}};password={{app_pass}};restoreFrom={{backup_path}}/VLIBRARY'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-30 21:20:13
|
Revision: 297 http://sourceforge.net/p/vlibrary/code/297 Author: psteitz Date: 2017-05-30 21:20:10 +0000 (Tue, 30 May 2017) Log Message: ----------- Pull sources from trunk. Modified Paths: -------------- trunk/playbooks/group_vars/servers Modified: trunk/playbooks/group_vars/servers =================================================================== --- trunk/playbooks/group_vars/servers 2017-05-30 21:19:25 UTC (rev 296) +++ trunk/playbooks/group_vars/servers 2017-05-30 21:20:10 UTC (rev 297) @@ -6,7 +6,7 @@ maven_path: "{{maven_home}}/bin" tomcat_version: 8.5.13 tomcat_home: /opt/apache-tomcat-{{tomcat_version}} -svn_root: https://svn.code.sf.net/p/vlibrary/code/branches/VLIBRARY_2_X +svn_root: https://svn.code.sf.net/p/vlibrary/code/trunk jre_path: /usr/lib/jvm/java-8-openjdk-amd64/jre #jre_path: /usr/lib/jvm/java-8-oracle/jre ansible_managed: Ansible Managed - do not edit. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-30 21:19:27
|
Revision: 296 http://sourceforge.net/p/vlibrary/code/296 Author: psteitz Date: 2017-05-30 21:19:25 +0000 (Tue, 30 May 2017) Log Message: ----------- Space out cron runs. Modified Paths: -------------- trunk/playbooks/roles/backupApp/tasks/main.yml Modified: trunk/playbooks/roles/backupApp/tasks/main.yml =================================================================== --- trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-25 21:54:40 UTC (rev 295) +++ trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-30 21:19:25 UTC (rev 296) @@ -44,7 +44,7 @@ cron: name: "vlibrary database backup cleanup" hour: "3" - minute: "2" - job: "find /vlibrary/ -type d -name backup20* -mtime +6 -exec rm -rf {} \; > /dev/null 2>&1" + minute: "10" + job: "find /vlibrary/ -type d -name backup20* -mtime +6 -exec rm -rf {} \\; > /dev/null 2>&1" become: true \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-25 21:54:42
|
Revision: 295 http://sourceforge.net/p/vlibrary/code/295 Author: psteitz Date: 2017-05-25 21:54:40 +0000 (Thu, 25 May 2017) Log Message: ----------- Made updateApp also update the backup app. Modified Paths: -------------- trunk/playbooks/updateApp.yml Modified: trunk/playbooks/updateApp.yml =================================================================== --- trunk/playbooks/updateApp.yml 2017-05-24 19:58:03 UTC (rev 294) +++ trunk/playbooks/updateApp.yml 2017-05-25 21:54:40 UTC (rev 295) @@ -1,11 +1,11 @@ --- -# Checks out the latest sources, builds and deploys the app +# Checks out the latest sources, builds and deploys the app and backup app # USAGE: # ansible-playbook updateApp.yml --extra-vars "app_user=app app_pass=appPass mail_user=som...@gm... mail_pass=secret" - hosts: servers roles: - - app + - backupApp - deploy environment: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-24 19:58:05
|
Revision: 294 http://sourceforge.net/p/vlibrary/code/294 Author: psteitz Date: 2017-05-24 19:58:03 +0000 (Wed, 24 May 2017) Log Message: ----------- Mute cron output. Modified Paths: -------------- trunk/playbooks/roles/backupApp/tasks/main.yml Modified: trunk/playbooks/roles/backupApp/tasks/main.yml =================================================================== --- trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-24 19:40:17 UTC (rev 293) +++ trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-24 19:58:03 UTC (rev 294) @@ -45,6 +45,6 @@ name: "vlibrary database backup cleanup" hour: "3" minute: "2" - job: "find /vlibrary/ -type d -name backup20* -mtime +6 -exec rm -rf {} \;" + job: "find /vlibrary/ -type d -name backup20* -mtime +6 -exec rm -rf {} \; > /dev/null 2>&1" become: true \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-24 19:40:19
|
Revision: 293 http://sourceforge.net/p/vlibrary/code/293 Author: psteitz Date: 2017-05-24 19:40:17 +0000 (Wed, 24 May 2017) Log Message: ----------- Added cron to clean up old backups. Modified Paths: -------------- trunk/playbooks/roles/backupApp/tasks/main.yml Modified: trunk/playbooks/roles/backupApp/tasks/main.yml =================================================================== --- trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-20 15:30:10 UTC (rev 292) +++ trunk/playbooks/roles/backupApp/tasks/main.yml 2017-05-24 19:40:17 UTC (rev 293) @@ -39,4 +39,12 @@ minute: "2" job: "java -jar /vlibrary/derbyBackup-1.0-SNAPSHOT-jar-with-dependencies.jar" become: true + +- name: Setup cron to clean up old backups + cron: + name: "vlibrary database backup cleanup" + hour: "3" + minute: "2" + job: "find /vlibrary/ -type d -name backup20* -mtime +6 -exec rm -rf {} \;" + become: true \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-20 15:30:11
|
Revision: 292 http://sourceforge.net/p/vlibrary/code/292 Author: psteitz Date: 2017-05-20 15:30:10 +0000 (Sat, 20 May 2017) Log Message: ----------- Replace trunk with copy of 2_X branch. Added Paths: ----------- trunk/ Removed Paths: ------------- temp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-20 15:29:16
|
Revision: 291 http://sourceforge.net/p/vlibrary/code/291 Author: psteitz Date: 2017-05-20 15:29:14 +0000 (Sat, 20 May 2017) Log Message: ----------- Temporarily rm trunk, copy 2_X branch to temp (to become new trunk). Added Paths: ----------- temp/ temp/src/main/webapp/WEB-INF/classes/database.properties Removed Paths: ------------- temp/src/main/webapp/WEB-INF/classes/database.properties trunk/ Deleted: temp/src/main/webapp/WEB-INF/classes/database.properties =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties 2017-05-20 00:17:30 UTC (rev 289) +++ temp/src/main/webapp/WEB-INF/classes/database.properties 2017-05-20 15:29:14 UTC (rev 291) @@ -1,5 +0,0 @@ -database.driverClassName = org.apache.derby.jdbc.ClientDriver -database.url = jdbc:derby://localhost:1527/VLIBRARY -database.username = app -database.password = apppass - Copied: temp/src/main/webapp/WEB-INF/classes/database.properties (from rev 290, branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties) =================================================================== --- temp/src/main/webapp/WEB-INF/classes/database.properties (rev 0) +++ temp/src/main/webapp/WEB-INF/classes/database.properties 2017-05-20 15:29:14 UTC (rev 291) @@ -0,0 +1,5 @@ +database.driverClassName = org.apache.derby.jdbc.ClientDriver +database.url = jdbc:derby://localhost:1527/VLIBRARY +database.username = app +database.password = apppass + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-20 15:08:37
|
Revision: 290 http://sourceforge.net/p/vlibrary/code/290 Author: psteitz Date: 2017-05-20 15:08:34 +0000 (Sat, 20 May 2017) Log Message: ----------- Copied trunk to 2_0 branch. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties Added Paths: ----------- branches/VLIBRARY_2_0/ Modified: branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties 2017-05-20 00:17:30 UTC (rev 289) +++ branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/database.properties 2017-05-20 15:08:34 UTC (rev 290) @@ -1,4 +1,4 @@ -database.driverClassName = org.apache.derby.jdbc.ClientDriver +database.driverClassName = org.apache.derby.jdbc.ClientDriver database.url = jdbc:derby://localhost:1527/VLIBRARY database.username = app database.password = apppass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-20 00:17:31
|
Revision: 289 http://sourceforge.net/p/vlibrary/code/289 Author: psteitz Date: 2017-05-20 00:17:30 +0000 (Sat, 20 May 2017) Log Message: ----------- Added playbook to just update and deploy the app. Added Paths: ----------- branches/VLIBRARY_2_X/playbooks/roles/deploy/ branches/VLIBRARY_2_X/playbooks/roles/deploy/tasks/ branches/VLIBRARY_2_X/playbooks/roles/deploy/tasks/main.yml branches/VLIBRARY_2_X/playbooks/updateApp.yml Added: branches/VLIBRARY_2_X/playbooks/roles/deploy/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/deploy/tasks/main.yml (rev 0) +++ branches/VLIBRARY_2_X/playbooks/roles/deploy/tasks/main.yml 2017-05-20 00:17:30 UTC (rev 289) @@ -0,0 +1,6 @@ +- name: Deploy the app + copy: + remote_src: true + src: "{{vlibrary_src}}/target/vlibrary.war" + dest: "{{tomcat_home}}/webapps" + become: true Added: branches/VLIBRARY_2_X/playbooks/updateApp.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/updateApp.yml (rev 0) +++ branches/VLIBRARY_2_X/playbooks/updateApp.yml 2017-05-20 00:17:30 UTC (rev 289) @@ -0,0 +1,12 @@ +--- +# Checks out the latest sources, builds and deploys the app +# USAGE: +# ansible-playbook updateApp.yml --extra-vars "app_user=app app_pass=appPass mail_user=som...@gm... mail_pass=secret" + +- hosts: servers + roles: + - app + - deploy + + environment: + DERBY_HOME: "{{derby_home}}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 19:49:01
|
Revision: 288 http://sourceforge.net/p/vlibrary/code/288 Author: psteitz Date: 2017-05-19 19:48:59 +0000 (Fri, 19 May 2017) Log Message: ----------- Updated tiles template to include issues link. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/template.jsp Modified: branches/VLIBRARY_2_X/src/main/webapp/template.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/template.jsp 2017-05-19 19:48:13 UTC (rev 287) +++ branches/VLIBRARY_2_X/src/main/webapp/template.jsp 2017-05-19 19:48:59 UTC (rev 288) @@ -33,10 +33,10 @@ </tr> <tr> <td colspan='2'> - <br> - <a href=mailto:<bean:message key="email.support.address"/>> - <bean:message key="index.contact"/> - </a> + <br> <a href=mailto:<bean:message key="email.support.address"/>> + <bean:message key="index.contact"/></a> + <br><a href="https://vlibrary.sourceforge.io/issues.html"> + <bean:message key="index.issues"/></a> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 19:48:15
|
Revision: 287 http://sourceforge.net/p/vlibrary/code/287 Author: psteitz Date: 2017-05-19 19:48:13 +0000 (Fri, 19 May 2017) Log Message: ----------- Don't become non-privileged user; various cleanup items. Modified Paths: -------------- branches/VLIBRARY_2_X/playbooks/group_vars/servers branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml branches/VLIBRARY_2_X/playbooks/roles/backupApp/tasks/main.yml branches/VLIBRARY_2_X/playbooks/roles/derby/handlers/main.yml branches/VLIBRARY_2_X/playbooks/roles/derby/tasks/main.yml branches/VLIBRARY_2_X/playbooks/roles/tomcat/tasks/main.yml Modified: branches/VLIBRARY_2_X/playbooks/group_vars/servers =================================================================== --- branches/VLIBRARY_2_X/playbooks/group_vars/servers 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/group_vars/servers 2017-05-19 19:48:13 UTC (rev 287) @@ -7,6 +7,8 @@ tomcat_version: 8.5.13 tomcat_home: /opt/apache-tomcat-{{tomcat_version}} svn_root: https://svn.code.sf.net/p/vlibrary/code/branches/VLIBRARY_2_X +jre_path: /usr/lib/jvm/java-8-openjdk-amd64/jre +#jre_path: /usr/lib/jvm/java-8-oracle/jre ansible_managed: Ansible Managed - do not edit. # default setup using gmail - need to allow insecure apps to access the sending account @@ -14,7 +16,7 @@ mail_port: 465 # lets_encrypt true means Let's Encrypt cert will be installed -lets_encrypt: true +lets_encrypt: false # Hard-coded (sic) list of locations that will be set up in the DB location_0: Scottsdale @@ -21,7 +23,7 @@ location_1: Austin # Log level -log_level: DEBUG +log_level: INFO # Location of database backups backup_root: /vlibrary/backup Modified: branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml 2017-05-19 19:48:13 UTC (rev 287) @@ -24,7 +24,6 @@ dest: "{{vlibrary_src}}" force: yes become: true - become_user: vlibrary register: svn_rev - name: Download Maven @@ -43,7 +42,6 @@ src: mailsender.properties dest: "{{vlibrary_src}}/src/main/webapp/WEB-INF/classes/" become: true - become_user: vlibrary - name: Inject logging properties template: @@ -50,7 +48,6 @@ src: log4j.properties dest: "{{vlibrary_src}}/src/main/webapp/WEB-INF/classes/" become: true - become_user: vlibrary - name: Inject database properties template: @@ -57,7 +54,6 @@ src: database.properties dest: "{{vlibrary_src}}/src/main/webapp/WEB-INF/classes/" become: true - become_user: vlibrary - name: Build the app command: "{{maven_path}}/mvn -DskipTests clean package" @@ -64,7 +60,6 @@ args: chdir: "{{vlibrary_src}}" become: true - become_user: vlibrary - name: Make war world-readable file: Modified: branches/VLIBRARY_2_X/playbooks/roles/backupApp/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/backupApp/tasks/main.yml 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/roles/backupApp/tasks/main.yml 2017-05-19 19:48:13 UTC (rev 287) @@ -4,7 +4,6 @@ src: database.properties dest: "{{vlibrary_src}}/derbyBackup/src/main/java" become: true - become_user: vlibrary - name: Build the backup app command: "{{maven_path}}/mvn -DskipTests clean package" @@ -11,7 +10,6 @@ args: chdir: "{{vlibrary_src}}/derbyBackup" become: true - become_user: vlibrary - name: Make the all-in-one jar world-readable file: @@ -24,12 +22,11 @@ src: "{{vlibrary_src}}/derbyBackup/target/derbyBackup-1.0-SNAPSHOT-jar-with-dependencies.jar" dest: "/vlibrary" become: true - become_user: vlibrary - name: Create the backup directory become: true file: - dest: {{backup_root}} + dest: "{{backup_root}}" owner: vlibrary group: vlibrary state: directory @@ -42,4 +39,4 @@ minute: "2" job: "java -jar /vlibrary/derbyBackup-1.0-SNAPSHOT-jar-with-dependencies.jar" become: true - become_user: vlibrary \ No newline at end of file + \ No newline at end of file Modified: branches/VLIBRARY_2_X/playbooks/roles/derby/handlers/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/derby/handlers/main.yml 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/roles/derby/handlers/main.yml 2017-05-19 19:48:13 UTC (rev 287) @@ -4,7 +4,6 @@ dest: "{{derby_home}}/create.ij" state: absent become: true - become_user: vlibrary - name: Remove restrict script file: @@ -11,7 +10,6 @@ dest: "{{derby_home}}/restrict.ij" state: absent become: true - become_user: vlibrary - name: Remove locations script file: @@ -18,4 +16,3 @@ dest: "{{derby_home}}/locations.ij" state: absent become: true - become_user: vlibrary Modified: branches/VLIBRARY_2_X/playbooks/roles/derby/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/derby/tasks/main.yml 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/roles/derby/tasks/main.yml 2017-05-19 19:48:13 UTC (rev 287) @@ -11,7 +11,7 @@ - name: Give Derby Java karma become: true blockinfile: - dest: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.policy + dest: "{{jre_path}}/lib/security/java.policy" content: | grant { permission java.net.SocketPermission "localhost:1527", "listen"; @@ -31,7 +31,6 @@ src: derby.properties dest: "{{derby_home}}" become: true - become_user: vlibrary - name: Start Derby become: true @@ -42,7 +41,6 @@ src: create.ij dest: "{{derby_home}}" become: true - become_user: vlibrary - name: Deploy access restriction ij script template: @@ -49,7 +47,6 @@ src: restrict.ij dest: "{{derby_home}}" become: true - become_user: vlibrary - name: Deploy location creation script template: @@ -56,7 +53,6 @@ src: locations.ij dest: "{{derby_home}}" become: true - become_user: vlibrary - name: Create database shell: "{{derby_home}}/bin/ij create.ij" @@ -65,7 +61,6 @@ creates: "{{derby_home}}/VLIBRARY" notify: Remove create script become: true - become_user: vlibrary - name: Restrict access shell: "{{derby_home}}/bin/ij restrict.ij" @@ -73,7 +68,6 @@ chdir: "{{derby_home}}" notify: Remove restrict script become: true - become_user: vlibrary - name: Add locations shell: "{{derby_home}}/bin/ij locations.ij" @@ -81,6 +75,6 @@ chdir: "{{derby_home}}" notify: Remove locations script become: true - become_user: vlibrary + Modified: branches/VLIBRARY_2_X/playbooks/roles/tomcat/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/tomcat/tasks/main.yml 2017-05-19 18:27:53 UTC (rev 286) +++ branches/VLIBRARY_2_X/playbooks/roles/tomcat/tasks/main.yml 2017-05-19 19:48:13 UTC (rev 287) @@ -44,7 +44,7 @@ copy: remote_src: true src: "{{derby_home}}/lib/derbyclient.jar" - dest: /opt/apache-tomcat-{{tomcat_version}}/lib + dest: "{{tomcat_home}}/lib" - name: Deploy the app copy: @@ -52,7 +52,6 @@ src: "{{vlibrary_src}}/target/vlibrary.war" dest: "{{tomcat_home}}/webapps" become: true - become_user: tomcat - name: Create ssl keystore directory file: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 18:27:55
|
Revision: 286 http://sourceforge.net/p/vlibrary/code/286 Author: psteitz Date: 2017-05-19 18:27:53 +0000 (Fri, 19 May 2017) Log Message: ----------- Updated checkstyle config. Modified Paths: -------------- branches/VLIBRARY_2_X/checkstyle.xml Modified: branches/VLIBRARY_2_X/checkstyle.xml =================================================================== --- branches/VLIBRARY_2_X/checkstyle.xml 2017-05-19 18:27:12 UTC (rev 285) +++ branches/VLIBRARY_2_X/checkstyle.xml 2017-05-19 18:27:53 UTC (rev 286) @@ -1,10 +1,28 @@ <?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> -<!-- vlibrary customization of default Checkstyle behavior --> +<!-- Hipparchus customization of default Checkstyle behavior --> <module name="Checker"> <property name="localeLanguage" value="en"/> + <property name="severity" value="warning" /> <module name="TreeWalker"> @@ -12,36 +30,169 @@ <module name="OperatorWrap"> <property name="option" value="eol"/> </module> - + + <!-- No if/else/do/for/while without braces --> + <module name="NeedBraces"/> + <!-- Interfaces must be types (not just constants) --> <module name="InterfaceIsType"/> - - <!-- Require method javadocs, allow undeclared RTE --> + + <!-- Must have class / interface header comments --> + <module name="JavadocType"/> + + <!-- Require method javadocs, allow undeclared RTE --> <module name="JavadocMethod"> <property name="allowUndeclaredRTE" value="true"/> + <property name="allowThrowsTagsForSubclasses" value="true"/> + <property name="validateThrows" value="false"/> </module> - + <!-- Require field javadoc --> <module name="JavadocVariable"/> - - <!-- No tabs allowed! --> - <module name="TabCharacter"/> - + <!-- No public fields --> <module name="VisibilityModifier"> - <property name="protectedAllowed" value="true"/> + <property name="protectedAllowed" value="true"/> </module> - + <!-- Require hash code override when equals is --> - <module name="EqualsHashCode"/> - - <!-- Disallow unecessary instantiantion of Boolean, String --> + <module name="EqualsHashCode"/> + + <!-- Disallow unnecessary instantiation of Boolean, String --> <module name="IllegalInstantiation"> <property name="classes" value="java.lang.Boolean, java.lang.String"/> </module> + + <!-- Required for SuppressionCommentFilter below --> + <module name="FileContentsHolder"/> + + <!-- Import should be explicit, really needed and only from pure java packages --> + <module name="AvoidStarImport" /> + <module name="UnusedImports" /> + <module name="IllegalImport" /> + + <!-- Utility class should not be instantiated, they must have a private constructor --> + <module name="HideUtilityClassConstructor" /> + + <!-- Switch statements should be complete and with independent cases --> + <module name="FallThrough" /> + <module name="MissingSwitchDefault" /> + + <!-- Constant names should obey the traditional all uppercase naming convention --> + <module name="ConstantName" /> + + <!-- Method parameters and local variables should not hide fields, except in constructors and setters --> + <module name="HiddenField"> + <property name="ignoreConstructorParameter" value="true" /> + <property name="ignoreSetter" value="true" /> + </module> + + <!-- No trailing whitespace --> + <module name="Regexp"> + <property name="format" value="[ \t]+$"/> + <property name="illegalPattern" value="true"/> + <property name="message" value="Trailing whitespace"/> + </module> + + <!-- No System.out.println() statements --> + <module name="Regexp"> + <!-- no sysouts --> + <property name="format" value="System\.out\.println"/> + <property name="illegalPattern" value="true"/> + </module> + + <!-- Authors should be in pom.xml file --> + <module name="Regexp"> + <property name="format" value="@author"/> + <property name="illegalPattern" value="true"/> + <property name="message" value="developers names should be in pom file"/> + </module> + + <!-- Use a consistent way to put modifiers --> + <module name="RedundantModifier" /> + <module name="ModifierOrder" /> + + <!-- Use a consistent way to put declarations --> + <module name="DeclarationOrder" /> + + <!-- Don't add up parentheses when they are not required --> + <module name="UnnecessaryParentheses" /> + + <!-- Don't use too widespread catch (Exception, Throwable, RuntimeException) --> + <module name="IllegalCatch" /> + + <!-- Don't use = or != for string comparisons --> + <module name="StringLiteralEquality" /> + + <!-- Don't declare multiple variables in the same statement --> + <module name="MultipleVariableDeclarations" /> + + <!-- String literals more than one character long should not be repeated several times --> + <!-- the "unchecked" string is also accepted to allow @SuppressWarnings("unchecked") --> + <module name="MultipleStringLiterals" > + <property name="ignoreStringsRegexp" value='^(("")|(".")|("unchecked"))$'/> + </module> + + <!-- Check if @Override tags are present --> + <module name="MissingOverride" /> + + <!-- <module name="TodoComment" /> --> + </module> + + <!-- No tabs allowed! --> + <module name="FileTabCharacter"/> + + <!-- Require files to end with newline characters --> + <module name="NewlineAtEndOfFile"/> <!-- Require package javadoc --> - <module name="PackageHtml"/> + <module name="JavadocPackage"/> + + <!-- Setup special comments to suppress specific checks from source files --> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable"/> + <property name="checkFormat" value="JavadocVariable"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocMethodCheck"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocMethodCheck"/> + <property name="checkFormat" value="JavadocMethodCheck"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop ConstantName"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume ConstantName"/> + <property name="checkFormat" value="ConstantName"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop HideUtilityClassConstructor"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume HideUtilityClassConstructor"/> + <property name="checkFormat" value="HideUtilityClassConstructor"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleVariableDeclarations"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleVariableDeclarations"/> + <property name="checkFormat" value="MultipleVariableDeclarations"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop IllegalCatch"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume IllegalCatch"/> + <property name="checkFormat" value="IllegalCatch"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop DeclarationOrder"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume DeclarationOrder"/> + <property name="checkFormat" value="DeclarationOrder"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop RedundantModifier"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume RedundantModifier"/> + <property name="checkFormat" value="RedundantModifier"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\: stop all"/> + <property name="onCommentFormat" value="CHECKSTYLE\: resume all"/> + </module> </module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 18:27:14
|
Revision: 285 http://sourceforge.net/p/vlibrary/code/285 Author: psteitz Date: 2017-05-19 18:27:12 +0000 (Fri, 19 May 2017) Log Message: ----------- Added link to issues page; updated tech overview. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties branches/VLIBRARY_2_X/src/main/webapp/a/menuContent.jsp branches/VLIBRARY_2_X/src/main/webapp/footer.jsp branches/VLIBRARY_2_X/src/main/webapp/techOverview.html branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties Modified: branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties 2017-05-19 18:26:09 UTC (rev 284) +++ branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties 2017-05-19 18:27:12 UTC (rev 285) @@ -16,7 +16,8 @@ index.forgotPassword=Forgot Your Password index.logoff=Logoff index.source=View/Download Source -index.contact=Questions? Comments? Feedback? +index.contact=Questions? Comments? +index.issues=Problems? Feature Requests? index.add.book=Add a Book how-it-works.title=How it works how-it-works.heading=How it works... Modified: branches/VLIBRARY_2_X/src/main/webapp/a/menuContent.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/a/menuContent.jsp 2017-05-19 18:26:09 UTC (rev 284) +++ branches/VLIBRARY_2_X/src/main/webapp/a/menuContent.jsp 2017-05-19 18:27:12 UTC (rev 285) @@ -20,7 +20,7 @@ <br> Click <A href="/vlibrary/a/how-it-works.jsp">here</A> for some instructions for use and explanation of how the Virtual Library works.<br> Click -<a href="http://sourceforge.net/tracker/?group_id=62087">here</a> to submit a bug +<a href="https://vlibrary.sourceforge.io/issues.html">here</a> to submit a bug report or feature request.<hr> <table border=0 cellpadding=10> </table> Modified: branches/VLIBRARY_2_X/src/main/webapp/footer.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/footer.jsp 2017-05-19 18:26:09 UTC (rev 284) +++ branches/VLIBRARY_2_X/src/main/webapp/footer.jsp 2017-05-19 18:27:12 UTC (rev 285) @@ -9,6 +9,7 @@ <br><a href=mailto:<bean:message key="email.support.address"/>> <bean:message key="index.contact"/></a> - + <br><a href="https://vlibrary.sourceforge.io/issues.html"> + <bean:message key="index.issues"/></a> </body> </html> \ No newline at end of file Modified: branches/VLIBRARY_2_X/src/main/webapp/techOverview.html =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/techOverview.html 2017-05-19 18:26:09 UTC (rev 284) +++ branches/VLIBRARY_2_X/src/main/webapp/techOverview.html 2017-05-19 18:27:12 UTC (rev 285) @@ -13,143 +13,175 @@ <TITLE>Virtual Library 2.0 Tech Overview</TITLE> </HEAD> <BODY bgcolor="#ffffff"> - <font face="arial,helvetica,sanserif"> - <H2>Virtual Library 2.0 Technical Overview</H2></font> - <TABLE><TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Basic Ingredients"><strong>Basic Ingredients</strong></a> - </font></TD></TR><TR><TD><BLOCKQUOTE><P> - <ul><li> - The Virtual Library (VL) is a <A HREF="http://struts.apache.org/index.html">Apache Struts/Tiles 1.3.5</A> - and <A HREF="http://www.springframework.org/">Spring Framework 2.0.2</A>, servlet-based application.</li> - <li> - The VL is set up to use a single SQL 92 / JDBC compliant database for both the - application and user store.</li> - <li> The application has been tested using Tomcat 5 (Java 5) through Tomcat 8 (Java 8). - </li> - <ul> <li>The VL uses Container-managed security, using a JDBC Realm.</li> - <li>The VL uses the mail session and JDBC connection pool resources - provided by Spring. The connection pool is Apache - Commons DBCP.</li></ul> - <li> - The VL uses log4j, version 1.2.6 for logging and Apache Commons BeanUtils, which requires - Commons Collections and Commons Logging. It also uses the Commons Lang package. - </li> - <li> - The VL 2.0 is built using Apache Maven. The project pom.xml is included with sources. - </li> - </ul></BLOCKQUOTE></TD></TR> + <font face="arial,helvetica,sanserif"> <H2>Virtual Library 2.0 Technical Overview</H2></font> + <TABLE> + <TR bgcolor="#9999FF"> + <TD> + <font color="#ffffff" face="arial,helvetica,sanserif"><a name="Basic Ingredients"><strong>Basic Ingredients</strong></a></font> + </TD> + </TR> + <TR> + <TD><BLOCKQUOTE><P> + <ul> + <li> + The Virtual Library (VL) is a <A HREF="http://struts.apache.org/index.html">Apache Struts/Tiles 1.3.5</A> + and <A HREF="http://www.springframework.org/">Spring Framework 2.0.2</A>, Java servlet-based application. + </li> + <li> + The VL is set up to use a single SQL 92 / JDBC compliant database for both the + application and user store. + </li> + <li> + The application has been tested using Tomcat 5 (Java 5) through Tomcat 8 (Java 8). + </li> + <li> + The VL uses Container-managed security, using a JDBC Realm. + </li> + <li>The VL uses the mail session and JDBC connection pool resources provided by Spring. The connection pool is Apache + Commons DBCP. + </li> + <li> + The VL uses log4j, version 1.2.6 for logging and Apache Commons BeanUtils, which requires + Commons Collections and Commons Logging. It also uses the Commons Lang package. + </li> + <li> + The VL 2.0 is built using Apache Maven. The project pom.xml is included with sources. + </li> + </ul></BLOCKQUOTE> + </TD> + </TR> + <TR bgcolor="#9999FF"> + <TD><font color="#ffffff" face="arial,helvetica,sanserif"> + <a name="Runtime Environment"><strong>Runtime Environment</strong></a> + </font> + </TD> + </TR> + <TR> + <TD> + <BLOCKQUOTE><P> + The application runs entirely within a serlvet 2.3 and newer container. There are no EJBs, RMI servers or other + components running outside of the servlet engine. The application will + work (and has been tested exclusively) running Tomcat as a standalone (i.e., + no external HTTP server). The database location is configured in the + Spring configuration file (lightweightcontainer.xml) and it can be either local or remote. + An outbound SMTP host is required. Like the + database, this is configured in Spring config file, can be either local or remote and + must accept SMTP connections from the host running VL. + </BLOCKQUOTE> + </TD> + </TR> + <TR bgcolor="#9999FF"> + <TD> + <font color="#ffffff" face="arial,helvetica,sanserif"> + <a name="Application Architecture"><strong>Application Architecture</strong></a> + </font> + </TD> + </TR> + <TR> + <TD> + <BLOCKQUOTE><P> + The VL is a struts 1 MVC application. Consult the following + references for background on + MVC and struts: + <UL> + <LI> + <A HREF="http://fitxers.oriolrius.cat/1797/web-tier5.html"> + Sun Blueprints -- Web Tier Application Framework Design</A></LI> + <LI> + <A HREF="http://www.jajakarta.org/struts/struts1.2/documentation/ja/target/userGuide/introduction.html"> + Struts 1 User's Guide</A> + </LI> + <li> + <a href="http://tool.oschina.net/uploads/apidocs/struts-1.3.10/index.html?overview-summary.html"> + Struts 1 JavaDocs</A> + </li> + </UL> + <b>Model Components</b><br> + The VL model is implemented in domain beans (Book, Reader, etc.), + a manager class (LibraryManager) and DAO classes. + The domain beans are operated upon (updated, inserted, retrieved, etc.) by DAO related + classes at the request of the LibraryManager. + Domain beans are instantiated by controller Actions, which use BeanUtils to synch their + properties with Form beans in the view. + <p> + The LibraryManager is a collection of methods supporting business functions such as processing book requests, + checkin, checkout, reader/book exists, etc, accessing the database through the DAO layer. + The LibraryManager is "injected" into the Action classes using Spring, with its member DAO instances + injected with properties set in the Spring configuration file, lightweightcontainer.xml. All + SQL used by the DAO classes is specified in this file. + <p> + <b>View Components</b><br> + The jsp's that form the view portion of the VL are limited to pure presentation. + There are <b>no</b> sriptlets in the VL jsp's! . There is also no javascript. + The VL jsp's make extensive use of struts tag libraries and all of the pages "inside" + the library are generated from a struts template (template.jsp). This template + divides the page into five logical components: + <ul> + <li>The page title</li> + <li>The page header - the title that appears on the page as rendered by the browser</li> + <li>sidebar -- the left-hand nav bar</li> + <li>the page content</li> + <li>the page footer -- hard coded in the template</li> + </ul> + A typical VL page has two jsp's associated with it -- one being the + "instantiated template" that references the components above -- + and the other being the content for the content portion of the page. + The name of the second page ends with "Content". For example, + "editReader.jsp" is the "instantiated template" for the edit + reader page and "editReaderContent.jsp" contains the content for the page. + See the struts docs for a full description of how templates work; + but just looking at the VL jsp's the structure should be obvious. + <p> + <b>Controller Components</b><br> + The Struts ActionServlet is the core controller component of any Struts 1 + application. The VL does not subclass the struts ActionServlet or extend + the core struts framework in any other way. The VL does include, however, + a base Action class, LibraryAction that extends + org.apache.struts.action.Action. The LibraryAction class overrides the + execute() method of the struts Action class, including generic logging, action + cancellation handling and dispatch to an abstract executeAction() method that + all concrete LibraryActions implement. This class also includes a + standardForward() method that forwards to the "error" target if errors have been + encountered in Action processing or to "success" if there are no errors. + All VL browser requests are for Actions configured in + /conf/struts-config.xml. Action URI's end in ".do" (this is configured in + web.xml and is what links struts-controlled URI's to the struts ActionServlet). + </BLOCKQUOTE> + </TD> + </TR> - <TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Runtime Environment"><strong>Runtime Environment</strong></a> - </font></TD></TR><TR><TD><BLOCKQUOTE><P> - The application runs entirely within a serlvet 2.3 and newer container. There are no EJBs, RMI servers or other - components running outside of the servlet engine. The application will - work (and has been tested exclusively) running Tomcat as a standalone (i.e., - no external HTTP server). The database location is configured in the - Spring configuration file (lightweightcontainer.xml) and it can be either local or remote. - An outbound SMTP host is required. Like the - database, this is configured in Spring config file, can be either local or remote and - must accept SMTP connections from the host running VL. - </BLOCKQUOTE></TD></TR> - - <TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Application Architecture"><strong>Application Architecture</strong></a> - </font></TD></TR><TR><TD><BLOCKQUOTE><P> - The VL is a struts 1 MVC application. Consult the following - references for background on - MVC and struts: - <UL><LI> - <A HREF="http://java.sun.com/blueprints/guidelines/ - designing_enterprise_applications_2e/web-tier/web-tier5.html">Sun Blueprints -- - Web Tier Application Framework Design</A></LI> - <LI><A HREF="http://struts.apache.org/index.html">Struts Home - Page</A></LI> - <LI><A HREF="http://struts.apache.org/1.x/userGuide/index.html">Struts - User's Guide</A></LI> - <li><a href="http://struts.apache.org/1.x/apidocs/index.html"> - Struts JavaDocs</A></li></UL> - <b>Model Components</b><br> - The VL model is implemented in domain beans (Book, Reader, etc.), - a POJO Facade class (LibraryManagerFacade) and DAO classes. - The domain beans are operated upon (updated, inserted, retrieved, etc.) by DAO related - classes at the request of the Facade. - These beans are instantiated by controller - Actions, which use BeanUtils to synch their properties with Form beans in the - view. <p> - The LibraryManagerFacadeImpl implementation (implements the LibraryManagerFacade interface) - is a collection of methods supporting business functions such as processing book requests, - checkin, checkout, reader/book exists, etc, accessing the database through the DAO layer. - The Facade is "injected" into the Action classes using Spring. - The DAO classes (all implementing interfaces) are also injected into the Facade through Spring, - therefore allowing for easy replacement with different implementations. <p> - <b>View Components</b><br> - The jsp's that form the view portion of the VL are limited to pure presentation. - There are <b>no</b> sriptlets in the VL jsp's! The VL jsp's make - extensive use of struts tag libraries and all of the pages "inside" the library - are generated from a struts template (template.jsp). This template - divides the page into five logical components: - <ul><li>The page title</li> - <li>The page header - the title that appears on the page as rendered by the - browser</li> - <li>sidebar -- the left-hand nav bar</li> - <li>the page content</li> - <li>the page footer -- hard coded in the template</li> - </ul> - A typical VL page has two jsp's associated with it -- one being the - "instantiated template" that references the components above -- - and the other being the content for the content portion of the page. - The name of the second page ends with "Content". For example, - "editReader.jsp" is the "instantiated template" for the edit - reader page and "editReaderContent.jsp" contains the content for the page. - See the struts docs for a full description of how templates work; - but just looking at the VL jsp's the structure should be obvious.<p> - <b>Controller Components</b><br> - The Struts ActionServlet is the core controller component of any Struts - application. The VL does not subclass the struts ActionServlet or extend - the core struts framework in any other way. The VL does include, however, - a base Action class, LibraryAction that extends - org.apache.struts.action.Action. The LibraryAction class overrides the - execute() method of the struts Action class, including generic logging, action - cancellation handling and dispatch to an abstract executeAction() method that - all concrete LibraryActions implement. This class also includes a - standardForward() method that forwards to the "error" target if errors have been - encountered in Action processing or to "success" if there are no errors. - All VL browser requests are for Actions configured in - /conf/struts-config.xml. Action URI's end in ".do" (this is configured in - web.xml and is what links struts-controlled URI's to the struts ActionServlet). - - - </BLOCKQUOTE></TD></TR> - - <TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Container Managed Security"><strong>Container Managed Security - Implementation</strong></a></font></TD></TR><TR><TD><BLOCKQUOTE><P> - The VL uses the servlet implementation of container managed security as - defined in the - <A HREF="http://www.jcp.org/aboutJava/communityprocess/final/jsr053/"> - Servlet 2.3 specification.</A> Refer to the spec and/or the - <A HREF="http://tomcat.apache.org/tomcat-8.5-doc/realm-howto.html"> - Tomcat Realm HOWTO</A> for details on how this implementation works.<p> - <b>Roles</b><br> - The VL uses a very simple set of role definitions. There are just two - roles: "reader" and "administrator". Readers can add books, search for - books, get status on books, request books and edit their own profile - information. Administrators can check books out and in and add/delete - both books and readers. They can also modify any reader's profile - information and reset reader passwords. - Finally, administrators can perform the most important - function of any administrator -- they can "promote" readers to become - administrators. (They can also "demote" which can result in a - "no administrator" state if they are not careful).<p> - <b>Authorization</b><br> - All URI's starting with /a/ or /r/ are protected by the container.   The - /a/* path is available to both readers and administrators. The /r/* URIs are - available to administrators only. This is specified - specified in security constraints in web.xml: <pre> + <TR bgcolor="#9999FF"> + <TD> + <font color="#ffffff" face="arial,helvetica,sanserif"> + <a name="Container Managed Security"><strong>Container Managed Security + Implementation</strong></a></font> + </TD> + </TR> + <TR> + <TD> + <BLOCKQUOTE><P> + The VL uses the servlet implementation of container managed security as + defined in the <A HREF="http://www.jcp.org/aboutJava/communityprocess/final/jsr053/"> + Servlet 2.3 specification.</A> Refer to the spec and/or the + <A HREF="http://tomcat.apache.org/tomcat-8.5-doc/realm-howto.html"> + Tomcat Realm HOWTO</A> for details on how this implementation works. + <p> + <b>Roles</b><br> + The VL uses a very simple set of role definitions. There are just two + roles: "reader" and "administrator". Readers can add books, search for + books, get status on books, request books and edit their own profile + information. Administrators can check books out and in and add/delete + both books and readers. They can also modify any reader's profile. Finally, + administrators can perform the most important + function of any administrator -- they can "promote" other readers to become + administrators. (They can also "demote" which can result in a + "no administrator" state if they are not careful). + <p> + <b>Authorization</b><br> + All URI's starting with /a/ or /r/ are protected by the container.   The + /a/* path is available to both readers and administrators. The /r/* URLs are + available to administrators only. This is specified + specified in security constraints in web.xml: <pre> <!-- Security Constraints --> <security-constraint> web-resource-collection> @@ -171,14 +203,14 @@ </auth-constraint> </security-constraint> </pre> - If a user requests a page such as "/library/a/listBook.do?selector=None", if s/he - is not logged in, the container will present the login page. On success, the - user will be redirected to the desired destination page. The only - "non-secure" pages in the VL are the login page, the reader registration pages - and their associated actions, and a "goodbye" page targeted on logoff. <p> - In some places, The VL uses selective rendering using the struts logic tags to - limit what what readers can do. For example, in - editReaderContent.jsp, we have: + If a user requests a page such as "/library/a/listBook.do?selector=None", if s/he + is not logged in, the container will present the login page. On success, the + user will be redirected to the desired destination page. The only + "non-secure" pages in the VL are the login page, the reader registration pages + and their associated actions, and a "goodbye" page targeted on logoff. <p> + In some places, The VL uses selective rendering using the struts logic tags to + limit what what readers can do. For example, in + editReaderContent.jsp, we have: <pre> <logic:present role="administrator"> <tr><th align="right"><bean:message key="reader.prompt.administrator"/></th> @@ -185,37 +217,45 @@ <td align="left"><html:checkbox property="administrator"/></td></tr> </logic:present> </pre> - If the user does not have the "administrator" role, the "administrator" checkbox - on the reader edit form will not appear. Administrators can use this - checkbox to "promote/demote" readers.<p> - It should be noted that limiting what users can do by selective rendering of html - elements is a very weak form of security. If the VL were processing - financial transactions or managing sensitive data, an additional layer of - authorization checking at the controller and/or model level would be required. - </BLOCKQUOTE></TD></TR> - - <TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Error Management"><strong>Error Management</strong></a> - </font></TD></TR><TR><TD><BLOCKQUOTE><P> - <b>Model components</b><br> - The class <b>LibraryException</b> extends <b>org.sourceforge.util.PortableException</b> - which is a generic Exception wrapper that enables stack traces to be fully serialized. - Model components should throw LibraryExceptions or instances of subclasses of this class. <p> - <b>Actions</b><br> - Actions catch Throwable in meaningful blocks within their executeAction() methods. - A list of LibraryExceptions wrapping the Throwables trapped during executeAction() - processing is accumulated in an errors ArrayList. If this ArrayList is not empty on - completion of the executeAction() method, it is placed in a "processingErrors" request - attribute and control is forwarded to the generic error page (content is in - hosedContent.jsp). See discussion above of standardForward(). - A customized top-level message to the user may also be placed in a request - attribute named "userMessage". Both of these request keys -- along - with all other parameter names, are defined in Constants.java and referred to in - the code by their symbolic names - (e.g. Constants.PROCESSINGERRORS = "processingErrors").<p> - <b>Generic Error Page</b><br> - Here is the core content of HosedContent.jsp:<br><pre> + If the user does not have the "administrator" role, the "administrator" checkbox + on the reader edit form will not appear. Administrators can use this + checkbox to "promote/demote" readers.<p> + It should be noted that limiting what users can do by selective rendering of html + elements is a very weak form of security. If the VL were processing + financial transactions or managing sensitive data, an additional layer of + authorization checking at the controller and/or model level would be required. + </BLOCKQUOTE> + </TD> + </TR> + <TR bgcolor="#9999FF"> + <TD> + <font color="#ffffff" face="arial,helvetica,sanserif"> + <a name="Error Management"><strong>Error Management</strong></a> + </font> + </TD> + </TR> + <TR> + <TD> + <BLOCKQUOTE><P> + <b>Model components</b><br> + The class <b>LibraryException</b> extends <b>org.sourceforge.util.PortableException</b> + which is a generic Exception wrapper that enables stack traces to be fully serialized. + Model components should throw LibraryExceptions or instances of subclasses of this class. <p> + <b>Actions</b><br> + Actions catch Throwable in meaningful blocks within their executeAction() methods. + A list of LibraryExceptions wrapping the Throwables trapped during executeAction() + processing is accumulated in an errors ArrayList. If this ArrayList is not empty on + completion of the executeAction() method, it is placed in a "processingErrors" request + attribute and control is forwarded to the generic error page (content is in + hosedContent.jsp). See discussion above of standardForward(). + A customized top-level message to the user may also be placed in a request + attribute named "userMessage". Both of these request keys -- along + with all other parameter names, are defined in Constants.java and referred to in + the code by their symbolic names + (e.g. Constants.PROCESSINGERRORS = "processingErrors"). + <p> + <b>Generic Error Page</b><br> + Here is the core content of HosedContent.jsp:<br><pre> <logic:present name="userMessage"> <h3> <bean:write name="userMessage"/> </h3> </logic:present> @@ -231,28 +271,34 @@ <strong><bean:write name="er" property="message"/> </strong> <br> </logic:iterate> </logic:present></pre><br> - If the "userMessage" request attribute has been set, the content of that message - is displayed first. Then, the generic message defined under the key - "hosed.message" in ApplicationResources.properties is displayed as a header for - the list of errors encountered during processing. This list of - messages is generated by iterating over the ArrayList stored in the - "processingErrors" request attribute. The elements of this list are - expected to be LibraryExceptions. <p> - The current setup of hosedContent.jsp will display stack traces to end users -- - generally not something that one should do in a production app.   This reflects - the beta state of the application. This page will be replaced when the vlibrary - application reaches "stable" state. - </BLOCKQUOTE></TD></TR> - - <TR bgcolor="#9999FF"><TD> - <font color="#ffffff" face="arial,helvetica,sanserif"> - <a name="Logging"><strong>Logging</strong></a> - </font></TD></TR><TR><TD><BLOCKQUOTE><P> - All vlibrary-specific logging uses log4j. The configuration file is - log4j.properties, located in the /conf directory of CVS and the source - distribution and deployed to /webapps/library/WEB-INF/classes. For an intro - to log4j, see the <A href="http://jakarta.apache.org/log4j/docs/index.html"> - log4j docs</a>. In log4j.properties ("production" example on a Unix/Linux system), we have: + If the "userMessage" request attribute has been set, the content of that message + is displayed first. Then, the generic message defined under the key + "hosed.message" in ApplicationResources.properties is displayed as a header for + the list of errors encountered during processing. This list of + messages is generated by iterating over the ArrayList stored in the + "processingErrors" request attribute. The elements of this list are + expected to be LibraryExceptions. <p> + The current setup of hosedContent.jsp will display stack traces to end users -- + generally not something that one should do in a production app.   This reflects + the beta state of the application. This page will be replaced when the vlibrary + application reaches "stable" state. + </BLOCKQUOTE> + </TD> + </TR> + <TR bgcolor="#9999FF"> + <TD> + <font color="#ffffff" face="arial,helvetica,sanserif"> + <a name="Logging"><strong>Logging</strong></a> + </font> + </TD> + </TR> + <TR> + <TD> + <BLOCKQUOTE><P> + All vlibrary-specific logging uses log4j. The configuration file is + log4j.properties, located in the /conf directory of CVS and the source + distribution and deployed to /webapps/library/WEB-INF/classes. + In log4j.properties ("production" example on a Unix/Linux system), we have: <pre> # Set root logging level to WARN to prevent Stuts/Tomcat from flooding log4j.rootLogger=WARN, R @@ -271,34 +317,33 @@ log4j.appender.R.layout.ConversionPattern=%d %p %c - %m%n </pre> - The root log level is set to WARN to prevent Struts and/or Tomcat from - generating DEBUG error messages, which the org.sourceforge.* classes are configured - to do. To get less verbose logging, set this to WARN or ERROR. <p> - - In this example, the application-specific log messages will go to - /var/logs/vlibrary2.0/libraryTran.log, which will roll over when it reaches 100KB. - See sources for a "development" example for this configuration file. - <p> - - - The standard logging pattern is to define a static logger for each class -- - e.g., <br> + The root log level is set to WARN to prevent Struts and/or Tomcat from + generating DEBUG error messages, which the org.sourceforge.* classes are configured + to do. To get less verbose logging, set this to WARN or ERROR. + <p> + In this example, the application-specific log messages will go to + /var/logs/vlibrary2.0/libraryTran.log, which will roll over when it reaches 100KB. + See sources for a "development" example for this configuration file. + <p> + The standard logging pattern is to define a static logger for each class -- + e.g., <br> <pre> /** log4j Logger */ private static Logger logger = Logger.getLogger(SaveReaderAction.class.getName()); </pre> - - and then to follow the vlibrary logging standards: - <ol><li>All log messages should be externalized -- i.e., use code like: - <pre>if (logger.isDebugEnabled()) - logger.debug(messages.getMessage("entering.perform"));</pre> - <li>Include if (logger.isDebugEnabled()), isInfoEnabled(), tests etc. as above - to avoid unecessary stack operations (see the log4j pages for explanation of - this best practice) - <li>log all exceptions (generally as ERROR) - <li>log all transactions as INFO, including ids for readers and books - </BLOCKQUOTE></TD></TR> - - </TABLE></BODY> + and then to follow the vlibrary logging standards: + <ol><li>All log messages should be externalized -- i.e., use code like: + <pre>if (logger.isDebugEnabled()) + logger.debug(messages.getMessage("entering.perform"));</pre></li> + <li>Include if (logger.isDebugEnabled()), isInfoEnabled(), tests etc. as above + to avoid unecessary stack operations (see the log4j pages for explanation of + this best practice)</li> + <li>log all exceptions (generally as ERROR)</li> + <li>log all transactions as INFO, including ids for readers and books</li> + </BLOCKQUOTE> + </TD> + </TR> + </TABLE> + </BODY> </HTML> Modified: branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties =================================================================== --- branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties 2017-05-19 18:26:09 UTC (rev 284) +++ branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties 2017-05-19 18:27:12 UTC (rev 285) @@ -16,7 +16,8 @@ index.forgotPassword=Forgot Your Password index.logoff=Logoff index.source=View/Download Source -index.contact=Questions? Comments? Feedback? +index.contact=Questions? Comments? +index.issues=Problems? Feature Requests? index.add.book=Add a Book how-it-works.title=How it works how-it-works.heading=How it works... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 18:26:11
|
Revision: 284 http://sourceforge.net/p/vlibrary/code/284 Author: psteitz Date: 2017-05-19 18:26:09 +0000 (Fri, 19 May 2017) Log Message: ----------- Added issues page. Modified Paths: -------------- branches/VLIBRARY_2_X/src/site/site.xml Added Paths: ----------- branches/VLIBRARY_2_X/src/site/apt/index.apt branches/VLIBRARY_2_X/src/site/apt/issues.apt Added: branches/VLIBRARY_2_X/src/site/apt/index.apt =================================================================== --- branches/VLIBRARY_2_X/src/site/apt/index.apt (rev 0) +++ branches/VLIBRARY_2_X/src/site/apt/index.apt 2017-05-19 18:26:09 UTC (rev 284) @@ -0,0 +1,19 @@ + ---- + Index + ----- + Virtual Library Team + ----- + 14 May 2017 + ----- + +Welcome to the Virtual Library! + + The Virtual Library (VL) is a web application designed to facilitate peer-to-peer sharing of books + among groups of people who are located in relatively close physical proximity (e.g. a group of + co-workers who work in the same location or a group of students in the same campus). As of version + 2.0, multiple locations are supported. Readers register and contribute books to the library, + which may be requested by other readers at any time. Requests for books trigger emails to + "current possessors" asking them to drop books off with the administrator (who effectively + maintains a "cache" of books awaiting pickup). Checkin and checkout operations are performed + by the administrator. Book search and status functions enable users to find books and/or + book locations. \ No newline at end of file Property changes on: branches/VLIBRARY_2_X/src/site/apt/index.apt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: branches/VLIBRARY_2_X/src/site/apt/issues.apt =================================================================== --- branches/VLIBRARY_2_X/src/site/apt/issues.apt (rev 0) +++ branches/VLIBRARY_2_X/src/site/apt/issues.apt 2017-05-19 18:26:09 UTC (rev 284) @@ -0,0 +1,43 @@ + ---- + Issues + ----- + Virtual Library Team + ----- + 14 May 2017 + ----- + +Virtual Library Issues + + The Virtual Library is an open development, open source project. We welcome + all feedback, especially when it comes with patches ;-) + +* Mailing Lists + + General comments should go to the VL {{{./mail-lists.html} mailing lists}}. + Questions or comments about how to use the application should be directed to + the user list. All discussion related to the code or design of the VL takes + place on the development list. + +* Filing issues + + If you think you have found a problem with the VL (something that does not work correctly), + then create a {{{https://sourceforge.net/p/vlibrary/bugs/} + Virtual Library Bug}}. + + If there is a new feature that you would like to see, create a + a {{{https://sourceforge.net/p/vlibrary/feature-requests/} + Feature Request}}. + + Suggestions for improvement to the code or existing features should be added as + {{{https://sourceforge.net/p/vlibrary/improve/} + Improvements}}. + + You can attach patches to any of these issue types and we thank you in advance + for your feedback and any contributions that you wish to make. To learn more + about getting involved with VL development, see {{{https://vlibrary.sourceforge.io/get-involved.html} + Get Involved}}. + + Thanks for your feedback! + + + Property changes on: branches/VLIBRARY_2_X/src/site/apt/issues.apt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: branches/VLIBRARY_2_X/src/site/site.xml =================================================================== --- branches/VLIBRARY_2_X/src/site/site.xml 2017-05-19 18:24:38 UTC (rev 283) +++ branches/VLIBRARY_2_X/src/site/site.xml 2017-05-19 18:26:09 UTC (rev 284) @@ -5,12 +5,11 @@ <item name="Overview" href="index.html"/> <item name="Technical reference" href="techOverview.html"/> <item name="Download" href="https://sourceforge.net/projects/vlibrary/files/"/> - <item name="Javadoc" href="apidocs/index.html" /> <item name="SourceForge project page" href="http://sourceforge.net/projects/vlibrary"/> - <item name="Issue tracker" href="https://sourceforge.net/p/vlibrary/bugs/"/> + <item name="Issue tracker" href="issues.html"/> <item name="Getting Started" href="getting-started.html" /> <item name="Get Involved" href="get-involved.html" /> </menu> - ${reports} + <menu ref="reports"/> </body> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-19 18:24:39
|
Revision: 283 http://sourceforge.net/p/vlibrary/code/283 Author: psteitz Date: 2017-05-19 18:24:38 +0000 (Fri, 19 May 2017) Log Message: ----------- Updated plugins, removed some reports. Modified Paths: -------------- branches/VLIBRARY_2_X/pom.xml Modified: branches/VLIBRARY_2_X/pom.xml =================================================================== --- branches/VLIBRARY_2_X/pom.xml 2017-05-14 18:13:23 UTC (rev 282) +++ branches/VLIBRARY_2_X/pom.xml 2017-05-19 18:24:38 UTC (rev 283) @@ -17,7 +17,7 @@ <name>The Virtual Library Team</name> <url>http://vlibrary.sourceforge.net/</url> </organization> - <url>http://vlibrary.sourceforge.net</url> + <url>https://vlibrary.sourceforge.io</url> <mailingLists> <mailingList> <name>Developer List</name> @@ -40,7 +40,7 @@ </mailingLists> <issueManagement> <system>SourceForge Tracker</system> - <url>http://sourceforge.net/tracker/?group_id=62087</url> + <url>https://sourceforge.net/p/vlibrary/bugs/</url> </issueManagement> <description> The Virtual Library (VL) is a web application designed to facilitate @@ -475,14 +475,14 @@ </configuration> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>surefire-report-maven-plugin</artifactId> - <version>2.0-beta-1</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + <version>2.4.3</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.2</version> + <version>2.6.1</version> <configuration> <aggregate>true</aggregate> <links> @@ -493,7 +493,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>2.0-beta-7</version> + <version>3.6</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -533,7 +533,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> - <version>2.2</version> + <version>2.3</version> <executions> <execution> <goals> @@ -568,17 +568,17 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> - <version>2.1</version> + <version>2.9</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> - <version>2.4</version> + <version>3.8</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.4</version> + <version>2.6.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -594,9 +594,9 @@ </configuration> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>surefire-report-maven-plugin</artifactId> - <version>2.0-beta-1</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + <version>2.4.3</version> <configuration> <reportFormat>xml</reportFormat> <testFailureIgnore>false</testFailureIgnore> @@ -605,7 +605,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.2</version> + <version>2.17</version> <configuration> <configLocation>${basedir}/checkstyle.xml</configLocation> <enableRulesSummary>false</enableRulesSummary> @@ -617,14 +617,9 @@ <version>2.1</version> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clover-plugin</artifactId> - <version>2.4</version> - </plugin> - <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> - <version>1.2</version> + <version>3.0.4</version> <configuration> <xmlOutput>true</xmlOutput> <xmlOutputDirectory>target/site/findbugs</xmlOutputDirectory> @@ -643,17 +638,12 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>taglist-maven-plugin</artifactId> - <version>2.2</version> + <version>2.4</version> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>cobertura-maven-plugin</artifactId> - <version>2.2</version> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> - <version>2.0</version> + <version>2.12.1</version> <reportSets> <reportSet> <reports> @@ -672,51 +662,17 @@ <artifactId>maven-changelog-plugin</artifactId> <version>2.1</version> </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>dashboard-maven-plugin</artifactId> - <version>1.0.0-beta-1</version> - </plugin> </plugins> </reporting> <profiles> <profile> - <id>clover</id> - <activation> - <file> - <exists>${basedir}/clover.license</exists> - </file> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clover-plugin</artifactId> - <version>2.3</version> - <configuration> - <licenseLocation>${basedir}/clover.license</licenseLocation> - <targetPercentage>50%</targetPercentage> - </configuration> - <executions> - <execution> - <id>verify</id> - <phase>verify</phase> - <goals> - <goal>instrument</goal> - <goal>check</goal> - </goals> - </execution> - <execution> - <id>pre-site</id> - <phase>pre-site</phase> - <goals> - <goal>instrument</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> + <id>disable-java8-doclint</id> + <activation> + <jdk>[1.8,)</jdk> + </activation> + <properties> + <additionalparam>-Xdoclint:none</additionalparam> + </properties> </profile> </profiles> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-14 18:13:26
|
Revision: 282 http://sourceforge.net/p/vlibrary/code/282 Author: psteitz Date: 2017-05-14 18:13:23 +0000 (Sun, 14 May 2017) Log Message: ----------- Fixed error in processCheckout causing request for book being checked out not to be deleted. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/BookDAO.java branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAO.java branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/logic/LibraryManager.java branches/VLIBRARY_2_X/src/test/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAOTest.java Modified: branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/BookDAO.java =================================================================== --- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/BookDAO.java 2017-05-13 23:23:35 UTC (rev 281) +++ branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/BookDAO.java 2017-05-14 18:13:23 UTC (rev 282) @@ -495,6 +495,23 @@ } /** + * Gets the ISBN of the book with the given ID if there is such a book, + * null otherwise. + * + * @param bookID ID of book + * @return ISBN of the book with the given ID + * @throws LibraryException if an error occurs searching for the book + */ + public String getIsbn(long bookID) throws LibraryException { + final Book book = retrieve(bookID); + if (null == book) { + return null; + } else { + return retrieve(bookID).getIsbn(); + } + } + + /** * Retrieves the book with the given ID, if there is such a book; * otherwise Null. * Modified: branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAO.java =================================================================== --- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAO.java 2017-05-13 23:23:35 UTC (rev 281) +++ branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAO.java 2017-05-14 18:13:23 UTC (rev 282) @@ -306,10 +306,11 @@ * @param book the id of the book being checked out * @param reader the id of the reader checking out the book * @param location the id of the location of the transaction + * @param isbn of the book * @exception LibraryException if the book is not checked in, or an * error occurs recording the transaction */ - public void processCheckout(long reader, long book, long location) + public void processCheckout(long reader, long book, String isbn, long location) throws LibraryException { if (logger.isDebugEnabled()) { final String message = resourceBundleMessageSource.getMessage( @@ -373,15 +374,15 @@ throw new LibraryException(errString,se); } - // Delete any pending requests for this <isbn,location> pair + // Delete any pending requests for this <isbn,reader> pair try { jdbcTemplate.update(deleteReaderBookRequestActionTransactionSQL, new Object [] { new Long(reader), - new Long(book), + isbn, new Long(Constants.REQUEST_ACTION) }, - new int[] {Types.INTEGER, Types.INTEGER, Types.INTEGER} + new int[] {Types.INTEGER, Types.VARCHAR, Types.INTEGER} ); } catch (final Exception se) { final String errString = Modified: branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/logic/LibraryManager.java =================================================================== --- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/logic/LibraryManager.java 2017-05-13 23:23:35 UTC (rev 281) +++ branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/logic/LibraryManager.java 2017-05-14 18:13:23 UTC (rev 282) @@ -948,7 +948,7 @@ newPossessor = readerDAO.retrieve(newPossessor); // Perform checkout and cancel any requests that the reader has for <book.isbn, location> - libraryTransactionDAO.processCheckout(reader, book, location); + libraryTransactionDAO.processCheckout(reader, book, bookDAO.getIsbn(book), location); // send mail to current requesters final Book bk = bookDAO.retrieve(book); Modified: branches/VLIBRARY_2_X/src/test/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAOTest.java =================================================================== --- branches/VLIBRARY_2_X/src/test/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAOTest.java 2017-05-13 23:23:35 UTC (rev 281) +++ branches/VLIBRARY_2_X/src/test/java/org/sourceforge/vlibrary/user/dao/LibraryTransactionDAOTest.java 2017-05-14 18:13:23 UTC (rev 282) @@ -9,6 +9,8 @@ import java.util.List; +import junit.framework.Assert; + import org.apache.log4j.Logger; import org.dbunit.Assertion; import org.dbunit.database.IDatabaseConnection; @@ -21,8 +23,6 @@ import org.sourceforge.vlibrary.TestUtils; import org.sourceforge.vlibrary.user.valuebeans.LibraryTransaction; -import junit.framework.Assert; - /** * */ @@ -146,6 +146,39 @@ //instance.cancelRequest(1021, 1011); } + /* + * <BOOK ID='101' + TITLE='Greatest Book' + PUBLISHER='Wrox' + ISBN='1-111-' + OWNER='101' + PUB_DATE='Mar 2006' + /> + <BOOK ID='102' + TITLE='Greatest Book2' + PUBLISHER='Wrox' + ISBN='2-111-' + OWNER='101' + PUB_DATE='Mar 2006' + COPY='0' + /> + <BOOK ID='103' + TITLE='XGreatest Book2' + PUBLISHER='Wrox' + ISBN='3-111-' + OWNER='101' + PUB_DATE='Mar 2006' + /> + <BOOK ID='104' + TITLE='Greatest Book2' + PUBLISHER='Wrox' + ISBN='2-111-' + OWNER='101' + PUB_DATE='Mar 2006' + COPY='1' + /> + */ + public void testGetLastLocation() throws Exception { logger.info("testGetLastLocation"); @@ -155,7 +188,7 @@ instance.processCheckin(103, 104, 102); assertEquals(102, instance.getLastLocation(104)); - instance.processCheckout(103, 104, 102); + instance.processCheckout(103, 104,"2-111-", 102); assertEquals(102, instance.getLastLocation(104)); } @@ -170,7 +203,7 @@ long[] copies = instance.getCopies("2-111-", 102); assertEquals(1, copies.length); assertEquals(104, copies[0]); - instance.processCheckout(103, 104, 102); + instance.processCheckout(103, 104,"2-111-", 102); copies = instance.getCopies("2-111-", 102); assertEquals(1, copies.length); assertEquals(104, copies[0]); @@ -189,10 +222,14 @@ "LibraryTransactionDAO", LibraryTransactionDAO.class); + // Record a request transaction + instance.processRequest(103, 103, 101); + // Check the book in first, so it is available for checkout instance.processCheckin(102, 103, 101); - instance.processCheckout(103, 103, 101); + // Check it out (should delete the request transaction) + instance.processCheckout(103, 103,"3-111-", 101); // Fetch database data final IDataSet databaseDataSet = TestUtils.getConnection().createDataSet(); @@ -210,7 +247,7 @@ Assertion.assertEquals(expectedTable, filteredTable); try { - instance.processCheckout(101, 103, 101); + instance.processCheckout(101, 103,"3-111-", 101); fail("checking out book 103 (already checked out by reader 103) should have thrown an exception"); } catch(final Exception ex) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-13 23:23:38
|
Revision: 281 http://sourceforge.net/p/vlibrary/code/281 Author: psteitz Date: 2017-05-13 23:23:35 +0000 (Sat, 13 May 2017) Log Message: ----------- Fix typo in message key. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties Modified: branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties 2017-05-13 19:42:58 UTC (rev 280) +++ branches/VLIBRARY_2_X/src/main/webapp/WEB-INF/classes/ApplicationResources.properties 2017-05-13 23:23:35 UTC (rev 281) @@ -268,7 +268,7 @@ email.request.messageLine3=\n email.request.messageLine4=Reply to {0} if our records are incorrect or you need assistance. email.request.acquisition.messageLine1={0} has requested {1}, which is not available at {2}. -email.request.messageLine2=Please order this book for delivery to {0}\n +email.request.acquisition.messageLine2=Please order this book for delivery to {0}\n email.request.confirmation.subject=Virtual Library Request Confirmation email.request.confirmation.messageLine1=Your request for {0} has been sent to {1}.\n email.request.confirmation.ordered.messageLine1=There is no copy of {0} in {1} yet.\n Modified: branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties =================================================================== --- branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties 2017-05-13 19:42:58 UTC (rev 280) +++ branches/VLIBRARY_2_X/src/test/resources/ApplicationResources.properties 2017-05-13 23:23:35 UTC (rev 281) @@ -268,6 +268,7 @@ email.request.messageLine3=\n email.request.messageLine4=Reply to {0} if our records are incorrect or you need assistance. email.request.acquisition.messageLine1={0} has requested {1}, which is not available at {2}. +email.request.acquisition.messageLine2=Please order this book for delivery to {0}\n email.request.confirmation.subject=Virtual Library Request Confirmation email.request.confirmation.messageLine1=Your request for {0} has been sent to {1}.\n email.request.confirmation.ordered.messageLine1=There is no copy of {0} in {1} yet.\n This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-13 19:42:59
|
Revision: 280 http://sourceforge.net/p/vlibrary/code/280 Author: psteitz Date: 2017-05-13 19:42:58 +0000 (Sat, 13 May 2017) Log Message: ----------- Added location parameter to get location from post. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp Modified: branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp 2017-05-08 23:21:37 UTC (rev 279) +++ branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp 2017-05-13 19:42:58 UTC (rev 280) @@ -15,6 +15,7 @@ <bean:parameter id="bookTitle" name="bookTitle"/> <bean:parameter id="id" name="id"/> <bean:parameter id="transaction" name="transaction"/> +<bean:parameter id="location" name="location"/> <form action="/vlibrary/a/moveBook.do"> <table cellpadding=5 border=0> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 23:21:39
|
Revision: 279 http://sourceforge.net/p/vlibrary/code/279 Author: psteitz Date: 2017-05-08 23:21:37 +0000 (Mon, 08 May 2017) Log Message: ----------- Dropped extraneous locations pulldown. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp Modified: branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp 2017-05-08 19:14:11 UTC (rev 278) +++ branches/VLIBRARY_2_X/src/main/webapp/a/moveBookContent.jsp 2017-05-08 23:21:37 UTC (rev 279) @@ -42,6 +42,7 @@ </option> </logic:iterate> </select></td> + <!-- <td align="left"> <select name="location"> <logic:iterate @@ -54,6 +55,7 @@ </option> </logic:iterate> </select></td> + --> </tr> <tr><td> <html:submit><bean:message key="button.submit"/></html:submit></td> @@ -65,5 +67,6 @@ <input type=hidden name="book" value=<bean:write name="id"/>> <input type=hidden name="bookTitle" value=<bean:write name="bookTitle"/>> <input type=hidden name="transaction" value=<bean:write name="transaction"/>> + <input type=hidden name="location" value=<bean:write name="location"/>> </form> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 19:14:13
|
Revision: 278 http://sourceforge.net/p/vlibrary/code/278 Author: psteitz Date: 2017-05-08 19:14:11 +0000 (Mon, 08 May 2017) Log Message: ----------- Formatting, plus do not display pwd in toString. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/domain/Reader.java Modified: branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/domain/Reader.java =================================================================== --- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/domain/Reader.java 2017-05-08 19:07:55 UTC (rev 277) +++ branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/domain/Reader.java 2017-05-08 19:14:11 UTC (rev 278) @@ -22,10 +22,10 @@ private String uid=""; private String pwd=""; private boolean administrator=false; - + public Reader() { } - + public Reader( String lastName, String firstName, @@ -50,7 +50,7 @@ this.pwd = pwd; this.administrator = administrator; } - + public String toString() { return "<Reader " + "id=\"" + id + @@ -63,119 +63,118 @@ "\" screenName=\"" + screenName + "\" imService=\"" + imService + "\" uid=\"" + uid + - "\" pwd=\"" + pwd + "\" administrator=\"" + administrator + "\" />"; } - + public Reader(String email) { this.email=email; } - + public String getFirstName() { return firstName; } - + public long getId() { return id; } - + public String getLastName() { return lastName; } - + public void setFirstName(String firstName) { this.firstName = firstName; } - + public void setId(long id) { this.id = id; } - + public void setId(Long id) { this.id = id.longValue(); } - + public void setId(Integer id) { this.id = id.longValue(); } - + public void setLastName(String lastName) { this.lastName = lastName; } - + public String getDeskPhone() { return deskPhone; } - + public void setDeskPhone(String deskPhone) { this.deskPhone = deskPhone; } - + public String getEmail() { return email; } - + public void setEmail(String email) { this.email = email; } - + public String getImService() { return imService; } - + public void setImService(String imService) { this.imService = imService; } - + public String getMobilePhone() { return mobilePhone; } - + public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } - + public String getPager() { return pager; } - + public void setPager(String pager) { this.pager = pager; } - + public String getPwd() { return pwd; } - + public void setPwd(String pwd) { this.pwd = pwd; } - + public String getScreenName() { return screenName; } - + public void setScreenName(String screenName) { this.screenName = screenName; } - + public String getUid() { return uid; } - + public void setUid(String uid) { this.uid = uid; } - + public boolean isAdministrator() { return administrator; } - + public void setAdministrator(boolean administrator) { this.administrator = administrator; } - + /** * Normalizes phone numbers to nnn-nnn-nnnn format by stripping * all non-numeric chars and replacing with "-", other than initial @@ -187,15 +186,15 @@ if ((phoneString == null) || (phoneString.length() == 0)) { return ""; } - + StringBuffer out = new StringBuffer(); String thisChar = ""; String lagChar="x"; String inString = phoneString.trim(); - + for (int i = 0; i<inString.length(); i++) { thisChar = inString.substring(i,i+1); - + if (StringUtils.isNumeric(thisChar)) { out.append(thisChar); } else { @@ -206,7 +205,7 @@ } return out.toString(); } - + /** * Returns true iff obj is a reader and admin status, id, deskPhone, mobilePhone, * email, firstName, lastName, imService, pager, screenName and uid fields match @@ -219,13 +218,13 @@ if (this == obj) { return true; } - + if((obj == null) || !(obj instanceof Reader)) { return false; } - + Reader reader = (Reader) obj; - + if (this.deskPhone == null && reader.getDeskPhone() != null) { return false; } @@ -241,23 +240,23 @@ if (this.mobilePhone == null && reader.getMobilePhone() != null) { return false; } - if ((this.pager != null && this.pager.equals("")) && + if ((this.pager != null && this.pager.equals("")) && (reader.getPager()!= null &&!reader.getPager().equals(""))) { return false; } - if ((this.screenName!= null && this.screenName.equals("")) && + if ((this.screenName!= null && this.screenName.equals("")) && (reader.getScreenName()!= null && !reader.getScreenName().equals(""))) { return false; } - if ((this.uid!= null && this.uid.equals("")) && + if ((this.uid!= null && this.uid.equals("")) && (reader.getUid() != null && !reader.getUid().equals(""))) { return false; } - if ((this.imService != null && this.imService.equals("")) && + if ((this.imService != null && this.imService.equals("")) && (reader.getImService() != null && !reader.getImService().equals(""))) { return false; } - + return (this.id == reader.getId()) && (this.deskPhone == null || @@ -267,20 +266,20 @@ (this.firstName == null || this.firstName.equals(reader.getFirstName())) && (this.lastName == null || - this.lastName.equals(reader.getLastName())) && + this.lastName.equals(reader.getLastName())) && (this.imService == null || - this.imService.equals(reader.getImService())) && + this.imService.equals(reader.getImService())) && (this.mobilePhone == null || - this.mobilePhone.equals(reader.getMobilePhone())) && + this.mobilePhone.equals(reader.getMobilePhone())) && (this.pager == null || - this.pager.equals(reader.getPager())) && + this.pager.equals(reader.getPager())) && (this.uid == null || - this.uid.equals(reader.getUid())) && + this.uid.equals(reader.getUid())) && (this.screenName == null || - this.screenName.equals(reader.getScreenName())) && + this.screenName.equals(reader.getScreenName())) && (this.administrator == reader.isAdministrator()); } - + public int hashCode() { int hash = (int) this.id * 7; String cat = this.deskPhone + "|" + this.email + @@ -289,6 +288,6 @@ this.screenName + "|" + this.administrator; return 31 * hash + cat.hashCode(); } - - + + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 19:07:58
|
Revision: 277 http://sourceforge.net/p/vlibrary/code/277 Author: psteitz Date: 2017-05-08 19:07:55 +0000 (Mon, 08 May 2017) Log Message: ----------- Formatting, generics. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/actions/SaveReaderAction.java Modified: branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/actions/SaveReaderAction.java =================================================================== --- branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/actions/SaveReaderAction.java 2017-05-08 19:02:40 UTC (rev 276) +++ branches/VLIBRARY_2_X/src/main/java/org/sourceforge/vlibrary/user/actions/SaveReaderAction.java 2017-05-08 19:07:55 UTC (rev 277) @@ -1,24 +1,23 @@ package org.sourceforge.vlibrary.user.actions; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; -import org.apache.commons.beanutils.PropertyUtils; -import org.apache.log4j.Logger; - import org.sourceforge.vlibrary.Constants; import org.sourceforge.vlibrary.exceptions.LibraryException; import org.sourceforge.vlibrary.user.domain.Reader; import org.sourceforge.vlibrary.user.forms.ReaderForm; - -import java.lang.reflect.InvocationTargetException; - /** * Implementation of <strong>Action</strong> that validates and creates or * updates the reader profile information entered by the user. @@ -27,11 +26,11 @@ */ public class SaveReaderAction extends LibraryAction { - + /** log4j Logger */ private static Logger logger = Logger.getLogger(SaveReaderAction.class.getName()); - + /** * Depending on the action request parameter, either create a Reader * or update based on <form> data. @@ -50,21 +49,20 @@ HttpServletResponse response, MessageResources messages) throws Exception { - + // Get the form and action parameter ReaderForm frm = (ReaderForm) form; - String action = request.getParameter(Constants.ACTION); - + if (action == null) { action = Constants.CREATE; } - - ArrayList errors = new ArrayList(); - + + ArrayList<LibraryException> errors = new ArrayList<LibraryException>(); + // Create a Reader object and copy properties from the ReaderForm Reader rd = new Reader(); - + try { PropertyUtils.copyProperties(rd, frm); } catch (InvocationTargetException e) { @@ -72,31 +70,24 @@ if (t == null) { t = e; } - String errString = messages.getMessage("error.reader.reflection"); - logger.error(errString, t); - errors.add(new LibraryException(errString,t)); - return standardForward(mapping,request,errors); } catch (Throwable t) { String errString = messages.getMessage("error.reader.populate"); - logger.error(errString, t); - errors.add(new LibraryException(errString,t)); - return standardForward(mapping,request,errors); } - + // Attempt requested action try { if (action.equals("Create")) { - libraryManager.insertReader( rd ); + libraryManager.insertReader(rd); } else { if (action.equals("Update")) { - libraryManager.updateReader( rd ); + libraryManager.updateReader(rd); } else { String errString = messages.getMessage ("error.action.invalid"); @@ -110,7 +101,7 @@ logger.error(errString,t); errors.add(new LibraryException(errString,t)); } - + if (errors.isEmpty() && logger.isInfoEnabled()) { // Log transaction if (action.equals("Create")) { @@ -121,7 +112,6 @@ rd.getFirstName() + " " + rd.getLastName())); } } - return standardForward(mapping,request,errors); } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 19:02:43
|
Revision: 276 http://sourceforge.net/p/vlibrary/code/276 Author: psteitz Date: 2017-05-08 19:02:40 +0000 (Mon, 08 May 2017) Log Message: ----------- Dropped copy number display from book list page. Modified Paths: -------------- branches/VLIBRARY_2_X/src/main/webapp/a/booklistContent.jsp Modified: branches/VLIBRARY_2_X/src/main/webapp/a/booklistContent.jsp =================================================================== --- branches/VLIBRARY_2_X/src/main/webapp/a/booklistContent.jsp 2017-05-08 18:51:49 UTC (rev 275) +++ branches/VLIBRARY_2_X/src/main/webapp/a/booklistContent.jsp 2017-05-08 19:02:40 UTC (rev 276) @@ -43,7 +43,6 @@ ISBN=<bean:write name="book" property="isbn"/> <br/> <logic:present role="administrator"> ID=<bean:write name="book" property="id"/> <br/> - COPY=<bean:write name="book" property="copy"/> <br/> </logic:present> </th> <logic:iterate id="location" name="locations" type="org.sourceforge.vlibrary.user.domain.Location"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 18:51:51
|
Revision: 275 http://sourceforge.net/p/vlibrary/code/275 Author: psteitz Date: 2017-05-08 18:51:49 +0000 (Mon, 08 May 2017) Log Message: ----------- Added header comment. Modified Paths: -------------- branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml Modified: branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml 2017-05-08 17:15:57 UTC (rev 274) +++ branches/VLIBRARY_2_X/playbooks/roles/app/tasks/main.yml 2017-05-08 18:51:49 UTC (rev 275) @@ -1,4 +1,9 @@ --- +# Checks out sources and builds the Virtual Library app locally on the target. +# Installs svn and maven if these are not present. Modifies sources to inject +# mail sender, database and logging properties. Also creates the log directory. +# See README for variables. + - name: add group "vlibrary" become: true group: name=vlibrary This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ps...@us...> - 2017-05-08 17:16:00
|
Revision: 274 http://sourceforge.net/p/vlibrary/code/274 Author: psteitz Date: 2017-05-08 17:15:57 +0000 (Mon, 08 May 2017) Log Message: ----------- Clarified header comment. Modified Paths: -------------- branches/VLIBRARY_2_X/playbooks/roles/changeAppPassword/tasks/main.yml Modified: branches/VLIBRARY_2_X/playbooks/roles/changeAppPassword/tasks/main.yml =================================================================== --- branches/VLIBRARY_2_X/playbooks/roles/changeAppPassword/tasks/main.yml 2017-05-08 16:41:09 UTC (rev 273) +++ branches/VLIBRARY_2_X/playbooks/roles/changeAppPassword/tasks/main.yml 2017-05-08 17:15:57 UTC (rev 274) @@ -1,8 +1,9 @@ --- -# Tasks to change the database password. Assumes that the app (and backup app) -# has been deployed and injected source is on the host (e.g. site.yml has been +# Tasks to change the database password. Assumes that the app and backup app +# have been deployed and injected source is on the host (e.g. site.yml has been # executed). Also assumes that app_user, app_pass (current pwd) and new_pass -# (the new password) are defined. Does not update source. +# (the new password) are defined. Does not svn update source (only changes +# to sources are properties / config files containing db creds). - name: Inject new database properties into app sources template: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |