[pal-cvs 2203] [12] moved cms-portlets project from cvs

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2007年 4月 5日 (木) 15:17:19 JST


Revision: 12
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=12
Author:   shinsuke
Date:     2007-04-05 15:17:13 +0900 (Thu, 05 Apr 2007)

Log Message:
-----------
moved cms-portlets project from cvs

Added Paths:
-----------
    cms-portlets/trunk/.classpath
    cms-portlets/trunk/.project
    cms-portlets/trunk/.settings/
    cms-portlets/trunk/.settings/org.eclipse.core.resources.prefs
    cms-portlets/trunk/.settings/org.eclipse.jdt.core.prefs
    cms-portlets/trunk/.settings/org.eclipse.jdt.ui.prefs
    cms-portlets/trunk/.tomcatplugin
    cms-portlets/trunk/build.xml
    cms-portlets/trunk/pom.xml
    cms-portlets/trunk/src/
    cms-portlets/trunk/src/java/
    cms-portlets/trunk/src/java/jp/
    cms-portlets/trunk/src/java/jp/sf/
    cms-portlets/trunk/src/java/jp/sf/pal/
    cms-portlets/trunk/src/java/jp/sf/pal/cms/
    cms-portlets/trunk/src/java/jp/sf/pal/cms/beans/
    cms-portlets/trunk/src/main/
    cms-portlets/trunk/src/main/java/
    cms-portlets/trunk/src/main/java/jp/
    cms-portlets/trunk/src/main/java/jp/sf/
    cms-portlets/trunk/src/main/java/jp/sf/pal/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSConstants.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSException.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/beans/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/DtoCreator.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FileNodeDao.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FolderNodeDao.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ObjectNodeDao.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/PageNodeDao.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ScopeNodeDao.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FileNodeDaoImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FolderNodeDaoImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ObjectNodeDaoImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/PageNodeDaoImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ScopeNodeDaoImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FileNodeDto.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FolderNodeDto.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ObjectNodeDto.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/PageNodeDto.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ScopeNodeDto.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/DownloadHelper.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/DownloadHelperImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/CMSPortlet.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/HtmlRewriter.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/RewriteHandler.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/RewriteHandlerImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/HtmlRewriterImpl.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/FileServlet.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/CMSUtil.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFilePage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFolderPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFileDetailPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderDetailPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderListPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/UploadFilePage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteHtmlContentPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteTextContentPage.java
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/
    cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/DisplayContentPage.java
    cms-portlets/trunk/src/main/resources/
    cms-portlets/trunk/src/main/resources/aop.dicon
    cms-portlets/trunk/src/main/resources/app.dicon
    cms-portlets/trunk/src/main/resources/convention.dicon
    cms-portlets/trunk/src/main/resources/creator.dicon
    cms-portlets/trunk/src/main/resources/customizer.dicon
    cms-portlets/trunk/src/main/resources/env.txt
    cms-portlets/trunk/src/main/resources/jp/
    cms-portlets/trunk/src/main/resources/jp/sf/
    cms-portlets/trunk/src/main/resources/jp/sf/pal/
    cms-portlets/trunk/src/main/resources/jp/sf/pal/cms/
    cms-portlets/trunk/src/main/resources/jp/sf/pal/cms/CMS.dicon
    cms-portlets/trunk/src/main/resources/s2container.dicon
    cms-portlets/trunk/src/main/resources/teedaCustomize.dicon
    cms-portlets/trunk/src/main/resources/teedaErrorPage.dicon
    cms-portlets/trunk/src/main/webapp/
    cms-portlets/trunk/src/main/webapp/WEB-INF/
    cms-portlets/trunk/src/main/webapp/WEB-INF/faces-config.xml
    cms-portlets/trunk/src/main/webapp/WEB-INF/portlet.xml
    cms-portlets/trunk/src/main/webapp/WEB-INF/repository.xml
    cms-portlets/trunk/src/main/webapp/WEB-INF/web.xml
    cms-portlets/trunk/src/main/webapp/view/
    cms-portlets/trunk/src/main/webapp/view/editor/
    cms-portlets/trunk/src/main/webapp/view/editor/createNewFile.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/createNewFolder.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/displayFileDetail.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/displayFolderDetail.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/displayFolderList.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/uploadFile.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/writeHtmlContent.jsp
    cms-portlets/trunk/src/main/webapp/view/editor/writeTextContent.jsp
    cms-portlets/trunk/src/main/webapp/view/viewer/
    cms-portlets/trunk/src/main/webapp/view/viewer/displayContent.jsp
    cms-portlets/trunk/src/webapp/
    cms-portlets/trunk/src/webapp/WEB-INF/
    cms-portlets/trunk/src/webapp/WEB-INF/cms/
    cms-portlets/trunk/src/webapp/jsp/


-------------- next part --------------
Added: cms-portlets/trunk/.classpath
===================================================================
--- cms-portlets/trunk/.classpath	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.classpath	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,51 @@
+<classpath>
+  <classpathentry kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/java"/>
+  <classpathentry kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
+  <classpathentry kind="src" path="src/main/webapp/view"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/jp/sf/pal/faces-dev-filter/0.1-SNAPSHOT/faces-dev-filter-0.1-SNAPSHOT.jar" sourcepath="M2_REPO/jp/sf/pal/faces-dev-filter/0.1-SNAPSHOT/faces-dev-filter-0.1-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar" sourcepath="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/marevol/marevol-faces-utils/0.3/marevol-faces-utils-0.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.8/log4j-1.2.8.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/jp/sf/pal/bridges-myfaces/0.8/bridges-myfaces-0.8.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/seasar/container/s2-extension/2.4.5/s2-extension-2.4.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-jcr-commons/1.1/jackrabbit-jcr-commons-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seasar/teeda/teeda-core/1.0.2-SNAPSHOT/teeda-core-1.0.2-SNAPSHOT.jar" sourcepath="M2_REPO/org/seasar/teeda/teeda-core/1.0.2-SNAPSHOT/teeda-core-1.0.2-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seasar/portlet/s2-portlet/1.0.6/s2-portlet-1.0.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/jcr/jcr/1.0/jcr-1.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-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"/>
+  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-core/1.1/jackrabbit-core-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/javassist/3.3.ga/javassist-3.3.ga.jar"/>
+  <classpathentry kind="var" path="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" sourcepath="M2_REPO/oro/oro/2.0.8/oro-2.0.8-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/0.9.5/nekohtml-0.9.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/pdfbox/pdfbox/0.6.4/pdfbox-0.6.4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/lucene/lucene/1.4.3/lucene-1.4.3.jar" sourcepath="M2_REPO/lucene/lucene/1.4.3/lucene-1.4.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seasar/container/s2-framework/2.4.5/s2-framework-2.4.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar" sourcepath="M2_REPO/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/myfaces/tomahawk/tomahawk/1.1.3/tomahawk-1.1.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.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/commons-fileupload/commons-fileupload/1.1/commons-fileupload-1.1.jar" sourcepath="M2_REPO/commons-fileupload/commons-fileupload/1.1/commons-fileupload-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-index-filters/1.1/jackrabbit-index-filters-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ognl/ognl/2.6.7/ognl-2.6.7.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar" sourcepath="M2_REPO/org/textmining/tm-extractors/0.4/tm-extractors-0.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-backup/1.1/jackrabbit-backup-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/seasar/jcr/s2-jcr/0.1.0-SNAPSHOT/s2-jcr-0.1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar" sourcepath="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/portals/bridges/portals-bridges-portletfilter/1.0.1-20061109/portals-bridges-portletfilter-1.0.1-20061109.jar"/>
+</classpath>


Property changes on: cms-portlets/trunk/.classpath
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/.project
===================================================================
--- cms-portlets/trunk/.project	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.project	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>cms-portlets</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature>
+	</natures>
+</projectDescription>


Property changes on: cms-portlets/trunk/.project
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/.settings/org.eclipse.core.resources.prefs
===================================================================
--- cms-portlets/trunk/.settings/org.eclipse.core.resources.prefs	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.settings/org.eclipse.core.resources.prefs	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,3 @@
+#Sat Feb 04 04:18:24 JST 2006
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: cms-portlets/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- cms-portlets/trunk/.settings/org.eclipse.jdt.core.prefs	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.settings/org.eclipse.jdt.core.prefs	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,261 @@
+#Thu Jun 08 15:03:10 JST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=false
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

Added: cms-portlets/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- cms-portlets/trunk/.settings/org.eclipse.jdt.ui.prefs	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.settings/org.eclipse.jdt.ui.prefs	2007-04-05 06:17:13 UTC (rev 12)
@@ -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 Portal Application Laboratory Team.\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" autoinse
="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.
.ui.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: cms-portlets/trunk/.tomcatplugin
===================================================================
--- cms-portlets/trunk/.tomcatplugin	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/.tomcatplugin	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tomcatProjectProperties>
+<rootDir>src/main/webapp/</rootDir>
+<exportSource>false</exportSource>
+<reloadable>false</reloadable>
+<redirectLogger>true</redirectLogger>
+<updateXml>true</updateXml>
+<warLocation></warLocation>
+<extraInfo></extraInfo>
+<webPath>/cms-portlet</webPath>
+</tomcatProjectProperties>

Added: cms-portlets/trunk/build.xml
===================================================================
--- cms-portlets/trunk/build.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/build.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="build" default="all" basedir=".">
+
+  <property name="war.name" value="cms-portlet"/>
+  <property name="src.main.webapp.webinf.classes" value="${basedir}/src/main/webapp/WEB-INF/classes"/>
+  <property name="src.main.webapp.webinf.lib" value="${basedir}/src/main/webapp/WEB-INF/lib"/>
+  <property name="target.webapp.webinf.lib" value="${basedir}/target/${war.name}/WEB-INF/lib"/>
+  <property name="target.webapp.webinf.classes" value="${basedir}/target/${war.name}/WEB-INF/classes"/>
+
+  <property name="shell.cmd" value="sh"/>
+  <property name="shell.options" value="-c"/>
+
+  <target name="check.os" 
+          description="--> Check OS">
+    <condition property="isWindows">
+      <os family="windows" />
+    </condition>
+  </target>
+
+  <target name="setup.shell" depends="check.os" if="isWindows"
+          description="--> Setup shell parameters">
+    <property name="shell.cmd" value="cmd.exe"/>
+    <property name="shell.options" value="/c"/>
+  </target>
+
+  <target name="clean" 
+          description="--> Clean Directories">
+    <delete dir="${src.main.webapp.webinf.classes}"/>
+    <delete dir="${src.main.webapp.webinf.lib}"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- SERVLET DEVELOPMENT ENVRIONMENT                                     -->
+  <!-- =================================================================== -->
+
+  <target name="servlet" depends="setup.shell,clean"
+          description="--> Setup Servlet Delopment Environment">
+
+    <delete dir="${basedir}/target"/>
+    <delete dir="${basedir}/work"/>
+
+    <!-- pom.xml -->
+    <replace
+        file="${basedir}/pom.xml"
+        token="&lt;!-- SERVLET DEV: BEGIN @@@"
+        value="&lt;!-- SERVLET DEV: BEGIN --&gt;"
+        >
+    </replace>
+    <replace
+        file="${basedir}/pom.xml"
+        token="@@@@ SERVLET DEV: END --&gt;"
+        value="&lt;!-- SERVLET DEV: END --&gt;"
+        >
+    </replace>
+
+    <!-- web.xml -->
+    <replace
+        file="${basedir}/src/main/webapp/WEB-INF/web.xml"
+        token="&lt;!-- SERVLET DEV: BEGIN @@@"
+        value="&lt;!-- SERVLET DEV: BEGIN --&gt;"
+        >
+    </replace>
+    <replace
+        file="${basedir}/src/main/webapp/WEB-INF/web.xml"
+        token="@@@@ SERVLET DEV: END --&gt;"
+        value="&lt;!-- SERVLET DEV: END --&gt;"
+        >
+    </replace>
+
+    <exec
+      executable="${shell.cmd}"
+      failonerror="true"
+      dir="${basedir}"
+      >
+      <arg line="${shell.options} 'mvn install'"/>
+    </exec>
+
+    <mkdir dir="${src.main.webapp.webinf.classes}"/>
+    <mkdir dir="${src.main.webapp.webinf.lib}"/>
+
+    <copy todir="${src.main.webapp.webinf.lib}">
+      <fileset dir="${target.webapp.webinf.lib}">
+        <include name="*.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${src.main.webapp.webinf.classes}">
+      <fileset dir="${target.webapp.webinf.classes}">
+        <include name="**"/>
+      </fileset>
+    </copy>
+
+    <delete dir="${basedir}/target"/>
+
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- PORTLET DEVELOPMENT ENVRIONMENT                                     -->
+  <!-- =================================================================== -->
+
+  <target name="portlet" depends="setup.shell,clean"
+          description="--> Setup Portlet Delopment Environment">
+
+    <delete dir="${basedir}/target"/>
+    <delete dir="${basedir}/work"/>
+
+    <!-- pom.xml -->
+    <replace
+        file="${basedir}/pom.xml"
+        token="&lt;!-- SERVLET DEV: BEGIN --&gt;"
+        value="&lt;!-- SERVLET DEV: BEGIN @@@"
+        >
+    </replace>
+    <replace
+        file="${basedir}/pom.xml"
+        token="&lt;!-- SERVLET DEV: END --&gt;"
+        value="@@@@ SERVLET DEV: END --&gt;" 
+        >
+    </replace>
+
+    <!-- web.xml -->
+    <replace
+        file="${basedir}/src/main/webapp/WEB-INF/web.xml"
+        token="&lt;!-- SERVLET DEV: BEGIN --&gt;"
+        value="&lt;!-- SERVLET DEV: BEGIN @@@"
+        >
+    </replace>
+    <replace
+        file="${basedir}/src/main/webapp/WEB-INF/web.xml"
+        token="&lt;!-- SERVLET DEV: END --&gt;"
+        value="@@@@ SERVLET DEV: END --&gt;" 
+        >
+    </replace>
+
+  </target>
+
+</project>
+


