husted 2004/03/11 18:32:41
Modified: src/example/org/apache/struts/webapp/example
ApplicationResources.properties
ApplicationResources_ja.properties
ApplicationResources_ru.properties
LocaleAction.java LogonAction.java MODEL.txt
UserDatabase.java
src/example/org/apache/struts/webapp/example/memory
MemoryUserDatabase.java
Log:
Refactor login.jsp and LogonAction
Revision Changes Path
1.12 +19 -17
jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources.properties
Index: ApplicationResources.properties
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources.properties,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ApplicationResources.properties 9 Mar 2004 04:36:49 -0000 1.11
+++ ApplicationResources.properties 12 Mar 2004 02:32:41 -0000 1.12
@@ -6,25 +6,27 @@
change.try=Try Again
change.title=Password Has Expired
database.load=Cannot load database from {0}
-error.database.missing=<li>User database is missing, cannot validate logon
credentials</li>
-error.fromAddress.format=<li>Invalid format for From Address</li>
-error.fromAddress.required=<li>From Address is required</li>
-error.fullName.required=<li>Full Name is required</li>
-error.host.required=<li>Mail Server is required</li>
-error.noSubscription=<li>No Subscription bean in user session</li>
+error.database.missing=User database is missing, cannot validate logon credentials
+error.fromAddress.format=Invalid format for From Address
+error.fromAddress.required=From Address is required
+error.fullName.required=Full Name is required
+error.host.required=Mail Server is required
+error.noSubscription=No Subscription bean in user session
error.password.expired=Your password has expired for username {0}
-error.password.required=<li>Password is required</li>
-error.password2.required=<li>Confirmation password is required</li>
-error.password.match=<li>Password and confirmation password must match</li>
-error.password.mismatch=<li>Invalid username and/or password, please try again</li>
-error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
-error.transaction.token=<li>Cannot submit this form out of order</li>
-error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
-error.type.required=<li>Server Type is required</li>
-error.username.required=<li>Username is required</li>
-error.username.unique=<li>That username is already in use - please select
another</li>
+error.password.required=Password is required
+error.password2.required=Confirmation password is required
+error.password.match=Password and confirmation password must match
+error.password.mismatch=Invalid username and/or password, please try again
+error.replyToAddress.format=Invalid format for Reply To Address
+error.transaction.token=Cannot submit this form out of order
+error.type.invalid=Server Type must be 'imap' or 'pop3'
+error.type.required=Server Type is required
+error.username.required=Username is required
+error.username.unique=That username is already in use - please select another
errors.footer=</ul><hr>
-errors.header=<h3><font color="red">Validation Error</font></h3>You must correct
the following error(s) before proceeding:<ul>
+errors.header=<h3><font color="red">Validation Error</font></h3><p>You must correct
the following error(s) before proceeding:</p><ul>
+errors.prefix=<li>
+errors.suffix=</li>
errors.ioException=I/O exception rendering error messages: {0}
expired.password=User Password has expired for {0}
heading.autoConnect=Auto
1.6 +19 -17
jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources_ja.properties
Index: ApplicationResources_ja.properties
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources_ja.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ApplicationResources_ja.properties 27 Feb 2004 00:33:24 -0000 1.5
+++ ApplicationResources_ja.properties 12 Mar 2004 02:32:41 -0000 1.6
@@ -6,25 +6,27 @@
change.try=\u518D\u8A66\u884C
change.title=\u30d1\u30b9\u30ef\u30fc\u30c9\u671f\u9650\u5207\u308c
database.load= {0}
\u304B\u3089\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
-error.database.missing=<li>\u30E6\u30FC\u30B6\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30ED\u30B0\u30AA\u30F3\u306E\u8A8D\u8A3C\u304C\u51FA\u6765\u307E\u305B\u3093</li>
-error.fromAddress.format=<li>From\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093</li>
-error.fromAddress.required=<li>From\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.fullName.required=<li>\u30D5\u30EB\u30CD\u30FC\u30E0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.host.required=<li>\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.noSubscription=<li>Subscription bean
\u304c\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u3042\u308a\u307e\u305b\u3093</li>
+error.database.missing=\u30E6\u30FC\u30B6\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30ED\u30B0\u30AA\u30F3\u306E\u8A8D\u8A3C\u304C\u51FA\u6765\u307E\u305B\u3093
+error.fromAddress.format=From\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
+error.fromAddress.required=From\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.fullName.required=\u30D5\u30EB\u30CD\u30FC\u30E0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.host.required=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.noSubscription=Subscription bean
\u304c\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u3042\u308a\u307e\u305b\u3093
error.password.expired=\u30E6\u30FC\u30B6 {0}
\u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F
-error.password.required=<li>\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059</li>
-error.password2.required=<li>\u30D1\u30B9\u30EF\u30FC\u30C9(\u78BA\u8A8D\u7528)\u304C\u5FC5\u8981\u3067\u3059</li>
-error.password.match=<li>\u30D1\u30B9\u30EF\u30FC\u30C9\u3068\u78BA\u8A8D\u7528\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E00\u81F4\u3057\u3066\u3044\u307E\u305B\u3093</li>
-error.password.mismatch=<li>\u30E6\u30FC\u30B6\u540D\u307E\u305F\u306F\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E0D\u6B63\u3067\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.replyToAddress.format=<li>\u8FD4\u4FE1\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093</li>
-error.transaction.token=<li>\u3053\u306E\u30D5\u30A9\u30FC\u30E0\u306E\u5185\u5BB9\u304C\u6B63\u3057\u304F\u306A\u3044\u305F\u3081\u9001\u4FE1\u3059\u308B\u3053\u3068\u304C\u51FA\u6765\u307E\u305B\u3093</li>
-error.type.invalid=<li>\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u306F 'imap' \u304B
'pop3'\u306E\u3069\u3061\u3089\u304B\u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093</li>
-error.type.required=<li>\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.username.required=<li>\u30E6\u30FC\u30B6\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
-error.username.unique=<li>\u305D\u306E\u30E6\u30FC\u30B6\u540D\u306F\u65E2\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002
\u5225\u306E\u30E6\u30FC\u30B6\u540D\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.password.required=\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059
+error.password2.required=\u30D1\u30B9\u30EF\u30FC\u30C9(\u78BA\u8A8D\u7528)\u304C\u5FC5\u8981\u3067\u3059
+error.password.match=\u30D1\u30B9\u30EF\u30FC\u30C9\u3068\u78BA\u8A8D\u7528\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E00\u81F4\u3057\u3066\u3044\u307E\u305B\u3093
+error.password.mismatch=\u30E6\u30FC\u30B6\u540D\u307E\u305F\u306F\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E0D\u6B63\u3067\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.replyToAddress.format=\u8FD4\u4FE1\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
+error.transaction.token=\u3053\u306E\u30D5\u30A9\u30FC\u30E0\u306E\u5185\u5BB9\u304C\u6B63\u3057\u304F\u306A\u3044\u305F\u3081\u9001\u4FE1\u3059\u308B\u3053\u3068\u304C\u51FA\u6765\u307E\u305B\u3093
+error.type.invalid=\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u306F 'imap' \u304B
'pop3'\u306E\u3069\u3061\u3089\u304B\u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093
+error.type.required=\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.username.required=\u30E6\u30FC\u30B6\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
+error.username.unique=\u305D\u306E\u30E6\u30FC\u30B6\u540D\u306F\u65E2\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002
\u5225\u306E\u30E6\u30FC\u30B6\u540D\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044
errors.footer=</ul><hr>
-errors.header=<h3><font
color="red">\u5165\u529b\u30c1\u30a7\u30c3\u30af\u30a8\u30e9\u30fc</font></h3>\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044:<ul>
+errors.header=<h3><font
color="red">\u5165\u529b\u30c1\u30a7\u30c3\u30af\u30a8\u30e9\u30fc</font></h3><p>\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044:</p><ul>
+errors.prefix=<li>
+errors.suffix=</li>
errors.ioException=I/O\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {0}
expired.password=\u30E6\u30FC\u30B6 {0}
\u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F
heading.autoConnect=\u81ea\u52d5\u63a5\u7d9a
1.4 +19 -17
jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources_ru.properties
Index: ApplicationResources_ru.properties
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/ApplicationResources_ru.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ApplicationResources_ru.properties 4 Nov 2002 05:54:50 -0000 1.3
+++ ApplicationResources_ru.properties 12 Mar 2004 02:32:41 -0000 1.4
@@ -6,25 +6,27 @@
change.try=Try Again
change.title=Password Has Expired
database.load=\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445
\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c
\u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0438\u0437 {0}
-error.database.missing=<li>\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e
\u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -
\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e
\u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438
\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.</li>
-error.fromAddress.format=<li>\u0412 \u043f\u043e\u043b\u0435
'\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:' \u0443\u043a\u0430\u0437\u0430\u043d
\u0430\u0434\u0440\u0435\u0441 \u0432
\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c
\u0444\u043e\u0440\u043c\u0430\u0442\u0435.</li>
-error.fromAddress.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0432
\u043f\u043e\u043b\u0435 '\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:'.</li>
-error.fullName.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435
\u0438\u043c\u044f.</li>
-error.host.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c
\u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439
\u0441\u0435\u0440\u0432\u0435\u0440.</li>
-error.noSubscription=<li>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430
\u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432
\u0441\u0435\u0441\u0441\u0438\u0438
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</li>
+error.database.missing=\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e
\u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -
\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e
\u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438
\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.
+error.fromAddress.format=\u0412 \u043f\u043e\u043b\u0435
'\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:' \u0443\u043a\u0430\u0437\u0430\u043d
\u0430\u0434\u0440\u0435\u0441 \u0432
\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c
\u0444\u043e\u0440\u043c\u0430\u0442\u0435.
+error.fromAddress.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0432
\u043f\u043e\u043b\u0435 '\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:'.
+error.fullName.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435
\u0438\u043c\u044f.
+error.host.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c
\u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.
+error.noSubscription=\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435
\u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432 \u0441\u0435\u0441\u0441\u0438\u0438
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
error.password.expired=Your password has expired for username {0}
-error.password.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c.</li>
-error.password2.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c
\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435
\u043f\u0430\u0440\u043e\u043b\u044f.</li>
-error.password.match=<li>\u041f\u0430\u0440\u043e\u043b\u044c \u0438
\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435
\u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435
\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.</li>
-error.password.mismatch=<li>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435
\u0438\u043c\u044f \u0438/\u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c -
\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435,
\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430,
\u0441\u043d\u043e\u0432\u0430.</li>
-error.replyToAddress.format=<li>\u0412 \u043f\u043e\u043b\u0435
'\u0410\u0434\u0440\u0435\u0441 \u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c
\u043d\u0430:' \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0434\u0440\u0435\u0441
\u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c
\u0444\u043e\u0440\u043c\u0430\u0442\u0435.</li>
-error.transaction.token=<li>\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0430
\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c
\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 -
\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435
\u043f\u043e\u0440\u044f\u0434\u043a\u0430
\u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u044f
\u0434\u0430\u043d\u043d\u044b\u0445.</li>
-error.type.invalid=<li>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435
\u0442\u0438\u043f\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
\u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c
\u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043b\u0438\u0448\u044c 'imap'
\u0438\u043b\u0438 'pop3'</li>
-error.type.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f
\u0441\u0435\u0440\u0432\u0435\u0440\u0430</li>
-error.username.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</li>
-error.username.unique=<li>\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435
\u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
\u0443\u0436\u0435
\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f -
\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435,
\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430,
\u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f.</li>
+error.password.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c.
+error.password2.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c
\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435
\u043f\u0430\u0440\u043e\u043b\u044f.
+error.password.match=\u041f\u0430\u0440\u043e\u043b\u044c \u0438
\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435
\u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435
\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.
+error.password.mismatch=\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435
\u0438\u043c\u044f \u0438/\u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c -
\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435,
\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430,
\u0441\u043d\u043e\u0432\u0430.
+error.replyToAddress.format=\u0412 \u043f\u043e\u043b\u0435
'\u0410\u0434\u0440\u0435\u0441 \u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c
\u043d\u0430:' \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0434\u0440\u0435\u0441
\u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c
\u0444\u043e\u0440\u043c\u0430\u0442\u0435.
+error.transaction.token=\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0430
\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c
\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 -
\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435
\u043f\u043e\u0440\u044f\u0434\u043a\u0430
\u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u044f
\u0434\u0430\u043d\u043d\u044b\u0445.
+error.type.invalid=\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435
\u0442\u0438\u043f\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
\u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c
\u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043b\u0438\u0448\u044c 'imap'
\u0438\u043b\u0438 'pop3'
+error.type.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f
\u0441\u0435\u0440\u0432\u0435\u0440\u0430
+error.username.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
+error.username.unique=\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435
\u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
\u0443\u0436\u0435
\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f -
\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435,
\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430,
\u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f.
errors.footer=</ul><hr>
-errors.header=<h3><font color="red">\u041e\u0448\u0438\u0431\u043a\u0438
\u043f\u0440\u0438 \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0438
\u0434\u0430\u043d\u043d\u044b\u0445</font></h3>\u0412\u044b
\u0434\u043e\u043b\u0436\u043d\u044b
\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c
\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435
\u043e\u0448\u0438\u0431\u043a\u0438:<ul>
+errors.header=<h3><font color="red">\u041e\u0448\u0438\u0431\u043a\u0438
\u043f\u0440\u0438 \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0438
\u0434\u0430\u043d\u043d\u044b\u0445</font></h3><p>\u0412\u044b
\u0434\u043e\u043b\u0436\u043d\u044b
\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c
\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435
\u043e\u0448\u0438\u0431\u043a\u0438:</p><ul>
+errors.prefix=<li>
+errors.suffix=</li>
errors.ioException=\u041e\u0448\u0438\u0431\u043a\u0430
\u0432\u0432\u043e\u0434\u0430/\u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438
\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438
\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431
\u043e\u0448\u0438\u0431\u043a\u0430\u0445: {0}
expired.password=User Password has expired for {0}
heading.autoConnect=\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438
1.2 +11 -8
jakarta-struts/src/example/org/apache/struts/webapp/example/LocaleAction.java
Index: LocaleAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/LocaleAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LocaleAction.java 10 Mar 2004 03:14:31 -0000 1.1
+++ LocaleAction.java 12 Mar 2004 02:32:41 -0000 1.2
@@ -32,7 +32,7 @@
/**
- * Change user's Struts @link(java.util.Locale.
+ * <p>Change user's Struts @link(java.util.Locale).</p>
*/
public final class LocaleAction extends BaseAction {
@@ -46,27 +46,30 @@
}
/**
- * Parameter for @link(java.util.Locale) language property.
+ * <p>Parameter for @link(java.util.Locale) language property.
+ * ["language"]</p>
*/
private static final String LANGUAGE = "language" ;
/**
- * Parameter for @link(java.util.Locale) country property.
+ * <p>Parameter for @link(java.util.Locale) country property.
+ * ["country"]</p>
*/
private static final String COUNTRY = "country";
/**
- * Parameter for response page URI.
+ * <p>Parameter for response page URI. ["page"]</p>
*/
private static final String PAGE = "page";
/**
- * Parameter for response forward name.
+ * <p>Parameter for response forward name.
+ * ["forward"]</p>
*/
private static final String FORWARD = "forward";
/**
- * Logging message if LocaleAction is missing a target parameter.
+ * <p>Logging message if LocaleAction is missing a target parameter.</p>
*/
private static final String LOCALE_LOG = "LocaleAction: Missing page or forward
parameter";
1.22 +95 -127
jakarta-struts/src/example/org/apache/struts/webapp/example/LogonAction.java
Index: LogonAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/LogonAction.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- LogonAction.java 13 Jan 2004 12:48:44 -0000 1.21
+++ LogonAction.java 12 Mar 2004 02:32:41 -0000 1.22
@@ -3,62 +3,20 @@
* $Revision$
* $Date$
*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowledgement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Copyright 2000-2004 Apache Software Foundation
*
+ * Licensed 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.
*/
-
package org.apache.struts.webapp.example;
import javax.servlet.http.HttpServletRequest;
@@ -66,62 +24,58 @@
import javax.servlet.http.HttpSession;
import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
-import org.apache.struts.util.ModuleException;
/**
- * Implementation of <strong>Action</strong> that validates a user logon.
+ * <p>Validate a user logon.</p>
*
* @version $Revision$ $Date$
*/
-public final class LogonAction extends Action {
+public final class LogonAction extends BaseAction {
- // ----------------------------------------------------- Instance Variables
+ /**
+ * Name of username field ["username"].
+ */
+ private static String USERNAME = "username";
/**
- * The <code>Log</code> instance for this application.
+ * Name of password field ["password"].
*/
- private Log log = LogFactory.getLog("org.apache.struts.webapp.Example");
+ private static String PASSWORD = "password";
- // --------------------------------------------------------- Public Methods
+ // ------------------------------------------------------ Protected Methods
- // See superclass for Javadoc
- public ActionForward execute(
- ActionMapping mapping,
- ActionForm form,
- HttpServletRequest request,
- HttpServletResponse response)
- throws Exception {
+ /**
+ * <p>Confirm user credentials. Post any errors and return User object
+ * (or null).</p>
+ *
+ * @param database Database in which to look up the user
+ * @param username Username specified on the logon form
+ * @param password Password specified on the logon form
+ * @param errors ActionMessages queue to passback errors
+ *
+ * @return Validated User object or null
+ * @throws ExpiredPasswordException to be handled by Struts exception
+ * processor via the action-mapping
+ */
+ protected User getUser(UserDatabase database, String username,
+ String password, ActionMessages errors) throws
ExpiredPasswordException {
- // Extract attributes we will need
User user = null;
-
- // Validate the request parameters specified by the user
- ActionMessages errors = new ActionMessages();
- String username = (String) PropertyUtils.getSimpleProperty(form,
"username");
- String password = (String) PropertyUtils.getSimpleProperty(form,
"password");
- UserDatabase database =
- (UserDatabase) servlet.getServletContext().getAttribute(
- Constants.DATABASE_KEY);
-
if (database == null){
errors.add(
ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("error.database.missing"));
- } else {
- user = getUser(database, username);
-
- if ((user != null) && !user.getPassword().equals(password)){
+ }
+ else {
+ user = database.findUser(username);
+ if ((user != null) && !user.getPassword().equals(password)) {
user = null;
}
-
if (user == null) {
errors.add(
ActionMessages.GLOBAL_MESSAGE,
@@ -129,13 +83,20 @@
}
}
- // Report any errors we have discovered back to the original form
- if (!errors.isEmpty()) {
- this.saveErrors(request, errors);
- return (mapping.getInputForward());
- }
+ return user;
+
+ }
+
+
+ /**
+ * <p>Store User object in client session.
+ * If user object is null, any existing user object is removed.</p>
+ *
+ * @param request The request we are processing
+ * @param user The user object returned from the database
+ */
+ protected void SaveUser(HttpServletRequest request, User user) {
- // Save our logged-in user in the session
HttpSession session = request.getSession();
session.setAttribute(Constants.USER_KEY, user);
if (log.isDebugEnabled()) {
@@ -146,46 +107,53 @@
+ session.getId());
}
- // Remove the obsolete form bean
- if (mapping.getAttribute() != null) {
- if ("request".equals(mapping.getScope()))
- request.removeAttribute(mapping.getAttribute());
- else
- session.removeAttribute(mapping.getAttribute());
- }
-
- // Forward control to the specified success URI
- return (mapping.findForward("success"));
-
}
- // ------------------------------------------------------ Protected Methods
+ // --------------------------------------------------------- Public Methods
/**
- * Look up the user, throwing an exception to simulate business logic
- * rule exceptions.
+ * Use "username" and "password" fields from ActionForm to retrieve a User
+ * object from the database. If credentials are not valid, or database
+ * has disappeared, post error messages and forward to input.
*
- * @param database Database in which to look up the user
- * @param username Username specified on the logon form
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request (if any)
+ * @param request The HTTP request we are processing
+ * @param response The HTTP response we are creating
*
- * @exception ModuleException if a business logic rule is violated
+ * @exception Exception if the application business logic throws
+ * an exception
*/
- public User getUser(UserDatabase database, String username)
- throws ModuleException {
+ public ActionForward execute(
+ ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response)
+ throws Exception {
- // Force an ArithmeticException which can be handled explicitly
- if ("arithmetic".equals(username)) {
- throw new ArithmeticException();
- }
+ // Local variables
+ UserDatabase database = getUserDatabase(request);
+ String username = (String) PropertyUtils.getSimpleProperty(form,
+ USERNAME);
+ String password = (String) PropertyUtils.getSimpleProperty(form,
+ PASSWORD);
+ ActionMessages errors = new ActionMessages();
+
+ // Retrieve user
+ User user = getUser(database,username,password,errors);
+
+ // Save (or clear) user object
+ SaveUser(request,user);
- // Force an application-specific exception which can be handled
- if ("expired".equals(username)) {
- throw new ExpiredPasswordException(username);
+ // Report back any errors, and exit if any
+ if (!errors.isEmpty()) {
+ this.saveErrors(request, errors);
+ return (mapping.getInputForward());
}
- // Look up and return the specified user
- return (database.findUser(username));
+ // Otherwise, return "success"
+ return (findSuccess(mapping));
}
-}
+}
\ No newline at end of file
1.2 +0 -2
jakarta-struts/src/example/org/apache/struts/webapp/example/MODEL.txt
Index: MODEL.txt
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/MODEL.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MODEL.txt 11 Mar 2004 03:30:01 -0000 1.1
+++ MODEL.txt 12 Mar 2004 02:32:41 -0000 1.2
@@ -31,7 +31,6 @@
+ ReplyToAddress: String
+ DataBase: UserDatabase
+ Subscription: Subscription[]
-+ ErrorMessage: String !NEW!
----
+ CreateSubscription(Host:String): Subscription
+ FindSubscription(Host:String):Subscription
@@ -77,7 +76,6 @@
- replyToAddress:String
- database:MemoryDataBAse
- subscriptions:HashMap
-- errorMessage:String; !NEW!
----
+ MemoryUser(database:MemoryUserDatabase:* :User members
database username:String)
1.5 +21 -63
jakarta-struts/src/example/org/apache/struts/webapp/example/UserDatabase.java
Index: UserDatabase.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/UserDatabase.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UserDatabase.java 13 Jan 2004 12:48:44 -0000 1.4
+++ UserDatabase.java 12 Mar 2004 02:32:41 -0000 1.5
@@ -3,63 +3,20 @@
* $Revision$
* $Date$
*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowledgement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Copyright 2000-2004 Apache Software Foundation
*
+ * Licensed 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.
*/
-
-
package org.apache.struts.webapp.example;
@@ -73,7 +30,6 @@
* @version $Revision$ $Date$
* @since Struts 1.1
*/
-
public interface UserDatabase {
@@ -105,8 +61,10 @@
* if any; otherwise return <code>null</code>.</p>
*
* @param username Username of the user to retrieve
+ * @throws ExpiredPasswordException if user password has expired
+ * and must be changed
*/
- public User findUser(String username);
+ public User findUser(String username) throws ExpiredPasswordException;
/**
1.8 +14 -47
jakarta-struts/src/example/org/apache/struts/webapp/example/memory/MemoryUserDatabase.java
Index: MemoryUserDatabase.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/memory/MemoryUserDatabase.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MemoryUserDatabase.java 11 Mar 2004 03:26:02 -0000 1.7
+++ MemoryUserDatabase.java 12 Mar 2004 02:32:41 -0000 1.8
@@ -35,6 +35,7 @@
import org.apache.struts.webapp.example.Subscription;
import org.apache.struts.webapp.example.User;
import org.apache.struts.webapp.example.UserDatabase;
+import org.apache.struts.webapp.example.ExpiredPasswordException;
import org.xml.sax.Attributes;
@@ -46,7 +47,7 @@
* @since Struts 1.1
*/
-public final class MemoryUserDatabase implements UserDatabase {
+public class MemoryUserDatabase implements UserDatabase {
// ----------------------------------------------------------- Constructors
@@ -94,11 +95,7 @@
// --------------------------------------------------------- Public Methods
- /**
- * <p>Finalize access to the underlying persistence layer.</p>
- *
- * @exception Exception if a database access error occurs
- */
+ // See interface for Javadoc
public void close() throws Exception {
save();
@@ -106,15 +103,7 @@
}
- /**
- * <p>Create and return a new [EMAIL PROTECTED] User} defined in this user
database.
- * </p>
- *
- * @param username Username of the new user
- *
- * @exception IllegalArgumentException if the specified username
- * is not unique
- */
+ // See interface for Javadoc
public User createUser(String username) {
synchronized (users) {
@@ -135,13 +124,8 @@
}
- /**
- * <p>Return the existing [EMAIL PROTECTED] User} with the specified username,
- * if any; otherwise return <code>null</code>.</p>
- *
- * @param username Username of the user to retrieve
- */
- public User findUser(String username) {
+ // See interface for Javadoc
+ public User findUser(String username) throws ExpiredPasswordException {
synchronized (users) {
return ((User) users.get(username));
@@ -150,9 +134,7 @@
}
- /**
- * <p>Return the set of [EMAIL PROTECTED] User}s defined in this user
database.</p>
- */
+ // See interface for Javadoc
public User[] findUsers() {
synchronized (users) {
@@ -163,11 +145,7 @@
}
- /**
- * <p>Initiate access to the underlying persistence layer.</p>
- *
- * @exception Exception if a database access error occurs
- */
+ // See interface for Javadoc
public void open() throws Exception {
FileInputStream fis = null;
@@ -221,14 +199,7 @@
}
- /**
- * Remove the specified [EMAIL PROTECTED] User} from this database.
- *
- * @param user User to be removed
- *
- * @exception IllegalArgumentException if the specified user is not
- * associated with this database
- */
+ // See interface for Javadoc
public void removeUser(User user) {
if (!(this == user.getDatabase())) {
@@ -245,11 +216,7 @@
}
- /**
- * <p>Save any pending changes to the underlying persistence layer.</p>
- *
- * @exception Exception if a database access error occurs
- */
+ // See interface for Javadoc
public void save() throws Exception {
if (log.isDebugEnabled()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]