You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ma...@apache.org on 2012/08/16 14:39:05 UTC

svn commit: r1373808 - in /rave/sandbox/content-services: demo-portal/src/main/webapp/WEB-INF/ rave-jcr-integration/page-configuration/src/main/resources/ rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/

Author: marijan
Date: Thu Aug 16 12:39:05 2012
New Revision: 1373808

URL: http://svn.apache.org/viewvc?rev=1373808&view=rev
Log:
RAVE-695 Create new rave-jcr-ocm module providing JCR based Object Content Mapping (OCM) support

- boostrap JCR configuration

Added:
    rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/page-config.json
Modified:
    rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/web.xml
    rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/module.json

Modified: rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/web.xml?rev=1373808&r1=1373807&r2=1373808&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/web.xml (original)
+++ rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/web.xml Thu Aug 16 12:39:05 2012
@@ -25,82 +25,117 @@
          id="RaveDemoPortal"
          version="2.5">
 
-    <display-name>Rave Demo Portal</display-name>
+  <display-name>Rave Demo Portal</display-name>
 
-    <context-param>
-        <param-name>contextConfigLocation</param-name>
-        <param-value>
-            /WEB-INF/applicationContext.xml
-            /WEB-INF/dataContext.xml
-            /WEB-INF/applicationContext-security.xml
-        </param-value>
-    </context-param>
-
-    <listener>
-        <listener-class>org.apache.rave.portal.web.context.RaveContextLoaderListener</listener-class>
-    </listener>
-
-    <!-- Filter to ensure Content Repository is loaded -->
-    <filter>
-      <filter-name>contentRepositoryAvailableFilter</filter-name>
-      <filter-class>org.apache.rave.jcr.servlet.ContextRepositoryAvailableFilter</filter-class>
-    </filter>
-
-    <filter>
-        <filter-name>springSecurityFilterChain</filter-name>
-        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-    </filter>
-
-    <filter-mapping>
-      <filter-name>contentRepositoryAvailableFilter</filter-name>
-        <url-pattern>/jcr/*</url-pattern>
-    </filter-mapping>
-
-    <filter-mapping>
-        <filter-name>springSecurityFilterChain</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- Exposes rave-jcr content repository -->
-    <servlet>
-      <servlet-name>contextRepository</servlet-name>
-      <servlet-class>org.apache.rave.jcr.servlet.ContextRepositoryServlet</servlet-class>
-      <load-on-startup>1</load-on-startup>
-    </servlet>
-  
-    <!-- Handles all + hmvc requests into the application -->
-    <servlet>
-        <servlet-name>dispatcher</servlet-name>
-        <servlet-class>org.apache.rave.portal.web.hmvc.servlet.HmvcDispatcherServlet</servlet-class>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-    
-    <!-- temporary exposure of ContextRepositoryServlet to show dynamic access to repository descriptor values -->
-    <servlet-mapping>
-      <servlet-name>contextRepository</servlet-name>
-      <url-pattern>/jcr/*</url-pattern>
-    </servlet-mapping>
-  
-    <servlet-mapping>
-        <servlet-name>dispatcher</servlet-name>
-        <url-pattern>/app/*</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>dispatcher</servlet-name>
-        <url-pattern>/index.html</url-pattern>
-    </servlet-mapping>
-
-    <servlet-mapping>
-        <servlet-name>dispatcher</servlet-name>
-        <url-pattern>/login</url-pattern>
-    </servlet-mapping>
-
-    <welcome-file-list>
-        <welcome-file>index.html</welcome-file>
-    </welcome-file-list>
-
-    <error-page>
-        <exception-type>java.lang.Throwable</exception-type>
-        <location>/WEB-INF/jsp/views/error.jsp</location>
-    </error-page>
+  <servlet>
+    <servlet-name>Repository</servlet-name>
+    <servlet-class>org.apache.rave.jcr.servlet.jackrabbit.JackrabbitRepositoryServlet</servlet-class>
+    <!--
+        <init-param>
+          <description>The Servlet context attribute name under which to expose the repository.
+          Default value is javax.jcr.Repository if undefined.
+          Also, this parameter can be overriden with a system property named 'repository.context.attribute'.</description>
+          <param-name>repository.context.attribute</param-name>
+          <param-value>javax.jcr.Repository</param-value>
+        </init-param>
+    -->
+    <init-param>
+      <description>The location for the repository files. Unless the location starts
+        with file: or /, the location is resolved as context relative.
+        Also, this parameter can be overriden with a system property named 'repository.home'.
+      </description>
+      <param-name>repository.home</param-name>
+      <param-value>WEB-INF/storage</param-value>
+    </init-param>
+    <!--
+        <init-param>
+          <description>The location of the repository configuration file. Unless the location
+          starts with file: or /, the location is resolved as context relative.
+          Also, this parameter can be overriden with a system property named 'repository.config'.
+          If undefined, the default is to lookup or create a repository.xml file under the repository.home location.
+          </description>
+          <param-name>repository.config</param-name>
+          <param-value>WEB-INF/repository.xml</param-value>
+        </init-param>
+    -->
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+      /WEB-INF/applicationContext.xml
+      /WEB-INF/dataContext.xml
+      /WEB-INF/applicationContext-security.xml
+    </param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>org.apache.rave.portal.web.context.RaveContextLoaderListener</listener-class>
+  </listener>
+
+  <!-- Filter to ensure Content Repository is loaded -->
+  <filter>
+    <filter-name>contentRepositoryAvailableFilter</filter-name>
+    <filter-class>org.apache.rave.jcr.servlet.ContextRepositoryAvailableFilter</filter-class>
+  </filter>
+
+  <filter>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>contentRepositoryAvailableFilter</filter-name>
+    <url-pattern>/jcr/*</url-pattern>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <!-- Exposes rave-jcr content repository -->
+  <servlet>
+    <servlet-name>contextRepository</servlet-name>
+    <servlet-class>org.apache.rave.jcr.servlet.ContextRepositoryServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- Handles all + hmvc requests into the application -->
+  <servlet>
+    <servlet-name>dispatcher</servlet-name>
+    <servlet-class>org.apache.rave.portal.web.hmvc.servlet.HmvcDispatcherServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- temporary exposure of ContextRepositoryServlet to show dynamic access to repository descriptor values -->
+  <servlet-mapping>
+    <servlet-name>contextRepository</servlet-name>
+    <url-pattern>/jcr/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>dispatcher</servlet-name>
+    <url-pattern>/app/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>dispatcher</servlet-name>
+    <url-pattern>/index.html</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>dispatcher</servlet-name>
+    <url-pattern>/login</url-pattern>
+  </servlet-mapping>
+
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+
+  <error-page>
+    <exception-type>java.lang.Throwable</exception-type>
+    <location>/WEB-INF/jsp/views/error.jsp</location>
+  </error-page>
 </web-app>

Modified: rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/module.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/module.json?rev=1373808&r1=1373807&r2=1373808&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/module.json (original)
+++ rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/META-INF/rave/module.json Thu Aug 16 12:39:05 2012
@@ -5,13 +5,13 @@
     },
     "cnds":{
         "rave":{
-            "file":"rave-config.cnd"
+            "file":"rave-page-config.cnd"
         }
     },
     "contents":{
         "raveconfig":{
-            "file":"sample-page-config.json",
-            "parent":"/pageconfiguration",
+            "file":"page-config.json",
+            "parent":"/",
             "importBehavior":"merge"
         }
     }

Added: rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/page-config.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/page-config.json?rev=1373808&view=auto
==============================================================================
--- rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/page-config.json (added)
+++ rave/sandbox/content-services/rave-jcr-integration/page-configuration/src/main/resources/page-config.json Thu Aug 16 12:39:05 2012
@@ -0,0 +1,28 @@
+{
+    "jcr:primaryType":"raveconfig:pageconfiguration",
+    "myPage":{
+        "jcr:primaryType":"raveconfig:pagedefinition",
+        "name":"myPage",
+        "path":"/mypage2",
+        "description":"Simple page",
+        "controller":"org.apache.rave.portal.web.hmvc.example.MyPageController",
+        "head":{
+            "jcr:primaryType":"raveconfig:pagefragment",
+            "name":"head",
+            "path":"myHeader",
+            "controller":"org.apache.rave.portal.web.hmvc.example.MyHeaderController"
+        },
+        "body":{
+            "jcr:primaryType":"raveconfig:pagefragment",
+            "name":"body",
+            "path":"myBody",
+            "controller":"org.apache.rave.portal.web.hmvc.example.MyContentController"
+        },
+        "footer":{
+            "jcr:primaryType":"raveconfig:pagefragment",
+            "name":"footer",
+            "path":"myFooter",
+            "controller":"org.apache.rave.portal.web.hmvc.example.MyFooterController"
+        }
+    }
+}