Property changes on: cms-portlets/trunk/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/pom.xml
===================================================================
--- cms-portlets/trunk/pom.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/pom.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,364 @@
+<?xml version="1.0"?>
+<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>cms-portlet</artifactId>
+  <packaging>war</packaging>
+  <version>0.4</version>
+  <name>CMS Portlet Project</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:cms-portlet
+        </connection>
+    <developerConnection>
+            scm:cvs:pserver:anony****@cvs*****:/cvsroot/pal:cms-portlet
+        </developerConnection>
+    <url>http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pal/cms-portlet</url>
+  </scm>
+  <organization>
+    <name>Portal Application Laboratory</name>
+    <url>http://pal.sourceforge.jp/</url>
+  </organization>
+  <build>
+    <finalName>cms-portlet</finalName>
+    <defaultGoal>validate</defaultGoal>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.4</source>
+            <target>1.4</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>
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshots Maven2 Repository</name>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>people.apache.org m2-snapshot</id>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </pluginRepository>
+    <pluginRepository>
+      <id>snapshots.repository.codehaus.org</id>
+      <url>http://snapshots.repository.codehaus.org</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </pluginRepository>
+  </pluginRepositories>
+  <dependencies>
+<!-- SERVLET DEV: BEGIN @@@
+    <dependency>
+      <groupId>jp.sf.pal</groupId>
+      <artifactId>faces-dev-filter</artifactId>
+      <version>0.1</version>
+      <scope>compile</scope>
+    </dependency>
+@@@@ SERVLET DEV: END -->
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+      <version>2.8.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.1.1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.3</version>
+      <scope>provided</scope>
+    </dependency>
+    <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>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.portals.bridges</groupId>
+      <artifactId>portals-bridges-portletfilter</artifactId>
+      <version>1.0.1-20070113</version>
+    </dependency>
+    <dependency>
+      <groupId>jp.sf.pal</groupId>
+      <artifactId>faces-response-filter</artifactId>
+      <version>0.2</version>
+    </dependency>
+    <dependency>
+      <groupId>jp.sf.pal</groupId>
+      <artifactId>tomahawk-bridge</artifactId>
+      <version>0.9.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.tomahawk</groupId>
+      <artifactId>tomahawk</artifactId>
+      <version>1.1.5-20061230</version>
+      <exclusions>
+        <exclusion>
+          <groupId>struts</groupId>
+          <artifactId>struts</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>com.marevol</groupId>
+      <artifactId>marevol-faces-utils</artifactId>
+      <version>0.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.seasar.container</groupId>
+      <artifactId>s2-framework</artifactId>
+      <version>2.4.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.seasar.container</groupId>
+      <artifactId>s2-extension</artifactId>
+      <version>2.4.8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.seasar.teeda</groupId>
+      <artifactId>teeda-core</artifactId>
+      <version>1.0.4-20070108</version>
+      <exclusions>
+        <exclusion>
+          <groupId>rhino</groupId>
+          <artifactId>rhino</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.seasar.portlet</groupId>
+      <artifactId>s2-portlet</artifactId>
+      <version>1.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.seasar.jcr</groupId>
+      <artifactId>s2-jcr</artifactId>
+      <version>0.1.0</version>
+    </dependency>
+<!-- Jackrabbit -->
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-core</artifactId>
+      <version>1.1</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-commons</artifactId>
+      <version>1.1</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-index-filters</artifactId>
+      <version>1.1</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-backup</artifactId>
+      <version>1.1</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>nekohtml</groupId>
+      <artifactId>nekohtml</artifactId>
+      <version>0.9.5</version>
+    </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: cms-portlets/trunk/pom.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSConstants.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSConstants.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSConstants.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms;
+
+public class CMSConstants {
+    public static final String CONSTANT_PREFIX = "jp.sf.pal.cms.";
+
+    public static final String PATH_SEPARATOR = "/";
+
+    public static final String KEY_SEPARATOR = ":";
+
+    public static final String ROOT_FOLDER = PATH_SEPARATOR;
+
+    public static final String DEFAULT_ENCODING = "UTF-8";
+
+    public static final String DEFAULT_LANG = CONSTANT_PREFIX + "DEFAULT";
+
+    public static final String DEFAULT_TEXT_MIMETYPE = "text/plain";
+
+    public static final String DEFAULT_HTML_MIMETYPE = "text/html";
+
+    public static final String DEFAULT_CONTENT_PATH = PATH_SEPARATOR
+            + "index.html";
+
+    public static final String PAGE_NAME = "page";
+
+    public static final String CONTENT_MANAGEMENT_PROTOCOL = "cmp://";
+
+    public static final String DISPLAY_FOLDER_LIST_PAGE = "DISPLAY_FOLDER_LIST_PAGE";
+
+    public static final String DISPLAY_FILE_DETAIL_PAGE = "DISPLAY_FILE_DETAIL_PAGE";
+
+    public static final String DISPLAY_FOLDER_DETAIL_PAGE = "DISPLAY_FOLDER_DETAIL_PAGE";
+
+    public static final String CREATE_NEW_FILE_PAGE = "CREATE_NEW_FILE_PAGE";
+
+    public static final String CREATE_NEW_FOLDER_PAGE = "CREATE_NEW_FOLDER_PAGE";
+
+    public static final String WRITE_TEXT_CONTENT_PAGE = "WRITE_TEXT_CONTENT_PAGE";
+
+    public static final String WRITE_HTML_CONTENT_PAGE = "WRITE_HTML_CONTENT_PAGE";
+
+    public static final String UPLOAD_FILE_PAGE = "UPLOAD_FILE_PAGE";
+
+    public static final String PATH = CONSTANT_PREFIX + "Path";
+
+    public static final String CONTENT_PATH = CONSTANT_PREFIX + "ContentPath";
+
+    public static final String CONTENT_TARGET = CONSTANT_PREFIX
+            + "ContentTarget";
+
+    public static final String CONTENT_TARGET_PREFIX = "cms" + KEY_SEPARATOR;
+
+    public static final String SCOPE = CONSTANT_PREFIX + "Scope";
+
+    public static final String IMPORT_FILE = CONSTANT_PREFIX + "ImportFile";
+
+    public static final String DEFAULT_SCOPE_VALUE = "default";
+
+    public static final String NEW_OBJECT_NAME = CONSTANT_PREFIX
+            + "NewObjectName";
+
+    public static final String SELECTED_OBJECT_NAME = CONSTANT_PREFIX
+            + "SelectedObjectName";
+
+    public static final String FILE_ID = CONSTANT_PREFIX + "FileId";
+
+    public static final String FILE_SERVLET = "/file";
+
+    public static final String NT_FILE = "nt:file";
+
+    public static final String NT_FOLDER = "nt:folder";
+
+    public static final String NT_RESOURCE = "nt:resource";
+
+    public static final String CMS_NAMESPACE = "cms:";
+
+    // public static final String JCR_NAMESPACE = "jcr:";
+
+    public static final String SCOPE_NODE = CMS_NAMESPACE + "scope";
+
+    public static final String SCOPE_NODE_NAME_ATTR = CMS_NAMESPACE + "name";
+
+    public static final String FOLDER_NODE = CMS_NAMESPACE + "folder";
+
+    public static final String FOLDER_NODE_NAME_ATTR = CMS_NAMESPACE + "name";
+
+    public static final String FOLDER_NODE_CREATED_ATTR = CMS_NAMESPACE
+            + "created";
+
+    public static final String FOLDER_NODE_LASTMODIFIED_ATTR = CMS_NAMESPACE
+            + "lastModified";
+
+    public static final String FILE_NODE = CMS_NAMESPACE + "file";
+
+    public static final String FILE_NODE_NAME_ATTR = CMS_NAMESPACE + "name";
+
+    public static final String FILE_NODE_CREATED_ATTR = CMS_NAMESPACE
+            + "created";
+
+    public static final String FILE_NODE_LASTMODIFIED_ATTR = CMS_NAMESPACE
+            + "lastModified";
+
+    public static final String CONTENT_NODE = CMS_NAMESPACE + "content";
+
+    public static final String CONTENT_NODE_TITLE_ATTR = CMS_NAMESPACE
+            + "title";
+
+    public static final String CONTENT_NODE_DESCRIPTION_ATTR = CMS_NAMESPACE
+            + "description";
+
+    public static final String CONTENT_NODE_MIMETYPE_ATTR = CMS_NAMESPACE
+            + "mimeType";
+
+    public static final String CONTENT_NODE_LANG_ATTR = CMS_NAMESPACE + "lang";
+
+    public static final String CONTENT_NODE_ENCODING_ATTR = CMS_NAMESPACE
+            + "encoding";
+
+    public static final String CONTENT_NODE_DATA_ATTR = CMS_NAMESPACE + "data";
+
+    public static final String CONTENT_NODE_LASTMODIFIED_ATTR = CMS_NAMESPACE
+            + "lastModified";
+
+    public static final String AUTHORING_CONTENT_NODE = CMS_NAMESPACE
+            + "authoring-content";
+
+    public static final String PAGE_NODE = CMS_NAMESPACE + "page";
+
+    public static final String PAGE_NODE_PATH_ATTR = CMS_NAMESPACE + "path";
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSConstants.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSException.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSException.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSException.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms;
+
+public class CMSException extends Exception {
+
+    public CMSException() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+    public CMSException(String message, Throwable cause) {
+        super(message, cause);
+        // TODO Auto-generated constructor stub
+    }
+
+    public CMSException(String message) {
+        super(message);
+        // TODO Auto-generated constructor stub
+    }
+
+    public CMSException(Throwable cause) {
+        super(cause);
+        // TODO Auto-generated constructor stub
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/CMSException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/DtoCreator.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/DtoCreator.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/DtoCreator.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.creator;
+
+import org.seasar.framework.container.ComponentCustomizer;
+import org.seasar.framework.container.assembler.AutoBindingDefFactory;
+import org.seasar.framework.container.creator.ComponentCreatorImpl;
+import org.seasar.framework.container.deployer.InstanceDefFactory;
+import org.seasar.framework.convention.NamingConvention;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class DtoCreator extends ComponentCreatorImpl {
+    public DtoCreator(NamingConvention namingConvention) {
+        super(namingConvention);
+        setNameSuffix(namingConvention.getDtoSuffix());
+        setInstanceDef(InstanceDefFactory.PROTOTYPE);
+        setAutoBindingDef(AutoBindingDefFactory.NONE);
+    }
+
+    public ComponentCustomizer getDtoCustomizer() {
+        return getCustomizer();
+    }
+
+    public void setDtoCustomizer(ComponentCustomizer customizer) {
+        setCustomizer(customizer);
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/creator/DtoCreator.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FileNodeDao.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FileNodeDao.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FileNodeDao.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao;
+
+import java.util.List;
+
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dto.FileNodeDto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface FileNodeDao {
+
+    public List getFileNodes(String scopeName, String path) throws CMSException;
+
+    public FileNodeDto getFileNode(String scopeName, String path)
+            throws CMSException;
+
+    public void insert(FileNodeDto objectNode) throws CMSException;
+
+    public void update(FileNodeDto objectNode) throws CMSException;
+
+    public void updateContent(FileNodeDto objectNode) throws CMSException;
+
+    public void delete(FileNodeDto fileNode) throws CMSException;
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FileNodeDao.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FolderNodeDao.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FolderNodeDao.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FolderNodeDao.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao;
+
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dto.FolderNodeDto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface FolderNodeDao {
+    public FolderNodeDto getFolderNode(String scopeName, String path)
+            throws CMSException;
+
+    public void insert(FolderNodeDto folderNode) throws CMSException;
+
+    public void update(FolderNodeDto folderNode) throws CMSException;
+
+    public void delete(FolderNodeDto folderNode) throws CMSException;
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/FolderNodeDao.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ObjectNodeDao.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ObjectNodeDao.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ObjectNodeDao.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao;
+
+import java.util.List;
+
+import jp.sf.pal.cms.CMSException;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface ObjectNodeDao {
+
+    public List getObjectNodes(String scopeName, String path)
+            throws CMSException;
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ObjectNodeDao.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/PageNodeDao.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/PageNodeDao.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/PageNodeDao.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao;
+
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dto.PageNodeDto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface PageNodeDao {
+    public PageNodeDto getPageNode(String name) throws CMSException;
+
+    public void insert(PageNodeDto pageNodeDto) throws CMSException;
+
+    public void update(PageNodeDto pageNodeDto) throws CMSException;
+
+    public void remove(PageNodeDto pageNodeDto) throws CMSException;
+
+    public void initPageNode() throws CMSException;
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/PageNodeDao.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ScopeNodeDao.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ScopeNodeDao.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ScopeNodeDao.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao;
+
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dto.ScopeNodeDto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface ScopeNodeDao {
+
+    public ScopeNodeDto getScopeNode(String scopeName) throws CMSException;
+
+    public void createScopeNode(String scopeName) throws CMSException;
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/ScopeNodeDao.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FileNodeDaoImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FileNodeDaoImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FileNodeDaoImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,702 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao.impl;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.query.InvalidQueryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
+import javax.jcr.version.VersionException;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.jcr.SessionFactory;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class FileNodeDaoImpl implements FileNodeDao {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(FileNodeDaoImpl.class);
+
+    private SessionFactory sessionFactory_;
+
+    private S2Container container;
+
+    public FileNodeDaoImpl(SessionFactory sessionFactory) {
+        sessionFactory_ = sessionFactory;
+    }
+
+    public List getFileNodes(String scopeName, String path) throws CMSException {
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNodes(String, String) - scopeName=" + scopeName
+                    + ", path=" + path);
+        }
+
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = path.split(CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + "*");
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNodes(String, String) - q=" + q);
+        }
+
+        try {
+            Query query = sessionFactory_.getSession().getWorkspace()
+                    .getQueryManager().createQuery(q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            List list = new ArrayList();
+            while (ni.hasNext()) {
+                Node node = ni.nextNode();
+                if (log.isDebugEnabled()) {
+                    // TODO remove this log
+                    log.debug("getFileNodes(String, String) - node.getName()="
+                            + node.getName());
+                }
+                if (node.getName().equals(CMSConstants.FILE_NODE)) {
+                    FileNodeDto fileNodeDto = (FileNodeDto) container
+                            .getComponent(FileNodeDto.class);
+                    // FileNodeDto objectNode = new FileNodeDto();
+                    fileNodeDto.setNodeType(CMSConstants.FILE_NODE);
+                    fileNodeDto.setScope(scopeName);
+                    fileNodeDto.setParentPath(path);
+                    fileNodeDto.setName(node.getProperty(
+                            CMSConstants.FILE_NODE_NAME_ATTR).getString());
+
+                    // TODO check node type
+                    // Node contentNode =
+                    // node.getNode(CMSConstants.CONTENT_NODE);
+                    Node contentNode = node
+                            .getNode(CMSConstants.AUTHORING_CONTENT_NODE);
+                    fileNodeDto.setTitle(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_TITLE_ATTR).getString());
+                    fileNodeDto.setDescription(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR)
+                            .getString());
+                    fileNodeDto.setMimeType(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_MIMETYPE_ATTR)
+                            .getString());
+                    fileNodeDto.setEncoding(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_ENCODING_ATTR)
+                            .getString());
+                    // TODO LANG
+                    fileNodeDto.setInputStream(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DATA_ATTR).getStream());
+                    fileNodeDto.setCreatedTime(node.getProperty(
+                            CMSConstants.FILE_NODE_CREATED_ATTR).getDate());
+                    fileNodeDto.setLastModifiedTime(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR)
+                            .getDate());
+
+                    list.add(fileNodeDto);
+                    // } else if
+                    // (node.getName().equals(CMSConstants.FOLDER_NODE)) {
+                    // ObjectNodeDto objectNode = new FileNodeDto();
+                    // objectNode.setNodeType(CMSConstants.FOLDER_NODE);
+                    // objectNode.setScope(scopeName);
+                    // objectNode.setPath(path);
+                    // objectNode.setName(node.getProperty(
+                    // CMSConstants.FOLDER_NODE_NAME_ATTR).getString());
+                    // list.add(objectNode);
+                } else {
+                    log.warn("Undefined object:" + node);
+                }
+            }
+            return list;
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public FileNodeDto getFileNode(String scopeName, String path)
+            throws CMSException {
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNode(String, String) - scopeName=" + scopeName
+                    + ", path=" + path);
+        }
+
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = path.split(CMSConstants.PATH_SEPARATOR);
+        int i;
+        for (i = 1; i < nodes.length - 1; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+                + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNode(String, String) - q=" + q);
+        }
+
+        try {
+            Query query = sessionFactory_.getSession().getWorkspace()
+                    .getQueryManager().createQuery(q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Node node = ni.nextNode();
+                if (node.getName().equals(CMSConstants.FILE_NODE)) {
+                    FileNodeDto fileNode = (FileNodeDto) container
+                            .getComponent(FileNodeDto.class);
+                    // FileNodeDto fileNode = new FileNodeDto();
+                    fileNode.setScope(scopeName);
+                    fileNode.setParentPath(CMSUtil.getParentPath(path));
+                    fileNode.setName(node.getProperty(
+                            CMSConstants.FILE_NODE_NAME_ATTR).getString());
+
+                    // TODO check node type
+                    // Node resNode = node.getNode(CMSConstants.CONTENT_NODE);
+                    Node resNode = node
+                            .getNode(CMSConstants.AUTHORING_CONTENT_NODE);
+
+                    fileNode.setTitle(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_TITLE_ATTR).getString());
+                    fileNode.setDescription(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR)
+                            .getString());
+                    fileNode.setMimeType(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_MIMETYPE_ATTR)
+                            .getString());
+                    fileNode.setEncoding(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_ENCODING_ATTR)
+                            .getString());
+                    // TODO LANG
+                    fileNode.setInputStream(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DATA_ATTR).getStream());
+                    fileNode.setCreatedTime(node.getProperty(
+                            CMSConstants.FILE_NODE_CREATED_ATTR).getDate());
+                    fileNode.setLastModifiedTime(resNode.getProperty(
+                            CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR)
+                            .getDate());
+
+                    return fileNode;
+                    // } else if
+                    // (node.getName().equals(CMSConstants.FOLDER_NODE)) {
+                    // ObjectNodeDto objectNode = new FileNodeDto();
+                    // objectNode.setNodeType(CMSConstants.FOLDER_NODE);
+                    // objectNode.setScope(scopeName);
+                    // objectNode.setPath(path);
+                    // objectNode.setName(node.getProperty(
+                    // CMSConstants.FOLDER_NODE_NAME_ATTR).getString());
+                    // list.add(objectNode);
+                } else {
+                    log.warn("Undefined object:" + node);
+                }
+            }
+            return null;
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void insert(FileNodeDto fileNode) throws CMSException {
+        if (fileNode.getName() == null || fileNode.getName().equals("")) {
+            throw new CMSException("Invalid file name.");
+        }
+        String scopeName = fileNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = fileNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("insert(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Calendar now = Calendar.getInstance();
+                Node folder = ni.nextNode();
+
+                // cms:file
+                Node newFileNode = folder.addNode(CMSConstants.FILE_NODE);
+                CMSUtil.setProperty(newFileNode,
+                        CMSConstants.FILE_NODE_NAME_ATTR, fileNode.getName());
+                CMSUtil.setProperty(newFileNode,
+                        CMSConstants.FILE_NODE_CREATED_ATTR, fileNode
+                                .getCreatedTime(), now);
+                // TODO file name update time
+                CMSUtil.setProperty(newFileNode,
+                        CMSConstants.FILE_NODE_LASTMODIFIED_ATTR, now);
+
+                // jcr:authoring-content
+                Node authoringContentNode = newFileNode
+                        .addNode(CMSConstants.AUTHORING_CONTENT_NODE);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_TITLE_ATTR, fileNode
+                                .getTitle(), "");
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR, fileNode
+                                .getDescription(), "");
+                // TODO default mime type
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_MIMETYPE_ATTR, fileNode
+                                .getMimeType(),
+                        CMSConstants.DEFAULT_TEXT_MIMETYPE);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_ENCODING_ATTR, fileNode
+                                .getEncoding(), CMSConstants.DEFAULT_ENCODING);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_LANG_ATTR, null,
+                        CMSConstants.DEFAULT_LANG);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_DATA_ATTR, fileNode
+                                .getInputStream(), new ByteArrayInputStream(""
+                                .getBytes()));
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR, fileNode
+                                .getLastModifiedTime(), now);
+
+                // jcr:content
+                // Node contentNode = newFileNode
+                // .addNode(CMSConstants.CONTENT_NODE);
+                // contentNode.addMixin("mix:versionable");
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_TITLE_ATTR, fileNode
+                // .getTitle(), "");
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR, fileNode
+                // .getDescription(), "");
+                // // TODO default mime type
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_MIMETYPE_ATTR, fileNode
+                // .getMimeType(),
+                // CMSConstants.DEFAULT_TEXT_MIMETYPE);
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_ENCODING_ATTR, fileNode
+                // .getEncoding(), CMSConstants.DEFAULT_ENCODING);
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_LANG_ATTR, null,
+                // CMSConstants.DEFAULT_LANG);
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_DATA_ATTR, fileNode
+                // .getInputStream(), new ByteArrayInputStream(""
+                // .getBytes()));
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR, fileNode
+                // .getLastModifiedTime(), now);
+
+                session.save();
+                // contentNode.checkin();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target folder: scopeName=" + scopeName
+                                + ", path=" + fileNode.getParentPath()
+                                + ", name=" + fileNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (UnsupportedRepositoryOperationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void update(FileNodeDto fileNode) throws CMSException {
+        if (fileNode.getName() == null || fileNode.getName().equals("")) {
+            throw new CMSException("Invalid file name.");
+        }
+        if (fileNode.getOldName() == null || fileNode.getOldName().equals("")) {
+            throw new CMSException("Invalid previous file name.");
+        }
+        String scopeName = fileNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = fileNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+                + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(fileNode.getOldName()) + "']");
+        // q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+        // + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+        // + CMSUtil.escapeAttributeValue(objectNode.getOldName()) + "']");
+
+        if (log.isDebugEnabled()) {
+            log.debug("update(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Calendar now = Calendar.getInstance();
+                Node updatedFileNode = ni.nextNode();
+                CMSUtil.setProperty(updatedFileNode,
+                        CMSConstants.FILE_NODE_NAME_ATTR, fileNode.getName());
+                if (fileNode.getCreatedTime() != null) {
+                    CMSUtil.setProperty(updatedFileNode,
+                            CMSConstants.FILE_NODE_CREATED_ATTR, fileNode
+                                    .getCreatedTime());
+                }
+                // else {
+                // updatedFileNode.setProperty(
+                // CMSConstants.FILE_NODE_CREATED_ATTR, now);
+                // }
+                // TODO file name update time
+                CMSUtil.setProperty(updatedFileNode,
+                        CMSConstants.FILE_NODE_LASTMODIFIED_ATTR, now);
+
+                session.save();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target file: scopeName=" + scopeName
+                                + ", path=" + fileNode.getParentPath()
+                                + ", name=" + fileNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (UnsupportedRepositoryOperationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void updateContent(FileNodeDto fileNode) throws CMSException {
+        if (fileNode.getName() == null || fileNode.getName().equals("")) {
+            throw new CMSException("Invalid file name.");
+        }
+        String scopeName = fileNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = fileNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+                + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(fileNode.getName()) + "']");
+        // q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+        // + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+        // + CMSUtil.escapeAttributeValue(objectNode.getName()) + "']");
+
+        if (log.isDebugEnabled()) {
+            log.debug("updateContent(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Calendar now = Calendar.getInstance();
+                Node updatedFileNode = ni.nextNode();
+                Node authoringContentNode = updatedFileNode
+                        .getNode(CMSConstants.AUTHORING_CONTENT_NODE);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_TITLE_ATTR, fileNode
+                                .getTitle());
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR, fileNode
+                                .getDescription());
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_MIMETYPE_ATTR, fileNode
+                                .getMimeType());
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_ENCODING_ATTR, fileNode
+                                .getEncoding());
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_LANG_ATTR, (String) null);
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_DATA_ATTR, fileNode
+                                .getInputStream());
+                CMSUtil.setProperty(authoringContentNode,
+                        CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR, fileNode
+                                .getLastModifiedTime(), now);
+
+                // Node contentNode = updatedFileNode
+                // .getNode(CMSConstants.CONTENT_NODE);
+                // contentNode.checkout();
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_TITLE_ATTR, fileNode
+                // .getTitle());
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR, fileNode
+                // .getDescription());
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_MIMETYPE_ATTR, fileNode
+                // .getMimeType());
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_ENCODING_ATTR, fileNode
+                // .getEncoding());
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_LANG_ATTR,(String)null);
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_DATA_ATTR, fileNode
+                // .getInputStream());
+                // CMSUtil.setProperty(contentNode,
+                // CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR, fileNode
+                // .getLastModifiedTime(), now);
+
+                session.save();
+                // contentNode.checkin();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target file: scopeName=" + scopeName
+                                + ", path=" + fileNode.getParentPath()
+                                + ", name=" + fileNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (UnsupportedRepositoryOperationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void delete(FileNodeDto fileNode) throws CMSException {
+        String scopeName = fileNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = fileNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+                + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(fileNode.getName()) + "']");
+        // q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+        // + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+        // + CMSUtil.escapeAttributeValue(objectNode.getName()) + "']");
+
+        if (log.isDebugEnabled()) {
+            log.debug("delete(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Node deletedFileNode = ni.nextNode();
+                deletedFileNode.remove();
+                session.save();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target file: scopeName=" + scopeName
+                                + ", path=" + fileNode.getParentPath()
+                                + ", name=" + fileNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FileNodeDaoImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FolderNodeDaoImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FolderNodeDaoImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FolderNodeDaoImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,378 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao.impl;
+
+import java.util.Calendar;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.query.InvalidQueryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
+import javax.jcr.version.VersionException;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FolderNodeDao;
+import jp.sf.pal.cms.dto.FolderNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.jcr.SessionFactory;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class FolderNodeDaoImpl implements FolderNodeDao {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(FolderNodeDaoImpl.class);
+
+    private SessionFactory sessionFactory_;
+
+    private S2Container container;
+
+    public FolderNodeDaoImpl(SessionFactory sessionFactory) {
+        sessionFactory_ = sessionFactory;
+    }
+
+    public FolderNodeDto getFolderNode(String scopeName, String path)
+            throws CMSException {
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = path.split(CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNode(String, String) - q=" + q);
+        }
+
+        try {
+            Query query = sessionFactory_.getSession().getWorkspace()
+                    .getQueryManager().createQuery(q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Node node = ni.nextNode();
+                if (log.isDebugEnabled()) {
+                    // TODO remove
+                    log.debug("getFolderNode(String, String) - node.getName()="
+                            + node.getName());
+                }
+                if (node.getName().equals(CMSConstants.FOLDER_NODE)) {
+                    FolderNodeDto folderNode = (FolderNodeDto) container
+                            .getComponent(FolderNodeDto.class);
+                    // FolderNodeDto folderNode = new FolderNodeDto();
+                    folderNode.setScope(scopeName);
+                    folderNode.setParentPath(CMSUtil.getParentPath(path));
+                    folderNode.setName(node.getProperty(
+                            CMSConstants.FOLDER_NODE_NAME_ATTR).getString());
+                    folderNode.setCreatedTime(node.getProperty(
+                            CMSConstants.FOLDER_NODE_CREATED_ATTR).getDate());
+                    folderNode.setLastModifiedTime(node.getProperty(
+                            CMSConstants.FOLDER_NODE_LASTMODIFIED_ATTR)
+                            .getDate());
+                    return folderNode;
+                } else {
+                    log.warn("Undefined object:" + node);
+                }
+            }
+            return null;
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void insert(FolderNodeDto folderNode) throws CMSException {
+        if (folderNode.getName() == null || folderNode.getName().equals("")) {
+            throw new CMSException("Invalid folder name.");
+        }
+        String scopeName = folderNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = folderNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("insert(FolderNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Calendar now = Calendar.getInstance();
+                Node folder = ni.nextNode();
+
+                // cms:folder
+                Node newFolderNode = folder.addNode(CMSConstants.FOLDER_NODE);
+                CMSUtil.setProperty(newFolderNode,
+                        CMSConstants.FOLDER_NODE_NAME_ATTR, folderNode
+                                .getName());
+                CMSUtil.setProperty(newFolderNode,
+                        CMSConstants.FOLDER_NODE_CREATED_ATTR, folderNode
+                                .getCreatedTime(), now);
+                CMSUtil.setProperty(newFolderNode,
+                        CMSConstants.FOLDER_NODE_LASTMODIFIED_ATTR, folderNode
+                                .getLastModifiedTime(), now);
+
+                session.save();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target folder: scopeName=" + scopeName
+                                + ", path=" + folderNode.getParentPath());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (UnsupportedRepositoryOperationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void update(FolderNodeDto folderNode) throws CMSException {
+        if (folderNode.getName() == null || folderNode.getName().equals("")) {
+            throw new CMSException("Invalid folder name.");
+        }
+        if (folderNode.getOldName() == null
+                || folderNode.getOldName().equals("")) {
+            throw new CMSException("Invalid previous folder name.");
+        }
+        String scopeName = folderNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = folderNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE + "[@"
+                + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(folderNode.getOldName()) + "']");
+        // q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+        // + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+        // + CMSUtil.escapeAttributeValue(objectNode.getOldName()) + "']");
+
+        if (log.isDebugEnabled()) {
+            log.debug("updateFile(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Calendar now = Calendar.getInstance();
+                Node updatedFolderNode = ni.nextNode();
+                CMSUtil.setProperty(updatedFolderNode,
+                        CMSConstants.FOLDER_NODE_NAME_ATTR, folderNode
+                                .getName());
+                CMSUtil.setProperty(updatedFolderNode,
+                        CMSConstants.FOLDER_NODE_CREATED_ATTR, folderNode
+                                .getCreatedTime());
+                // else {
+                // updatedFileNode.setProperty(
+                // CMSConstants.FOLDER_NODE_CREATED_ATTR, now);
+                // }
+                // TODO file name update time
+                CMSUtil.setProperty(updatedFolderNode,
+                        CMSConstants.FOLDER_NODE_LASTMODIFIED_ATTR, now);
+
+                session.save();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target folder: scopeName=" + scopeName
+                                + ", path=" + folderNode.getParentPath()
+                                + ", name=" + folderNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (UnsupportedRepositoryOperationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void delete(FolderNodeDto folderNode) throws CMSException {
+        String scopeName = folderNode.getScope();
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = folderNode.getParentPath().split(
+                CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE + "[@"
+                + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                + CMSUtil.escapeAttributeValue(folderNode.getName()) + "']");
+        // q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FILE_NODE + "[@"
+        // + CMSConstants.FILE_NODE_NAME_ATTR + "='"
+        // + CMSUtil.escapeAttributeValue(objectNode.getName()) + "']");
+
+        if (log.isDebugEnabled()) {
+            log.debug("delete(FileNodeDto) - q=" + q);
+        }
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Node deletedFileNode = ni.nextNode();
+                deletedFileNode.remove();
+                session.save();
+            } else {
+                throw new CMSException(
+                        "Cannot find the target file: scopeName=" + scopeName
+                                + ", path=" + folderNode.getParentPath()
+                                + ", name=" + folderNode.getName());
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/FolderNodeDaoImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ObjectNodeDaoImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ObjectNodeDaoImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ObjectNodeDaoImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.query.InvalidQueryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
+import javax.jcr.version.VersionException;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.ObjectNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.dto.FolderNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.jcr.SessionFactory;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class ObjectNodeDaoImpl implements ObjectNodeDao {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(ObjectNodeDaoImpl.class);
+
+    private SessionFactory sessionFactory_;
+
+    private S2Container container;
+
+    public ObjectNodeDaoImpl(SessionFactory sessionFactory) {
+        sessionFactory_ = sessionFactory;
+    }
+
+    public List getObjectNodes(String scopeName, String path)
+            throws CMSException {
+        StringBuffer q = new StringBuffer(CMSConstants.PATH_SEPARATOR
+                + CMSConstants.PATH_SEPARATOR + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '"
+                + CMSUtil.escapeAttributeValue(scopeName) + "']");
+
+        String[] nodes = path.split(CMSConstants.PATH_SEPARATOR);
+        for (int i = 1; i < nodes.length; i++) {
+            q.append(CMSConstants.PATH_SEPARATOR + CMSConstants.FOLDER_NODE
+                    + "[@" + CMSConstants.FOLDER_NODE_NAME_ATTR + "='"
+                    + CMSUtil.escapeAttributeValue(nodes[i]) + "']");
+        }
+        q.append(CMSConstants.PATH_SEPARATOR + "*");
+        if (log.isDebugEnabled()) {
+            log.debug("getFileNodes(String, String) - q=" + q);
+        }
+
+        try {
+            Query query = sessionFactory_.getSession().getWorkspace()
+                    .getQueryManager().createQuery(q.toString(), Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            List list = new ArrayList();
+            while (ni.hasNext()) {
+                Node node = ni.nextNode();
+                if (log.isDebugEnabled()) {
+                    // TODO remove this log
+                    log.debug("getFileNodes(String, String) - node.getName()="
+                            + node.getName());
+                }
+                if (node.getName().equals(CMSConstants.FILE_NODE)) {
+                    FileNodeDto fileNodeDto = (FileNodeDto) container
+                            .getComponent(FileNodeDto.class);
+                    // FileNodeDto fileNode = new FileNodeDto();
+                    fileNodeDto.setScope(scopeName);
+                    fileNodeDto.setParentPath(path);
+                    fileNodeDto.setName(node.getProperty(
+                            CMSConstants.FILE_NODE_NAME_ATTR).getString());
+
+                    // TODO check node type
+                    // Node contentNode =
+                    // node.getNode(CMSConstants.CONTENT_NODE);
+                    Node contentNode = node
+                            .getNode(CMSConstants.AUTHORING_CONTENT_NODE);
+
+                    fileNodeDto.setTitle(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_TITLE_ATTR).getString());
+                    fileNodeDto.setDescription(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DESCRIPTION_ATTR)
+                            .getString());
+                    fileNodeDto.setMimeType(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_MIMETYPE_ATTR)
+                            .getString());
+                    fileNodeDto.setEncoding(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_ENCODING_ATTR)
+                            .getString());
+                    fileNodeDto.setInputStream(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_DATA_ATTR).getStream());
+                    fileNodeDto.setCreatedTime(node.getProperty(
+                            CMSConstants.FILE_NODE_CREATED_ATTR).getDate());
+                    fileNodeDto.setLastModifiedTime(contentNode.getProperty(
+                            CMSConstants.CONTENT_NODE_LASTMODIFIED_ATTR)
+                            .getDate());
+
+                    list.add(fileNodeDto);
+                } else if (node.getName().equals(CMSConstants.FOLDER_NODE)) {
+                    FolderNodeDto folderNode = (FolderNodeDto) container
+                            .getComponent(FolderNodeDto.class);
+                    // FolderNodeDto folderNode = new FolderNodeDto();
+                    folderNode.setScope(scopeName);
+                    folderNode.setParentPath(path);
+                    folderNode.setName(node.getProperty(
+                            CMSConstants.FOLDER_NODE_NAME_ATTR).getString());
+                    list.add(folderNode);
+                } else {
+                    log.warn("Undefined object:" + node);
+                }
+            }
+            return list;
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ObjectNodeDaoImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/PageNodeDaoImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/PageNodeDaoImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/PageNodeDaoImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao.impl;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.PageNodeDao;
+import jp.sf.pal.cms.dto.PageNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.jcr.SessionFactory;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class PageNodeDaoImpl implements PageNodeDao {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(PageNodeDaoImpl.class);
+
+    private SessionFactory sessionFactory_;
+
+    private S2Container container;
+
+    public PageNodeDaoImpl(SessionFactory sessionFactory) {
+        sessionFactory_ = sessionFactory;
+    }
+
+    public PageNodeDto getPageNode(String name) throws CMSException {
+        try {
+            Session session = sessionFactory_.getSession();
+            Node rn = session.getRootNode();
+            Node pageNode = rn.getNode(CMSConstants.PAGE_NODE);
+            Node targetNode = pageNode.getNode(name);
+            PageNodeDto pageNodeDto = (PageNodeDto) container
+                    .getComponent(PageNodeDto.class);
+            // PageNodeDto pageNodeDto = new PageNodeDto();
+            pageNodeDto.setName(name);
+            pageNodeDto.setPath(targetNode.getProperty(
+                    CMSConstants.PAGE_NODE_PATH_ATTR).getString());
+            return pageNodeDto;
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Could not find a page node. ", e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Could not find a page node. ", e);
+        }
+    }
+
+    public void insert(PageNodeDto pageNodeDto) throws CMSException {
+        try {
+            Session session = sessionFactory_.getSession();
+            Node rn = session.getRootNode();
+            Node pageNode = rn.getNode(CMSConstants.PAGE_NODE);
+            Node targetNode = pageNode.addNode(pageNodeDto.getName());
+            CMSUtil.setProperty(targetNode, CMSConstants.PAGE_NODE_PATH_ATTR,
+                    pageNodeDto.getPath());
+            session.save();
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (VersionException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (LockException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Could not insert the page node. ", e);
+        }
+    }
+
+    public void update(PageNodeDto pageNodeDto) throws CMSException {
+        try {
+            Session session = sessionFactory_.getSession();
+            Node rn = session.getRootNode();
+            Node pageNode = rn.getNode(CMSConstants.PAGE_NODE);
+            Node targetNode = pageNode.getNode(pageNodeDto.getName());
+            CMSUtil.setProperty(targetNode, CMSConstants.PAGE_NODE_PATH_ATTR,
+                    pageNodeDto.getPath());
+            session.save();
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (VersionException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (LockException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Could not update the page node. ", e);
+        }
+    }
+
+    public void remove(PageNodeDto pageNodeDto) throws CMSException {
+        try {
+            Session session = sessionFactory_.getSession();
+            Node rn = session.getRootNode();
+            Node pageNode = rn.getNode(CMSConstants.PAGE_NODE);
+            Node targetNode = pageNode.getNode(pageNodeDto.getName());
+            targetNode.remove();
+            session.save();
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (VersionException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (LockException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Could not remove the page node. ", e);
+        }
+    }
+
+    public void initPageNode() throws CMSException {
+        try {
+            Session session = sessionFactory_.getSession();
+            Node rn = session.getRootNode();
+            try {
+                rn.getNode(CMSConstants.PAGE_NODE);
+            } catch (PathNotFoundException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Could not find a page node. Creating it...");
+                }
+                rn.addNode(CMSConstants.PAGE_NODE);
+            }
+            session.save();
+        } catch (ItemExistsException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (VersionException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (LockException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Could not create a page node. ", e);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/PageNodeDaoImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ScopeNodeDaoImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ScopeNodeDaoImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ScopeNodeDaoImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dao.impl;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.query.InvalidQueryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
+import javax.jcr.version.VersionException;
+
+import org.seasar.framework.container.S2Container;
+import org.seasar.jcr.SessionFactory;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.ScopeNodeDao;
+import jp.sf.pal.cms.dto.ScopeNodeDto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class ScopeNodeDaoImpl implements ScopeNodeDao {
+    private SessionFactory sessionFactory_;
+
+    private S2Container container;
+
+    public ScopeNodeDaoImpl(SessionFactory sessionFactory) {
+        sessionFactory_ = sessionFactory;
+    }
+
+    public ScopeNodeDto getScopeNode(String scopeName) throws CMSException {
+        String q = CMSConstants.PATH_SEPARATOR + CMSConstants.PATH_SEPARATOR
+                + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '" + scopeName + "']";
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q, Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (ni.hasNext()) {
+                Node scopeNode = ni.nextNode();
+                ScopeNodeDto scopeNodeDto = (ScopeNodeDto) container
+                        .getComponent(ScopeNodeDto.class);
+                // ScopeNodeDto scopeNodeDto = new ScopeNodeDto();
+                scopeNodeDto.setName(scopeNode.getProperty(
+                        CMSConstants.SCOPE_NODE_NAME_ATTR).toString());
+                return scopeNodeDto;
+            }
+            return null;
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    public void createScopeNode(String scopeName) throws CMSException {
+        String q = CMSConstants.PATH_SEPARATOR + CMSConstants.PATH_SEPARATOR
+                + CMSConstants.SCOPE_NODE + "[@"
+                + CMSConstants.SCOPE_NODE_NAME_ATTR + " = '" + scopeName + "']";
+        try {
+            Session session = sessionFactory_.getSession();
+            Query query = session.getWorkspace().getQueryManager().createQuery(
+                    q, Query.XPATH);
+            QueryResult result = query.execute();
+            NodeIterator ni = result.getNodes();
+            if (!ni.hasNext()) {
+                Node rn = session.getRootNode();
+                Node scopeNode = rn.addNode(CMSConstants.SCOPE_NODE);
+                scopeNode.setProperty(CMSConstants.SCOPE_NODE_NAME_ATTR,
+                        scopeName);
+                session.save();
+
+            }
+        } catch (InvalidQueryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ItemExistsException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (PathNotFoundException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (VersionException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ConstraintViolationException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (LockException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (ValueFormatException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (AccessDeniedException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (InvalidItemStateException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (NoSuchNodeTypeException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        } catch (RepositoryException e) {
+            throw new CMSException("Exception: Query=" + q, e);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dao/impl/ScopeNodeDaoImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FileNodeDto.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FileNodeDto.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FileNodeDto.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,246 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dto;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+public class FileNodeDto extends ObjectNodeDto {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(FileNodeDto.class);
+
+    private String title;
+
+    private String description;
+
+    private String mimeType;
+
+    private String encoding;
+
+    private InputStream inputStream;
+
+    private S2Container container;
+
+    public FileNodeDto() {
+        super();
+        setNodeType(CMSConstants.FILE_NODE);
+        setTitle("");
+        setDescription("");
+        setMimeType("");
+        setEncoding("");
+        setInputStream(null);
+    }
+
+    public String toString() {
+        return super.toString() + //
+                "title=" + title + "\n" + //
+                "description=" + description + "\n" + //
+                "mimeType=" + mimeType + "\n" + //
+                "encoding=" + encoding + "\n" + //
+                "inputStream=" + inputStream + "\n" + //
+                "";
+    }
+
+    public boolean isTextEditable() {
+        // TODO
+        return true;
+    }
+
+    public boolean isHtmlEditable() {
+        // TODO
+        return true;
+    }
+
+    /**
+     * @return the mimeType
+     */
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    /**
+     * @param mimeType
+     *            the mimeType to set
+     */
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * @return Returns the description.
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description
+     *            The description to set.
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return Returns the title.
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * @param title
+     *            The title to set.
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * @return Returns the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * @param encoding
+     *            The encoding to set.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    /**
+     * @return Returns the inputStream.
+     */
+    public InputStream getInputStream() {
+        return inputStream;
+    }
+
+    /**
+     * @param inputStream
+     *            The inputStream to set.
+     */
+    public void setInputStream(InputStream content) {
+        this.inputStream = content;
+    }
+
+    private String cachedContent;
+
+    public String getContent() {
+        if (cachedContent != null) {
+            return cachedContent;
+        }
+
+        if (getInputStream() != null) {
+            cachedContent = getContent(getInputStream(), getEncoding());
+            setInputStream(null);
+            return cachedContent;
+        }
+
+        // S2Container container = SingletonS2ContainerFactory.getContainer();
+        FileNodeDao fileNodeDao = (FileNodeDao) container
+                .getComponent(FileNodeDao.class);
+        FileNodeDto fileNode = null;
+        try {
+            fileNode = fileNodeDao.getFileNode(getScope(), CMSUtil
+                    .normalizedPath(getParentPath()
+                            + CMSConstants.PATH_SEPARATOR + getName()));
+            if (fileNode != null) {
+                cachedContent = getContent(fileNode.getInputStream(), fileNode
+                        .getEncoding());
+            } else {
+                cachedContent = "";
+            }
+        } catch (CMSException e) {
+            log.error(
+                    "Could not load the content from the persistent storage.",
+                    e);
+            cachedContent = "";
+        }
+        return cachedContent;
+    }
+
+    private String getContent(InputStream inputStream, String encoding) {
+        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        try {
+            drain(inputStream, os);
+        } catch (IOException e) {
+            log.error("Could not load the content from the input stream.", e);
+            return "";
+        }
+        try {
+            return os.toString(encoding);
+        } catch (UnsupportedEncodingException e) {
+            log.warn("Unsupported encoding: " + encoding, e);
+            return os.toString();
+        } finally {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                log.error("Could not close the input stream.", e);
+            }
+        }
+    }
+
+    private static int BLOCK_SIZE = 4096;
+
+    private void drain(InputStream r, OutputStream w) throws IOException {
+        byte[] bytes = new byte[BLOCK_SIZE];
+        try {
+            int length = r.read(bytes);
+            while (length != -1) {
+                if (length != 0) {
+                    w.write(bytes, 0, length);
+                }
+                length = r.read(bytes);
+            }
+        } finally {
+            bytes = null;
+        }
+
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FileNodeDto.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FolderNodeDto.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FolderNodeDto.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FolderNodeDto.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dto;
+
+import jp.sf.pal.cms.CMSConstants;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class FolderNodeDto extends ObjectNodeDto {
+    public FolderNodeDto() {
+        super();
+        setNodeType(CMSConstants.FOLDER_NODE);
+    }
+
+    public String toString() {
+        return super.toString() + //
+                "";
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/FolderNodeDto.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ObjectNodeDto.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ObjectNodeDto.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ObjectNodeDto.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dto;
+
+import java.util.Calendar;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class ObjectNodeDto {
+
+    protected String scope;
+
+    protected String parentPath;
+
+    protected String name;
+
+    private String oldName;
+
+    protected Calendar lastModifiedTime;
+
+    protected Calendar createdTime;
+
+    protected String nodeType;
+
+    /**
+     * 
+     */
+    public ObjectNodeDto() {
+        super();
+        setScope("");
+        setParentPath("");
+        setName("");
+        setOldName(null);
+        setNodeType("");
+    }
+
+    public String toString() {
+        return //
+        "scope=" + scope + "\n" + //
+                "parentPath=" + parentPath + "\n" + //
+                "name=" + name + "\n" + //
+                "oldName=" + oldName + "\n" + //
+                "lastModifiedTime=" + lastModifiedTime + "\n" + //
+                "createdTime=" + createdTime + "\n" + //
+                "nodeType=" + nodeType + "\n" + //
+                "";
+    }
+
+    /**
+     * @return the lastModifiedTime
+     */
+    public Calendar getLastModifiedTime() {
+        return lastModifiedTime;
+    }
+
+    /**
+     * @param lastModifiedTime
+     *            the lastModifiedTime to set
+     */
+    public void setLastModifiedTime(Calendar lastModifiedTime) {
+        this.lastModifiedTime = lastModifiedTime;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the nodeType
+     */
+    public String getNodeType() {
+        return nodeType;
+    }
+
+    /**
+     * @param nodeType
+     *            the nodeType to set
+     */
+    public void setNodeType(String nodeType) {
+        this.nodeType = nodeType;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getParentPath() {
+        return parentPath;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setParentPath(String path) {
+        this.parentPath = path;
+    }
+
+    /**
+     * @return Returns the scope.
+     */
+    public String getScope() {
+        return scope;
+    }
+
+    /**
+     * @param scope
+     *            The scope to set.
+     */
+    public void setScope(String scope) {
+        this.scope = scope;
+    }
+
+    /**
+     * @return Returns the createdTime.
+     */
+    public Calendar getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * @param createdTime
+     *            The createdTime to set.
+     */
+    public void setCreatedTime(Calendar createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * @return Returns the oldName.
+     */
+    public String getOldName() {
+        return oldName;
+    }
+
+    /**
+     * @param oldName
+     *            The oldName to set.
+     */
+    public void setOldName(String oldName) {
+        this.oldName = oldName;
+    }
+
+}
\ No newline at end of file


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ObjectNodeDto.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/PageNodeDto.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/PageNodeDto.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/PageNodeDto.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class PageNodeDto {
+    private String path;
+
+    private String name;
+
+    public PageNodeDto() {
+
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/PageNodeDto.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ScopeNodeDto.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ScopeNodeDto.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ScopeNodeDto.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.dto;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class ScopeNodeDto {
+    private String name;
+
+    public ScopeNodeDto() {
+        setName("");
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/dto/ScopeNodeDto.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/DownloadHelper.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/DownloadHelper.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/DownloadHelper.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.helper;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface DownloadHelper {
+    public String consume(String key);
+
+    public String publish(String value);
+
+    public void reset();
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/DownloadHelper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/DownloadHelperImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/DownloadHelperImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/DownloadHelperImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.helper.impl;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderResponse;
+import javax.servlet.http.HttpSession;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.helper.DownloadHelper;
+
+import org.seasar.framework.container.S2Container;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class DownloadHelperImpl implements DownloadHelper {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(DownloadHelperImpl.class);
+
+    private static String DOWNLOAD_FILE_MAP = CMSConstants.CONSTANT_PREFIX
+            + "DownloadFileMap";
+
+    private static int DEFAULT_MAP_SIZE = 4;
+
+    private static int DEFAULT_KEY_LENGTH = 64;
+
+    private int mapSize;
+
+    private int keyLength;
+
+    private S2Container container;
+
+    public DownloadHelperImpl() {
+        this.mapSize = DEFAULT_MAP_SIZE;
+        this.keyLength = DEFAULT_KEY_LENGTH;
+    }
+
+    public DownloadHelperImpl(int mapSize, int keyLength) {
+        this.mapSize = mapSize;
+        this.keyLength = keyLength;
+    }
+
+    public String consume(String key) {
+        String path = consumeFromSessionAttribute(key);
+        return path;
+    }
+
+    public String publish(String value) {
+        if (value == null) {
+            return null;
+        }
+        String namespace = getNamespace();
+        String key = namespace
+                + RandomStringUtils.randomAlphanumeric(keyLength);
+        publishToSessionAttribute(key, value);
+        return key;
+    }
+
+    public void reset() {
+        removeSessionAttribute(DOWNLOAD_FILE_MAP);
+    }
+
+    private String getNamespace() {
+        if (getContainer().getExternalContext().getResponse() instanceof RenderResponse) {
+            return (String) ((RenderResponse) getContainer()
+                    .getExternalContext().getResponse()).getNamespace();
+        }
+        return "";
+    }
+
+    private void publishToSessionAttribute(String key, String value) {
+        Object obj = getContainer().getExternalContext().getSession();
+        if (obj instanceof PortletSession) {
+            PortletSession session = (PortletSession) obj;
+            Map map = (Map) session.getAttribute(DOWNLOAD_FILE_MAP,
+                    PortletSession.APPLICATION_SCOPE);
+            if (map == null) {
+                map = new HashMap(mapSize);
+                session.setAttribute(DOWNLOAD_FILE_MAP, map,
+                        PortletSession.APPLICATION_SCOPE);
+            }
+            map.put(key, value);
+        } else if (obj instanceof HttpSession) {
+            HttpSession session = (HttpSession) obj;
+            Map map = (Map) session.getAttribute(DOWNLOAD_FILE_MAP);
+            if (map == null) {
+                map = new HashMap(mapSize);
+                session.setAttribute(DOWNLOAD_FILE_MAP, map);
+            }
+            map.put(key, value);
+        } else {
+            log.error("Invalid session object: " + obj);
+            throw new IllegalStateException("Invalid session object: " + obj);
+        }
+    }
+
+    private String consumeFromSessionAttribute(String key) {
+        Object obj = getContainer().getExternalContext().getSession();
+        if (obj instanceof PortletSession) {
+            PortletSession session = (PortletSession) obj;
+            Map map = (Map) session.getAttribute(DOWNLOAD_FILE_MAP,
+                    PortletSession.APPLICATION_SCOPE);
+            if (map == null) {
+                return null;
+            }
+            String value = (String) map.get(key);
+            map.remove(key);
+            return value;
+        } else if (obj instanceof HttpSession) {
+            HttpSession session = (HttpSession) obj;
+            Map map = (Map) session.getAttribute(DOWNLOAD_FILE_MAP);
+            if (map == null) {
+                return null;
+            }
+            String value = (String) map.get(key);
+            map.remove(key);
+            // TODO size check
+            return value;
+        } else {
+            log.error("Invalid session object: " + obj);
+            throw new IllegalStateException("Invalid session object: " + obj);
+        }
+
+    }
+
+    private void removeSessionAttribute(String key) {
+        Object obj = getContainer().getExternalContext().getSession();
+        if (obj instanceof PortletSession) {
+            PortletSession session = (PortletSession) obj;
+            Map map = (Map) session.getAttribute(DOWNLOAD_FILE_MAP,
+                    PortletSession.APPLICATION_SCOPE);
+            if (map != null) {
+                String namespace = getNamespace();
+                if ("".equals(namespace)) {
+                    log.warn("The namespace is not defined.");
+                    return;
+                }
+                for (Iterator ite = map.keySet().iterator(); ite.hasNext();) {
+                    String name = (String) ite.next();
+                    if (name.startsWith(namespace)) {
+                        map.remove(name);
+                    }
+                }
+            }
+        } else if (obj instanceof HttpSession) {
+            HttpSession session = (HttpSession) obj;
+            session.removeAttribute(DOWNLOAD_FILE_MAP);
+        } else {
+            log.error("Invalid session object: " + obj);
+            throw new IllegalStateException("Invalid session object: " + obj);
+        }
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/helper/impl/DownloadHelperImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/CMSPortlet.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/CMSPortlet.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/CMSPortlet.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.portlet;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.PageNodeDao;
+import jp.sf.pal.cms.dao.ScopeNodeDao;
+import jp.sf.pal.cms.dto.ScopeNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
+import org.seasar.teeda.core.portlet.FacesPortlet;
+
+public class CMSPortlet extends FacesPortlet {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(CMSPortlet.class);
+
+    private String scopeName;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.seasar.teeda.core.portlet.FacesPortlet#init()
+     */
+    public void init() throws PortletException {
+        super.init();
+
+        // create scope node
+        scopeName = getPortletConfig().getInitParameter(CMSConstants.SCOPE);
+        if (scopeName == null) {
+            if (log.isDebugEnabled()) {
+                log.debug(CMSConstants.SCOPE + " is null. The scope is set to "
+                        + CMSConstants.DEFAULT_SCOPE_VALUE + ".");
+            }
+            scopeName = CMSConstants.DEFAULT_SCOPE_VALUE;
+        }
+        S2Container container = SingletonS2ContainerFactory.getContainer();
+        ScopeNodeDao scopeNodeDao = (ScopeNodeDao) container
+                .getComponent(ScopeNodeDao.class);
+        try {
+            ScopeNodeDto scopeNodeDto = scopeNodeDao.getScopeNode(scopeName);
+            if (scopeNodeDto == null) {
+                // String importFilename = getPortletConfig().getInitParameter(
+                // CMSConstants.IMPORT_FILE);
+                // if (importFilename != null) {
+                // SessionFactory sessoinFactory = (SessionFactory)
+                // container
+                // .getComponent(SessionFactory.class);
+                // try {
+                // importFilename = getPortletContext().getRealPath(
+                // importFilename);
+                // log.debug("TEST: CMSPortlet 4
+                // importFilename="+importFilename);
+                // InputStream in = new FileInputStream(importFilename);
+                // Session session = sessoinFactory.getSession();
+                // session.importXML(CMSConstants.PATH_SEPARATOR, in,
+                // ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
+                // } catch (FileNotFoundException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (PathNotFoundException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (ItemExistsException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (ConstraintViolationException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (VersionException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (InvalidSerializedDataException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (LockException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (RepositoryException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // } catch (IOException e) {
+                // log.error("Could not import: " + importFilename, e);
+                // }
+                // } else {
+                // if (log.isDebugEnabled()) {
+                // log.debug("The import file is not specified.");
+                // }
+                // create a scope node
+                scopeNodeDao.createScopeNode(scopeName);
+                // }
+            }
+        } catch (CMSException e) {
+            throw new PortletException(e);
+        }
+
+        PageNodeDao pageNodeDao = (PageNodeDao) container
+                .getComponent(PageNodeDao.class);
+        try {
+            pageNodeDao.initPageNode();
+        } catch (CMSException e) {
+            throw new PortletException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.seasar.teeda.core.portlet.FacesPortlet#processAction(javax.portlet.ActionRequest,
+     *      javax.portlet.ActionResponse)
+     */
+    public void processAction(ActionRequest request, ActionResponse response)
+            throws PortletException, IOException {
+        request.setAttribute(CMSConstants.SCOPE, scopeName);
+
+        if (request.getPortletMode().equals(PortletMode.VIEW)) {
+            String path = request.getParameter(CMSConstants.CONTENT_PATH);
+            String target = request.getParameter(CMSConstants.CONTENT_TARGET);
+            if (log.isDebugEnabled()) {
+                log
+                        .debug("processAction(ActionRequest, ActionResponse) - path="
+                                + path);
+            }
+            if (path != null && target != null) {
+                request.getPortletSession().setAttribute(
+                        CMSConstants.CONTENT_PATH + CMSConstants.KEY_SEPARATOR
+                                + target, CMSUtil.normalizedPath(path),
+                        PortletSession.APPLICATION_SCOPE);
+            }
+        } else {
+            super.processAction(request, response);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see javax.portlet.GenericPortlet#render(javax.portlet.RenderRequest,
+     *      javax.portlet.RenderResponse)
+     */
+    public void render(RenderRequest request, RenderResponse response)
+            throws PortletException, IOException {
+        PortletSession portletSession = request.getPortletSession();
+        String key = CMSConstants.CONTENT_PATH + CMSConstants.KEY_SEPARATOR
+                + response.getNamespace();
+        String path = (String) portletSession.getAttribute(key,
+                PortletSession.APPLICATION_SCOPE);
+        if (path != null) {
+            portletSession.setAttribute(CMSConstants.CONTENT_PATH, path);
+            portletSession.removeAttribute(key,
+                    PortletSession.APPLICATION_SCOPE);
+        }
+        request.setAttribute(CMSConstants.SCOPE, scopeName);
+        super.render(request, response);
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/portlet/CMSPortlet.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/HtmlRewriter.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/HtmlRewriter.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/HtmlRewriter.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.rewriter;
+
+import org.xml.sax.InputSource;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface HtmlRewriter {
+    public String parse(InputSource inputSource);
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/HtmlRewriter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/RewriteHandler.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/RewriteHandler.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/RewriteHandler.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.rewriter.helpers;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface RewriteHandler extends ContentHandler, DTDHandler,
+        EntityResolver, ErrorHandler {
+    public String getContent();
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/RewriteHandler.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/RewriteHandlerImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/RewriteHandlerImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/RewriteHandlerImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,320 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.rewriter.helpers.impl;
+
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletURL;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.helper.DownloadHelper;
+import jp.sf.pal.cms.rewriter.helpers.RewriteHandler;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class RewriteHandlerImpl extends DefaultHandler implements
+        RewriteHandler {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(RewriteHandlerImpl.class);
+
+    private static final String BODY_TAG = "body";
+
+    private StringBuffer buf;
+
+    private boolean write;
+
+    public RewriteHandlerImpl() {
+        buf = new StringBuffer();
+        write = false;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.cms.rewriter.helpers.RewriteHandler#getContent()
+     */
+    public String getContent() {
+        if (log.isDebugEnabled()) {
+            log.debug("getContent() - content=" + buf.toString());
+        }
+
+        return buf.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.xml.sax.helpers.DefaultHandler#characters(char[], int, int)
+     */
+    public void characters(char[] ch, int start, int length)
+            throws SAXException {
+        if (!write) {
+            return;
+        }
+        buf.append(new String(ch, start, length));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.xml.sax.helpers.DefaultHandler#endDocument()
+     */
+    public void endDocument() throws SAXException {
+        if (log.isDebugEnabled()) {
+            log.debug("endDocument()");
+            buf.append("<!-- End Document(RewriteHandlerImpl) -->");
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String,
+     *      java.lang.String, java.lang.String)
+     */
+    public void endElement(String uri, String localName, String qName)
+            throws SAXException {
+        if (write && qName.equalsIgnoreCase(BODY_TAG)) {
+            write = false;
+            return;
+        }
+        if (!write) {
+            return;
+        }
+        buf.append("</");
+        buf.append(qName.toLowerCase());
+        buf.append(">");
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.xml.sax.helpers.DefaultHandler#startDocument()
+     */
+    public void startDocument() throws SAXException {
+        if (log.isDebugEnabled()) {
+            log.debug("startDocument()");
+            buf.append("<!-- Start Document(RewriteHandlerImpl) -->");
+        }
+        S2Container container = SingletonS2ContainerFactory.getContainer();
+        DownloadHelper downloadHelper = (DownloadHelper) container
+                .getComponent(DownloadHelper.class);
+        downloadHelper.reset();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String,
+     *      java.lang.String, java.lang.String, org.xml.sax.Attributes)
+     */
+    public void startElement(String uri, String localName, String qName,
+            Attributes attributes) throws SAXException {
+        if (log.isDebugEnabled()) {
+            log.debug("startElement(String, String, String, Attributes) - uri="
+                    + uri + ", localName=" + localName + ", qName=" + qName
+                    + ", attributes=" + attributes);
+        }
+        if (!write && qName.equalsIgnoreCase(BODY_TAG)) {
+            write = true;
+            return;
+        }
+        if (!write) {
+            return;
+        }
+        buf.append("<");
+        buf.append(qName.toLowerCase());
+        if (qName.equalsIgnoreCase("a")) {
+            // a
+            String href = null;
+            String target = null;
+            for (int i = 0; i < attributes.getLength(); i++) {
+                String attrQName = attributes.getQName(i);
+                String attrValue = attributes.getValue(i);
+                if (attrQName.equalsIgnoreCase("href")) {
+                    href = attrValue;
+                } else if (attrQName.equalsIgnoreCase("target")) {
+                    target = attrValue;
+                } else {
+                    buf.append(" ");
+                    buf.append(attrQName);
+                    buf.append("=\"");
+                    buf.append(attrValue);
+                    buf.append("\"");
+                }
+            }
+            if (log.isDebugEnabled()) {
+                log
+                        .debug("startElement(String, String, String, Attributes) - href="
+                                + href + ", target=" + target);
+            }
+            if (href != null) {
+                if (target != null) {
+                    if (target.startsWith(CMSConstants.CONTENT_TARGET_PREFIX)) {
+                        buf.append(" ");
+                        buf.append("href");
+                        buf.append("=\"");
+                        buf.append(rewriteUrl(href, target
+                                .substring(CMSConstants.CONTENT_TARGET_PREFIX
+                                        .length())));
+                        buf.append("\"");
+                    } else {
+                        buf.append(" ");
+                        buf.append("href");
+                        buf.append("=\"");
+                        buf.append(rewriteUrl(href, null));
+                        buf.append("\"");
+
+                        buf.append(" ");
+                        buf.append("target");
+                        buf.append("=\"");
+                        buf.append(target);
+                        buf.append("\"");
+                    }
+                } else {
+                    buf.append(" ");
+                    buf.append("href");
+                    buf.append("=\"");
+                    buf.append(rewriteUrl(href, null));
+                    buf.append("\"");
+                }
+            } else if (target != null) {
+                buf.append(" ");
+                buf.append("target");
+                buf.append("=\"");
+                buf.append(target);
+                buf.append("\"");
+            }
+        } else if (qName.equalsIgnoreCase("img")) {
+            // img
+            for (int i = 0; i < attributes.getLength(); i++) {
+                String attrQName = attributes.getQName(i);
+                String attrValue = attributes.getValue(i);
+                if (attrQName.equalsIgnoreCase("src")) {
+                    // src
+                    buf.append(" ");
+                    buf.append(attrQName);
+                    buf.append("=\"");
+                    buf.append(rewriteUrl(attrValue, null));
+                    buf.append("\"");
+                } else {
+                    buf.append(" ");
+                    buf.append(attrQName);
+                    buf.append("=\"");
+                    buf.append(attrValue);
+                    buf.append("\"");
+                }
+            }
+        } else {
+            for (int i = 0; i < attributes.getLength(); i++) {
+                buf.append(" ");
+                buf.append(attributes.getQName(i));
+                buf.append("=\"");
+                buf.append(attributes.getValue(i));
+                buf.append("\"");
+            }
+        }
+        buf.append(">");
+
+    }
+
+    protected String rewriteUrl(String url, String target) {
+        if (log.isDebugEnabled()) {
+            log.debug("rewriteUrl(String) - url=" + url);
+        }
+        if (url.startsWith(CMSConstants.CONTENT_MANAGEMENT_PROTOCOL)) {
+            String path = url
+                    .substring(CMSConstants.CONTENT_MANAGEMENT_PROTOCOL
+                            .length());
+            if (log.isDebugEnabled()) {
+                log.debug("rewriteUrl(String) - path=" + path);
+            }
+            try {
+                S2Container container = SingletonS2ContainerFactory
+                        .getContainer();
+                FileNodeDao fileNodeDao = (FileNodeDao) container
+                        .getComponent(FileNodeDao.class);
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(), path);
+                if (fileNode != null) {
+                    if (fileNode.getMimeType() != null
+                            && fileNode.getMimeType().equals(
+                                    CMSConstants.DEFAULT_HTML_MIMETYPE)) {
+                        PortletURL portletUrl = CMSUtil.getRenderResponse()
+                                .createActionURL();
+                        portletUrl
+                                .setParameter(CMSConstants.CONTENT_PATH, path);
+                        if (target == null) {
+                            target = CMSUtil.getRenderResponse().getNamespace();
+                        }
+                        portletUrl.setParameter(CMSConstants.CONTENT_TARGET,
+                                target);
+                        if (log.isDebugEnabled()) {
+                            log.debug("rewriteUrl(String) - url=" + url
+                                    + ", path=" + path + ", target=" + target);
+                            log.debug("rewriteUrl(String) - portletUrl="
+                                    + portletUrl);
+                        }
+                        return portletUrl.toString();
+                    } else {
+                        DownloadHelper downloadHelper = (DownloadHelper) container
+                                .getComponent(DownloadHelper.class);
+                        String key = downloadHelper.publish(CMSUtil
+                                .getScopeFromRequest()
+                                + CMSConstants.KEY_SEPARATOR + path);
+                        if (key == null) {
+                            log.error("Invalid url: " + url);
+                            return url;
+                        }
+                        StringBuffer buf = new StringBuffer(FacesContext
+                                .getCurrentInstance().getExternalContext()
+                                .getRequestContextPath());
+                        buf.append(CMSConstants.FILE_SERVLET);
+                        buf.append("?");
+                        buf.append(CMSConstants.FILE_ID);
+                        buf.append("=");
+                        buf.append(key);
+                        return buf.toString();
+                    }
+                } else {
+                    log.error("Invalid url: " + url);
+                    return url;
+                }
+            } catch (CMSException e) {
+                log.error("Invalid url: " + url, e);
+                return url;
+            }
+        } else {
+            return url;
+        }
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/helpers/impl/RewriteHandlerImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/HtmlRewriterImpl.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/HtmlRewriterImpl.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/HtmlRewriterImpl.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.rewriter.impl;
+
+import java.io.IOException;
+
+import jp.sf.pal.cms.rewriter.HtmlRewriter;
+import jp.sf.pal.cms.rewriter.helpers.RewriteHandler;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.cyberneko.html.parsers.SAXParser;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class HtmlRewriterImpl implements HtmlRewriter {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(HtmlRewriterImpl.class);
+
+    private RewriteHandler rewriteHandler;
+
+    public HtmlRewriterImpl(RewriteHandler rewriteHandler) {
+        setRewriteHandler(rewriteHandler);
+    }
+
+    public String parse(InputSource inputSource) {
+        SAXParser parser = new SAXParser();
+        parser.setContentHandler(getRewriteHandler());
+        parser.setDTDHandler(getRewriteHandler());
+        parser.setEntityResolver(getRewriteHandler());
+        parser.setErrorHandler(getRewriteHandler());
+        try {
+            parser.parse(inputSource);
+            return getRewriteHandler().getContent();
+        } catch (SAXException e) {
+            log.error("XML parser error occurred.", e);
+        } catch (IOException e) {
+            log.error("I/O error occurred.", e);
+        }
+        return null;
+    }
+
+    /**
+     * @return Returns the rewriteHandler.
+     */
+    public RewriteHandler getRewriteHandler() {
+        return rewriteHandler;
+    }
+
+    /**
+     * @param rewriteHandler
+     *            The rewriteHandler to set.
+     */
+    public void setRewriteHandler(RewriteHandler rewriteHandler) {
+        this.rewriteHandler = rewriteHandler;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/rewriter/impl/HtmlRewriterImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/FileServlet.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/FileServlet.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/FileServlet.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.servlet;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.helper.DownloadHelper;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class FileServlet extends HttpServlet {
+
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(FileServlet.class);
+
+    private static final int BLOCK_SIZE = 4096;
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws IOException, ServletException {
+
+        String fileId = (String) request.getParameter(CMSConstants.FILE_ID);
+        if (log.isDebugEnabled()) {
+            log.debug("doGet() - fileId=" + fileId);
+        }
+        if (fileId == null) {
+            log.error("The file id is emtpy. ");
+            // TODO i18n
+            response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                    "The file id is emtpy. ");
+            return;
+        }
+
+        S2Container container = SingletonS2ContainerFactory.getContainer();
+        DownloadHelper downloadHelper = (DownloadHelper) container
+                .getComponent(DownloadHelper.class);
+        String value = downloadHelper.consume(fileId);
+        if (value == null) {
+            log.error("Could not find the specified object. ");
+            // TODO i18n
+            response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                    "Could not find the specified object. ");
+            return;
+        }
+        int index = value.indexOf(CMSConstants.KEY_SEPARATOR);
+        if (index < 0) {
+            log.error("Could not find the path. " + value);
+            // TODO i18n
+            response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                    "Could not find the path. " + value);
+            return;
+        }
+        String scopeName = value.substring(0, index);
+        String path = value.substring(index + 1);
+        if (log.isDebugEnabled()) {
+            log.debug("doGet(HttpServletRequest, HttpServletResponse) - value="
+                    + value + ", index=" + index + ", scopeName=" + scopeName
+                    + ", path=" + path);
+        }
+
+        try {
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            FileNodeDto fileNode = fileNodeDao.getFileNode(scopeName, path);
+            if (fileNode == null) {
+                log.error("Could not find scope=" + scopeName + ", path="
+                        + value);
+                // TODO i18n
+                response
+                        .sendError(HttpServletResponse.SC_NOT_FOUND,
+                                "Could not find scope=" + scopeName + ", path="
+                                        + value);
+                return;
+            }
+
+            InputStream in = fileNode.getInputStream();
+            if (in == null) {
+                log.error("The input stream is null: scope=" + scopeName
+                        + ", path=" + value);
+                // TODO i18n
+                response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                        "The input stream is null: scope=" + scopeName
+                                + ", path=" + value);
+                return;
+            }
+
+            // MIME Type
+            StringBuffer contentType = new StringBuffer();
+            if (fileNode.getMimeType() != null) {
+                contentType.append(fileNode.getMimeType());
+            } else {
+                contentType.append("application/octet-stream");
+            }
+            if (fileNode.getEncoding() != null
+                    && !fileNode.getEncoding().equals("")) {
+                contentType.append(";charset=");
+                contentType.append(fileNode.getEncoding());
+            }
+            response.setContentType(contentType.toString());
+
+            // File Name
+            response.setHeader("Content-disposition", "attachment; filename=\""
+                    + fileNode.getName() + "\"");
+
+            drain(in, response.getOutputStream());
+        } catch (CMSException e) {
+            log.error("Could not load the target object: " + path, e);
+            // TODO i18n
+            response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                    "Could not load the target object: " + path);
+        }
+    }
+
+    public static void drain(InputStream r, OutputStream w) throws IOException {
+        byte[] bytes = new byte[BLOCK_SIZE];
+        try {
+            int length = r.read(bytes);
+            while (length != -1) {
+                if (length != 0) {
+                    w.write(bytes, 0, length);
+                }
+                length = r.read(bytes);
+            }
+        } finally {
+            bytes = null;
+        }
+
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/servlet/FileServlet.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/CMSUtil.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/CMSUtil.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/CMSUtil.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,256 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.util;
+
+import java.io.InputStream;
+import java.util.Calendar;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.version.VersionException;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequest;
+import javax.portlet.RenderResponse;
+import javax.servlet.ServletContext;
+
+import jp.sf.pal.cms.CMSConstants;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class CMSUtil {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(CMSUtil.class);
+
+    public static String normalizedPath(String path) {
+        // TODO
+        path = new String(path).replaceAll(CMSConstants.PATH_SEPARATOR + "+",
+                CMSConstants.PATH_SEPARATOR);
+        return path;
+    }
+
+    public static String getParentPath(String path) {
+        path = normalizedPath(path);
+        int last = path.lastIndexOf(CMSConstants.PATH_SEPARATOR);
+        if (path.endsWith(CMSConstants.PATH_SEPARATOR)) {
+            last = path.lastIndexOf(CMSConstants.PATH_SEPARATOR, last);
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("getParentPath(String) - path=" + path);
+            log.debug("getParentPath(String) - parentPath="
+                    + path.substring(0, last));
+            log.debug("getParentPath(String) - last=" + last);
+        }
+        if (last != 0) {
+            return path.substring(0, last);
+        } else {
+            return CMSConstants.PATH_SEPARATOR;
+        }
+    }
+
+    public static void setScopeToRequest(PortletRequest request,
+            String scopeName) {
+        request.setAttribute(CMSConstants.SCOPE, scopeName);
+    }
+
+    /**
+     * Returns the scope name during init()
+     * 
+     * @param request
+     * @return
+     */
+    public static String getScopeFromRequest(PortletRequest request) {
+        String scopeName = (String) request.getAttribute(CMSConstants.SCOPE);
+        if (scopeName != null) {
+            return scopeName;
+        }
+        // TODO NPE from getPortletConfig
+        scopeName = getPortletConfig(request).getInitParameter(
+                CMSConstants.SCOPE);
+        if (scopeName != null) {
+            return scopeName;
+        }
+        return CMSConstants.DEFAULT_SCOPE_VALUE;
+    }
+
+    public static PortletConfig getPortletConfig(PortletRequest request) {
+        String name = "javax.portlet.PortletConfig";
+        return (PortletConfig) request.getAttribute(name);
+    }
+
+    /**
+     * Returns the scope name during processAction() and render()
+     * 
+     * @param request
+     * @return
+     */
+    public static String getScopeFromRequest() {
+        String scopeName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getRequestMap().get(CMSConstants.SCOPE);
+        if (scopeName != null) {
+            return scopeName;
+        }
+        // TODO NPE from getPortletConfig
+        scopeName = getPortletConfig().getInitParameter(CMSConstants.SCOPE);
+        if (scopeName != null) {
+            return scopeName;
+        }
+        return CMSConstants.DEFAULT_SCOPE_VALUE;
+
+    }
+
+    public static PortletConfig getPortletConfig() {
+        String name = "javax.portlet.PortletConfig";
+        return (PortletConfig) FacesContext.getCurrentInstance()
+                .getExternalContext().getRequestMap().get(name);
+    }
+
+    public static void clearSession() {
+        Map sessionMap = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap();
+        if (sessionMap != null) {
+            sessionMap.remove(CMSConstants.NEW_OBJECT_NAME);
+            sessionMap.remove(CMSConstants.SELECTED_OBJECT_NAME);
+        } else {
+            log.warn("Cannot get the session.");
+        }
+    }
+
+    public static String escapeAttributeValue(String str) {
+        // TODO review conversion
+        // return StringEscapeUtils.escapeJava(str);
+        return str.replaceAll("'", "\\'");
+    }
+
+    public static boolean setProperty(Node node, String key, String value)
+            throws VersionException, LockException, ValueFormatException,
+            RepositoryException {
+        if (value == null) {
+            return false;
+        }
+        node.setProperty(key, value);
+        return true;
+    }
+
+    public static boolean setProperty(Node node, String key, String value,
+            String defaultValue) throws VersionException, LockException,
+            ValueFormatException, RepositoryException {
+        if (!setProperty(node, key, value)) {
+            if (defaultValue == null) {
+                return false;
+            }
+            node.setProperty(key, defaultValue);
+        }
+        return true;
+    }
+
+    public static boolean setProperty(Node node, String key, Calendar value)
+            throws VersionException, LockException, ValueFormatException,
+            RepositoryException {
+        if (value == null) {
+            return false;
+        }
+        node.setProperty(key, value);
+        return true;
+    }
+
+    public static boolean setProperty(Node node, String key, Calendar value,
+            Calendar defaultValue) throws VersionException, LockException,
+            ValueFormatException, RepositoryException {
+        if (!setProperty(node, key, value)) {
+            if (defaultValue == null) {
+                return false;
+            }
+            node.setProperty(key, defaultValue);
+        }
+        return true;
+    }
+
+    public static boolean setProperty(Node node, String key, InputStream value)
+            throws VersionException, LockException, ValueFormatException,
+            RepositoryException {
+        if (value == null) {
+            return false;
+        }
+        node.setProperty(key, value);
+        return true;
+    }
+
+    public static boolean setProperty(Node node, String key, InputStream value,
+            InputStream defaultValue) throws VersionException, LockException,
+            ValueFormatException, RepositoryException {
+        if (!setProperty(node, key, value)) {
+            if (defaultValue == null) {
+                return false;
+            }
+            node.setProperty(key, defaultValue);
+        }
+        return true;
+    }
+
+    public static String getNamespace() {
+        return FacesContext.getCurrentInstance().getExternalContext()
+                .encodeNamespace(CMSConstants.PAGE_NAME);
+    }
+
+    public static RenderResponse getRenderResponse() {
+        Object response = FacesContext.getCurrentInstance()
+                .getExternalContext().getResponse();
+        if (response instanceof RenderResponse) {
+            return (RenderResponse) response;
+        }
+        throw new IllegalStateException("Could not get RenderResponse.");
+    }
+
+    public static String getMimeType(String filename) {
+        return getMimeType(FacesContext.getCurrentInstance()
+                .getExternalContext().getContext(), filename);
+    }
+
+    public static String getMimeType(Object context, String filename) {
+        if (context instanceof ServletContext) {
+            ServletContext servletContext = (ServletContext) context;
+            return servletContext.getMimeType(filename);
+        } else if (context instanceof PortletContext) {
+            PortletContext portletContext = (PortletContext) context;
+            return portletContext.getMimeType(filename);
+        }
+        return null;
+    }
+
+    public static boolean isTextMimeType(String mimeType) {
+        if (mimeType != null && mimeType.startsWith("text")) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isHtmlMimeType(String mimeType) {
+        if (mimeType != null
+                && mimeType.equals(CMSConstants.DEFAULT_HTML_MIMETYPE)) {
+            return true;
+        }
+        return false;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/util/CMSUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFilePage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFilePage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFilePage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.util.CMSUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class CreateNewFilePage {
+    private String path;
+
+    private String name;
+
+    public CreateNewFilePage() {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    public String createTextContent() {
+        FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
+                .put(CMSConstants.NEW_OBJECT_NAME, getName());
+        return CMSConstants.WRITE_TEXT_CONTENT_PAGE;
+    }
+
+    public String createHtmlContent() {
+        FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
+                .put(CMSConstants.NEW_OBJECT_NAME, getName());
+        return CMSConstants.WRITE_HTML_CONTENT_PAGE;
+    }
+
+    public String upload() {
+        FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
+                .put(CMSConstants.NEW_OBJECT_NAME, getName());
+        return CMSConstants.UPLOAD_FILE_PAGE;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFilePage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFolderPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFolderPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFolderPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FolderNodeDao;
+import jp.sf.pal.cms.dto.FolderNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class CreateNewFolderPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(CreateNewFolderPage.class);
+
+    private String path;
+
+    private String name;
+
+    private S2Container container;
+
+    public CreateNewFolderPage() {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    public String create() {
+        FolderNodeDto folderNode = (FolderNodeDto) container
+                .getComponent(FolderNodeDto.class);
+        // S2Container container = SingletonS2ContainerFactory.getContainer();
+        FolderNodeDao folderNodeDao = (FolderNodeDao) container
+                .getComponent(FolderNodeDao.class);
+        // FolderNodeDto folderNode = new FolderNodeDto();
+        folderNode.setScope(CMSUtil.getScopeFromRequest());
+        folderNode.setParentPath(getPath());
+        folderNode.setName(getName());
+        try {
+            folderNodeDao.insert(folderNode);
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } catch (CMSException e) {
+            log.error("Could not create the new folder: " + getName(), e);
+        }
+        return null;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/CreateNewFolderPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFileDetailPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFileDetailPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFileDetailPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.util.Calendar;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dao.PageNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.dto.PageNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class DisplayFileDetailPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory
+            .getLog(DisplayFileDetailPage.class);
+
+    private String path;
+
+    private String name;
+
+    private S2Container container;
+
+    private boolean textFile;
+
+    private boolean htmlFile;
+
+    public DisplayFileDetailPage(S2Container container) {
+        setContainer(container);
+
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+
+        String name = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (name != null) {
+            setName(name);
+
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            try {
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + name);
+                String mimeType = fileNode.getMimeType();
+                setHtmlFile(CMSUtil.isHtmlMimeType(mimeType));
+                setTextFile(CMSUtil.isTextMimeType(mimeType));
+            } catch (CMSException e) {
+                log.error("Could not open: " + name, e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage("Could not open: " + name, e);
+            }
+        } else {
+            setName("");
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+        }
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    public String update() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (fileName == null) {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+            return null;
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("update() - getPath()=" + getPath());
+            log.debug("update() - getName()=" + getName());
+            log.debug("update() - name=" + fileName);
+        }
+        if (!fileName.equals(getName())) {
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            try {
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + fileName);
+                fileNode.setOldName(fileName);
+                fileNode.setName(getName());
+                fileNode.setLastModifiedTime(Calendar.getInstance());
+
+                fileNodeDao.update(fileNode);
+                FacesContext.getCurrentInstance().getExternalContext()
+                        .getSessionMap().put(CMSConstants.SELECTED_OBJECT_NAME,
+                                getName());
+                // TODO i18n
+                FacesMessageUtil.addInfoMessage("Updated this file.");
+            } catch (CMSException e) {
+                log.error("Could not update this file.", e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage("Could not update this file.",
+                        e);
+            }
+        } else {
+            // TODO i18n
+            FacesMessageUtil.addInfoMessage("The filename is not changed.");
+        }
+        return null;
+    }
+
+    public String updateTextContent() {
+        return CMSConstants.WRITE_TEXT_CONTENT_PAGE;
+    }
+
+    public String updateHtmlContent() {
+        return CMSConstants.WRITE_HTML_CONTENT_PAGE;
+    }
+
+    public String uploadContent() {
+        return CMSConstants.UPLOAD_FILE_PAGE;
+    }
+
+    public String delete() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (fileName == null) {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+            return null;
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("delete() - getPath()=" + getPath());
+            log.debug("delete() - getName()=" + getName());
+            log.debug("delete() - name=" + fileName);
+        }
+        // S2Container container = SingletonS2ContainerFactory.getContainer();
+        FileNodeDao fileNodeDao = (FileNodeDao) container
+                .getComponent(FileNodeDao.class);
+        try {
+            FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                    .getScopeFromRequest(), CMSUtil.normalizedPath(getPath()
+                    + CMSConstants.PATH_SEPARATOR)
+                    + fileName);
+            fileNodeDao.delete(fileNode);
+            // TODO i18n
+            FacesMessageUtil.addInfoMessage("Deleted the file.");
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } catch (CMSException e) {
+            log.error("Could not delete: " + fileName, e);
+            // TODO i18n
+            FacesMessageUtil
+                    .addErrorMessage("Could not delete: " + fileName, e);
+        }
+
+        return null;
+    }
+
+    public String setAsDefaultPage() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (fileName == null) {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+            return null;
+        }
+
+        // check MIME
+        FileNodeDao fileNodeDao = (FileNodeDao) container
+                .getComponent(FileNodeDao.class);
+        try {
+            FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                    .getScopeFromRequest(), CMSUtil.normalizedPath(getPath()
+                    + CMSConstants.PATH_SEPARATOR)
+                    + fileName);
+            if (fileNode.getMimeType() == null
+                    || !CMSUtil.isTextMimeType(fileNode.getMimeType())) {
+                // TODO i18n
+                FacesMessageUtil
+                        .addWarnMessage("This file cannot be set as a default page.");
+                return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+            }
+        } catch (CMSException e) {
+            log.error("Could not open: " + fileName, e);
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("Could not open: " + fileName, e);
+        }
+
+        String uri = CMSUtil.normalizedPath(getPath()
+                + CMSConstants.PATH_SEPARATOR)
+                + fileName;
+        PageNodeDao pageNodeDao = (PageNodeDao) getContainer().getComponent(
+                PageNodeDao.class);
+        String namespace = CMSUtil.getNamespace();
+        try {
+            PageNodeDto pageNodeDto = pageNodeDao.getPageNode(namespace);
+            pageNodeDto.setPath(uri);
+            pageNodeDao.update(pageNodeDto);
+            // TODO i18n
+            FacesMessageUtil
+                    .addInfoMessage("Updated the default page for this portlet.");
+        } catch (CMSException e) {
+            if (log.isDebugEnabled()) {
+                log.debug("Could not update an existing page node: "
+                        + namespace + " path: " + uri
+                        + " Inserting a new page node...");
+            }
+            PageNodeDto newPageNodeDto = (PageNodeDto) container
+                    .getComponent(PageNodeDto.class);
+            // PageNodeDto newPageNodeDto = new PageNodeDto();
+            newPageNodeDto.setName(namespace);
+            newPageNodeDto.setPath(uri);
+            try {
+                pageNodeDao.insert(newPageNodeDto);
+                // TODO i18n
+                FacesMessageUtil
+                        .addInfoMessage("Added the default page for this portlet.");
+            } catch (CMSException e1) {
+                log.error("Could not insert a new page node.", e1);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @return Returns the htmlFile.
+     */
+    public boolean isHtmlFile() {
+        return htmlFile;
+    }
+
+    /**
+     * @param htmlFile
+     *            The htmlFile to set.
+     */
+    public void setHtmlFile(boolean htmlFile) {
+        this.htmlFile = htmlFile;
+    }
+
+    /**
+     * @return Returns the textFile.
+     */
+    public boolean isTextFile() {
+        return textFile;
+    }
+
+    /**
+     * @param textFile
+     *            The textFile to set.
+     */
+    public void setTextFile(boolean textFile) {
+        this.textFile = textFile;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFileDetailPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderDetailPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderDetailPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderDetailPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.util.Calendar;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FolderNodeDao;
+import jp.sf.pal.cms.dto.FolderNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class DisplayFolderDetailPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory
+            .getLog(DisplayFolderDetailPage.class);
+
+    private String path;
+
+    private String name;
+
+    private S2Container container;
+
+    public DisplayFolderDetailPage() {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+
+        String name = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (name != null) {
+            setName(name);
+        } else {
+            setName("");
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+        }
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    public String update() {
+        String folderName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (folderName == null) {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+            return null;
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("update() - getPath()=" + getPath());
+            log.debug("update() - getName()=" + getName());
+            log.debug("update() - name=" + folderName);
+        }
+        if (!folderName.equals(getName())) {
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FolderNodeDao folderNodeDao = (FolderNodeDao) container
+                    .getComponent(FolderNodeDao.class);
+            try {
+                FolderNodeDto folderNode = folderNodeDao.getFolderNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + folderName);
+                folderNode.setOldName(folderName);
+                folderNode.setName(getName());
+                folderNode.setLastModifiedTime(Calendar.getInstance());
+
+                folderNodeDao.update(folderNode);
+                FacesContext.getCurrentInstance().getExternalContext()
+                        .getSessionMap().put(CMSConstants.SELECTED_OBJECT_NAME,
+                                getName());
+                // TODO i18n
+                FacesMessageUtil.addInfoMessage("Updated this folder.");
+            } catch (CMSException e) {
+                log.error("Could not update this folder.", e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage(
+                        "Could not update this folder.", e);
+            }
+        } else {
+            // TODO i18n
+            FacesMessageUtil.addInfoMessage("The folder name is not changed.");
+        }
+        return null;
+    }
+
+    public String delete() {
+        String folderName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.SELECTED_OBJECT_NAME);
+        if (folderName == null) {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("The selected object is null.");
+            return null;
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("delete() - getPath()=" + getPath());
+            log.debug("delete() - getName()=" + getName());
+            log.debug("delete() - name=" + folderName);
+        }
+        // S2Container container = SingletonS2ContainerFactory.getContainer();
+        FolderNodeDao folderNodeDao = (FolderNodeDao) container
+                .getComponent(FolderNodeDao.class);
+        try {
+            FolderNodeDto folderNode = folderNodeDao.getFolderNode(CMSUtil
+                    .getScopeFromRequest(), CMSUtil.normalizedPath(getPath()
+                    + CMSConstants.PATH_SEPARATOR)
+                    + folderName);
+            folderNodeDao.delete(folderNode);
+            // TODO i18n
+            FacesMessageUtil.addInfoMessage("Deleted the folder.");
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } catch (CMSException e) {
+            log.error("Could not delete: " + folderName, e);
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("Could not delete: " + folderName,
+                    e);
+        }
+
+        return null;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderDetailPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderListPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderListPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderListPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,286 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.portlet.RenderResponse;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.ObjectNodeDao;
+import jp.sf.pal.cms.dao.PageNodeDao;
+import jp.sf.pal.cms.dto.ObjectNodeDto;
+import jp.sf.pal.cms.dto.PageNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.ComponentNotFoundRuntimeException;
+import org.seasar.framework.container.CyclicReferenceRuntimeException;
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.TooManyRegistrationRuntimeException;
+import org.seasar.jcr.SessionFactory;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+public class DisplayFolderListPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory
+            .getLog(DisplayFolderListPage.class);
+
+    private String path;
+
+    private String defaultPath;
+
+    private S2Container container;
+
+    public DisplayFolderListPage(S2Container container) {
+        if (log.isDebugEnabled()) {
+            log.debug("DisplayFolderListPage()");
+        }
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            String namespace = CMSUtil.getNamespace();
+            try {
+                PageNodeDao pageNodeDao = (PageNodeDao) container
+                        .getComponent(PageNodeDao.class);
+                PageNodeDto pageNodeDto = pageNodeDao.getPageNode(namespace);
+                if (pageNodeDto != null && pageNodeDto.getPath() != null) {
+                    setPath(CMSUtil.getParentPath(pageNodeDto.getPath()));
+                } else {
+                    setPath(CMSConstants.ROOT_FOLDER);
+                }
+            } catch (CMSException e) {
+                log.warn("Could not get a page node: " + namespace);
+                setPath(CMSConstants.ROOT_FOLDER);
+            }
+        }
+
+    }
+
+    // Action
+    public String goCreateNewFile() {
+        CMSUtil.clearSession();
+        return CMSConstants.CREATE_NEW_FILE_PAGE;
+    }
+
+    public String goCreateNewFolder() {
+        CMSUtil.clearSession();
+        return CMSConstants.CREATE_NEW_FOLDER_PAGE;
+    }
+
+    public String storeXmlFile() {
+        // TODO
+        // S2Container container = SingletonS2ContainerFactory.getContainer();
+        SessionFactory sessionFactory = (SessionFactory) container
+                .getComponent(SessionFactory.class);
+
+        File outputFile = new File("/tmp/cms.xml");
+        try {
+            FileOutputStream out = new FileOutputStream(outputFile);
+            sessionFactory.getSession()
+                    .exportSystemView("/", out, false, false);
+        } catch (FileNotFoundException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (PathNotFoundException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (RepositoryException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public String go() {
+        setPathToSession(getPath());
+        return null;
+    }
+
+    public String goParentFolder() {
+        setPathToSession(CMSUtil.getParentPath(getPath()));
+        return null;
+    }
+
+    public String select() {
+        CMSUtil.clearSession();
+
+        FacesContext context = FacesContext.getCurrentInstance();
+        ExternalContext exContext = context.getExternalContext();
+        Map map = exContext.getRequestMap();
+        ObjectNodeDto objectNode = (ObjectNodeDto) map.get("objectNode");
+        if (objectNode.getNodeType().equals(CMSConstants.FOLDER_NODE)) {
+            // folder
+            setPathToSession(CMSUtil.normalizedPath(objectNode.getParentPath()
+                    + CMSConstants.PATH_SEPARATOR)
+                    + objectNode.getName());
+            return null;
+        } else if (objectNode.getNodeType().equals(CMSConstants.FILE_NODE)) {
+            // file
+            FacesContext.getCurrentInstance().getExternalContext()
+                    .getSessionMap().put(CMSConstants.SELECTED_OBJECT_NAME,
+                            objectNode.getName());
+            return CMSConstants.DISPLAY_FILE_DETAIL_PAGE;
+        } else {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("Invalid node type.");
+            return null;
+        }
+    }
+
+    private void setPathToSession(String path) {
+        FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
+                .put(CMSConstants.PATH, path);
+        setPath(path);
+    }
+
+    public String editFolder() {
+        CMSUtil.clearSession();
+
+        FacesContext context = FacesContext.getCurrentInstance();
+        ExternalContext exContext = context.getExternalContext();
+        Map map = exContext.getRequestMap();
+        ObjectNodeDto objectNode = (ObjectNodeDto) map.get("objectNode");
+        if (objectNode.getNodeType().equals(CMSConstants.FOLDER_NODE)) {
+            // folder
+            FacesContext.getCurrentInstance().getExternalContext()
+                    .getSessionMap().put(CMSConstants.SELECTED_OBJECT_NAME,
+                            objectNode.getName());
+            return CMSConstants.DISPLAY_FOLDER_DETAIL_PAGE;
+        } else {
+            // TODO i18n
+            FacesMessageUtil.addErrorMessage("Invalid node type.");
+            return null;
+        }
+    }
+
+    // Setter and Getter
+    /**
+     * @return the path
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            the path to set
+     */
+    public void setPath(String path) {
+        this.path = CMSUtil.normalizedPath(path);
+    }
+
+    public List getObjectNodes() {
+        try {
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            ObjectNodeDao objectNodeDao = (ObjectNodeDao) container
+                    .getComponent(ObjectNodeDao.class);
+            // TODO insert service layer?
+            if (log.isDebugEnabled()) {
+                log
+                        .debug("DisplayFolderListPage() - scope="
+                                + CMSUtil.getScopeFromRequest() + ", path="
+                                + getPath());
+            }
+            return objectNodeDao.getObjectNodes(CMSUtil.getScopeFromRequest(),
+                    getPath());
+        } catch (ComponentNotFoundRuntimeException e) {
+            log.error(e);
+        } catch (TooManyRegistrationRuntimeException e) {
+            log.error(e);
+        } catch (CyclicReferenceRuntimeException e) {
+            log.error(e);
+        } catch (CMSException e) {
+            log.error(e);
+        }
+        // TODO empty List needed?
+        return null;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+    /**
+     * @return Returns the defaultPath.
+     */
+    public String getDefaultPath() {
+        if (defaultPath != null) {
+            return defaultPath;
+        }
+        String namespace = CMSUtil.getNamespace();
+        PageNodeDao pageNodeDao = (PageNodeDao) getContainer().getComponent(
+                PageNodeDao.class);
+        try {
+            PageNodeDto pageNodeDto = pageNodeDao.getPageNode(namespace);
+            if (pageNodeDto != null && pageNodeDto.getPath() != null) {
+                defaultPath = pageNodeDto.getPath();
+                if (log.isDebugEnabled()) {
+                    log.debug("getDefaultPath() - defaultPath=" + defaultPath);
+                }
+                return defaultPath;
+            }
+        } catch (CMSException e) {
+            log.warn("Could not call PageNodeDao#getPageNode(" + namespace
+                    + ") in getDefaultPath().");
+        }
+        defaultPath = "";
+        if (log.isDebugEnabled()) {
+            log.debug("getDefaultPath() - defaultPath=" + defaultPath);
+        }
+        return defaultPath;
+    }
+
+    public String getNamespace() {
+        Object response = FacesContext.getCurrentInstance()
+                .getExternalContext().getResponse();
+        if (response instanceof RenderResponse) {
+            return ((RenderResponse) response).getNamespace();
+        }
+        return null;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/DisplayFolderListPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/UploadFilePage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/UploadFilePage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/UploadFilePage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,361 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.custom.fileupload.UploadedFile;
+import org.seasar.framework.container.S2Container;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class UploadFilePage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(UploadFilePage.class);
+
+    private String path;
+
+    private String name;
+
+    private String title;
+
+    private String description;
+
+    private String mimeType;
+
+    private String encoding;
+
+    private UploadedFile uploadedFile;
+
+    private S2Container container;
+
+    public UploadFilePage(S2Container container) {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+
+        // add new object
+        String name = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("UploadFilePage() - path=" + path);
+            log.debug("UploadFilePage() - name=" + name);
+        }
+        if (name != null) {
+            setName(name);
+        } else {
+            // update
+            name = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (log.isDebugEnabled()) {
+                log.debug("UploadFilePage() - name=" + name);
+                log
+                        .debug("UploadFilePage() - CMSUtil.normalizedPath(getPath() + CMSConstants.PATH_SEPARATOR + name)="
+                                + CMSUtil.normalizedPath(getPath()
+                                        + CMSConstants.PATH_SEPARATOR) + name);
+            }
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+
+            try {
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + name);
+                if (fileNode != null) {
+                    setName(fileNode.getName());
+                    setTitle(fileNode.getTitle());
+                    setDescription(fileNode.getDescription());
+                    setMimeType(fileNode.getMimeType());
+                    setEncoding(fileNode.getEncoding());
+
+                } else {
+                    // TODO i18n
+                    FacesMessageUtil
+                            .addErrorMessage("The file object is not specified.");
+                }
+            } catch (CMSException e) {
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage("Could not load file: "
+                        + getPath() + CMSConstants.PATH_SEPARATOR + name, e);
+            }
+        }
+        // Set MIME type
+        if (getMimeType() == null || getMimeType().equals("")) {
+            setMimeType(CMSUtil.getMimeType(getName()));
+        }
+    }
+
+    public String save() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("save() - name=" + fileName);
+        }
+        if (fileName != null) {
+            // create a new object
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            FileNodeDto fileNode = (FileNodeDto) container
+                    .getComponent(FileNodeDto.class);
+            // FileNodeDto fileNode = new FileNodeDto();
+            fileNode.setScope(CMSUtil.getScopeFromRequest());
+            fileNode.setParentPath(getPath());
+            fileNode.setName(fileName);
+            fileNode.setTitle(getTitle());
+            fileNode.setDescription(getDescription());
+            fileNode.setMimeType(getMimeType());
+            fileNode.setEncoding(getEncoding());
+            if (getUploadedFile() != null) {
+                try {
+                    fileNode.setInputStream(getUploadedFile().getInputStream());
+                } catch (IOException e) {
+                    log
+                            .warn(
+                                    "Could not load an input stream from the uploaded file.",
+                                    e);
+                }
+            } else {
+                fileNode.setInputStream(null);
+            }
+            try {
+                fileNodeDao.insert(fileNode);
+                // TODO i18n
+                FacesMessageUtil.addInfoMessage("Added a new file object.");
+            } catch (CMSException e) {
+                log.warn("Could not insert a new file object: path="
+                        + fileNode.getParentPath() + ", name="
+                        + fileNode.getName(), e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage(
+                        "Could not insert a new file object.", e);
+            }
+            // clear session
+            CMSUtil.clearSession();
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } else {
+            // update
+            fileName = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (fileName != null) {
+                // S2Container container = SingletonS2ContainerFactory
+                // .getContainer();
+                FileNodeDao fileNodeDao = (FileNodeDao) container
+                        .getComponent(FileNodeDao.class);
+                try {
+                    FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                            .getScopeFromRequest(), CMSUtil
+                            .normalizedPath(getPath()
+                                    + CMSConstants.PATH_SEPARATOR)
+                            + fileName);
+                    if (log.isDebugEnabled()) {
+                        log.debug("save() - fileNode=" + fileNode);
+                    }
+                    fileNode.setTitle(getTitle());
+                    fileNode.setDescription(getDescription());
+                    fileNode.setMimeType(getMimeType());
+                    fileNode.setEncoding(getEncoding());
+                    if (getUploadedFile() != null) {
+                        try {
+                            fileNode.setInputStream(getUploadedFile()
+                                    .getInputStream());
+                        } catch (IOException e) {
+                            log
+                                    .warn(
+                                            "Could not load an input stream from the uploaded file.",
+                                            e);
+                        }
+                    } else {
+                        fileNode.setInputStream(null);
+                    }
+                    fileNodeDao.updateContent(fileNode);
+                    // TODO i18n
+                    FacesMessageUtil.addInfoMessage("Updated the file object.");
+                } catch (CMSException e) {
+                    log.warn("Could not update the file object: path="
+                            + getPath() + ", name=" + getName(), e);
+                    // TODO i18n
+                    FacesMessageUtil.addErrorMessage(
+                            "Could not update the file object.", e);
+                }
+                return null;
+            } else {
+                // TODO i18n
+                FacesMessageUtil
+                        .addErrorMessage("The file object is not specified.");
+            }
+        }
+        return null;
+    }
+
+    public String backToList() {
+        if (log.isDebugEnabled()) {
+            log.debug("backToList()");
+        }
+
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the description.
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description
+     *            The description to set.
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return Returns the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * @param encoding
+     *            The encoding to set.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    /**
+     * @return Returns the mimeType.
+     */
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    /**
+     * @param mimeType
+     *            The mimeType to set.
+     */
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the title.
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * @param title
+     *            The title to set.
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * @return Returns the uploadedFile.
+     */
+    public UploadedFile getUploadedFile() {
+        return uploadedFile;
+    }
+
+    /**
+     * @param uploadedFile
+     *            The uploadedFile to set.
+     */
+    public void setUploadedFile(UploadedFile uploadedFile) {
+        this.uploadedFile = uploadedFile;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/UploadFilePage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteHtmlContentPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteHtmlContentPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteHtmlContentPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,383 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class WriteHtmlContentPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory
+            .getLog(WriteHtmlContentPage.class);
+
+    private String content;
+
+    private String path;
+
+    private String name;
+
+    private String title;
+
+    private String description;
+
+    private String mimeType;
+
+    private String encoding;
+
+    private S2Container container;
+
+    public WriteHtmlContentPage(S2Container container) {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+
+        // add new object
+        String name = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("WriteHtmlContentPage() - path=" + path);
+            log.debug("WriteHtmlContentPage() - name=" + name);
+        }
+        if (name != null) {
+            // new
+            setName(name);
+            setMimeType(CMSConstants.DEFAULT_HTML_MIMETYPE);
+            setEncoding(CMSConstants.DEFAULT_ENCODING);
+            setContent("");
+        } else {
+            // update
+            name = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (log.isDebugEnabled()) {
+                log.debug("WriteHtmlContentPage() - name=" + name);
+                log
+                        .debug("WriteHtmlContentPage() - CMSUtil.normalizedPath(getPath() + CMSConstants.PATH_SEPARATOR + name)="
+                                + CMSUtil.normalizedPath(getPath()
+                                        + CMSConstants.PATH_SEPARATOR) + name);
+            }
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+
+            try {
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + name);
+                if (fileNode != null) {
+                    setName(fileNode.getName());
+                    setTitle(fileNode.getTitle());
+                    setDescription(fileNode.getDescription());
+                    setMimeType(fileNode.getMimeType());
+                    setEncoding(fileNode.getEncoding());
+                    setContent(fileNode.getContent());
+                } else {
+                    // TODO i18n
+                    FacesMessageUtil
+                            .addErrorMessage("The file object is not specified.");
+                }
+            } catch (CMSException e) {
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage("Could not load file: "
+                        + getPath() + CMSConstants.PATH_SEPARATOR + name, e);
+            }
+        }
+        // Set MIME type
+        if (getMimeType() == null || getMimeType().equals("")) {
+            setMimeType(CMSUtil.getMimeType(getName()));
+        }
+    }
+
+    public String save() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("save() - name=" + fileName);
+        }
+        if (fileName != null) {
+            // create a new object
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            FileNodeDto fileNode = (FileNodeDto) container
+                    .getComponent(FileNodeDto.class);
+            // FileNodeDto fileNode = new FileNodeDto();
+            fileNode.setScope(CMSUtil.getScopeFromRequest());
+            fileNode.setParentPath(getPath());
+            fileNode.setName(fileName);
+            fileNode.setTitle(getTitle());
+            fileNode.setDescription(getDescription());
+            fileNode.setMimeType(getMimeType());
+            fileNode.setEncoding(getEncoding());
+            try {
+                fileNode.setInputStream(new ByteArrayInputStream(getContent()
+                        .getBytes(fileNode.getEncoding())));
+            } catch (UnsupportedEncodingException e) {
+                fileNode.setEncoding(CMSConstants.DEFAULT_ENCODING);
+                log
+                        .warn(
+                                "Unsupported encoding when the content is converted to a stream. ",
+                                e);
+                try {
+                    fileNode.setInputStream(new ByteArrayInputStream(
+                            getContent().getBytes(fileNode.getEncoding())));
+                } catch (UnsupportedEncodingException e1) {
+                    log.error("The system could not handle UTF-8 encoding.", e);
+                    // TODO i18n
+                    FacesMessageUtil.addErrorMessage(
+                            "The system could not handle UTF-8 encoding.", e);
+                    return null;
+                }
+            }
+            try {
+                fileNodeDao.insert(fileNode);
+                // TODO i18n
+                FacesMessageUtil.addInfoMessage("Added a new file object.");
+            } catch (CMSException e) {
+                log.warn("Could not insert a new file object: path="
+                        + fileNode.getParentPath() + ", name="
+                        + fileNode.getName(), e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage(
+                        "Could not insert a new file object.", e);
+            }
+            // clear session
+            CMSUtil.clearSession();
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } else {
+            // update
+            fileName = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (fileName != null) {
+                // S2Container container = SingletonS2ContainerFactory
+                // .getContainer();
+                FileNodeDao fileNodeDao = (FileNodeDao) container
+                        .getComponent(FileNodeDao.class);
+                try {
+                    FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                            .getScopeFromRequest(), CMSUtil
+                            .normalizedPath(getPath()
+                                    + CMSConstants.PATH_SEPARATOR)
+                            + fileName);
+                    if (log.isDebugEnabled()) {
+                        log.debug("save() - fileNode=" + fileNode);
+                    }
+                    fileNode.setTitle(getTitle());
+                    fileNode.setDescription(getDescription());
+                    fileNode.setMimeType(getMimeType());
+                    fileNode.setEncoding(getEncoding());
+                    try {
+                        fileNode.setInputStream(new ByteArrayInputStream(
+                                getContent().getBytes(fileNode.getEncoding())));
+                    } catch (UnsupportedEncodingException e) {
+                        fileNode.setEncoding(CMSConstants.DEFAULT_ENCODING);
+                        log
+                                .warn(
+                                        "Unsupported encoding when the content is converted to a stream. ",
+                                        e);
+                        try {
+                            fileNode.setInputStream(new ByteArrayInputStream(
+                                    getContent().getBytes(
+                                            fileNode.getEncoding())));
+                        } catch (UnsupportedEncodingException e1) {
+                            log
+                                    .error(
+                                            "The system could not handle UTF-8 encoding.",
+                                            e);
+                            // TODO i18n
+                            FacesMessageUtil
+                                    .addErrorMessage(
+                                            "The system could not handle UTF-8 encoding.",
+                                            e);
+                            return null;
+                        }
+                    }
+                    fileNodeDao.updateContent(fileNode);
+                    // TODO i18n
+                    FacesMessageUtil.addInfoMessage("Updated the file object.");
+                } catch (CMSException e) {
+                    log.warn("Could not update the file object: path="
+                            + getPath() + ", name=" + getName(), e);
+                    // TODO i18n
+                    FacesMessageUtil.addErrorMessage(
+                            "Could not update the file object.", e);
+                }
+                return null;
+            } else {
+                // TODO i18n
+                FacesMessageUtil
+                        .addErrorMessage("The file object is not specified.");
+            }
+        }
+        return null;
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    /**
+     * @return Returns the content.
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * @param content
+     *            The content to set.
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    /**
+     * @return Returns the description.
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description
+     *            The description to set.
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return Returns the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * @param encoding
+     *            The encoding to set.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    /**
+     * @return Returns the mimeType.
+     */
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    /**
+     * @param mimeType
+     *            The mimeType to set.
+     */
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the title.
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * @param title
+     *            The title to set.
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteHtmlContentPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteTextContentPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteTextContentPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteTextContentPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,387 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+
+import com.marevol.utils.faces.application.FacesMessageUtil;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class WriteTextContentPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory
+            .getLog(WriteTextContentPage.class);
+
+    private String content;
+
+    private String path;
+
+    private String name;
+
+    private String title;
+
+    private String description;
+
+    private String mimeType;
+
+    private String encoding;
+
+    private S2Container container;
+
+    public WriteTextContentPage(S2Container container) {
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.PATH);
+        if (obj != null) {
+            setPath((String) obj);
+        } else {
+            setPath(CMSConstants.ROOT_FOLDER);
+        }
+
+        // add new object
+        String name = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("WriteTextContentPage() - path=" + path);
+            log.debug("WriteTextContentPage() - name=" + name);
+        }
+        if (name != null) {
+            // new
+            setName(name);
+            setMimeType(CMSConstants.DEFAULT_TEXT_MIMETYPE);
+            setEncoding(CMSConstants.DEFAULT_ENCODING);
+            setContent("");
+        } else {
+            // update
+            name = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (log.isDebugEnabled()) {
+                log.debug("WriteTextContentPage() - name=" + name);
+                log
+                        .debug("WriteTextContentPage() - CMSUtil.normalizedPath(getPath() + CMSConstants.PATH_SEPARATOR + name)="
+                                + CMSUtil.normalizedPath(getPath()
+                                        + CMSConstants.PATH_SEPARATOR) + name);
+            }
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+
+            try {
+                FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                        .getScopeFromRequest(),
+                        CMSUtil.normalizedPath(getPath()
+                                + CMSConstants.PATH_SEPARATOR)
+                                + name);
+                if (fileNode != null) {
+                    setName(fileNode.getName());
+                    setTitle(fileNode.getTitle());
+                    setDescription(fileNode.getDescription());
+                    setMimeType(fileNode.getMimeType());
+                    setEncoding(fileNode.getEncoding());
+                    setContent(fileNode.getContent());
+                } else {
+                    // TODO i18n
+                    FacesMessageUtil
+                            .addErrorMessage("The file object is not specified.");
+                }
+            } catch (CMSException e) {
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage("Could not load file: "
+                        + getPath() + CMSConstants.PATH_SEPARATOR + name, e);
+            }
+        }
+        // Set MIME type
+        if (getMimeType() == null || getMimeType().equals("")) {
+            setMimeType(CMSUtil.getMimeType(getName()));
+        }
+
+    }
+
+    public String save() {
+        String fileName = (String) FacesContext.getCurrentInstance()
+                .getExternalContext().getSessionMap().get(
+                        CMSConstants.NEW_OBJECT_NAME);
+        if (log.isDebugEnabled()) {
+            log.debug("save() - name=" + fileName);
+        }
+        if (fileName != null) {
+            // create a new object
+            // S2Container container =
+            // SingletonS2ContainerFactory.getContainer();
+            FileNodeDao fileNodeDao = (FileNodeDao) container
+                    .getComponent(FileNodeDao.class);
+            FileNodeDto fileNode = (FileNodeDto) container
+                    .getComponent(FileNodeDto.class);
+            // FileNodeDto fileNode = new FileNodeDto();
+            fileNode.setScope(CMSUtil.getScopeFromRequest());
+            fileNode.setParentPath(getPath());
+            fileNode.setName(fileName);
+            fileNode.setTitle(getTitle());
+            fileNode.setDescription(getDescription());
+            fileNode.setMimeType(getMimeType());
+            fileNode.setEncoding(getEncoding());
+            if (getContent() == null) {
+                setContent("");
+            }
+            try {
+                fileNode.setInputStream(new ByteArrayInputStream(getContent()
+                        .getBytes(fileNode.getEncoding())));
+            } catch (UnsupportedEncodingException e) {
+                fileNode.setEncoding(CMSConstants.DEFAULT_ENCODING);
+                log
+                        .warn(
+                                "Unsupported encoding when the content is converted to a stream. ",
+                                e);
+                try {
+                    fileNode.setInputStream(new ByteArrayInputStream(
+                            getContent().getBytes(fileNode.getEncoding())));
+                } catch (UnsupportedEncodingException e1) {
+                    log.error("The system could not handle UTF-8 encoding.", e);
+                    // TODO i18n
+                    FacesMessageUtil.addErrorMessage(
+                            "The system could not handle UTF-8 encoding.", e);
+                    return null;
+                }
+            }
+            try {
+                fileNodeDao.insert(fileNode);
+                // TODO i18n
+                FacesMessageUtil.addInfoMessage("Added a new file object.");
+            } catch (CMSException e) {
+                log.warn("Could not insert a new file object: path="
+                        + fileNode.getParentPath() + ", name="
+                        + fileNode.getName(), e);
+                // TODO i18n
+                FacesMessageUtil.addErrorMessage(
+                        "Could not insert a new file object.", e);
+            }
+            // clear session
+            CMSUtil.clearSession();
+            return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+        } else {
+            // update
+            fileName = (String) FacesContext.getCurrentInstance()
+                    .getExternalContext().getSessionMap().get(
+                            CMSConstants.SELECTED_OBJECT_NAME);
+            if (fileName != null) {
+                // S2Container container = SingletonS2ContainerFactory
+                // .getContainer();
+                FileNodeDao fileNodeDao = (FileNodeDao) container
+                        .getComponent(FileNodeDao.class);
+                try {
+                    FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                            .getScopeFromRequest(), CMSUtil
+                            .normalizedPath(getPath()
+                                    + CMSConstants.PATH_SEPARATOR)
+                            + fileName);
+                    if (log.isDebugEnabled()) {
+                        log.debug("save() - fileNode=" + fileNode);
+                    }
+                    fileNode.setTitle(getTitle());
+                    fileNode.setDescription(getDescription());
+                    fileNode.setMimeType(getMimeType());
+                    fileNode.setEncoding(getEncoding());
+                    try {
+                        fileNode.setInputStream(new ByteArrayInputStream(
+                                getContent().getBytes(fileNode.getEncoding())));
+                    } catch (UnsupportedEncodingException e) {
+                        fileNode.setEncoding(CMSConstants.DEFAULT_ENCODING);
+                        log
+                                .warn(
+                                        "Unsupported encoding when the content is converted to a stream. ",
+                                        e);
+                        try {
+                            fileNode.setInputStream(new ByteArrayInputStream(
+                                    getContent().getBytes(
+                                            fileNode.getEncoding())));
+                        } catch (UnsupportedEncodingException e1) {
+                            log
+                                    .error(
+                                            "The system could not handle UTF-8 encoding.",
+                                            e);
+                            // TODO i18n
+                            FacesMessageUtil
+                                    .addErrorMessage(
+                                            "The system could not handle UTF-8 encoding.",
+                                            e);
+                            return null;
+                        }
+                    }
+                    fileNodeDao.updateContent(fileNode);
+                    // TODO i18n
+                    FacesMessageUtil.addInfoMessage("Updated the file object.");
+                } catch (CMSException e) {
+                    log.warn("Could not update the file object: path="
+                            + getPath() + ", name=" + getName(), e);
+                    // TODO i18n
+                    FacesMessageUtil.addErrorMessage(
+                            "Could not update the file object.", e);
+                }
+                return null;
+            } else {
+                // TODO i18n
+                FacesMessageUtil
+                        .addErrorMessage("The file object is not specified.");
+            }
+        }
+        return null;
+    }
+
+    public String backToList() {
+        CMSUtil.clearSession();
+        return CMSConstants.DISPLAY_FOLDER_LIST_PAGE;
+    }
+
+    /**
+     * @return Returns the content.
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * @param content
+     *            The content to set.
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @param path
+     *            The path to set.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Returns the description.
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description
+     *            The description to set.
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return Returns the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * @param encoding
+     *            The encoding to set.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    /**
+     * @return Returns the mimeType.
+     */
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    /**
+     * @param mimeType
+     *            The mimeType to set.
+     */
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * @return Returns the title.
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * @param title
+     *            The title to set.
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/editor/WriteTextContentPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/DisplayContentPage.java
===================================================================
--- cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/DisplayContentPage.java	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/DisplayContentPage.java	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2005-2006 The Portal Application Laboratory Team.
+ *
+ * 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.cms.web.viewer;
+
+import java.io.InputStream;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.cms.CMSConstants;
+import jp.sf.pal.cms.CMSException;
+import jp.sf.pal.cms.dao.FileNodeDao;
+import jp.sf.pal.cms.dao.PageNodeDao;
+import jp.sf.pal.cms.dto.FileNodeDto;
+import jp.sf.pal.cms.dto.PageNodeDto;
+import jp.sf.pal.cms.rewriter.HtmlRewriter;
+import jp.sf.pal.cms.util.CMSUtil;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.seasar.framework.container.S2Container;
+import org.xml.sax.InputSource;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public class DisplayContentPage {
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(DisplayContentPage.class);
+
+    private String contentPath;
+
+    private S2Container container;
+
+    public DisplayContentPage(S2Container container) {
+        if (log.isDebugEnabled()) {
+            log.debug("DisplayContentPage(S2Container container)");
+        }
+        setContainer(container);
+        Object obj = FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap().get(CMSConstants.CONTENT_PATH);
+        if (obj != null) {
+            setContentPath((String) obj);
+        } else {
+            String namespace = CMSUtil.getNamespace();
+            if (log.isDebugEnabled()) {
+                log.debug("DisplayContentPage(S2Container) - namespace="
+                        + namespace);
+            }
+            try {
+                PageNodeDao pageNodeDao = (PageNodeDao) container
+                        .getComponent(PageNodeDao.class);
+                PageNodeDto pageNodeDto = pageNodeDao.getPageNode(namespace);
+                if (pageNodeDto != null && pageNodeDto.getPath() != null) {
+                    setContentPath(pageNodeDto.getPath());
+                } else {
+                    setContentPath(CMSConstants.DEFAULT_CONTENT_PATH);
+                }
+            } catch (CMSException e) {
+                log.error("Could not get a page node: " + namespace);
+                setContentPath(CMSConstants.DEFAULT_CONTENT_PATH);
+            }
+        }
+    }
+
+    /**
+     * @return Returns the contentPath.
+     */
+    public String getContentPath() {
+        return contentPath;
+    }
+
+    /**
+     * @param contentPath
+     *            The contentPath to set.
+     */
+    public void setContentPath(String contentPath) {
+        this.contentPath = contentPath;
+    }
+
+    /**
+     * @return Returns the content.
+     */
+    public String getContent() {
+        if (contentPath != null) {
+            String content = retrieveContent(contentPath);
+            if (content != null) {
+                return content;
+            }
+            // TODO i18n
+            return "Could not find the target content: " + contentPath;
+        } else {
+            // TODO i18n
+            return "Need to specify the page path.";
+        }
+    }
+
+    protected String retrieveContent(String path) {
+        FileNodeDao fileNodeDao = (FileNodeDao) container
+                .getComponent(FileNodeDao.class);
+        try {
+            FileNodeDto fileNode = fileNodeDao.getFileNode(CMSUtil
+                    .getScopeFromRequest(), path);
+            if (fileNode == null) {
+                return null;
+            }
+            // set title
+            if (fileNode.getTitle() != null) {
+                setPageTitle(fileNode.getTitle());
+            }
+            return rewriteContent(fileNode.getInputStream(), fileNode
+                    .getEncoding());
+        } catch (CMSException e) {
+            log.error("Could not find the target file: " + path, e);
+        }
+
+        return null;
+    }
+
+    protected void setPageTitle(String title) {
+        CMSUtil.getRenderResponse().setTitle(title);
+    }
+
+    protected String rewriteContent(InputStream inputStream, String encoding)
+            throws CMSException {
+        if (inputStream == null) {
+            throw new CMSException("The input stream is null.");
+        }
+        HtmlRewriter htmlRewriter = (HtmlRewriter) container
+                .getComponent(HtmlRewriter.class);
+        InputSource inputSource = new InputSource(inputStream);
+        inputSource.setEncoding(encoding);
+        return htmlRewriter.parse(inputSource);
+    }
+
+    /**
+     * @param content
+     *            The content to set.
+     */
+    public void setContent(String content) {
+        // None
+    }
+
+    /**
+     * @return Returns the container.
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container
+     *            The container to set.
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: cms-portlets/trunk/src/main/java/jp/sf/pal/cms/web/viewer/DisplayContentPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/resources/aop.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/aop.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/aop.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+	"http://www.seasar.org/dtd/components24.dtd">
+<components namespace="aop">
+	<component name="traceInterceptor"
+		class="org.seasar.framework.aop.interceptors.TraceInterceptor"/>
+	<component name="traceThrowsInterceptor"
+		class="org.seasar.framework.aop.interceptors.TraceThrowsInterceptor"/>
+	<component name="classLoaderAwareTraceInterceptor"
+		class="org.seasar.framework.aop.interceptors.ClassLoaderAwareTraceInterceptor"/>
+</components>
\ No newline at end of file

Added: cms-portlets/trunk/src/main/resources/app.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/app.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/app.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+    "http://www.seasar.org/dtd/components24.dtd">
+<components>
+    <include path="convention.dicon" />
+    <include path="aop.dicon" />
+    <include path="teeda.dicon" />
+    <include path="jp/sf/pal/cms/CMS.dicon" />
+</components>

Added: cms-portlets/trunk/src/main/resources/convention.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/convention.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/convention.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+	"http://www.seasar.org/dtd/components24.dtd">
+<components>
+    <component
+        class="org.seasar.framework.convention.impl.NamingConventionImpl">
+        <initMethod name="addRootPackageName">
+            <arg>"jp.sf.pal.cms"</arg>
+        </initMethod>
+        <property name="viewRootPath">"/view"</property>
+        <property name="viewExtension">".jsp"</property>
+    </component>
+</components>

Added: cms-portlets/trunk/src/main/resources/creator.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/creator.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/creator.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN" 
+	"http://www.seasar.org/dtd/components24.dtd">
+<components>
+	<include path="convention.dicon"/>
+	<include path="customizer.dicon"/>
+	<component class="org.seasar.framework.container.creator.ActionCreator"/>
+	<component class="org.seasar.framework.container.creator.DaoCreator"/>
+	<component class="jp.sf.pal.cms.creator.DtoCreator"/>
+	<component class="org.seasar.framework.container.creator.DxoCreator"/>
+	<component class="org.seasar.framework.container.creator.HelperCreator"/>
+	<component class="org.seasar.framework.container.creator.LogicCreator"/>
+	<component class="org.seasar.framework.container.creator.PageCreator"/>
+	<component class="org.seasar.framework.container.creator.ServiceCreator"/>
+	<component class="org.seasar.framework.container.creator.InterceptorCreator"/>
+	<component class="org.seasar.framework.container.creator.ValidatorCreator"/>
+	<component class="org.seasar.framework.container.creator.ConverterCreator"/>
+	<component class="org.seasar.framework.container.creator.ConnectorCreator"/>
+</components>

Added: cms-portlets/trunk/src/main/resources/customizer.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/customizer.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/customizer.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN" 
+	"http://www.seasar.org/dtd/components24.dtd">
+<components>
+	<component name="defaultCustomizer" class="org.seasar.framework.container.customizer.AspectCustomizer">
+		<property name="interceptorName">"aop.classLoaderAwareTraceInterceptor"</property>
+	</component>
+	<component name="commandAspectCustomizer" class="org.seasar.framework.container.customizer.AspectCustomizer">
+		<property name="interceptorName">"aop.classLoaderAwareTraceInterceptor"</property>
+		<property name="pointcut">"do.*, initialize, prerender"</property>
+	</component>
+	<component name="actionSupportAspectCustomizer" class="org.seasar.framework.container.customizer.AspectCustomizer">
+		<property name="interceptorName">"app_aop.actionSupportInterceptor"</property>
+		<property name="pointcut">"do.*, initialize, prerender"</property>
+	</component>
+
+	<component name="actionCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>commandAspectCustomizer</arg>
+		</initMethod>
+		<initMethod name="addCustomizer">
+			<arg>actionSupportAspectCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="daoCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="dtoCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+	</component>
+	<component name="dxoCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="helperCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="logicCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="pageCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="serviceCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+		<initMethod name="addCustomizer">
+			<arg>defaultCustomizer</arg>
+		</initMethod>
+	</component>
+	<component name="interceptorCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+	</component>
+	<component name="validatorCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+	</component>
+	<component name="converterCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+	</component>
+	<component name="connectorCustomizer" class="org.seasar.framework.container.customizer.CustomizerChain">
+	</component>
+</components>
\ No newline at end of file

Added: cms-portlets/trunk/src/main/resources/env.txt
===================================================================
--- cms-portlets/trunk/src/main/resources/env.txt	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/env.txt	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1 @@
+product


Property changes on: cms-portlets/trunk/src/main/resources/env.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/resources/jp/sf/pal/cms/CMS.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/jp/sf/pal/cms/CMS.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/jp/sf/pal/cms/CMS.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+    "http://www.seasar.org/dtd/components24.dtd">
+<components>
+
+    <!-- For Jackrabbit Configuration -->
+
+    <component name="repositoryFactory"
+        class="org.seasar.jcr.jackrabbit.JackrabbitRepositoryFactory">
+        <arg>
+            container.getComponent(@java.lang.Class @ forName("javax.servlet.ServletContext")).getRealPath("/WEB-INF/repository.xml")
+        </arg>
+        <arg>
+            container.getComponent(@java.lang.Class @ forName("javax.servlet.ServletContext")).getRealPath("/WEB-INF/repository")
+        </arg>
+    </component>
+
+    <component name="sessionFactory"
+        class="org.seasar.jcr.impl.SessionFactoryImpl">
+        <arg>repositoryFactory</arg>
+        <property name="namespaces">
+            #{"cms" : "http://pal.sourceforge.jp/jcr/cms/1.0"}
+        </property>
+        <property name="credentials">
+            new javax.jcr.SimpleCredentials("cms", "".toCharArray())
+        </property>
+        <initMethod name="registerNamespaces"></initMethod>
+    </component>
+
+    <!-- Html Rewriter Configuration -->
+
+    <component name="htmlRewriter" instance="prototype"
+        class="jp.sf.pal.cms.rewriter.impl.HtmlRewriterImpl">
+        <arg>rewriteHandler</arg>
+    </component>
+    
+    <component name="rewriteHandler" instance="prototype"
+        class="jp.sf.pal.cms.rewriter.helpers.impl.RewriteHandlerImpl">
+    </component>
+
+</components>

Added: cms-portlets/trunk/src/main/resources/s2container.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/s2container.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/s2container.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+    "http://www.seasar.org/dtd/components24.dtd">
+<components>
+    <include condition="#ENV == 'ut'" path="hotdeploy.dicon"/>
+    <include condition="#ENV == 'ct' || #ENV == 'it'" path="warmdeploy.dicon"/>
+    <include condition="#ENV == 'product'" path="cooldeploy.dicon"/>
+</components>

Added: cms-portlets/trunk/src/main/resources/teedaCustomize.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/teedaCustomize.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/teedaCustomize.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+	"http://www.seasar.org/dtd/components24.dtd">
+<components>
+	<!--
+	<component class="org.seasar.teeda.core.render.JsfSpecComponentIdLookupStrategy" />
+	-->
+	<component class="org.seasar.teeda.core.render.DefaultComponentIdLookupStrategy" />
+	<component class="org.seasar.teeda.core.application.impl.DefaultComponentLookupStrategy" />
+</components>

Added: cms-portlets/trunk/src/main/resources/teedaErrorPage.dicon
===================================================================
--- cms-portlets/trunk/src/main/resources/teedaErrorPage.dicon	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/resources/teedaErrorPage.dicon	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+	"http://www.seasar.org/dtd/components24.dtd">
+<components namespace="teedaErrorPage" >
+
+	<component class="org.seasar.teeda.core.util.ServletErrorPageManagerImpl">
+		<!--
+		<initMethod name="addErrorPage">
+			<arg>@java.lang.Throwable @ class</arg>
+			<arg>"/aaa/bbb.html"</arg>
+		</initMethod>
+		-->
+	</component>
+</components>

Added: cms-portlets/trunk/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- cms-portlets/trunk/src/main/webapp/WEB-INF/faces-config.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/WEB-INF/faces-config.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+    <application>
+        <locale-config>
+            <default-locale>en</default-locale>
+            <supported-locale>ja</supported-locale>
+        </locale-config>
+    </application>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>DISPLAY_FOLDER_LIST_PAGE</from-outcome>
+            <to-view-id>/view/editor/displayFolderList.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>DISPLAY_FILE_DETAIL_PAGE</from-outcome>
+            <to-view-id>/view/editor/displayFileDetail.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>DISPLAY_FOLDER_DETAIL_PAGE</from-outcome>
+            <to-view-id>/view/editor/displayFolderDetail.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>CREATE_NEW_FILE_PAGE</from-outcome>
+            <to-view-id>/view/editor/createNewFile.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>CREATE_NEW_FOLDER_PAGE</from-outcome>
+            <to-view-id>/view/editor/createNewFolder.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>WRITE_TEXT_CONTENT_PAGE</from-outcome>
+            <to-view-id>/view/editor/writeTextContent.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>WRITE_HTML_CONTENT_PAGE</from-outcome>
+            <to-view-id>/view/editor/writeHtmlContent.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <from-view-id>*</from-view-id>
+        <navigation-case>
+            <from-outcome>UPLOAD_FILE_PAGE</from-outcome>
+            <to-view-id>/view/editor/uploadFile.jsp</to-view-id>
+        </navigation-case>
+    </navigation-rule>
+
+</faces-config>


Property changes on: cms-portlets/trunk/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- cms-portlets/trunk/src/main/webapp/WEB-INF/portlet.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/WEB-INF/portlet.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 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.
+-->
+<portlet-app id="cms-portlets" version="1.0">
+  <portlet>
+    <portlet-name>CMSViewer</portlet-name>
+    <display-name>CMS Viewer</display-name>
+    <description>CMS viewer</description>
+    <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
+    <init-param>
+      <name>portlet-class</name>
+      <value>jp.sf.pal.cms.portlet.CMSPortlet</value>
+    </init-param>
+    <init-param>
+      <name>portlet-filters</name>
+      <value>jp.sf.pal.facesresponse.FacesResponseFilter,org.seasar.portlet.filter.S2PortletFilter,org.seasar.portlet.filter.HotdeployPortletFilter,jp.sf.pal.tomahawk.filter.ExtensionsPortletFilter</value>
+    </init-param>
+    <init-param>
+      <name>view-page</name>
+      <value>/view/viewer/displayContent.jsp</value>
+    </init-param>
+    <init-param>
+      <name>edit-page</name>
+<!--TODO-->
+      <value>/view/editor/displayFolderList.jsp</value>
+    </init-param>
+    <init-param>
+      <name>jp.sf.pal.cms.Scope</name>
+      <value>default</value>
+    </init-param>
+    <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>
+<!-- resource-bundle>
+            jp.sf.pal.blog.resources.BlogViewResources
+        </resource-bundle -->
+    <portlet-info>
+      <title>CMS Viewer</title>
+      <short-title>Viewer</short-title>
+    </portlet-info>
+  </portlet>
+  <portlet>
+    <portlet-name>CMSEditor</portlet-name>
+    <display-name>CMS Editor</display-name>
+    <description>CMS editor</description>
+    <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
+    <init-param>
+      <name>portlet-class</name>
+      <value>jp.sf.pal.cms.portlet.CMSPortlet</value>
+    </init-param>
+    <init-param>
+      <name>portlet-filters</name>
+      <value>jp.sf.pal.facesresponse.FacesResponseFilter,org.seasar.portlet.filter.S2PortletFilter,org.seasar.portlet.filter.HotdeployPortletFilter,jp.sf.pal.tomahawk.filter.ExtensionsPortletFilter</value>
+    </init-param>
+    <init-param>
+      <name>view-page</name>
+      <value>/view/editor/displayFolderList.jsp</value>
+    </init-param>
+    <init-param>
+      <name>jp.sf.pal.cms.Scope</name>
+      <value>default</value>
+    </init-param>
+    <init-param>
+      <name>jp.sf.pal.cms.ImportFile</name>
+      <value>/WEB-INF/cms.xml</value>
+    </init-param>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+    </supports>
+    <supported-locale>en</supported-locale>
+    <supported-locale>ja</supported-locale>
+<!--
+    <resource-bundle>
+            jp.sf.pal.blog.resources.BlogViewResources
+    </resource-bundle>
+-->
+    <portlet-info>
+      <title>CMS Editor</title>
+      <short-title>Editor</short-title>
+    </portlet-info>
+  </portlet>
+</portlet-app>


Property changes on: cms-portlets/trunk/src/main/webapp/WEB-INF/portlet.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/WEB-INF/repository.xml
===================================================================
--- cms-portlets/trunk/src/main/webapp/WEB-INF/repository.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/WEB-INF/repository.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+   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 Repository [
+    <!--
+        the Repository element configures a repository instance;
+        individual workspaces of the repository are configured through
+        separate configuration files called workspace.xml which are
+        located in a subfolder of the workspaces root directory
+        (see Workspaces element).
+
+        it consists of
+
+            a FileSystem element (the virtual file system
+            used by the repository to persist global state such as
+            registered namespaces, custom node types, etc..
+
+            a Security element that specifies the name of the app-entry
+            in the JAAS config and the access manager
+
+            a Workspaces element that specifies the location of the 
+            workspaces root directory, the name of the default workspace,
+            the maximum idle time before a workspace is automatically
+            shutdown (optional) and the workspace configuration root directory
+            within the virtual repository file system (optional)
+
+            a Workspace element that is used as a workspace configuration
+            template; it is used to create the initial workspace if there's
+            no workspace yet and for creating additional workspaces through
+            the api
+
+            a Versioning element that is used for configuring
+            versioning-related settings
+
+            a SearchIndex element that is used for configuring Indexing-related
+            settings on the /jcr:system tree.
+    -->
+    <!ELEMENT Repository (FileSystem,Security,Workspaces,Workspace,Versioning,SearchIndex?)>
+
+    <!--
+        a virtual file system
+    -->
+    <!ELEMENT FileSystem (param*)>
+    <!ATTLIST FileSystem
+      class CDATA #REQUIRED>
+
+    <!--
+        the Security element specifies the name (appName attribute)
+        of the JAAS configuration app-entry for this repository.
+
+        it also specifies the access manager to be used (AccessManager element).
+    -->
+    <!ELEMENT Security (AccessManager, LoginModule?)>
+    <!ATTLIST Security
+      appName CDATA #REQUIRED>
+
+    <!--
+        the AccessManager element configures the access manager to be used by
+        this repository instance; the class attribute specifies the FQN of the
+        class implementing the AccessManager interface
+    -->
+    <!ELEMENT AccessManager (param*)>
+    <!ATTLIST AccessManager
+      class CDATA #REQUIRED>
+
+    <!--
+        generic parameter (name/value pair)
+    -->
+    <!ELEMENT param EMPTY>
+    <!ATTLIST param
+      name CDATA #REQUIRED
+      value CDATA #REQUIRED>
+
+    <!--
+        the LoginModule element optionally specifies a JAAS login module to
+        authenticate users. This feature allows the use of Jackrabbit in a
+        non-JAAS environment.
+    -->
+    <!ELEMENT LoginModule (param*)>
+    <!ATTLIST LoginModule
+      class CDATA #REQUIRED>
+
+    <!--
+        the Workspaces element specifies the physical workspaces root directory
+        (rootPath attribute), the name of the default workspace
+        (defaultWorkspace attribute), the (optional) maximum amount of time in
+        seconds before an idle workspace is automatically shutdown
+        (maxIdleTime attribute) and the (optional) workspace configuration
+        root directory within the virtual repository file system (configRootPath
+        attribute).
+
+        individual workspaces are configured through individual workspace.xml
+        files located in a subfolder each of either
+
+        a) the physical workspaces root directory
+
+        or, if configRootPath had been specified,
+
+        b) the configuration root directory within the virtual repository file system.
+    -->
+    <!ELEMENT Workspaces EMPTY>
+    <!ATTLIST Workspaces
+        rootPath CDATA #REQUIRED
+        defaultWorkspace CDATA #REQUIRED
+        configRootPath CDATA #IMPLIED
+        maxIdleTime CDATA #IMPLIED>
+
+    <!--
+        the Workspace element serves as a workspace configuration template;
+        it is used to create the initial workspace if there's no workspace yet
+        and for creating additional workspaces through the api
+    -->
+    <!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex?)>
+    <!ATTLIST Workspace
+      name CDATA #REQUIRED>
+
+    <!--
+        the PersistenceManager element configures the persistence manager
+        to be used for the workspace; the class attribute specifies the
+        FQN of the class implementing the PersistenceManager interface
+    -->
+    <!ELEMENT PersistenceManager (param*)>
+    <!ATTLIST PersistenceManager
+      class CDATA #REQUIRED>
+
+    <!--
+        the SearchIndex element specifies the locaction of the search index
+        (used by the QueryHandler); the class attribute specifies the
+        FQN of the class implementing the QueryHandler interface.
+    -->
+    <!ELEMENT SearchIndex (param*,FileSystem?)>
+    <!ATTLIST SearchIndex
+      class CDATA #REQUIRED>
+
+    <!--
+        the Versioning element configures the persistence manager
+        to be used for persisting version state
+    -->
+    <!ELEMENT Versioning (FileSystem, PersistenceManager)>
+    <!ATTLIST Versioning
+      rootPath CDATA #REQUIRED
+    >
+]>
+<!-- Example Repository Configuration File -->
+<Repository>
+    <!--
+        virtual file system where the repository stores global state
+        (e.g. registered namespaces, custom node types, etc.)
+    -->
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+        <param name="path" value="${rep.home}/repository"/>
+    </FileSystem>
+
+    <!--
+        security configuration
+    -->
+    <Security appName="Jackrabbit">
+        <!--
+            access manager:
+            class: FQN of class implementing the AccessManager interface
+        -->
+        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
+            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+        </AccessManager>
+
+        <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
+           <!-- anonymous user name ('anonymous' is the default value) -->
+           <param name="anonymousId" value="anonymous"/>
+        </LoginModule>
+    </Security>
+
+    <!--
+        location of workspaces root directory and name of default workspace
+    -->
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+    <!--
+        workspace configuration template:
+        used to create the initial workspace if there's no workspace yet
+    -->
+    <Workspace name="${wsp.name}">
+        <!--
+            virtual file system of the workspace:
+            class: FQN of class implementing the FileSystem interface
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${wsp.home}"/>
+        </FileSystem>
+        <!--
+            persistence manager of the workspace:
+            class: FQN of class implementing the PersistenceManager interface
+        -->
+        <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
+            <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+        </PersistenceManager>
+        <!--
+            Search index and the file system it uses.
+            class: FQN of class implementing the QueryHandler interface
+
+            If required by the QueryHandler implementation, one may configure
+            a FileSystem that the handler may use.
+
+            Supported parameters for lucene search index:
+            - path: location of the index. This parameter is mandatory!
+            - useCompoundFile: advises lucene to use compound files for the index files
+            - minMergeDocs: minimum number of nodes in an index until segments are merged
+            - volatileIdleTime: idle time in seconds until the volatile index is
+              moved to persistent index even though minMergeDocs is not reached.
+            - maxMergeDocs: maximum number of nodes in segments that will be merged
+            - mergeFactor: determines how often segment indices are merged
+            - maxFieldLength: the number of words that are fulltext indexed at most per property.
+            - bufferSize: maximum number of documents that are held in a pending
+              queue until added to the index
+            - cacheSize: size of the document number cache. This cache maps
+              uuids to lucene document numbers
+            - forceConsistencyCheck: runs a consistency check on every startup. If
+              false, a consistency check is only performed when the search index
+              detects a prior forced shutdown.
+            - autoRepair: errors detected by a consistency check are automatically
+              repaired. If false, errors are only written to the log.
+            - analyzer: class name of a lucene analyzer to use for fulltext indexing of text.
+            - queryClass: class name that implements the javax.jcr.query.Query interface.
+              this class must extend the class: org.apache.jackrabbit.core.query.AbstractQueryImpl
+            - idleTime: idle time in seconds after which an unused query handler is shut down.
+              If the query handler is later used again it is automatically started.
+              Default value -1 disables this feature.
+            - respectDocumentOrder: If true and the query does not contain an 'order by' clause,
+              result nodes will be in document order. For better performance when queries return
+              a lot of nodes set to 'false'.
+
+            Note: all parameters (except path) in this SearchIndex config are default
+            values and can be omitted.
+        -->
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+            <param name="useCompoundFile" value="true"/>
+            <param name="minMergeDocs" value="100"/>
+            <param name="volatileIdleTime" value="3"/>
+            <param name="maxMergeDocs" value="100000"/>
+            <param name="mergeFactor" value="10"/>
+            <param name="maxFieldLength" value="10000"/>
+            <param name="bufferSize" value="10"/>
+            <param name="cacheSize" value="1000"/>
+            <param name="forceConsistencyCheck" value="false"/>
+            <param name="autoRepair" value="true"/>
+            <param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+            <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl"/>
+            <param name="idleTime" value="-1"/>
+            <param name="respectDocumentOrder" value="true"/>
+        </SearchIndex>
+    </Workspace>
+
+    <!--
+        Configures the versioning
+    -->
+    <Versioning rootPath="${rep.home}/version">
+        <!--
+            Configures the filesystem to use for versioning for the respective
+            persistence manager
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${rep.home}/version"/>
+        </FileSystem>
+        
+        <!--
+            Configures the perisistence manager to be used for persisting version state.
+            Please note that the current versioning implementation is based on
+            a 'normal' persistence manager, but this could change in future
+            implementations.
+        -->
+        <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager">
+            <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+            <param name="schemaObjectPrefix" value="version_"/>
+        </PersistenceManager>
+
+    </Versioning>
+    
+    <!--
+        Search index for content that is shared repository wide
+        (/jcr:system tree, contains mainly versions)
+        
+        The same parameters are supported as in the search index configuration
+        inside the workspace definition element.
+        
+        This element is optional. If omitted, the /jcr:system tree will not be
+        indexed and no results will be returned for that tree!
+    -->
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+        <param name="path" value="${rep.home}/repository/index"/>
+    </SearchIndex>
+
+</Repository>


Property changes on: cms-portlets/trunk/src/main/webapp/WEB-INF/repository.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- cms-portlets/trunk/src/main/webapp/WEB-INF/web.xml	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/WEB-INF/web.xml	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,1334 @@
+<?xml version="1.0"?>
+<!--
+    * Copyright 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.
+-->
+<!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>CMS Portlet</display-name>
+  <description>CMS Portlet</description>
+  <context-param>
+    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+    <param-value>.jsp</param-value>
+  </context-param>
+  <context-param>
+    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+    <param-value>server</param-value>
+  </context-param>
+<!-- Servlet Filter -->
+  <filter>
+    <filter-name>encodingfilter</filter-name>
+    <filter-class>org.seasar.extension.filter.EncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+  </filter>
+  <filter>
+    <filter-name>MyFacesExtensionsFilter</filter-name>
+    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+    <init-param>
+      <param-name>maxFileSize</param-name>
+      <param-value>20m</param-value>
+      <description>
+                Set the size limit for uploaded files. Format: 10 - 10 bytes 10k
+                - 10 KB 10m - 10 MB 1g - 1 GB
+            </description>
+    </init-param>
+  </filter>
+<!-- SERVLET DEV: BEGIN @@@
+  <filter>
+    <filter-name>facesdevfilter</filter-name>
+    <filter-class>jp.sf.pal.facesdevfilter.FacesDevFilter</filter-class>
+  </filter>
+@@@@ SERVLET DEV: END -->
+  <filter>
+    <filter-name>s2filter</filter-name>
+    <filter-class>org.seasar.framework.container.filter.S2ContainerFilter</filter-class>
+  </filter>
+  <filter>
+    <filter-name>hotdeployfilter</filter-name>
+    <filter-class>org.seasar.framework.container.hotdeploy.HotdeployFilter</filter-class>
+  </filter>
+<!-- Servlet Filter Mapping -->
+  <filter-mapping>
+    <filter-name>encodingfilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
+  <filter-mapping>
+    <filter-name>MyFacesExtensionsFilter</filter-name>
+<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
+    <servlet-name>Faces Servlet</servlet-name>
+  </filter-mapping>
+<!-- SERVLET DEV: BEGIN @@@
+  <filter-mapping>
+    <filter-name>facesdevfilter</filter-name>
+    <url-pattern>/faces/*</url-pattern>
+  </filter-mapping>
+@@@@ SERVLET DEV: END -->
+  <filter-mapping>
+    <filter-name>s2filter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>hotdeployfilter</filter-name>
+    <url-pattern>/*</url-pattern>
+<!--
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+         -->
+  </filter-mapping>
+<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
+  <filter-mapping>
+    <filter-name>MyFacesExtensionsFilter</filter-name>
+    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
+  </filter-mapping>
+  <listener>
+    <listener-class>org.seasar.teeda.core.webapp.TeedaPortletExtendedConfigureListener</listener-class>
+  </listener>
+<!-- org.seasar.teeda.core.webapp.TeedaConfigureListener -->
+  <servlet>
+    <servlet-name>Faces Servlet</servlet-name>
+    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+    <load-on-startup>2</load-on-startup>
+  </servlet>
+  <servlet>
+    <servlet-name>File Servlet</servlet-name>
+    <servlet-class>jp.sf.pal.cms.servlet.FileServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Faces Servlet</servlet-name>
+    <url-pattern>/faces/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>File Servlet</servlet-name>
+    <url-pattern>/file</url-pattern>
+  </servlet-mapping>
+<!-- MIME type mapping -->
+  <mime-mapping>
+    <extension>123</extension>
+    <mime-type>application/vnd.lotus-1-2-3</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>3g2</extension>
+    <mime-type>video/3gpp2</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>3gp</extension>
+    <mime-type>video/3gpp</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ai</extension>
+    <mime-type>application/postscript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>aif</extension>
+    <mime-type>audio/x-aiff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>aifc</extension>
+    <mime-type>audio/x-aiff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>aiff</extension>
+    <mime-type>audio/x-aiff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>album</extension>
+    <mime-type>application/album</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>amc</extension>
+    <mime-type>application/x-mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>api</extension>
+    <mime-type>application/x-httpd-isapi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asc</extension>
+    <mime-type>text/plain</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asd</extension>
+    <mime-type>application/astound</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asf</extension>
+    <mime-type>video/x-ms-asf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asis</extension>
+    <mime-type>httpd/send-as-is</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asn</extension>
+    <mime-type>application/astound</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asp</extension>
+    <mime-type>application/x-asap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>asx</extension>
+    <mime-type>video/x-ms-asf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>au</extension>
+    <mime-type>audio/basic</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>avi</extension>
+    <mime-type>video/x-msvideo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>bcpio</extension>
+    <mime-type>application/x-bcpio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>bin</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>bmp</extension>
+    <mime-type>image/bmp</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cco</extension>
+    <mime-type>application/x-cocoa</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cct</extension>
+    <mime-type>application/x-cct</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cdf</extension>
+    <mime-type>application/x-netcdf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cgi</extension>
+    <mime-type>application/x-httpd-cgi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>class</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>clp</extension>
+    <mime-type>application/x-msclip</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cocoa</extension>
+    <mime-type>application/x-cocoa</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>com</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cpio</extension>
+    <mime-type>application/x-cpio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>cpt</extension>
+    <mime-type>application/mac-compactpro</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>crd</extension>
+    <mime-type>application/x-mscardfile</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>csh</extension>
+    <mime-type>application/x-csh</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>csm</extension>
+    <mime-type>chemical/x-csml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>csml</extension>
+    <mime-type>chemical/x-csml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>css</extension>
+    <mime-type>text/css</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>d96</extension>
+    <mime-type>x-world/x-d96</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dcr</extension>
+    <mime-type>application/x-director</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dir</extension>
+    <mime-type>application/x-director</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dl</extension>
+    <mime-type>application/x-WebSync-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dms</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>doc</extension>
+    <mime-type>application/msword</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dot</extension>
+    <mime-type>application/x-dot</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dvi</extension>
+    <mime-type>application/x-dvi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dwf</extension>
+    <mime-type>drawing/x-dwf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dwg</extension>
+    <mime-type>image/vnd</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>dxr</extension>
+    <mime-type>application/x-director</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ebk</extension>
+    <mime-type>application/x-expandedbook</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>emb</extension>
+    <mime-type>chemical/x-embl-dl-nucleotide</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>embl</extension>
+    <mime-type>chemical/x-embl-dl-nucleotide</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>eps</extension>
+    <mime-type>application/postscript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>es</extension>
+    <mime-type>audio/echospeech</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>esl</extension>
+    <mime-type>audio/echospeech</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>etc</extension>
+    <mime-type>application/x-earthtime</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>etx</extension>
+    <mime-type>text/x-setext</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>evy</extension>
+    <mime-type>application/x-envoy</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>exe</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ez</extension>
+    <mime-type>application/andrew-inset</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>fdf</extension>
+    <mime-type>application/vnd</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>fgd</extension>
+    <mime-type>application/x-director</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>fif</extension>
+    <mime-type>image/fif</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>fm</extension>
+    <mime-type>application/x-maker</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>fvi</extension>
+    <mime-type>video/isivideo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>gau</extension>
+    <mime-type>chemical/x-gaussian-input</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>gif</extension>
+    <mime-type>image/gif</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>gtar</extension>
+    <mime-type>application/x-gtar</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>gz</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>hdf</extension>
+    <mime-type>application/x-hdf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>hdml</extension>
+    <mime-type>text/x-hdml;charset=Shift_JIS</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>hlp</extension>
+    <mime-type>application/winhlp</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>hqx</extension>
+    <mime-type>application/mac-binhex40</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>htm</extension>
+    <mime-type>text/html</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>html</extension>
+    <mime-type>text/html</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ice</extension>
+    <mime-type>x-conference/x-cooltalk</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ief</extension>
+    <mime-type>image/ief</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ifm</extension>
+    <mime-type>image/gif</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ifs</extension>
+    <mime-type>image/ifs</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>iges</extension>
+    <mime-type>model/iges</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>igs</extension>
+    <mime-type>model/iges</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ins</extension>
+    <mime-type>application/x-NET-Install</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ips</extension>
+    <mime-type>application/x-ipscript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ipx</extension>
+    <mime-type>application/x-ipix</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ivr</extension>
+    <mime-type>i-world/i-vrml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jbw</extension>
+    <mime-type>application/x-js-taro</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jfw</extension>
+    <mime-type>application/x-js-taro</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jnlp</extension>
+    <mime-type>application/x-java-jnlp-file</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jpe</extension>
+    <mime-type>image/jpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jpeg</extension>
+    <mime-type>image/jpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jpg</extension>
+    <mime-type>image/jpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>js</extension>
+    <mime-type>application/x-javascript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>jtd</extension>
+    <mime-type>application/x-js-taro</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>kar</extension>
+    <mime-type>audio/midi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>kjx</extension>
+    <mime-type>application/x-kjx</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>latex</extension>
+    <mime-type>application/x-latex</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>lcc</extension>
+    <mime-type>application/fastman</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>lcl</extension>
+    <mime-type>application/x-digitalloca</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>lcr</extension>
+    <mime-type>application/x-digitalloca</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>lha</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>LZH</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>lzh</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>m13</extension>
+    <mime-type>application/x-msmediaview</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>m14</extension>
+    <mime-type>application/x-msmediaview</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>m3u</extension>
+    <mime-type>audio/x-mpegurl</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>man</extension>
+    <mime-type>application/x-troff-man</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>map</extension>
+    <mime-type>application/x-httpd-imap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mbd</extension>
+    <mime-type>application/mbedlet</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mcf</extension>
+    <mime-type>text/mcf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mcp</extension>
+    <mime-type>application/netmc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mct</extension>
+    <mime-type>application/x-mascot</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mdb</extension>
+    <mime-type>application/x-msaccess</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mdc</extension>
+    <mime-type>application/x-mediadesc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mdx</extension>
+    <mime-type>application/x-mediadesc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>me</extension>
+    <mime-type>application/x-troff-me</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mesh</extension>
+    <mime-type>model/mesh</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>MID</extension>
+    <mime-type>audio/midi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mid</extension>
+    <mime-type>audio/midi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>midi</extension>
+    <mime-type>audio/midi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mif</extension>
+    <mime-type>application/vnd.mif</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mio</extension>
+    <mime-type>audio/x-mio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mmf</extension>
+    <mime-type>application/x-smaf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mng</extension>
+    <mime-type>video/x-mng</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mny</extension>
+    <mime-type>application/x-msmoney</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mocha</extension>
+    <mime-type>application/x-mocha</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mof</extension>
+    <mime-type>application/x-yumekara</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mol</extension>
+    <mime-type>chemical/x-mdl-molfile</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mop</extension>
+    <mime-type>chemical/x-mopac-input</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mov</extension>
+    <mime-type>video/quicktime</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>movie</extension>
+    <mime-type>video/x-sgi-movie</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mp2</extension>
+    <mime-type>audio/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mp3</extension>
+    <mime-type>audio/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mp4</extension>
+    <mime-type>video/mp4</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpe</extension>
+    <mime-type>video/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpeg</extension>
+    <mime-type>video/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpg</extension>
+    <mime-type>video/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpg4</extension>
+    <mime-type>video/mp4</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpga</extension>
+    <mime-type>audio/mpeg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mpp</extension>
+    <mime-type>application/vnd.ms-project</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mrl</extension>
+    <mime-type>text/x-mrml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ms</extension>
+    <mime-type>application/x-troff-ms</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>msh</extension>
+    <mime-type>model/mesh</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>mus</extension>
+    <mime-type>x-world/x-d96</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nc</extension>
+    <mime-type>application/x-netcdf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nm</extension>
+    <mime-type>application/x-nvat</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nva</extension>
+    <mime-type>application/x-neva1</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nvat</extension>
+    <mime-type>application/x-nvat</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>oda</extension>
+    <mime-type>application/oda</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>oke</extension>
+    <mime-type>audio/karaoke</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>olh</extension>
+    <mime-type>application/x-onlivehead</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>olr</extension>
+    <mime-type>application/x-onlivereg</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>olv</extension>
+    <mime-type>x-world/x-vrml1.0</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pac</extension>
+    <mime-type>audio/x-pac</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pae</extension>
+    <mime-type>audio/x-epac</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pbm</extension>
+    <mime-type>image/x-portable-bitmap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pcv</extension>
+    <mime-type>application/x-pcnavi</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pdb</extension>
+    <mime-type>chemical/x-pdb</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pdf</extension>
+    <mime-type>application/pdf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pfr</extension>
+    <mime-type>application/font-tdpfr</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pgm</extension>
+    <mime-type>image/x-portable-graymap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pgn</extension>
+    <mime-type>application/x-chess-pgn</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pmd</extension>
+    <mime-type>application/x-pmd</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>png</extension>
+    <mime-type>image/png</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pnm</extension>
+    <mime-type>image/x-portable-anymap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pot</extension>
+    <mime-type>application/vnd.ms-powerpoint</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ppm</extension>
+    <mime-type>image/x-portable-pixmap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pps</extension>
+    <mime-type>application/vnd.ms-powerpoint</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ppt</extension>
+    <mime-type>application/vnd.ms-powerpoint</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>prc</extension>
+    <mime-type>application/x-palmpilot</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ps</extension>
+    <mime-type>application/postscript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>pub</extension>
+    <mime-type>application/x-mspublisher</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>qcp</extension>
+    <mime-type>audio/vnd.qcelp</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>qt</extension>
+    <mime-type>video/quicktime</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ra</extension>
+    <mime-type>audio/x-realaudio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ram</extension>
+    <mime-type>audio/x-pn-realaudio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ras</extension>
+    <mime-type>image/x-cmu-raster</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rgb</extension>
+    <mime-type>image/x-rgb</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rm</extension>
+    <mime-type>audio/x-pn-realaudio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>roff</extension>
+    <mime-type>application/x-troff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rp</extension>
+    <mime-type>image/vnd.rn-realpix</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rpm</extension>
+    <mime-type>audio/x-pn-realaudio-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rt</extension>
+    <mime-type>text/vnd.rn-realtext</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rtf</extension>
+    <mime-type>text/rtf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rtx</extension>
+    <mime-type>text/richtext</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rv</extension>
+    <mime-type>video/vnd.rn-realvideo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>rxnfile</extension>
+    <mime-type>chemical/x-mdl-rxnfile</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>scd</extension>
+    <mime-type>application/x-msschedule</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sds</extension>
+    <mime-type>application/x-onlive</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sea</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sgm</extension>
+    <mime-type>text/sgml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sgml</extension>
+    <mime-type>text/sgml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sh</extension>
+    <mime-type>application/x-sh</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>shar</extension>
+    <mime-type>application/x-shar</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>shtml</extension>
+    <mime-type>text/x-server-parsed-html</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>silo</extension>
+    <mime-type>model/mesh</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sit</extension>
+    <mime-type>application/x-stuffit</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>skd</extension>
+    <mime-type>application/x-koan</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>skm</extension>
+    <mime-type>application/x-koan</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>skp</extension>
+    <mime-type>application/x-koan</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>skt</extension>
+    <mime-type>application/x-koan</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>slc</extension>
+    <mime-type>application/x-salsa</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>smi</extension>
+    <mime-type>application/smil</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>smil</extension>
+    <mime-type>application/smil</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>smp</extension>
+    <mime-type>application/studiom</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>snd</extension>
+    <mime-type>audio/basic</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>spl</extension>
+    <mime-type>application/x-futuresplash</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sprite</extension>
+    <mime-type>application/x-sprite</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>spt</extension>
+    <mime-type>application/x-spt</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>src</extension>
+    <mime-type>application/x-wais-source</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sv4cpio</extension>
+    <mime-type>application/x-sv4cpio</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>sv4crc</extension>
+    <mime-type>application/x-sv4crc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>svf</extension>
+    <mime-type>image/vnd</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>svi</extension>
+    <mime-type>application/softvision</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>svr</extension>
+    <mime-type>x-world/x-svr</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>swf</extension>
+    <mime-type>application/x-shockwave-flash</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>t</extension>
+    <mime-type>application/x-troff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>talk</extension>
+    <mime-type>text/x-speech</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tar</extension>
+    <mime-type>application/x-tar</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tbp</extension>
+    <mime-type>application/x-timbuktu</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tbt</extension>
+    <mime-type>application/timbuktu</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tcl</extension>
+    <mime-type>application/x-tcl</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tex</extension>
+    <mime-type>application/x-tex</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>texinfo</extension>
+    <mime-type>application/x-texinfo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tgf</extension>
+    <mime-type>chemical/x-mdl-tgf</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tif</extension>
+    <mime-type>image/tiff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tiff</extension>
+    <mime-type>image/tiff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tki</extension>
+    <mime-type>application/x-tkined</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tkined</extension>
+    <mime-type>application/x-tkined</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tlk</extension>
+    <mime-type>application/x-tlk</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tr</extension>
+    <mime-type>application/x-troff</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>trm</extension>
+    <mime-type>application/x-msterminal</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tsp</extension>
+    <mime-type>application/dsptype</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>tsv</extension>
+    <mime-type>text/tab-separated-values</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ttz</extension>
+    <mime-type>application/t-time</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>txt</extension>
+    <mime-type>text/plain</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ustar</extension>
+    <mime-type>application/x-ustar</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vcd</extension>
+    <mime-type>application/x-cdlink</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vdo</extension>
+    <mime-type>video/vdo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vex</extension>
+    <mime-type>application/x-yumekara</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vgm</extension>
+    <mime-type>video/x-videogram</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vgp</extension>
+    <mime-type>video/x-videogram-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vgx</extension>
+    <mime-type>video/x-videogram</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vif</extension>
+    <mime-type>video/x-vif</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>viv</extension>
+    <mime-type>video/vnd.vivo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vivo</extension>
+    <mime-type>video/vnd.vivo</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vqe</extension>
+    <mime-type>audio/x-twinvq-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vqf</extension>
+    <mime-type>audio/x-twinvq</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vql</extension>
+    <mime-type>audio/x-twinvq</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vrml</extension>
+    <mime-type>model/vrml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>vrt</extension>
+    <mime-type>x-world/x-vrt</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wav</extension>
+    <mime-type>audio/x-wav</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wax</extension>
+    <mime-type>audio/x-ms-wax</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wbmp</extension>
+    <mime-type>image/vnd.wap.wbmp</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wbxml</extension>
+    <mime-type>application/vnd.wap.wbxml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wfp</extension>
+    <mime-type>application/wfphelpap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wi</extension>
+    <mime-type>image/wavelet</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wk1</extension>
+    <mime-type>application/vnd.lotus-1-2-3</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wk3</extension>
+    <mime-type>application/vnd.lotus-1-2-3</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wk4</extension>
+    <mime-type>application/vnd.lotus-1-2-3</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wm</extension>
+    <mime-type>video/x-ms-wm</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wma</extension>
+    <mime-type>audio/x-ms-wma</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmd</extension>
+    <mime-type>video/x-ms-wmd</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmf</extension>
+    <mime-type>application/x-msmetafile</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wml</extension>
+    <mime-type>text/vnd.wap.wml;charset=Shift_JIS</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmlc</extension>
+    <mime-type>application/vnd.wap.wmlc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmls</extension>
+    <mime-type>text/vnd.wap.wmlscript</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmlsc</extension>
+    <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmv</extension>
+    <mime-type>video/x-ms-wmv</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmx</extension>
+    <mime-type>video/x-ms-wmx</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wmz</extension>
+    <mime-type>video/x-ms-wmz</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wri</extension>
+    <mime-type>application/x-mswrite</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wrl</extension>
+    <mime-type>model/vrml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ws2</extension>
+    <mime-type>application/x-WebSync2-Plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wse</extension>
+    <mime-type>application/x-WebSync-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wss</extension>
+    <mime-type>application/x-WebSync-plugin</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wv</extension>
+    <mime-type>video/wavelet</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wvh</extension>
+    <mime-type>video/x-webview-h</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wvp</extension>
+    <mime-type>video/x-webview-p</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>wvx</extension>
+    <mime-type>video/x-ms-wvx</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xbd</extension>
+    <mime-type>application/vnd.fujixerox.docuworks.binder</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xbm</extension>
+    <mime-type>image/x-xbitmap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xdm</extension>
+    <mime-type>application/x-xdma</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xdw</extension>
+    <mime-type>application/vnd.fujixerox.docuworks</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xhm</extension>
+    <mime-type>application/xhtml+xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xht</extension>
+    <mime-type>application/xhtml+xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xhtm</extension>
+    <mime-type>application/xhtml+xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xhtml</extension>
+    <mime-type>application/xhtml+xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xla</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xlc</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xll</extension>
+    <mime-type>application/x-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xlm</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xls</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xlt</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xlw</extension>
+    <mime-type>application/vnd.ms-excel</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>XML</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xml</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xpm</extension>
+    <mime-type>image/x-xpixmap</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xsl</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xwd</extension>
+    <mime-type>image/x-xwindowdump</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>xyz</extension>
+    <mime-type>chemical/x-xyz</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>Z</extension>
+    <mime-type>application/octet-stream</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>zac</extension>
+    <mime-type>application/x-zaurus-zac</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>zip</extension>
+    <mime-type>application/zip</mime-type>
+  </mime-mapping>
+<!-- Welcome files -->
+  <welcome-file-list>
+    <welcome-file>index.jsf</welcome-file>
+    <welcome-file>index.jsp</welcome-file>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+</web-app>


Property changes on: cms-portlets/trunk/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/createNewFile.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/createNewFile.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/createNewFile.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,59 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_createNewFilePage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="3">
+
+				<h:outputLabel for="name">
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:inputText id="name" value="#{editor_createNewFilePage.name}"
+					styleClass="portlet-form-field-label" size="30" required="true" />
+				<h:message for="name" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="3">
+							<h:commandButton type="submit" value="Write As Text"
+								action="#{editor_createNewFilePage.createTextContent}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Write As Html"
+								action="#{editor_createNewFilePage.createHtmlContent}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Upload File"
+								action="#{editor_createNewFilePage.upload}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to List page"
+								action="#{editor_createNewFilePage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/createNewFile.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/createNewFolder.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/createNewFolder.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/createNewFolder.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,53 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_createNewFolderPage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="3">
+
+				<h:outputLabel for="name">
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:inputText id="name" value="#{editor_createNewFolderPage.name}"
+					styleClass="portlet-form-field-label" size="30" required="true" />
+				<h:message for="name" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Create Folder"
+								action="#{editor_createNewFolderPage.create}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to List page"
+								action="#{editor_createNewFolderPage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/createNewFolder.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/displayFileDetail.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/displayFileDetail.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/displayFileDetail.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,76 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_displayFileDetailPage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="3">
+
+				<h:outputLabel for="name">
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:inputText id="name" value="#{editor_displayFileDetailPage.name}"
+					styleClass="portlet-form-field-label" size="30" required="true" />
+				<h:message for="name" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="2">
+							<h:commandButton type="submit" value="Update File Name"
+								action="#{editor_displayFileDetailPage.update}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Delete"
+								action="#{editor_displayFileDetailPage.delete}"
+								styleClass="portlet-form-button"
+								onclick="if(!confirm('Do you want to delete this file/directory?')) return false;" />
+						</h:panelGrid>
+						<h:panelGrid columns="3">
+							<h:commandButton type="submit" value="Edit As Text"
+								action="#{editor_displayFileDetailPage.updateTextContent}"
+								rendered="#{editor_displayFileDetailPage.textFile}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Edit As Html"
+								action="#{editor_displayFileDetailPage.updateHtmlContent}"
+								rendered="#{editor_displayFileDetailPage.htmlFile}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Upload File"
+								action="#{editor_displayFileDetailPage.uploadContent}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1" rendered="#{editor_displayFileDetailPage.textFile}">
+							<h:commandButton type="submit" value="Set As Default Page"
+								action="#{editor_displayFileDetailPage.setAsDefaultPage}"
+								rendered="#{editor_displayFileDetailPage.textFile}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to List page"
+								action="#{editor_displayFileDetailPage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/displayFileDetail.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/displayFolderDetail.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/displayFolderDetail.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/displayFolderDetail.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,57 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_displayFolderDetailPage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="3">
+
+				<h:outputLabel for="name">
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:inputText id="name" value="#{editor_displayFolderDetailPage.name}"
+					styleClass="portlet-form-field-label" size="30" required="true" />
+				<h:message for="name" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="2">
+							<h:commandButton type="submit" value="Update Folder Name"
+								action="#{editor_displayFolderDetailPage.update}"
+								styleClass="portlet-form-button" />
+							<h:commandButton type="submit" value="Delete"
+								action="#{editor_displayFolderDetailPage.delete}"
+								styleClass="portlet-form-button"
+								onclick="if(!confirm('Do you want to delete this folder?')) return false;" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to List page"
+								action="#{editor_displayFolderDetailPage.backToList}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/displayFolderDetail.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/displayFolderList.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/displayFolderList.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/displayFolderList.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,96 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+	<h:form>
+		<!-- MENU -->
+		<t:div style="text-align: left;width: 100%;">
+
+			<h:commandButton alt="Create New File" title="Create New File"
+				value="Create New File"
+				action="#{editor_displayFolderListPage.goCreateNewFile}"
+				styleClass="portlet-form-button" immediate="true" />
+			<h:commandButton alt="Create New Folder" title="Create New Folder"
+				value="Create New Folder"
+				action="#{editor_displayFolderListPage.goCreateNewFolder}"
+				styleClass="portlet-form-button" immediate="true" />
+			<h:commandButton alt="Store XML File" title="Store XML File"
+				value="Store XML File"
+				action="#{editor_displayFolderListPage.storeXmlFile}"
+				styleClass="portlet-form-button" immediate="true" rendered="false" />
+
+		</t:div>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="4">
+
+				<h:outputLabel for="path">
+					<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:inputText id="path" value="#{editor_displayFolderListPage.path}"
+					styleClass="portlet-form-field-label" size="50" />
+				<h:commandButton type="submit" value="Go"
+					action="#{editor_displayFolderListPage.go}"
+					styleClass="portlet-form-button" />
+				<h:commandButton alt="Go to Parent Folder"
+					title="Go to Parent Folder" value="Go to Parent Folder"
+					action="#{editor_displayFolderListPage.goParentFolder}"
+					styleClass="portlet-form-button" immediate="true" />
+
+			</h:panelGrid>
+		</t:div>
+		
+		<t:div style="text-align: left;width: 100%;">
+          <h:panelGrid columns="1">
+            <h:outputText value="Namespace: #{editor_displayFolderListPage.namespace}"/>  
+            <h:outputText value="Default Path: none" rendered="#{editor_displayFolderListPage.defaultPath==''}"/>  
+            <h:outputText value="Default Path: #{editor_displayFolderListPage.defaultPath}" rendered="#{editor_displayFolderListPage.defaultPath!=''}"/>  
+          </h:panelGrid>
+		</t:div>        
+		
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<!-- h:outputText value="#{editor_displayFolderListPage.outputHtml}" escape="false" / -->
+
+
+		<!-- Table -->
+		<h:dataTable id="fileList" border="1" var="objectNode" width="100%"
+			value="#{editor_displayFolderListPage.objectNodes}"
+			headerClass="portlet-section-header"
+			rowClasses="portlet-section-body,portlet-section-alternate">
+			<h:column>
+				<f:facet name="header">
+					<h:outputText value="Name" />
+				</f:facet>
+				<t:div>
+					<h:commandLink action="#{editor_displayFolderListPage.select}">
+						<h:outputText id="name" value="#{objectNode.name}" />
+					</h:commandLink>
+					<h:outputText value="("
+						rendered="#{objectNode.nodeType=='cms:folder'}" />
+					<h:commandLink action="#{editor_displayFolderListPage.editFolder}"
+						rendered="#{objectNode.nodeType=='cms:folder'}">
+						<h:outputText id="editFolder" value="Edit" />
+					</h:commandLink>
+					<h:outputText value=")"
+						rendered="#{objectNode.nodeType=='cms:folder'}" />
+				</t:div>
+			</h:column>
+			<h:column>
+				<f:facet name="header">
+					<h:outputText value="Mime Type" />
+				</f:facet>
+				<h:outputText id="mimeType" value="#{objectNode.mimeType}"
+					rendered="#{objectNode.nodeType=='cms:file'}" />
+				<h:outputText id="mimeTypeNone" value="-"
+					rendered="#{objectNode.nodeType=='cms:folder'}" />
+			</h:column>
+		</h:dataTable>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/displayFolderList.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/uploadFile.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/uploadFile.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/uploadFile.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,94 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form enctype="multipart/form-data">
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_uploadFilePage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="1">
+
+				<h:panelGrid columns="3">
+
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+					<h:outputText id="name" value="#{editor_uploadFilePage.name}"
+						styleClass="portlet-form-field-label" />
+					<h:outputText value="" styleClass="portlet-form-field" />
+
+					<h:outputLabel for="title">
+						<h:outputText value="Title:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="title" value="#{editor_uploadFilePage.title}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="title" />
+
+					<h:outputLabel for="description">
+						<h:outputText value="Description:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="description"
+						value="#{editor_uploadFilePage.description}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="description" />
+
+					<h:outputLabel for="mimeType">
+						<h:outputText value="MIME Type:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="mimeType" value="#{editor_uploadFilePage.mimeType}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="mimeType" />
+
+					<h:outputLabel for="encoding">
+						<h:outputText value="Encoding:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="encoding" value="#{editor_uploadFilePage.encoding}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="encoding" />
+
+					<h:outputLabel for="fileupload">
+						<h:outputText value="File:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<t:inputFileUpload id="fileupload"
+						value="#{editor_uploadFilePage.uploadedFile}" storage="file"
+						required="true" styleClass="portlet-form-field-label" size="40" />
+					<h:message for="fileupload" />
+
+				</h:panelGrid>
+
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Finish"
+								action="#{editor_uploadFilePage.save}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to Folder List"
+								action="#{editor_uploadFilePage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>
+


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/uploadFile.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/writeHtmlContent.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/writeHtmlContent.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/writeHtmlContent.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,93 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_writeHtmlContentPage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="1">
+
+				<h:panelGrid columns="3">
+
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+					<h:outputText id="name" value="#{editor_writeHtmlContentPage.name}"
+						styleClass="portlet-form-field-label" />
+					<h:outputText value="" styleClass="portlet-form-field" />
+
+					<h:outputLabel for="title">
+						<h:outputText value="Title:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="title" value="#{editor_writeHtmlContentPage.title}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="title" />
+
+					<h:outputLabel for="description">
+						<h:outputText value="Description:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="description"
+						value="#{editor_writeHtmlContentPage.description}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="description" />
+
+					<h:outputLabel for="mimeType">
+						<h:outputText value="MIME Type:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="mimeType"
+						value="#{editor_writeHtmlContentPage.mimeType}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="mimeType" />
+
+					<h:outputLabel for="encoding">
+						<h:outputText value="Encoding:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="encoding"
+						value="#{editor_writeHtmlContentPage.encoding}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="encoding" />
+
+				</h:panelGrid>
+
+				<t:inputHtml value="#{editor_writeHtmlContentPage.content}"
+					style="height: 400px; width: 100%" allowEditSource="true"
+					showPropertiesToolBox="true" showLinksToolBox="true"
+					showImagesToolBox="true" showTablesToolBox="true"
+					showCleanupExpressionsToolBox="true" showDebugToolBox="false"
+					addKupuLogo="false" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Finish"
+								action="#{editor_writeHtmlContentPage.save}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to Folder List"
+								action="#{editor_writeHtmlContentPage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/writeHtmlContent.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/editor/writeTextContent.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/editor/writeTextContent.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/editor/writeTextContent.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,94 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+
+	<h:form>
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="2">
+
+				<h:outputText value="PATH:" styleClass="portlet-form-field" />
+				<h:outputText id="path" value="#{editor_writeTextContentPage.path}"
+					styleClass="portlet-form-field" />
+
+			</h:panelGrid>
+		</t:div>
+
+		<h:messages styleClass="portlet-msg-success"
+			errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+			warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+		<t:div style="text-align: left;width: 100%;">
+			<h:panelGrid columns="1">
+
+				<h:panelGrid columns="3">
+
+					<h:outputText value="Name:" styleClass="portlet-form-field" />
+					<h:outputText id="name" value="#{editor_writeTextContentPage.name}"
+						styleClass="portlet-form-field-label" />
+					<h:outputText value="" styleClass="portlet-form-field" />
+
+					<h:outputLabel for="title">
+						<h:outputText value="Title:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="title" value="#{editor_writeTextContentPage.title}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="title" />
+
+					<h:outputLabel for="description">
+						<h:outputText value="Description:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="description"
+						value="#{editor_writeTextContentPage.description}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="description" />
+
+					<h:outputLabel for="mimeType">
+						<h:outputText value="MIME Type:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="mimeType"
+						value="#{editor_writeTextContentPage.mimeType}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="mimeType" />
+
+					<h:outputLabel for="encoding">
+						<h:outputText value="Encoding:" styleClass="portlet-form-field" />
+					</h:outputLabel>
+					<h:inputText id="encoding"
+						value="#{editor_writeTextContentPage.encoding}"
+						styleClass="portlet-form-field-label" size="30" />
+					<h:message for="encoding" />
+
+				</h:panelGrid>
+
+				<h:outputLabel for="content">
+					<h:outputText value="Content:" styleClass="portlet-form-field" />
+				</h:outputLabel>
+				<h:message for="content" />
+				<h:inputTextarea id="content"
+					value="#{editor_writeTextContentPage.content}"
+					styleClass="portlet-form-field-label" cols="60" rows="20" />
+
+				<f:facet name="footer">
+					<h:panelGrid columns="1">
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Finish"
+								action="#{editor_writeTextContentPage.save}"
+								styleClass="portlet-form-button" />
+						</h:panelGrid>
+						<h:panelGrid columns="1">
+							<h:commandButton type="submit" value="Back to Folder List"
+								action="#{editor_writeTextContentPage.backToList}"
+								styleClass="portlet-form-button" immediate="true" />
+						</h:panelGrid>
+					</h:panelGrid>
+				</f:facet>
+
+			</h:panelGrid>
+		</t:div>
+
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/editor/writeTextContent.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Added: cms-portlets/trunk/src/main/webapp/view/viewer/displayContent.jsp
===================================================================
--- cms-portlets/trunk/src/main/webapp/view/viewer/displayContent.jsp	2007-04-05 06:01:35 UTC (rev 11)
+++ cms-portlets/trunk/src/main/webapp/view/viewer/displayContent.jsp	2007-04-05 06:17:13 UTC (rev 12)
@@ -0,0 +1,10 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+	<h:form>
+        <h:outputText escape="false" value="#{viewer_displayContentPage.content}" />
+	</h:form>
+</f:view>


Property changes on: cms-portlets/trunk/src/main/webapp/view/viewer/displayContent.jsp
___________________________________________________________________
Name: svn:eol-style
   + native


pal-cvs メーリングリストの案内
Back to archive index