svnno****@sourc*****
svnno****@sourc*****
2007年 4月 18日 (水) 15:40:58 JST
Revision: 57 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=57 Author: shinsuke Date: 2007-04-18 15:40:57 +0900 (Wed, 18 Apr 2007) Log Message: ----------- prototype implementation for wcm feature. Added Paths: ----------- pal-wcm/trunk/.classpath pal-wcm/trunk/.project pal-wcm/trunk/.settings/ pal-wcm/trunk/.settings/org.eclipse.core.resources.prefs pal-wcm/trunk/.settings/org.eclipse.jdt.core.prefs pal-wcm/trunk/.settings/org.eclipse.jdt.ui.prefs pal-wcm/trunk/LICENSE.TXT pal-wcm/trunk/pom.xml pal-wcm/trunk/src/ pal-wcm/trunk/src/main/ pal-wcm/trunk/src/main/java/ pal-wcm/trunk/src/main/java/jp/ pal-wcm/trunk/src/main/java/jp/sf/ pal-wcm/trunk/src/main/java/jp/sf/pal/ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/PALWcmConstants.java pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java pal-wcm/trunk/src/main/resources/ pal-wcm/trunk/src/main/webapp/ pal-wcm/trunk/src/main/webapp/WEB-INF/ pal-wcm/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml pal-wcm/trunk/src/main/webapp/WEB-INF/portlet.xml pal-wcm/trunk/src/main/webapp/WEB-INF/web.xml pal-wcm/trunk/src/main/webapp/view/ pal-wcm/trunk/src/main/webapp/view/wcm/ pal-wcm/trunk/src/main/webapp/view/wcm/wcmEdit.jsp pal-wcm/trunk/src/main/webapp/view/wcm/wcmView.jsp -------------- next part -------------- Added: pal-wcm/trunk/.classpath =================================================================== --- pal-wcm/trunk/.classpath 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/.classpath 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,15 @@ +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/main/resources"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/org/apache/pluto/pluto/1.0.1/pluto-1.0.1.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/portals/jetspeed-2/jetspeed-api/2.2-dev/jetspeed-api-2.2-dev.jar"/> + <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar" sourcepath="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar" sourcepath="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2-sources.jar"/> +</classpath> \ No newline at end of file Property changes on: pal-wcm/trunk/.classpath ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/.project =================================================================== --- pal-wcm/trunk/.project 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/.project 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,14 @@ +<projectDescription> + <name>pal-wcm</name> + <comment></comment> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Property changes on: pal-wcm/trunk/.project ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/.settings/org.eclipse.core.resources.prefs =================================================================== --- pal-wcm/trunk/.settings/org.eclipse.core.resources.prefs 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/.settings/org.eclipse.core.resources.prefs 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,3 @@ +#Fri Nov 24 23:23:40 JST 2006 +eclipse.preferences.version=1 +encoding/<project>=UTF-8 Added: pal-wcm/trunk/.settings/org.eclipse.jdt.core.prefs =================================================================== --- pal-wcm/trunk/.settings/org.eclipse.jdt.core.prefs 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/.settings/org.eclipse.jdt.core.prefs 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,7 @@ +#Fri Nov 24 23:23:41 JST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 Added: pal-wcm/trunk/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- pal-wcm/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,13 @@ +#Thu Jun 08 20:38:39 JST 2006 +eclipse.preferences.version=1 +formatter_settings_version=8 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates><template id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment" description\="Comment for getter method" context\="gettercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment" description\="Comment for setter method" context\="settercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment" description\="Comment for created constructors" context\="constructorcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment" description\="Comment for created Java files" context\="filecomment_context" enabled\="true" deleted\="false" autoinsert\="false">/*\r\n * Copyright 2004-2006 the Seasar Foundation and the Others.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, \r\n * either express or implied. See the License for the specific language\r\n * governing permissions and limitations under the License.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment" description\="Comment for created types" context\="typecomment_context" enabled\="true" deleted\="false" autoinsert true">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment" description\="Comment for fields" context\="fieldcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * \r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment" description\="Comment for non-overriding methods" context\="methodcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment" description\="Comment for overriding methods" context\="overridecomment_context" enabled\="true" deleted\="false" autoinsert\="true">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype" description\="Newly created files" context\="newtype_context" enabled\="true" deleted\="false" autoinsert\="false">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock" description\="Code in new catch blocks" context\="catchblock_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody" description\="Code in created method stubs" context\="methodbody_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody" description\="Code in created constructor stubs" context\="constructorbody_context" enabled\="true" deleted\="false" autoinsert\="true">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template id\="org.eclipse.jd i.text.codetemplates.getterbody" name\="getterbody" description\="Code in created getters" context\="getterbody_context" enabled\="true" deleted\="false" autoinsert\="true">return ${field};</template><template id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody" description\="Code in created setters" context\="setterbody_context" enabled\="true" deleted\="false" autoinsert\="true">${field} \= ${param};</template></templates> Added: pal-wcm/trunk/LICENSE.TXT =================================================================== --- pal-wcm/trunk/LICENSE.TXT 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/LICENSE.TXT 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,190 @@ + 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 2004 The Apache Software Foundation + Added: pal-wcm/trunk/pom.xml =================================================================== --- pal-wcm/trunk/pom.xml 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/pom.xml 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,235 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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> + <groupId>jp.sf.pal</groupId> + <artifactId>pal-wcm</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>war</packaging> + <name>Web Content Management tools for PAL Portal</name> + <description/> + <url>http://pal.sourceforge.jp/</url> + <inceptionYear>2005</inceptionYear> + <developers> + <developer> + <id>shinsuke</id> + <name>Shinsuke Sugaya</name> + <email>shinsuke_at_yahoo.co.jp</email> + <url>http://d.hatena.ne.jp/shinsuke_sugaya/</url> + <organization/> + <organizationUrl/> + <timezone>+9</timezone> + </developer> + </developers> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + <scm> + <connection>scm:cvs:pserver:anony****@cvs*****:/cvsroot/pal:pal-wcm</connection> + <developerConnection>scm:cvs:pserver:anony****@cvs*****:/cvsroot/pal:pal-wcm</developerConnection> + <url>http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pal/pal-wcm</url> + </scm> + <organization> + <name>Portal Application Laboratory</name> + <url>http://pal.sourceforge.jp/</url> + </organization> + <build> + <finalName>pal-wcm</finalName> + <defaultGoal>validate</defaultGoal> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + <encoding>UTF-8</encoding> + </configuration> + </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <updateReleaseInfo>true</updateReleaseInfo> + </configuration> + </plugin> +<!-- + <plugin> + <artifactId>maven-site-plugin</artifactId> + <configuration> + <outputEncodinf>UTF-8</outputEncodinf> + </configuration> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <forkMode>none</forkMode> + </configuration> + </plugin> + --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>2.0-SNAPSHOT</version> + <executions> + <execution> + <goals> + <goal>clean</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>source-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> +<!-- + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <id>javadoc-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + <configuration> + <charset>UTF-8</charset> + </configuration> + </plugin> +--> + </plugins> + </build> + <repositories> + <repository> + <id>maven.marevol.com</id> + <name>Maven2 Repository on marevol.com</name> + <url>http://www.marevol.com/maven2</url> + </repository> + <repository> + <id>maven.seasar.org</id> + <name>The Seasar Foundation Maven2 Repository</name> + <url>http://maven.seasar.org/maven2</url> + </repository> + </repositories> + <dependencies> + <dependency> + <groupId>portlet-api</groupId> + <artifactId>portlet-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>jstl</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>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <type>jar</type> + </dependency> +<!-- Jetspeed2 --> + <dependency> + <groupId>org.apache.portals.jetspeed-2</groupId> + <artifactId>jetspeed-api</artifactId> + <version>2.2-dev</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.pluto</groupId> + <artifactId>pluto</artifactId> + <version>1.0.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <scope>provided</scope> + </dependency> + </dependencies> + <reporting> + <plugins> + <plugin> + <artifactId>maven-project-info-reports-plugin</artifactId> + </plugin> +<!-- + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>surefire-report-maven-plugin</artifactId> + </plugin> + --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>changelog-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>taglist-maven-plugin</artifactId> + <configuration> + <tags> + <tag>FIXME</tag> + <tag>TODO</tag> + <tag>XXX</tag> + </tags> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>2.0-SNAPSHOT</version> +<!-- + <configuration> + <outputDirectory>${project.build.directory}/site/cobertura</outputDirectory> + </configuration> + --> + </plugin> +<!-- + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-clover-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-pmd-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-checkstyle-plugin</artifactId> + </plugin> + --> + </plugins> + </reporting> +</project> Property changes on: pal-wcm/trunk/pom.xml ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/PALWcmConstants.java =================================================================== --- pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/PALWcmConstants.java 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/PALWcmConstants.java 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,19 @@ +package jp.sf.pal.wcm; + +/** + * @author shinsuke + * + */ +public class PALWcmConstants +{ + public static final String PREFIX = "jp.sf.pal.wcm."; + + public static final String TITLE = PREFIX + "Title"; + + public static final String CONTENT = PREFIX + "Content"; + + public static final String FRAGMENT_ID = PREFIX + "FragmentId"; + + public static final String PORTAL_CONTEXT_PATH = PREFIX + + "PortalContextPath"; +} Property changes on: pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/PALWcmConstants.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java =================================================================== --- pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,261 @@ +/* + * Copyright 2000-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. + */ +package jp.sf.pal.wcm.portlet; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.GenericPortlet; +import javax.portlet.PortletConfig; +import javax.portlet.PortletException; +import javax.portlet.PortletMode; +import javax.portlet.PortletRequest; +import javax.portlet.PortletRequestDispatcher; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import jp.sf.pal.wcm.PALWcmConstants; + +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.jetspeed.CommonPortletServices; +import org.apache.jetspeed.PortalReservedParameters; +import org.apache.jetspeed.om.page.ContentFragment; +import org.apache.jetspeed.om.page.ContentPage; +import org.apache.jetspeed.om.page.Fragment; +import org.apache.jetspeed.om.preference.FragmentPreference; +import org.apache.jetspeed.page.PageManager; +import org.apache.jetspeed.page.PageNotUpdatedException; +import org.apache.jetspeed.page.document.NodeException; +import org.apache.jetspeed.request.RequestContext; + +/** + * HelloWorldPortlet is a portlet to say "Hello!" + * + * @author <a href="mailto:shins****@yahoo*****">Shinsuke Sugaya</a> + */ +public class PALWcmPortlet extends GenericPortlet +{ + /** + * Logger for this class + */ + private static final Log log = LogFactory.getLog(PALWcmPortlet.class); + + private PageManager pageManager; + + /* (non-Javadoc) + * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig) + */ + public void init(PortletConfig config) throws PortletException + { + super.init(config); + + // pageManager + pageManager = (PageManager) getPortletContext().getAttribute( + CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT); + if (null == pageManager) + { + throw new PortletException( + "Failed to find the Page Manager on portlet initialization"); + } + } + + /* (non-Javadoc) + * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse) + */ + protected void doView(RenderRequest request, RenderResponse response) + throws PortletException, IOException + { + response.setContentType("text/html"); + + Fragment fragment = getCurrentFragment(request); + String title = getFragmentPreferenceValue(fragment, + PALWcmConstants.TITLE, ""); + String content = getFragmentPreferenceValue(fragment, + PALWcmConstants.CONTENT, ""); + + response.setTitle(title); + request.setAttribute(PALWcmConstants.CONTENT, content); + + PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher( + "/view/wcm/wcmView.jsp"); + rd.include(request, response); + } + + /* (non-Javadoc) + * @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest, javax.portlet.RenderResponse) + */ + protected void doEdit(RenderRequest request, RenderResponse response) + throws PortletException, IOException + { + response.setContentType("text/html"); + + Fragment fragment = getCurrentFragment(request); + String title = getFragmentPreferenceValue(fragment, + PALWcmConstants.TITLE, ""); + String content = getFragmentPreferenceValue(fragment, + PALWcmConstants.CONTENT, ""); + String fragmentId = fragment.getId(); + + response.setTitle(title); + request.setAttribute(PALWcmConstants.TITLE, title); + request.setAttribute(PALWcmConstants.CONTENT, StringEscapeUtils + .escapeJavaScript(content)); + request.setAttribute(PALWcmConstants.FRAGMENT_ID, fragmentId); + request.setAttribute(PALWcmConstants.PORTAL_CONTEXT_PATH, + getPortalContextPath(request)); + + PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher( + "/view/wcm/wcmEdit.jsp"); + rd.include(request, response); + } + + /* (non-Javadoc) + * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse) + */ + public void processAction(ActionRequest request, ActionResponse response) + throws PortletException, IOException + { + if (PortletMode.VIEW.equals(request.getPortletMode())) + { + processView(request, response); + } + else if (PortletMode.EDIT.equals(request.getPortletMode())) + { + processEdit(request, response); + } + else + { + log.warn("Invalid action prcess."); + } + } + + protected void processView(ActionRequest request, ActionResponse response) + throws PortletException, IOException + { + //nothing + } + + protected void processEdit(ActionRequest request, ActionResponse response) + throws PortletException, IOException + { + String title = request.getParameter(PALWcmConstants.TITLE); + String content = request.getParameter(PALWcmConstants.CONTENT); + String fragmentId = request.getParameter(PALWcmConstants.FRAGMENT_ID); + + // TODO check above + + ContentPage page = getCurrentPage(request); + Fragment fragment = page.getFragmentById(fragmentId); + + setFragmentPreferenceValue(fragment, PALWcmConstants.TITLE, title); + setFragmentPreferenceValue(fragment, PALWcmConstants.CONTENT, content); + + try + { + pageManager.updatePage(page); + } + catch (PageNotUpdatedException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + catch (NodeException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private String getPortalContextPath(PortletRequest request) + { + RequestContext requestContext = (RequestContext) request + .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE); + return requestContext.getRequest().getContextPath(); + } + + private ContentPage getCurrentPage(PortletRequest request) + { + RequestContext requestContext = (RequestContext) request + .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE); + return requestContext.getPage(); + } + + private ContentFragment getCurrentFragment(RenderRequest request) + { + return (ContentFragment) request + .getAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE); + } + + private FragmentPreference getFragmentPreferenceByName(Fragment fragment, + String name) + { + if (name == null) + { + return null; + } + List preferences = fragment.getPreferences(); + for (Iterator ite = preferences.iterator(); ite.hasNext();) + { + FragmentPreference fp = (FragmentPreference) ite.next(); + if (fp.getName() != null && fp.getName().equals(name)) + { + return fp; + } + } + return null; + } + + private void setFragmentPreferenceValue(Fragment fragment, String name, + String value) + { + FragmentPreference fp = getFragmentPreferenceByName(fragment, name); + if (fp == null) + { + fp = pageManager.newFragmentPreference(); + fp.setName(name); + fp.setReadOnly(false); + List list = new ArrayList(); + list.add(StringEscapeUtils.escapeXml(value)); + fp.setValueList(list); + fragment.getPreferences().add(fp); + } + else + { + fp.getValueList().set(0, StringEscapeUtils.escapeXml(value)); + } + } + + private String getFragmentPreferenceValue(Fragment fragment, String name, + String defaultValue) + { + FragmentPreference fp = getFragmentPreferenceByName(fragment, name); + if (fp != null) + { + if (fp.getValueList().size() > 0) + { + return StringEscapeUtils.unescapeXml((String) fp.getValueList() + .get(0)); + } + } + return defaultValue; + } +} Property changes on: pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml =================================================================== --- pal-wcm/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<portlet-app id="pal-wcm" version="1.0" + xmlns="http://portals.apache.org/jetspeed" + xmlns:js="http://portals.apache.org/jetspeed" + xmlns:dc="http://www.purl.org/dc" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/jetspeed-portlet.xsd"> + + <dc:title>WCM Portlet for PAL</dc:title> + <dc:title xml:lang="ja">PALポータル用 WCM ポートレット</dc:title> + <dc:creator>PAL Team</dc:creator> + + <js:services> + <js:service name='PageManager'/> + </js:services> + +</portlet-app> Property changes on: pal-wcm/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- pal-wcm/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<portlet-app id="pal-wcm" version="1.0" + xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"> + + <portlet id="PALWcmPortlet"> + <description>Web Content Management for PAL Portal</description> + <description xml:lang="ja">PALポータル用 Web コンテンツ管理</description> + <portlet-name>PALWcmPortlet</portlet-name> + <display-name>WCM for PALPortal</display-name> + <display-name xml:lang="ja">PALポータル用 WCM</display-name> + <portlet-class>jp.sf.pal.wcm.portlet.PALWcmPortlet</portlet-class> + <expiration-cache>-1</expiration-cache> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + <portlet-mode>EDIT</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <supported-locale>ja</supported-locale> + <portlet-info> + <title>WCM</title> + <short-title>WCM</short-title> + <keywords>WCM,CMS</keywords> + </portlet-info> + </portlet> + +</portlet-app> + Property changes on: pal-wcm/trunk/src/main/webapp/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/webapp/WEB-INF/web.xml =================================================================== --- pal-wcm/trunk/src/main/webapp/WEB-INF/web.xml 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/webapp/WEB-INF/web.xml 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>WCM Portlet</display-name> + <description>Web Content Management for PAL Portal.</description> +</web-app> Property changes on: pal-wcm/trunk/src/main/webapp/WEB-INF/web.xml ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/webapp/view/wcm/wcmEdit.jsp =================================================================== --- pal-wcm/trunk/src/main/webapp/view/wcm/wcmEdit.jsp 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/webapp/view/wcm/wcmEdit.jsp 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,50 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--%> +<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> +<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> +<%@page import="jp.sf.pal.wcm.PALWcmConstants"%> +<portlet:defineObjects/> +<portlet:renderURL var="closeUrl" portletMode="view"></portlet:renderURL> + +<div style="z-index:100;border-left:1px solid #999999;border-top:1px solid #999999;border-bottom:4px solid #999999;border-right:4px solid #999999;width:750px;height:500px;position:absolute; top:30px; left:30px;background-color:white;"> + <form id="<portlet:namespace/>FCKeditorForm" action="<portlet:actionURL />" method="POST"> + <input type="hidden" name="<%= PALWcmConstants.FRAGMENT_ID %>" + value="<%= renderRequest.getAttribute(jp.sf.pal.wcm.PALWcmConstants.FRAGMENT_ID) %>"/> + <div style="float:left;height:20px"> + Title: + <input type="text" name="<%= PALWcmConstants.TITLE %>" + value="<%= renderRequest.getAttribute(jp.sf.pal.wcm.PALWcmConstants.TITLE) %>" /> + </div> + <div style="float:right;height:20px"> + <a href="<%= closeUrl %>">Close</a> + </div> + + <div style="clear:both;"> +<script type="text/javascript" src="<%= renderRequest.getAttribute(jp.sf.pal.wcm.PALWcmConstants.PORTAL_CONTEXT_PATH) %>/fckeditor/fckeditor.js"></script> +<script type="text/javascript"> +<!-- +var <portlet:namespace/>FCKeditor = new FCKeditor("<%= PALWcmConstants.CONTENT %>"); +<portlet:namespace/>FCKeditor.BasePath = "<%= renderRequest.getAttribute(jp.sf.pal.wcm.PALWcmConstants.PORTAL_CONTEXT_PATH) %>/fckeditor/"; +<portlet:namespace/>FCKeditor.Value = "<%= renderRequest.getAttribute(PALWcmConstants.CONTENT) %>"; +<portlet:namespace/>FCKeditor.Height = 480; +<portlet:namespace/>FCKeditor.Create(); +//--> +</script> + </div> + + </form> +</div> Property changes on: pal-wcm/trunk/src/main/webapp/view/wcm/wcmEdit.jsp ___________________________________________________________________ Name: svn:eol-style + native Added: pal-wcm/trunk/src/main/webapp/view/wcm/wcmView.jsp =================================================================== --- pal-wcm/trunk/src/main/webapp/view/wcm/wcmView.jsp 2007-04-18 06:37:28 UTC (rev 56) +++ pal-wcm/trunk/src/main/webapp/view/wcm/wcmView.jsp 2007-04-18 06:40:57 UTC (rev 57) @@ -0,0 +1,16 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--%><%= request.getAttribute(jp.sf.pal.wcm.PALWcmConstants.CONTENT) %>