You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by gv...@apache.org on 2006/08/08 05:22:47 UTC
svn commit: r429552 [1/2] - in /shale/sandbox/shale-clay-mailreader: ./ src/
src/main/ src/main/assembly/ src/main/java/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/apache/shale/
src/main/java/org/apache/shale/examples/ src/main/java...
Author: gvanmatre
Date: Mon Aug 7 20:22:45 2006
New Revision: 429552
URL: http://svn.apache.org/viewvc?rev=429552&view=rev
Log:
Shamelessly borrowed the mailreader for a example of using tiles like clay full xml views. Most of the html templates are using the jsp like syntax. This is still a works in progress. I have not nailed down a problem with the facet in the panelGrid yet.
Added:
shale/sandbox/shale-clay-mailreader/
shale/sandbox/shale-clay-mailreader/LICENSE.txt (with props)
shale/sandbox/shale-clay-mailreader/NOTICE.txt (with props)
shale/sandbox/shale-clay-mailreader/pom.xml (with props)
shale/sandbox/shale-clay-mailreader/src/
shale/sandbox/shale-clay-mailreader/src/main/
shale/sandbox/shale-clay-mailreader/src/main/assembly/
shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/
shale/sandbox/shale-clay-mailreader/src/main/java/org/
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java (with props)
shale/sandbox/shale-clay-mailreader/src/main/resources/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties (with props)
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties (with props)
shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ru.properties (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/clay-config.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/clay-tiles-config.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/database.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/faces-config.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/WEB-INF/web.xml (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/index_nsjsp.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/layout_tap.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/logon_nsjsp.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/logon_tap.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/mainMenu_nsjsp.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/registration_nsjsp.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/pages/subscription_nsjsp.html (with props)
shale/sandbox/shale-clay-mailreader/src/main/webapp/welcome.jsp (with props)
shale/sandbox/shale-clay-mailreader/src/site/
shale/sandbox/shale-clay-mailreader/src/site/site.xml
shale/sandbox/shale-clay-mailreader/src/site/xdoc/
shale/sandbox/shale-clay-mailreader/src/test/
shale/sandbox/shale-clay-mailreader/src/test/java/
Added: shale/sandbox/shale-clay-mailreader/LICENSE.txt
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/LICENSE.txt?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/LICENSE.txt (added)
+++ shale/sandbox/shale-clay-mailreader/LICENSE.txt Mon Aug 7 20:22:45 2006
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
Propchange: shale/sandbox/shale-clay-mailreader/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/NOTICE.txt
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/NOTICE.txt?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/NOTICE.txt (added)
+++ shale/sandbox/shale-clay-mailreader/NOTICE.txt Mon Aug 7 20:22:45 2006
@@ -0,0 +1,6 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product contains code written by David Geary and Cay Horstmann
+for the first edition of Core JavaServer Faces.
+
Propchange: shale/sandbox/shale-clay-mailreader/NOTICE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/pom.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/pom.xml?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/pom.xml (added)
+++ shale/sandbox/shale-clay-mailreader/pom.xml Mon Aug 7 20:22:45 2006
@@ -0,0 +1,153 @@
+<!--
+ /*
+ * Copyright 2006 The 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.
+ *
+ * $Id$
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-apps-parent</artifactId>
+ <version>1.0.3-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>shale-clay-mailreader</artifactId>
+ <packaging>war</packaging>
+ <name>Shale Clay Mailreader Sample App</name>
+ <url>http://shale.apache.org/</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>1.3.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-clay</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-test</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts.action</groupId>
+ <artifactId>struts-mailreader-dao</artifactId>
+ <version>1.3.4</version>
+ </dependency>
+
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>tomahawk</artifactId>
+ <version>1.1.3</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>1.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>1.1.3</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- These should be specified in the myfaces pom -->
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-el</groupId>
+ <artifactId>commons-el</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>
+ src/main/assembly/dep.xml
+ </descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/systest/**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: shale/sandbox/shale-clay-mailreader/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml Mon Aug 7 20:22:45 2006
@@ -0,0 +1,64 @@
+<!--
+/*
+ * Copyright 2006 The 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.
+ *
+ * $Id: pom.xml 414075 2006-06-14 05:06:06Z jmitchell $
+ */
+-->
+<assembly>
+
+ <id>dist</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+
+ <fileSets>
+
+ <!-- Include top level directory files in the assembly -->
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>pom.xml</include>
+ <include>*.txt</include>
+ </includes>
+ </fileSet>
+
+ <!-- Include the source code in the assembly -->
+ <fileSet>
+ <directory>./src</directory>
+ <outputDirectory>src/</outputDirectory>
+ </fileSet>
+
+ <!-- Include the website docs in the assembly -->
+ <fileSet>
+ <directory>./target/site</directory>
+ <outputDirectory>docs/</outputDirectory>
+ </fileSet>
+
+ <!-- Include the web application in the assembly -->
+ <fileSet>
+ <directory>./target</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>*.war</include>
+ </includes>
+ </fileSet>
+
+ </fileSets>
+
+</assembly>
\ No newline at end of file
Propchange: shale/sandbox/shale-clay-mailreader/src/main/assembly/dep.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,229 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: ApplicationListener.java 414803 2006-06-16 11:06:03Z jmitchell $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+
+import javax.faces.model.SelectItem;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.struts.apps.mailreader.dao.impl.memory.MemoryUserDatabase;
+
+/**
+ * <p><code>ServletContextListener</code> that initializes and finalizes the
+ * persistent storage of User and Subscription information for the Struts
+ * Demonstration Application, using an in-memory database backed by an
+ * XML file.</p>
+ *
+ * <p><strong>IMPLEMENTATION WARNING</strong> - If this web application is run
+ * from a WAR file, or in another environment where reading and writing of the
+ * web application resource is impossible, the initial contents will be copied
+ * to a file in the web application temporary directory provided by the
+ * container. This is for demonstration purposes only - you should
+ * <strong>NOT</strong> assume that files written here will survive a restart
+ * of your servlet container.</p>
+ */
+
+public final class ApplicationListener implements ServletContextListener {
+
+
+ // ------------------------------------------------------ Manifest Constants
+
+
+ /**
+ * <p>Appication scope attribute key under which the in-memory
+ * version of our database is stored.</p>
+ */
+ public static final String DATABASE_KEY = "database";
+
+
+ /**
+ * <p>Application scope attribute key under which the valid
+ * selection items for the protocol property is stored.</p>
+ */
+ public static final String PROTOCOLS_KEY = "protocols";
+
+
+ // ------------------------------------------------------ Instance Variables
+
+
+ /**
+ * <p>The <code>ServletContext</code> for this web application.</p>
+ */
+ private ServletContext context = null;
+
+
+ /**
+ * The {@link MemoryUserDatabase} object we construct and make available.
+ */
+ private MemoryUserDatabase database = null;
+
+
+ /**
+ * Logging output for this plug in instance.
+ */
+ private Log log = LogFactory.getLog(this.getClass());
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * The web application resource path of our persistent database
+ * storage file.
+ */
+ private String pathname = "/WEB-INF/database.xml";
+
+ public String getPathname() {
+ return (this.pathname);
+ }
+
+ public void setPathname(String pathname) {
+ this.pathname = pathname;
+ }
+
+
+ // ------------------------------------------ ServletContextListener Methods
+
+
+ /**
+ * <p>Gracefully shut down this database, releasing any resources
+ * that were allocated at initialization.</p>
+ *
+ * @param event ServletContextEvent to process
+ */
+ public void contextDestroyed(ServletContextEvent event) {
+
+ log.info("Finalizing memory database plug in");
+
+ if (database != null) {
+ try {
+ database.close();
+ } catch (Exception e) {
+ log.error("Closing memory database", e);
+ }
+ }
+
+ context.removeAttribute(DATABASE_KEY);
+ context.removeAttribute(PROTOCOLS_KEY);
+ database = null;
+ context = null;
+
+ }
+
+
+ /**
+ * <p>Initialize and load our initial database from persistent storage.</p>
+ *
+ * @param event The context initialization event
+ *
+ * @exception ServletException if we cannot configure ourselves correctly
+ */
+ public void contextInitialized(ServletContextEvent event) {
+
+ log.info("Initializing memory database plug in from '" +
+ pathname + "'");
+
+ // Remember our associated ServletContext
+ this.context = event.getServletContext();
+
+ // Construct a new database and make it available
+ database = new MemoryUserDatabase();
+ try {
+ String path = calculatePath();
+ if (log.isDebugEnabled()) {
+ log.debug(" Loading database from '" + path + "'");
+ }
+ database.setPathname(path);
+ database.open();
+ } catch (Exception e) {
+ log.error("Opening memory database", e);
+ throw new IllegalStateException("Cannot load database from '" +
+ pathname + "': " + e);
+ }
+ context.setAttribute(DATABASE_KEY, database);
+
+ // Cache the selection items for protocols
+ SelectItem protocols[] = new SelectItem[2];
+ protocols[0] = new SelectItem("imap", "IMAP Protocol");
+ protocols[1] = new SelectItem("pop3", "POP3 Protocol");
+ context.setAttribute(PROTOCOLS_KEY, protocols);
+
+ }
+
+
+ // -------------------------------------------------------- Private Methods
+
+
+ /**
+ * Calculate and return an absolute pathname to the XML file to contain
+ * our persistent storage information.
+ *
+ * @exception Exception if an input/output error occurs
+ */
+ private String calculatePath() throws Exception {
+
+ // Can we access the database via file I/O?
+ String path = context.getRealPath(pathname);
+ if (path != null) {
+ return (path);
+ }
+
+ // Does a copy of this file already exist in our temporary directory
+ File dir = (File)
+ context.getAttribute("javax.servlet.context.tempdir");
+ File file = new File(dir, "struts-example-database.xml");
+ if (file.exists()) {
+ return (file.getAbsolutePath());
+ }
+
+ // Copy the static resource to a temporary file and return its path
+ InputStream is =
+ context.getResourceAsStream(pathname);
+ BufferedInputStream bis = new BufferedInputStream(is, 1024);
+ FileOutputStream os =
+ new FileOutputStream(file);
+ BufferedOutputStream bos = new BufferedOutputStream(os, 1024);
+ byte buffer[] = new byte[1024];
+ while (true) {
+ int n = bis.read(buffer);
+ if (n <= 0) {
+ break;
+ }
+ bos.write(buffer, 0, n);
+ }
+ bos.close();
+ bis.close();
+ return (file.getAbsolutePath());
+
+ }
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/ApplicationListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: BaseViewController.java 414803 2006-06-16 11:06:03Z jmitchell $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import org.apache.shale.view.AbstractViewController;
+import org.apache.struts.apps.mailreader.dao.UserDatabase;;
+
+/**
+ * <p>Convenience abstract base <code>ViewController</code>
+ * for the Mail Reader example application.</p>
+ */
+
+public abstract class BaseViewController extends AbstractViewController {
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+ // ------------------------------------------------------- Protected Methods
+
+
+ /**
+ * <p>Return the state saving bean for this user's transaction state.</p>
+ */
+ protected State getState() {
+
+ // Look up the state saving bean,
+ // using the 'getBean' method inherited from AbstractFacesBean
+ return (State) getBean("state");
+
+ }
+
+
+ /**
+ * <p>Return the DAO for our user database.</p>
+ */
+ protected UserDatabase getUserDatabase() {
+
+ // Look up the DAO for the user database,
+ // using the 'getBean' method inherited from AbstractFacesBean
+ UserDatabase db = (UserDatabase) getBean("database");
+ return db;
+
+ }
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/BaseViewController.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,48 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: Index.java 372087 2006-01-25 03:38:42Z craigmcc $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+/**
+ * <p><code>ViewController</code> for the <code>index</code> page.</p>
+ */
+
+public class Index extends BaseViewController {
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ /**
+ * <p>Set the appropriate mode and forward to the registration page.</p>
+ */
+ public String create() {
+
+ getState().setMode("CREATE");
+ return "registration";
+
+ }
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Index.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,128 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: Logon.java 372087 2006-01-25 03:38:42Z craigmcc $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException;
+import org.apache.struts.apps.mailreader.dao.User;
+
+/**
+ * <p><code>ViewController</code> for the <code>logon</code> page.</p>
+ */
+
+public class Logon extends BaseViewController {
+
+
+ // -------------------------------------------------------- Static Variables
+
+
+ /**
+ * <p><code>Log</code> instance for this class.</p>
+ */
+ private static final Log log = LogFactory.getLog(Logon.class);
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ /**
+ * <p>The password input field.</p>
+ */
+ private String password = null;
+
+
+ /**
+ * <p>The username input field.</p>
+ */
+ private String username = null;
+
+
+ /**
+ * @return Returns the password.
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+
+ /**
+ * @param password The password to set.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ /**
+ * @return Returns the username.
+ */
+ public String getUsername() {
+ return this.username;
+ }
+
+
+ /**
+ * @param username The username to set.
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ /**
+ * <p>Authenticate this user and proceed based on the results.</p>
+ */
+ public String logon() {
+
+ if (log.isDebugEnabled()) {
+ log.debug("logon(" + username + "," + password + ")");
+ }
+
+ User user = null;
+ try {
+ user = getUserDatabase().findUser(username);
+ } catch (ExpiredPasswordException e) {
+ log.debug(e.getCause());
+ }
+ if ((user != null) && (user.getPassword().equals(password))) {
+ getState().setUser(user);
+ return "success";
+ }
+
+ // Append an error message
+ // FIXME - use Commons Resources to localize this message
+ getFacesContext().addMessage(null,
+ new FacesMessage("Invalid username or password, please try again"));
+
+ // Redisplay the logon page
+ return null;
+
+ }
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Logon.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,70 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: MainMenu.java 372087 2006-01-25 03:38:42Z craigmcc $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import org.apache.struts.apps.mailreader.dao.User;
+
+/**
+ * <p><code>ViewController</code> for the <code>index</code> page.</p>
+ */
+
+public class MainMenu extends BaseViewController {
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ /**
+ * <p>Set the appropriate mode and forward to the registration page.</p>
+ */
+ public String edit() {
+
+ getState().setMode("EDIT");
+ Registration registration = (Registration)getBean("registration");
+ User user = getState().getUser();
+ registration.setFromAddress(user.getFromAddress());
+ registration.setFullName(user.getFullName());
+ registration.setPassword(user.getPassword());
+ registration.setPassword2(user.getPassword());
+ registration.setReplyToAddress(user.getReplyToAddress());
+ registration.setSubscriptions(user.getSubscriptions());
+ registration.setUsername(user.getUsername());
+ return "registration";
+
+ }
+
+
+ /**
+ * <p>Remove the currently logged user and return to the welcome page.</p>
+ */
+ public String logoff() {
+
+ getState().setUser(null);
+ return "welcome";
+
+ }
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/MainMenu.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,419 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: Registration.java 414807 2006-06-16 11:44:29Z jmitchell $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException;
+import org.apache.struts.apps.mailreader.dao.Subscription;
+import org.apache.struts.apps.mailreader.dao.User;
+import org.apache.struts.apps.mailreader.dao.UserDatabase;
+
+/**
+ * <p><code>ViewController</code> for the <code>registration</code> page.</p>
+ */
+
+public class Registration extends BaseViewController {
+
+
+ // -------------------------------------------------------- Static Variables
+
+
+ /**
+ * <p>The log instance for this bean.</p>
+ */
+ private static final Log log = LogFactory.getLog(Registration.class);
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ /**
+ * <p>The from address of this user.</p>
+ */
+ private String fromAddress = null;
+
+ /**
+ * @return Returns the fromAddress.
+ */
+ public String getFromAddress() {
+ return this.fromAddress;
+ }
+
+ /**
+ * @param fromAddress The fromAddress to set.
+ */
+ public void setFromAddress(String fromAddress) {
+ this.fromAddress = fromAddress;
+ }
+
+
+ /**
+ * <p>The full name of this user.</p>
+ */
+ private String fullName = null;
+
+ /**
+ * @return Returns the fullName.
+ */
+ public String getFullName() {
+ return this.fullName;
+ }
+
+ /**
+ * @param fullName The fullName to set.
+ */
+ public void setFullName(String fullName) {
+ this.fullName = fullName;
+ }
+
+
+
+
+
+
+
+
+
+ /**
+ * <p>The login password for this user.</p>
+ */
+ private String password = null;
+
+ /**
+ * @return Returns the password.
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+ /**
+ * @param password The password to set.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ /**
+ * <p>The confirmation password for this user.</p>
+ */
+ private String password2 = null;
+
+ /**
+ * @return Returns the password2.
+ */
+ public String getPassword2() {
+ return this.password2;
+ }
+
+ /**
+ * @param password2 The password2 to set.
+ */
+ public void setPassword2(String password2) {
+ this.password2 = password2;
+ }
+
+
+ /**
+ * <p>The reply to address of this user.</p>
+ */
+ private String replyToAddress = null;
+
+ /**
+ * @return Returns the replyToAddress.
+ */
+ public String getReplyToAddress() {
+ return this.replyToAddress;
+ }
+
+ /**
+ * @param replyToAddress The replyToAddress to set.
+ */
+ public void setReplyToAddress(String replyToAddress) {
+ this.replyToAddress = replyToAddress;
+ }
+
+
+ /**
+ * <p>The set of subscriptions for the currently logged in user.
+ */
+ private Subscription[] subscriptions = null;
+
+ /**
+ * @return Returns the subscriptions.
+ */
+ public Subscription[] getSubscriptions() {
+ return this.subscriptions;
+ }
+
+ /**
+ * @param subscriptions The subscriptions to set.
+ */
+ public void setSubscriptions(Subscription subscriptions[]) {
+ if (log.isTraceEnabled()) {
+ if (subscriptions == null) {
+ log.trace("Erasing stored subscriptions");
+ } else {
+ log.trace("Storing " + subscriptions.length + " subscriptions");
+ }
+ }
+ this.subscriptions = subscriptions;
+ }
+
+
+ /**
+ * <p>The logon username for this user.</p>
+ */
+ private String username = null;
+
+ /**
+ * @return Returns the username.
+ */
+ public String getUsername() {
+ return this.username;
+ }
+
+ /**
+ * @param username The username to set.
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ /**
+ * <p>Return to the appropriate page depending on the current mode.</p>
+ */
+ public String cancel() {
+
+ if ("CREATE".equals(getState().getMode())) {
+ return "welcome";
+ } else {
+ return "menu";
+ }
+
+ }
+
+
+ /**
+ * <p>Create a new subscription.</p>
+ */
+ public String create() {
+
+ State state = getState();
+ state.setHost(null);
+ state.setMode("CREATE");
+ if (log.isTraceEnabled()) {
+ log.trace("subscription(" + state.getMode() + "," + state.getHost() + ")");
+ }
+ return "subscription";
+
+ }
+
+
+ /**
+ * <p>Delete an existing subscription.</p>
+ */
+ public String delete() {
+
+ State state = getState();
+ state.setHost(((Subscription) getBean("current")).getHost());
+ state.setMode("DELETE");
+ if (log.isTraceEnabled()) {
+ log.trace("subscription(" + state.getMode() + "," + state.getHost() + ")");
+ }
+ return "subscription";
+
+ }
+
+
+ /**
+ * <p>Edit an existing subscription.</p>
+ */
+ public String edit() {
+
+ State state = getState();
+ state.setHost(((Subscription) getBean("current")).getHost());
+ state.setMode("EDIT");
+ if (log.isTraceEnabled()) {
+ log.trace("subscription(" + state.getMode() + "," + state.getHost() + ")");
+ }
+ return "subscription";
+
+ }
+
+
+ /**
+ * <p>Create or update the user information.</p>
+ * @throws ExpiredPasswordException
+ */
+ public String save() throws ExpiredPasswordException {
+
+ UserDatabase database = getUserDatabase();
+ String mode = getState().getMode();
+ boolean ok = true;
+ User user = null;
+
+ if ("CREATE".equals(mode)) {
+
+ // Verify that the proposed username is not already taken
+ if (database.findUser(username) != null) {
+ // FIXME - localization
+ getFacesContext().addMessage("registration:username",
+ new FacesMessage("That username is already taken"));
+ ok = false;
+ }
+
+ // Verify that the two password values match
+ if (!password.equals(password2)) {
+ // FIXME - localization
+ getFacesContext().addMessage("registration:password2",
+ new FacesMessage("Password values do not match"));
+ ok = false;
+ }
+
+ // Create a new user with the specified username and password
+ // and log the new user on
+ if (ok) {
+ user = database.createUser(username);
+ getState().setUser(user);
+ }
+
+
+ } else /* if ("EDIT".equals(mode)) */ {
+
+ // Verify that the two password values match (if entered)
+ if ((password != null) && (password.length() > 0) &&
+ (password2 != null) && (password2.length() > 0) &&
+ !password.equals(password2)) {
+ // FIXME - localization
+ getFacesContext().addMessage("registration:password2",
+ new FacesMessage("Password values do not match"));
+ ok = false;
+ }
+
+ // Edit the currently logged on user
+ user = getState().getUser();
+
+ }
+
+ // Copy the remaining properties
+ if (ok) {
+ if ((password != null) && (password.length() > 0)) {
+ user.setPassword(password);
+ }
+ user.setFullName(fullName);
+ user.setFromAddress(fromAddress);
+ user.setReplyToAddress(replyToAddress);
+ }
+
+ // Save the updated information to the database
+ try {
+ database.save();
+ } catch (Exception e) {
+ getFacesContext().addMessage(null,
+ new FacesMessage(e.getMessage()));
+ log.error("Database save exception", e);
+ ok = false;
+ }
+
+ // Return to the input page if there were any errors
+ if (!ok) {
+ return null;
+ } else {
+ return "menu";
+ }
+
+ }
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+ /**
+ * <p>If this is a postback, and we are in EDIT mode, retrieve the
+ * subscriptions for the currently logged on user. This is required
+ * in case the user clicked one of the Delete or Edit buttons in the
+ * table, so that the correct row can be positioned to before calling
+ * the event handler.</p>
+ */
+ public void preprocess() {
+
+ State state = getState();
+ if ("EDIT".equals(state.getMode())) {
+ setSubscriptions(state.getUser().getSubscriptions());
+ }
+
+ }
+
+
+ /**
+ * <p>If this is not a postback, and we are in EDIT mode, prepopulate
+ * the field values for the user registration update form and retrieve the
+ * subscriptions for the currently logged in user. (If this is a
+ * postback, we will have done this already in <code>init()</code>.)</p>
+ */
+ public void prerender() {
+
+ State state = getState();
+
+ // If we are not in EDIT mode, there is nothing to do
+ if (!"EDIT".equals(state.getMode())) {
+ return;
+ }
+
+ // The first time in, prepopulate our input field values
+ User user = state.getUser();
+ if (!isPostBack()) {
+ setUsername(user.getUsername()); //FIXME: NPE (after session timeout?)
+ setPassword("");
+ setPassword2("");
+ setFullName(user.getFullName());
+ setFromAddress(user.getFromAddress());
+ setReplyToAddress(user.getReplyToAddress());
+
+ // Look up the subscriptions for the currently logged on user,
+ // if we have not done so already.
+ // If we were using a real database, this is where executing the
+ // query and opening the result set would occur
+ setSubscriptions(user.getSubscriptions());
+ }
+
+ }
+
+
+ /**
+ * <p>Release our reference to to the retrieved subscriptions (if any).
+ * If we were using a real database, this is where closing the result set
+ * would go.</p>
+ */
+ public void destroy() {
+ // TODO this is causing the page not to display the subscriptions
+ //setSubscriptions(null);
+
+ }
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Registration.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,94 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: State.java 372087 2006-01-25 03:38:42Z craigmcc $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import org.apache.struts.apps.mailreader.dao.User;
+
+
+/**
+ * <p>In the absence of a <code>DialogController</code>, provide some
+ * properties that can be used to save our state information.</p>
+ */
+
+public class State {
+
+
+ // -------------------------------------------------------------- Properties
+
+ /**
+ * <p>Host name used to select which subscription to process.</p>
+ */
+ private String host = null;
+
+ /**
+ * @return Returns the host.
+ */
+ public String getHost() {
+ return this.host;
+ }
+
+ /**
+ * @param host The host to set.
+ */
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+
+ /**
+ * <p>Transaction processing mode.</p>
+ */
+ private String mode = null;
+
+ /**
+ * @return Returns the mode.
+ */
+ public String getMode() {
+ return this.mode;
+ }
+
+ /**
+ * @param mode The mode to set.
+ */
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+
+
+ /**
+ * <p>The currently logged on <code>User</code>.</p>
+ */
+ private User user = null;
+
+ /**
+ * @return Returns the user.
+ */
+ public User getUser() {
+ return this.user;
+ }
+
+ /**
+ * @param user The user to set.
+ */
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/State.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java Mon Aug 7 20:22:45 2006
@@ -0,0 +1,273 @@
+/*
+ * Copyright 1999-2002,2004 The 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.
+ *
+ * $Id: Subscription.java 414804 2006-06-16 11:06:24Z jmitchell $
+ */
+
+package org.apache.shale.examples.mailreader;
+
+import javax.faces.application.FacesMessage;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.apps.mailreader.dao.User;
+import org.apache.struts.apps.mailreader.dao.UserDatabase;
+
+/**
+ * <p><code>ViewController</code> for the <code>subscription</code> page.</p>
+ */
+
+public class Subscription extends BaseViewController {
+
+
+ // -------------------------------------------------------- Static Variables
+
+
+ /**
+ * <p>The log instance for this bean.</p>
+ */
+ private static final Log log = LogFactory.getLog(Subscription.class);
+
+
+ // -------------------------------------------------------------- Properties
+
+
+ /**
+ * <p>The autoConnect state for this subscription.</p>
+ */
+ private boolean autoConnect = false;
+
+ /**
+ * @return Returns the autoConnect.
+ */
+ public boolean isAutoConnect() {
+ return this.autoConnect;
+ }
+
+ /**
+ * @param autoConnect The autoConnect to set.
+ */
+ public void setAutoConnect(boolean autoConnect) {
+ this.autoConnect = autoConnect;
+ }
+
+
+ /**
+ * <p>The host for this subscription.</p>
+ */
+ private String host = null;
+
+ /**
+ * @return Returns the host.
+ */
+ public String getHost() {
+ return this.host;
+ }
+
+ /**
+ * @param host The host to set.
+ */
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+
+ /**
+ * <p>The login password for this subscription.</p>
+ */
+ private String password = null;
+
+ /**
+ * @return Returns the password.
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+ /**
+ * @param password The password to set.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ /**
+ * <p>The type for this subscription.</p>
+ */
+ private String type = null;
+
+ /**
+ * @return Returns the type.
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * @param type The type to set.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+
+ /**
+ * <p>The logon username for this subscription.</p>
+ */
+ private String username = null;
+
+ /**
+ * @return Returns the username.
+ */
+ public String getUsername() {
+ return this.username;
+ }
+
+ /**
+ * @param username The username to set.
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ // ---------------------------------------------------------- Event Handlers
+
+
+ /**
+ * <p>Return to the appropriate page depending on the current mode.</p>
+ */
+ public String cancel() {
+
+ if ("CREATE".equals(getState().getMode())) {
+ return "welcome";
+ } else {
+ getState().setMode("EDIT");
+ return "registration";
+ }
+
+ }
+
+
+ /**
+ * <p>Create or update the user information.</p>
+ */
+ public String save() {
+
+ State state = getState();
+ UserDatabase database = getUserDatabase();
+ String mode = state.getMode();
+ User user = state.getUser();
+ org.apache.struts.apps.mailreader.dao.Subscription subscription =
+ user.findSubscription(state.getHost());
+
+ if ("CREATE".equals(mode)) {
+
+ // Verify that the proposed hostname is not already taken
+ if (user.findSubscription(host) != null) {
+ // FIXME - localization
+ getFacesContext().addMessage("subscription:host",
+ new FacesMessage("That hostname is already defined"));
+ return null;
+ }
+
+ // Create a new subscription
+ subscription = user.createSubscription(host);
+ Registration registration = (Registration)getBean("registration");
+ user = getState().getUser();
+ registration.setFromAddress(user.getFromAddress());
+ registration.setFullName(user.getFullName());
+ registration.setPassword(user.getPassword());
+ registration.setPassword2(user.getPassword());
+ registration.setReplyToAddress(user.getReplyToAddress());
+ registration.setSubscriptions(user.getSubscriptions());
+ registration.setUsername(user.getUsername());
+
+ } else if ("DELETE".equals(mode)) {
+
+ user.removeSubscription(subscription);
+ try {
+ database.save();
+ } catch (Exception e) {
+ getFacesContext().addMessage(null,
+ new FacesMessage(e.getMessage()));
+ log.error("Database save exception", e);
+ return null;
+ }
+ state.setMode("EDIT");
+ return "registration";
+
+ } else /* if ("EDIT".equals(mode)) */ {
+
+ ; // No special action required
+
+ }
+
+ // Copy the remaining properties
+ subscription.setUsername(username);
+ subscription.setPassword(password);
+ subscription.setType(type);
+ subscription.setAutoConnect(autoConnect);
+
+ // Save the updated information to the database
+ try {
+ database.save();
+ } catch (Exception e) {
+ getFacesContext().addMessage(null,
+ new FacesMessage(e.getMessage()));
+ log.error("Database save exception", e);
+ return null;
+ }
+
+ // Return to the registration page
+ state.setMode("EDIT");
+ return "registration";
+
+ }
+
+
+ // -------------------------------------------------- ViewController Methods
+
+
+ /**
+ * <p>If this is not a postack, and we are in DELETE or EDIT mode,
+ * prepopulate the field values for the subscription update form.</p>
+ */
+ public void prerender() {
+
+ State state = getState();
+
+ // If we are not in DELETE or EDIT mode, there is nothing to do
+ if (!"DELETE".equals(state.getMode()) &&
+ !"EDIT".equals(state.getMode())) {
+ return;
+ }
+
+ // The first time in, prepopulate our input field values
+ User user = state.getUser();
+ org.apache.struts.apps.mailreader.dao.Subscription subscription =
+ user.findSubscription(state.getHost());
+ if (!isPostBack()) {
+ setHost(subscription.getHost());
+ setUsername(subscription.getUsername());
+ setPassword(subscription.getPassword());
+ setType(subscription.getType());
+ setAutoConnect(subscription.getAutoConnect());
+ }
+
+ }
+
+
+}
Propchange: shale/sandbox/shale-clay-mailreader/src/main/java/org/apache/shale/examples/mailreader/Subscription.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties Mon Aug 7 20:22:45 2006
@@ -0,0 +1,111 @@
+# ==============================================================================
+# Copyright 2002-2005 The 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.
+# ==============================================================================
+#
+button.add=Add New
+button.cancel=Cancel
+button.confirm=Confirm
+button.delete=Delete
+button.edit=Edit
+button.logon=Log On
+button.reset=Reset
+button.save=Save
+button.update=Update
+change.message=Your password has expired. Please ask the system administrator to change it.
+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.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>
+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.ioException=I/O exception rendering error messages: {0}
+expired.password=User Password has expired for {0}
+heading.autoConnect=Auto
+heading.subscriptions=Current Subscriptions
+heading.host=Host Name
+heading.user=User Name
+heading.type=Server Type
+heading.action=Action
+index.heading=MailReader Demonstration Application Options
+index.logon=Log on to the MailReader Demonstration Application
+index.registration=Register with the MailReader Demonstration Application
+index.title=MailReader Demonstration Application
+index.tour=A Walking Tour of the Example Application
+linkSubscription.io=I/O Error: {0}
+linkSubscription.noSubscription=No subscription under attribute {0}
+linkUser.io=I/O Error: {0}
+linkUser.noUser=No user under attribute {0}
+logon.footer=Enter your username and password, and press the Log On button
+logon.header=Logon Form
+logon.title=MailReader Demonstration Application - Logon
+mainMenu.heading=Main Menu Options for
+mainMenu.logoff=Log off MailReader Demonstration Application
+mainMenu.registration=Edit your user registration profile
+mainMenu.title=MailReader Demonstration Application - Main Menu
+option.imap=IMAP Protocol
+option.pop3=POP3 Protocol
+prompt.autoConnect=Auto Connect:
+prompt.fromAddress=From Address:
+prompt.fullName=Full Name:
+prompt.mailHostname=Mail Server:
+prompt.mailPassword=Mail Password:
+prompt.mailServerType=Server Type:
+prompt.mailUsername=Mail Username:
+prompt.password=Password:
+prompt.password2=(Repeat) Password:
+prompt.replyToAddress=Reply To Address:
+prompt.username=Username:
+registration.addSubscription=Add
+registration.deleteSubscription=Delete
+registration.editSubscription=Edit
+registration.header.create=Enter Registration Information
+registration.header.edit=Edit Your Registration Information
+registration.title.create=Register for the MailReader Demonstration Application
+registration.title.edit=Edit Registration for the MailReader Demonstration Application
+subscription.title.create=Create New Mail Subscription
+subscription.title.delete=Delete Existing Mail Subscription
+subscription.title.edit=Edit Existing Mail Subscription
+
+# Standard error messages for validator framework checks
+errors.required={0} is required.
+errors.minlength={0} cannot be less than {1} characters.
+errors.maxlength={0} cannot be greater than {1} characters.
+errors.invalid={0} is invalid.
+errors.byte={0} must be an byte.
+errors.short={0} must be an short.
+errors.integer={0} must be an integer.
+errors.long={0} must be an long.
+errors.float={0} must be an float.
+errors.double={0} must be an double.
+errors.date={0} is not a date.
+errors.range={0} is not in the range {1} through {2}.
+errors.creditcard={0} is not a valid credit card number.
+errors.email={0} is an invalid e-mail address.
Propchange: shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties?rev=429552&view=auto
==============================================================================
--- shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties (added)
+++ shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties Mon Aug 7 20:22:45 2006
@@ -0,0 +1,110 @@
+# ==============================================================================
+# Copyright 2002,2004 The 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.
+# ==============================================================================
+#
+button.cancel=\u30ad\u30e3\u30f3\u30bb\u30eb
+button.confirm=\u78ba\u8a8d
+button.reset=\u30ea\u30bb\u30c3\u30c8
+button.save=\u4fdd\u5b58
+change.message=\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F\u3002\u30B7\u30B9\u30C6\u30E0\u7BA1\u7406\u8005\u306B\u304A\u554F\u3044\u5408\u308F\u305B\u4E0B\u3055\u3044
+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.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>
+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.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
+heading.subscriptions=\u73fe\u5728\u306e\u8cfc\u8aad\u60c5\u5831
+heading.host=\u30db\u30b9\u30c8\u540d
+heading.user=\u30e6\u30fc\u30b6\u540d
+heading.type=\u30b5\u30fc\u30d0\u30bf\u30a4\u30d7
+heading.action=\u64cd\u4f5c
+index.heading=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 \u30aa\u30d7\u30b7\u30e7\u30f3
+index.logon=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30ed\u30b0\u30aa\u30f3
+index.registration=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e6\u30fc\u30b6\u767b\u9332
+index.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3(Struts 1.1-dev)
+index.tour=\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6563\u7b56\u3059\u308b
+linkSubscription.io=I/O\u30a8\u30e9\u30fc: {0}
+linkSubscription.noSubscription=\u5c5e\u6027 {0} \u306b\u8cfc\u8aad\u60c5\u5831\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
+linkUser.io=I/O\u30a8\u30e9\u30fc: {0}
+linkUser.noUser=\u5c5e\u6027 {0} \u306b\u30e6\u30fc\u30b6\u60c5\u5831\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
+logon.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30ed\u30b0\u30aa\u30f3
+mainMenu.heading=\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
+mainMenu.logoff=MailReader \u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u30aa\u30d5
+mainMenu.registration=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6
+mainMenu.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
+option.imap=IMAP \u30d7\u30ed\u30c8\u30b3\u30eb
+option.pop3=POP3 \u30d7\u30ed\u30c8\u30b3\u30eb
+prompt.autoConnect=\u81ea\u52d5\u63a5\u7d9a
+prompt.fromAddress=From\u30a2\u30c9\u30ec\u30b9
+prompt.fullName=\u30d5\u30eb\u30cd\u30fc\u30e0
+prompt.mailHostname=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0
+prompt.mailPassword=\u30e1\u30fc\u30eb\u30d1\u30b9\u30ef\u30fc\u30c9
+prompt.mailServerType=\u30b5\u30fc\u30d0\u30bf\u30a4\u30d7
+prompt.mailUsername=\u30e1\u30fc\u30eb\u30e6\u30fc\u30b6\u540d
+prompt.password=\u30d1\u30b9\u30ef\u30fc\u30c9
+prompt.password2=\u30d1\u30b9\u30ef\u30fc\u30c9(\u78ba\u8a8d\u7528)
+prompt.replyToAddress=\u8fd4\u4fe1\u30a2\u30c9\u30ec\u30b9
+prompt.username=\u30e6\u30fc\u30b6\u540d
+registration.addSubscription=\u65b0\u898f\u4f5c\u6210
+registration.deleteSubscription=\u524a\u9664
+registration.editSubscription=\u7de8\u96c6
+registration.title.create=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e6\u30fc\u30b6\u767b\u9332
+registration.title.edit=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6
+subscription.title.create=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u65b0\u898f\u4f5c\u6210
+subscription.title.delete=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u524a\u9664
+subscription.title.edit=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u7de8\u96c6
+
+# Standard error messages for validator framework checks
+errors.required={0} \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+errors.minlength={0} \u306f {1} \u6587\u5b57\u4ee5\u4e0a\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.maxlength={0} \u306f {2} \u6587\u5b57\u4ee5\u4e0b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.invalid={0} \u306f\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.byte={0} \u306fbyte\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.short={0} \u306fshort\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.integer={0} \u306finteger\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.long={0} \u306flong\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.float={0} \u306ffloat\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.double={0} \u306fdouble\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.date={0} \u306f\u65e5\u4ed8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.range={0} \u306f {1} \u304b\u3089 {2} \u306e\u9593\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.creditcard={0} \u306f\u6b63\u3057\u3044\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.email={0} \u306f\u6b63\u3057\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+
+logon.footer=\u30E6\u30FC\u30B6\u540D\u3068\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u30ED\u30B0\u30AA\u30F3\u30DC\u30BF\u30F3\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044
+
+logon.header=\u30ED\u30B0\u30AA\u30F3\u30D5\u30A9\u30FC\u30E0
+
+registration.header.create=\u767B\u9332\u60C5\u5831\u5165\u529B
+
+registration.header.edit=\u767B\u9332\u60C5\u5831\u7DE8\u96C6
Propchange: shale/sandbox/shale-clay-mailreader/src/main/resources/org/apache/shale/examples/mailreader/ApplicationResources_ja.properties
------------------------------------------------------------------------------
svn:eol-style = native