You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2013/01/03 19:48:51 UTC
svn commit: r1428544 [2/2] - in /rave/trunk: ./ rave-components/
rave-components/rave-core/
rave-components/rave-core/src/main/java/org/apache/rave/portal/model/impl/
rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/
rave-compo...
Modified: rave/trunk/rave-portal-dependencies/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-dependencies/pom.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-dependencies/pom.xml (original)
+++ rave/trunk/rave-portal-dependencies/pom.xml Thu Jan 3 18:48:47 2013
@@ -19,7 +19,8 @@
$Id$
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Modified: rave/trunk/rave-portal-resources/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/pom.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/pom.xml (original)
+++ rave/trunk/rave-portal-resources/pom.xml Thu Jan 3 18:48:47 2013
@@ -159,4 +159,57 @@
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>jpa</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${maven-war-plugin.version}</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/resources_jpa</directory>
+ <targetPath>WEB-INF/</targetPath>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>mongodb</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${maven-war-plugin.version}</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/resources_mongo</directory>
+ <targetPath>WEB-INF/</targetPath>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: rave/trunk/rave-portal-resources/src/main/resources/portal.properties
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/resources/portal.properties?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/resources/portal.properties (original)
+++ rave/trunk/rave-portal-resources/src/main/resources/portal.properties Thu Jan 3 18:48:47 2013
@@ -35,23 +35,38 @@ portal.opensocial_security.domain=defaul
# the default page name to create for new users
portal.page.default_name=Main
-#Default Rave Portal database settings with in memory H2 database
+###################################################################
+# Properties related to the Rave JPA implementation #
+###################################################################
+
+# Default Rave Portal database settings with in memory H2 database
# rave.database.location is replaced during the build
-portal.dataSource.url=jdbc:h2:${rave.database.location};AUTO_SERVER=TRUE
-portal.dataSource.driver=org.h2.Driver
-portal.dataSource.username=sa
-portal.dataSource.password=local
-
-portal.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
-portal.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
-portal.jpaVendorAdapter.database=H2
+jpa.dataSource.url=jdbc:h2:${rave.database.location};AUTO_SERVER=TRUE
+jpa.dataSource.driver=org.h2.Driver
+jpa.dataSource.username=sa
+jpa.dataSource.password=local
+
+jpa.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
+jpa.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
+jpa.jpaVendorAdapter.database=H2
# General Rave portal database settings
-portal.jpaVendorAdapter.showSql=true
-portal.openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=WARN, SQL=WARN
-portal.openjpa.RuntimeUnenhancedClasses=unsupported
-portal.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
-portal.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+jpa.jpaVendorAdapter.showSql=true
+jpa.openjpa.Log=DefaultLevel=WARN, Runtime=WARN, Tool=WARN, SQL=WARN
+jpa.openjpa.RuntimeUnenhancedClasses=unsupported
+jpa.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
+jpa.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+
+
+###################################################################
+# Properties related to the Rave MongoDB implementation #
+###################################################################
+mongo.host=localhost
+mongo.port=27017
+mongo.database=rave
+mongo.username=
+mongo.password=
+
provider.wookie.wookieServerUrl=http://localhost:8080/wookie
provider.wookie.wookieApiKey=TEST
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/applicationContext.xml Thu Jan 3 18:48:47 2013
@@ -21,13 +21,132 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
+ http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+ <!-- make the the portal.properties props available to autowire injectors, location of the properties can
+be overridden by setting a system property "portal.override.properties" -->
+ <bean id="portalPropertyPlaceholder" class="org.apache.rave.util.OverridablePropertyPlaceholderConfigurer">
+ <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
+ <property name="systemPropertyName" value="portal.override.properties"/>
+ <property name="location" value="classpath:portal.properties"/>
+ </bean>
+
+ <!-- bean post-processor for JPA annotations -->
+ <context:annotation-config/>
+
+ <!-- enable the use of the @AspectJ style of Spring AOP -->
+ <aop:aspectj-autoproxy/>
+
+ <!-- rave-common component base-package scan (maybe move to a separate common-applicationContext.xml?) -->
+ <context:component-scan base-package="org.apache.rave.service"/>
+ <context:component-scan base-package="org.apache.rave.synchronization"/>
+
+ <!-- rave-core component base-package scan -->
+ <context:component-scan base-package="org.apache.rave.portal.model"/>
+ <context:component-scan base-package="org.apache.rave.portal.repository"/>
+
+ <!-- Password encoding -->
+ <bean class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" id="passwordEncoder">
+ <!--<constructor-arg index="0" value="10"/>-->
+ </bean>
+
+ <!-- email settings -->
+ <bean id="emailServiceMailMessage" class="org.springframework.mail.SimpleMailMessage">
+ <property name="from" value="${portal.mail.sender}"/>
+ <property name="replyTo" value="${portal.mail.replyto}"/>
+ </bean>
+
+ <bean id="freemarkerMailConfiguration" class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean">
+ <property name="templateLoaderPath" value="/WEB-INF/mailtemplates"/>
+ </bean>
+ <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
+ <property name="host" value="${portal.mail.host}"/>
+ <property name="password" value="${portal.mail.password}"/>
+ <property name="username" value="${portal.mail.username}"/>
+ <property name="port" value="${portal.mail.port}"/>
+ <property name="protocol" value="${portal.mail.protocol}"/>
+ <!-- NOTE: if using Gmail, you'll need following properties-->
+ <!--<property name="javaMailProperties">
+ <props>
+ <prop key="mail.smtp.auth">true</prop>
+ <prop key="mail.smtp.starttls.enable">true</prop>
+ <prop key="mail.smtp.timeout">8500</prop>
+ </props>
+ </property>-->
+ </bean>
+ <!--
+ NOTE: to use mail session you'll need to configure following within catalina_home/conf/context.xml
+ <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="my.mail.host"/>
+
+ Further, activation & mail jars needs to be placed within catalina_home/lib folder
+ -->
+ <!--
+ <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
+ <property name="session" ref="mailSession"/>
+ </bean>
+ <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <property name="jndiName" value="java:comp/env/mail/Session"/>
+ </bean>
+ -->
+
+ <bean id="restTemplate" class="org.springframework.web.client.RestTemplate" />
+
+ <bean id="staticContentCache" class="org.apache.rave.service.impl.DefaultStaticContentFetcherService">
+ <constructor-arg ref="restTemplate"/>
+ <constructor-arg>
+ <list>
+ <!-- example of a Static Content source that doesn't have any string token placeholders in its content body
+ <bean class="org.apache.rave.model.StaticContent">
+ <constructor-arg index="0" value="standardCompanyHeader"/>
+ <constructor-arg index="1" value="${company.header.host}/content/standard_header.html"/>
+ <constructor-arg index="2">
+ <null/>
+ </constructor-arg>
+ </bean>
+ -->
+ <!-- example of a Static Content source that has string token placeholders
+ <bean class="org.apache.rave.model.StaticContent">
+ <constructor-arg index="0" value="environmentSpecificContent"/>
+ <constructor-arg index="1" value="${company.header.host}/content/footer.html"/>
+ <constructor-arg index="2">
+ <map>
+ <entry key="\{supportEmail\}" value="${raveproperty.supportemail}"/>
+ <entry key="\{productVersion\}" value="${raveproperty.version}"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ -->
+ </list>
+ </constructor-arg>
+ </bean>
+
+ <!-- example on how to setup a Spring Timer to refresh the Static Content cache at a fixed interval
+ <bean id="refreshStaticContentCacheScheduledTask" class="org.springframework.scheduling.timer.ScheduledTimerTask">
+ <property name="delay" value="5000"/>
+ <property name="period" value="300000"/>
+ <property name="timerTask">
+ <bean class="org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean"
+ p:targetObject-ref="staticContentCache" p:targetMethod="refreshAll"/>
+ </property>
+ </bean>
+ <bean id="timerFactory" class="org.springframework.scheduling.timer.TimerFactoryBean">
+ <property name="daemon" value="true"/>
+ <property name="scheduledTimerTasks">
+ <list>
+ <ref local="refreshStaticContentCacheScheduledTask"/>
+ </list>
+ </property>
+ </bean>
+ -->
<import resource="classpath*:org/apache/rave/core-applicationContext.xml"/>
- <import resource="classpath*:org/apache/rave/jpa-applicationContext.xml"/>
+ <import resource="classpath*:org/apache/rave/persistence-applicationContext.xml"/>
<import resource="classpath*:org/apache/rave/web-applicationContext.xml"/>
<import resource="classpath*:org/apache/rave/opensocial-provider-applicationContext.xml"/>
<import resource="classpath*:org/apache/rave/w3c-provider-applicationContext.xml"/>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/dispatcher-servlet.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/dispatcher-servlet.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/dispatcher-servlet.xml (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/dispatcher-servlet.xml Thu Jan 3 18:48:47 2013
@@ -27,6 +27,8 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd">
+ <import resource="classpath*:/org/apache/rave/marshaller-applicationContext.xml" />
+
<!--
Scans the classpath of this application for @Components to deploy as beans
NOTE: only the controllers (api and controller packages) are scanned here in dispatcher-servlet.xml. All other
@@ -90,16 +92,6 @@
<property name="suffix" value=".jsp"/>
</bean>
- <oxm:jaxb2-marshaller id="xmlMarshaller">
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaUser"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaPage"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaRegion"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaRegionWidget"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaRegionWidgetPreference"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.model.JpaWidget"/>
- <oxm:class-to-be-bound name="org.apache.rave.portal.web.model.RegionWidgetPreferenceListWrapper"/>
- </oxm:jaxb2-marshaller>
-
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<property name="messageConverters">
<list>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferences.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferences.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferences.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/preferences.jsp Thu Jan 3 18:48:47 2013
@@ -42,7 +42,7 @@
<h2><fmt:message key="admin.preferences.shorttitle"/></h2>
<spring:url value="/app/admin/preferencedetail/edit" var="detaillink"/>
- <%--@elvariable id="preferenceMap" type="java.util.Map<java.lang.String, org.apache.rave.portal.model.JpaPortalPreference>"--%>
+ <%--@elvariable id="preferenceMap" type="java.util.Map<java.lang.String, org.apache.rave.portal.model.PortalPreference>"--%>
<c:choose>
<c:when test="${fn:length(preferenceMap) eq 0}">
<a class="btn btn-primary" href="<c:out value="${detaillink}"/>"><fmt:message key="admin.preferences.edit"/></a>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/userdetail.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/userdetail.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/userdetail.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/userdetail.jsp Thu Jan 3 18:48:47 2013
@@ -115,7 +115,7 @@
</fieldset>
<fieldset>
<span class="control-label"><fmt:message key="admin.userdata.authorities"/></span>
- <%--@elvariable id="authorities" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.JpaAuthority>"--%>
+ <%--@elvariable id="authorities" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.Authority>"--%>
<ul class="checkboxlist">
<form:checkboxes path="authorities" items="${authorities.resultSet}" itemLabel="authority" itemValue="authority" element="li"/>
</ul>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/users.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/users.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/users.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/users.jsp Thu Jan 3 18:48:47 2013
@@ -19,7 +19,7 @@
<%@ page language="java" trimDirectiveWhitespaces="true" %>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
<fmt:setBundle basename="messages"/>
-<%--@elvariable id="searchResult" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.JpaUser>"--%>
+<%--@elvariable id="searchResult" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.User>"--%>
<fmt:message key="${pageTitleKey}" var="pagetitle"/>
<rave:navbar pageTitle="${pagetitle}"/>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/widgets.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/widgets.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/widgets.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/admin/widgets.jsp Thu Jan 3 18:48:47 2013
@@ -19,7 +19,7 @@
<%@ page language="java" trimDirectiveWhitespaces="true" %>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
<fmt:setBundle basename="messages"/>
-<%--@elvariable id="searchResult" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.JpaWidget>"--%>
+<%--@elvariable id="searchResult" type="org.apache.rave.portal.model.util.SearchResult<org.apache.rave.portal.model.Widget>"--%>
<fmt:message key="${pageTitleKey}" var="pagetitle"/>
<rave:navbar pageTitle="${pagetitle}"/>
<div class="container-fluid">
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp Thu Jan 3 18:48:47 2013
@@ -22,7 +22,7 @@
<fmt:setBundle basename="messages"/>
<jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>" scope="request"/>
<jsp:useBean id="pageUser" type="org.apache.rave.portal.model.PageUser" scope="request"/>
-<jsp:useBean id="pageLayouts" type="java.util.List<org.apache.rave.portal.model.JpaPageLayout>" scope="request"/>
+<jsp:useBean id="pageLayouts" type="java.util.List" scope="request"/>
<%--@elvariable id="page" type="org.apache.rave.portal.model.Page"--%>
<sec:authentication property="principal.id" var="principalId" scope="request"/>
@@ -100,7 +100,7 @@
</li>
</c:when>
<c:otherwise>
- <li id="tab-${userPage.id}" onclick="rave.viewPage(${userPage.id});">
+ <li id="tab-${userPage.id}" onclick="rave.viewPage('${userPage.id}');">
<c:choose>
<c:when test="${isSharedToMe}">
<a href="#" class="rave-ui-tab-shared-to-me">
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp Thu Jan 3 18:48:47 2013
@@ -21,7 +21,7 @@
<%@ page errorPage="/WEB-INF/jsp/views/error.jsp" %>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
<fmt:setBundle basename="messages"/>
-<jsp:useBean id="userProfile" type="org.apache.rave.portal.model.JpaUser" scope="request"/>
+<jsp:useBean id="userProfile" type="org.apache.rave.portal.model.User" scope="request"/>
<sec:authentication property="principal.username" var="principleUsername" scope="request"/>
<sec:authentication property="principal.displayName" var="displayName" scope="request"/>
@@ -165,7 +165,7 @@
</div>
</div>
<div class="span3">
- <portal:person id="${page.ownerId}" var="${owner}" />
+ <portal:person id="${page.ownerId}" var="owner" />
<button type="button" id="addRemoveFriend" value="${owner.username}" class="btn btn-primary profile-info-visible"><fmt:message key="page.personProfile.addremove.friends"/></button>
</div>
<div class="span3">
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp Thu Jan 3 18:48:47 2013
@@ -76,7 +76,7 @@
</div>
</c:if>
<ul class="storeItems">
- <%--@elvariable id="widget" type="org.apache.rave.portal.model.JpaWidget"--%>
+ <%--@elvariable id="widget" type="org.apache.rave.portal.model.Widget"--%>
<c:forEach var="widget" items="${widgets.resultSet}">
<%--@elvariable id="widgetsStatistics" type="org.apache.rave.portal.model.util.WidgetStatistics"--%>
<c:set var="widgetStatistics" value="${widgetsStatistics[widget.id]}"/>
@@ -100,7 +100,7 @@
<div id="widgetAdded_${widget.id}" class="storeButton">
<button class="btn btn-small btn-primary" id="addWidget_${widget.id}"
- onclick="rave.api.rpc.addWidgetToPage({widgetId: ${widget.id}, pageId: ${referringPageId}, buttonId: this.id});"
+ onclick="rave.api.rpc.addWidgetToPage({widgetId: '${widget.id}', pageId: '${referringPageId}', buttonId: this.id});"
data-success="<fmt:message key="page.widget.addedToPage"/>">
<fmt:message key="page.widget.addToPage"/>
</button>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/userProfile.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/userProfile.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/userProfile.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/userProfile.jsp Thu Jan 3 18:48:47 2013
@@ -19,7 +19,7 @@
<%@ page language="java" trimDirectiveWhitespaces="true" %>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
<fmt:setBundle basename="messages"/>
-<jsp:useBean id="userProfile" type="org.apache.rave.portal.model.JpaUser" scope="request"/>
+<jsp:useBean id="userProfile" type="org.apache.rave.portal.model.User" scope="request"/>
<div id="content">
<h1>${pagetitle}</h1>
<form:form id="userProfileForm" commandName="userProfile" action="updateUserProfile" method="POST">
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp Thu Jan 3 18:48:47 2013
@@ -43,7 +43,7 @@
<div id="widgetAdded_${widget.id}" class="detailWidgetAdd">
<button class="btn btn-primary btn-large storeItemButton"
id="addWidget_${widget.id}"
- onclick="rave.api.rpc.addWidgetToPage({widgetId: ${widget.id}, pageId: ${referringPageId}, redirectAfterAdd:true});"
+ onclick="rave.api.rpc.addWidgetToPage({widgetId: '${widget.id}', pageId: '${referringPageId}', redirectAfterAdd:true});"
data-success="<fmt:message key="page.widget.addedToPage"/>">
<fmt:message key="page.widget.addToPage"/>
</button>
@@ -218,12 +218,12 @@
</span>
<c:if test="${userProfile.id eq comment.userId}">
<button id="comment-delete-${comment.id}" class="btn btn-danger btn-mini commentDeleteButton"
- value="Delete" title="Delete comment" data-widgetid="<c:out value="${comment.widgetId}"/>">
+ value="Delete" title="Delete comment" data-widgetid="<c:out value="${widget.id}"/>">
<i class="icon-remove icon-white"></i>
</button>
<button id="comment-edit-${comment.id}" class="btn btn-mini commentEditButton"
value="Edit" title="Edit comment"
- data-widgetid="<c:out value="${comment.widgetId}"/>"
+ data-widgetid="<c:out value="${widget.id}"/>"
data-toggle="modal" data-target="#editComment-dialog">
<i class="icon-pencil"></i>
</button>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/navbar.tag
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/navbar.tag?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/navbar.tag (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/navbar.tag Thu Jan 3 18:48:47 2013
@@ -44,7 +44,7 @@
<c:when test="${navItem.hasChildren}">
<ul class="dropdown-menu friendRequestDropdown">
<c:forEach items="${navItem.childNavigationItems}" var="childItem">
- <li class="requestItem">${childItem.name}
+ <li class="requestItem"><c:out value="${childItem.name}" />
<a class="acceptFriendRequest" id="${childItem.nameParam}" href="#"><i class="icon-ok"></i></a>
<a class="declineFriendRequest" id="${childItem.nameParam}" href="#"><i class="icon-remove"></i></a>
</li>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_person_profile.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_person_profile.js?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_person_profile.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_person_profile.js Thu Jan 3 18:48:47 2013
@@ -130,33 +130,33 @@ rave.personprofile = rave.personprofile
)
.append(
$("<td/>")
- .attr("id", "friendStatusButtonHolder" + this.entityId)
+ .attr("id", "friendStatusButtonHolder" + this.id)
)
);
if(this.username != currentUser){
// check if already added
if(rave.personprofile.isUserAlreadyFriend(this.username)){
- $('#friendStatusButtonHolder'+this.entityId)
+ $('#friendStatusButtonHolder'+this.id)
.append(
$("<a/>")
.attr("href", "#")
.attr("id", this.entityId)
- .attr("onclick", "rave.personprofile.removeFriend("+this.entityId+", '"+this.username+"');")
+ .attr("onclick", "rave.personprofile.removeFriend("+this.id+", '"+this.username+"');")
.text(rave.getClientMessage("common.remove"))
);
// check if already sent friend request
}else if(rave.personprofile.isFriendRequestSent(this.username)){
- $('#friendStatusButtonHolder'+this.entityId)
+ $('#friendStatusButtonHolder'+this.id)
.append(
$("<a/>")
.attr("href", "#")
.attr("id", this.entityId)
- .attr("onclick", "rave.personprofile.removeFriendRequestSent("+this.entityId+", '"+this.username+"');")
+ .attr("onclick", "rave.personprofile.removeFriendRequestSent("+this.id+", '"+this.username+"');")
.text(rave.getClientMessage("common.cancel.request"))
);
}else if(rave.personprofile.isFriendRequestReceived(this.username)){
- $('#friendStatusButtonHolder'+this.entityId)
+ $('#friendStatusButtonHolder'+this.id)
.append(
$("<a/>")
.attr("href", "#")
@@ -166,17 +166,17 @@ rave.personprofile = rave.personprofile
' / ',
$("<a/>")
.attr("href", "#")
- .attr("id", this.entityId)
- .attr("onclick", "rave.personprofile.declineFriendRequest("+this.entityId+", '"+this.username+"');")
+ .attr("id", this.id)
+ .attr("onclick", "rave.personprofile.declineFriendRequest("+this.id+", '"+this.username+"');")
.text(rave.getClientMessage("common.decline"))
);
}else {
- $('#friendStatusButtonHolder'+this.entityId)
+ $('#friendStatusButtonHolder'+this.id)
.append(
$("<a/>")
.attr("href", "#")
- .attr("id", this.entityId)
- .attr("onclick", "rave.personprofile.addFriend("+this.entityId+", '"+this.username+"');")
+ .attr("id", this.id)
+ .attr("onclick", "rave.personprofile.addFriend("+this.id+", '"+this.username+"');")
.text(rave.getClientMessage("common.add"))
);
}
Modified: rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal/pom.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal/pom.xml (original)
+++ rave/trunk/rave-portal/pom.xml Thu Jan 3 18:48:47 2013
@@ -201,7 +201,7 @@
<!-- un-comment following property for: Loading the SizeOfAgent will probably fail,
as you are running on Apple OS X and have a value set for java.io.tmpdir -->
<!-- <net.sf.ehcache.pool.sizeof.AgentSizeOf.bypass>true</net.sf.ehcache.pool.sizeof.AgentSizeOf.bypass> -->
-
+
<!-- Documentation: http://rave.apache.org/documentation/host-configuration.html -->
<!--
<portal.override.properties>/path/to/custom.portal.properties</portal.override.properties>
@@ -284,6 +284,74 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>jpa</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${project.basedir}/src/test/resources_jpa</directory>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+ <profile>
+ <id>mongodb</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-portal-dependencies</artifactId>
+ <type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-jpa</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-mongodb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>de.flapdoodle.embed</groupId>
+ <artifactId>de.flapdoodle.embed.mongo</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${project.basedir}/src/test/resources_mongo</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>com.github.joelittlejohn.embedmongo</groupId>
+ <artifactId>embedmongo-maven-plugin</artifactId>
+ <version>0.1.5</version>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
Modified: rave/trunk/rave-portal/src/test/resources/portal.properties
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal/src/test/resources/portal.properties?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal/src/test/resources/portal.properties (original)
+++ rave/trunk/rave-portal/src/test/resources/portal.properties Thu Jan 3 18:48:47 2013
@@ -34,21 +34,30 @@ portal.opensocial_security.domain=defaul
portal.page.default_name=Main
#Default Rave Portal database settings with in memory H2 database
-portal.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
-portal.dataSource.driver=org.h2.Driver
-portal.dataSource.username=sa
-portal.dataSource.password=local
-
-portal.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
-portal.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
-portal.jpaVendorAdapter.database=H2
-
-# General Rave portal database settings
-portal.jpaVendorAdapter.showSql=true
-portal.openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=WARN
-portal.openjpa.RuntimeUnenhancedClasses=unsupported
-portal.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
-portal.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+jpa.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
+jpa.dataSource.driver=org.h2.Driver
+jpa.dataSource.username=sa
+jpa.dataSource.password=local
+
+jpa.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
+jpa.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
+jpa.jpaVendorAdapter.database=H2
+
+# General Rave jpa database settings
+jpa.jpaVendorAdapter.showSql=true
+jpa.openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=WARN
+jpa.openjpa.RuntimeUnenhancedClasses=unsupported
+jpa.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
+jpa.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+
+###################################################################
+# Properties related to the Rave MongoDB implementation #
+###################################################################
+mongo.host=localhost
+mongo.port=27017
+mongo.database=rave
+mongo.username=
+mongo.password=
provider.wookie.wookieServerUrl=http://localhost:8080/wookie
provider.wookie.wookieApiKey=TEST
Modified: rave/trunk/rave-portal/src/test/resources/test-applicationContext.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal/src/test/resources/test-applicationContext.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-portal/src/test/resources/test-applicationContext.xml (original)
+++ rave/trunk/rave-portal/src/test/resources/test-applicationContext.xml Thu Jan 3 18:48:47 2013
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:org/apache/rave/core-applicationContext.xml"/>
- <import resource="classpath:org/apache/rave/jpa-applicationContext.xml"/>
+ <import resource="classpath:org/apache/rave/persistence-applicationContext.xml"/>
<import resource="classpath:org/apache/rave/web-applicationContext.xml"/>
<import resource="classpath:org/apache/rave/opensocial-provider-applicationContext.xml"/>
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRenderer.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRenderer.java?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRenderer.java (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRenderer.java Thu Jan 3 18:48:47 2013
@@ -64,19 +64,19 @@ public class OpenSocialWidgetRenderer im
//Note the widgets.push() call. This defines the widget objects, which are
//added to the widgets[] array in home.jsp.
private static final String SCRIPT_BLOCK =
- "<script>rave.registerWidget(%1$s, {type: '%2$s'," +
- " regionWidgetId: %3$s," +
+ "<script>rave.registerWidget('%1$s', {type: '%2$s'," +
+ " regionWidgetId: '%3$s'," +
" widgetUrl: '%4$s', " +
" securityToken: '%5$s', " +
" metadata: %6$s," +
" userPrefs: %7$s," +
" collapsed: %8$s, " +
- " widgetId: %9$s," +
+ " widgetId: '%9$s'," +
" locked: %10$s," +
" hideChrome: %11$s," +
" subPage: {id: %12$s, name: '%13$s', isDefault: %14$s}" +
"});</script>";
- private static final String MARKUP = "<!-- RegionWidget %1$s placeholder -->";
+ private static final String MARKUP = "<!-- RegionWidget '%1$s' placeholder -->";
@Override
public String getSupportedContext() {
@@ -128,7 +128,7 @@ public class OpenSocialWidgetRenderer im
boolean isDefault = false;
Page page = item.getRegion().getPage();
if (PageType.SUB_PAGE.equals(page.getPageType())) {
- pageId = page.getId();
+ pageId = "'" + page.getId() + "'";
pageName = page.getName();
// check to see if this regionWidget is on the first sub page, which will be the default
// subpage rendered if the user doesn't specify which subpage via the URL hash
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/test/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRendererTest.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/test/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRendererTest.java?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/test/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRendererTest.java (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/test/java/org/apache/rave/provider/opensocial/web/renderer/OpenSocialWidgetRendererTest.java Thu Jan 3 18:48:47 2013
@@ -22,7 +22,6 @@ package org.apache.rave.provider.opensoc
import org.apache.rave.exception.NotSupportedException;
import org.apache.rave.portal.model.*;
import org.apache.rave.portal.model.impl.*;
-import org.apache.rave.portal.service.WidgetService;
import org.apache.rave.portal.web.renderer.RenderScope;
import org.apache.rave.portal.web.renderer.Renderer;
import org.apache.rave.portal.web.renderer.ScriptLocation;
@@ -49,7 +48,6 @@ public class OpenSocialWidgetRendererTes
private SecurityTokenService securityTokenService;
private ScriptManager scriptManager;
private Renderer<RegionWidgetWrapper> renderer;
- private WidgetService widgetService;
private static final String VALID_GADGET_URL = "http://www.example.com/gadget.xml";
private static final String VALID_METADATA = "metadata";
@@ -62,7 +60,6 @@ public class OpenSocialWidgetRendererTes
@Before
public void setup() {
renderContext = new RenderContext();
- widgetService = createMock(WidgetService.class);
scriptManager = createStrictMock(ScriptManager.class);
openSocialService = createNiceMock(OpenSocialService.class);
securityTokenService = createNiceMock(SecurityTokenService.class);
@@ -100,10 +97,6 @@ public class OpenSocialWidgetRendererTes
w.setType(Constants.WIDGET_TYPE);
w.setUrl(VALID_GADGET_URL);
- expect(widgetService.getWidget(w.getId())).andReturn(w);
- expect(widgetService.getWidget(w.getId())).andReturn(w);
- replay(widgetService);
-
Region region = new RegionImpl(REGION_ID);
region.setPage(subPage);
RegionWidget rw = new RegionWidgetImpl(REGION_WIDGET_ID);
@@ -117,17 +110,17 @@ public class OpenSocialWidgetRendererTes
new RegionWidgetPreferenceImpl( "1", null, null)));
final String markup =
- "<script>rave.registerWidget(" + REGION_ID + " , {type: 'OpenSocial'," +
- " regionWidgetId: " + REGION_WIDGET_ID + "," +
+ "<script>rave.registerWidget('" + REGION_ID + "', {type: 'OpenSocial'," +
+ " regionWidgetId: '" + REGION_WIDGET_ID + "'," +
" widgetUrl: '" + VALID_GADGET_URL +"', " +
" securityToken: '" + VALID_SECURITY_TOKEN + "', " +
" metadata: " + VALID_METADATA + "," +
" userPrefs: {\"speed\":\"fast\",\"color\":\"blue\"}," +
" collapsed: " + VALID_COLLAPSED + ", " +
- " widgetId: " + WIDGET_ID + "," +
+ " widgetId: '" + WIDGET_ID + "'," +
" locked: " + VALID_LOCKED + "," +
" hideChrome: " + VALID_HIDE_CHROME + "," +
- " subPage: {id: " + VALID_SUBPAGE_ID + ", name: '" + VALID_SUBPAGE_NAME + "', isDefault: " + VALID_IS_DEFAULT_SUBPAGE + "}" +
+ " subPage: {id: '" + VALID_SUBPAGE_ID + "', name: '" + VALID_SUBPAGE_NAME + "', isDefault: " + VALID_IS_DEFAULT_SUBPAGE + "}" +
"});</script>";
expect(securityTokenService.getEncryptedSecurityToken(rw, w)).andReturn(VALID_SECURITY_TOKEN);
@@ -135,16 +128,15 @@ public class OpenSocialWidgetRendererTes
String key = OpenSocialWidgetRenderer.REGISTER_WIDGET_KEY+"-"+rw.getId();
scriptManager.registerScriptBlock(key, markup, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, renderContext);
- // TODO Renable this test once it's fixed.
- //expectLastCall();
- //replay(scriptManager);
+ expectLastCall();
+ replay(scriptManager);
RegionWidgetWrapper wrapper = new RegionWidgetWrapper(w, rw);
String result = renderer.render(wrapper, renderContext);
- assertThat(result, is(equalTo("<!-- RegionWidget " + REGION_WIDGET_ID + " placeholder -->")));
- //verify(scriptManager);
+ assertThat(result, is(equalTo("<!-- RegionWidget '" + rw.getId() + "' placeholder -->")));
+ verify(scriptManager);
}
@Test
@@ -156,13 +148,9 @@ public class OpenSocialWidgetRendererTes
Page page = new PageImpl();
page.setPageType(PageType.USER);
- WidgetImpl w = new WidgetImpl(WIDGET_ID);
+ WidgetImpl w = new WidgetImpl();
w.setType(Constants.WIDGET_TYPE);
- expect(widgetService.getWidget(w.getId())).andReturn(w);
- expect(widgetService.getWidget(w.getId())).andReturn(w);
- replay(widgetService);
-
Region region = new RegionImpl(REGION_ID);
region.setPage(page);
RegionWidget rw = new RegionWidgetImpl();
@@ -170,14 +158,14 @@ public class OpenSocialWidgetRendererTes
rw.setRegion(region);
final String markup =
- "<script>rave.registerWidget(" + REGION_ID + ", {type: 'OpenSocial'," +
- " regionWidgetId: null," +
+ "<script>rave.registerWidget('8675309', {type: 'OpenSocial'," +
+ " regionWidgetId: 'null'," +
" widgetUrl: 'null', " +
" securityToken: 'null', " +
" metadata: null," +
" userPrefs: {}," +
" collapsed: false, " +
- " widgetId: " + WIDGET_ID + "," +
+ " widgetId: 'null'," +
" locked: false," +
" hideChrome: false," +
" subPage: {id: null, name: '', isDefault: false}" +
@@ -199,9 +187,6 @@ public class OpenSocialWidgetRendererTes
w.setType("NONE");
w.setUrl("http://www.example.com/gadget.xml");
- expect(widgetService.getWidget(w.getId())).andReturn(w);
- replay(widgetService);
-
RegionWidget rw = new RegionWidgetImpl("1");
rw.setWidgetId(w.getId());
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave.shindig.properties
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave.shindig.properties?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave.shindig.properties (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave.shindig.properties Thu Jan 3 18:48:47 2013
@@ -27,21 +27,21 @@ shindig.contextroot=
shindig.spring.base-package=org.apache.rave
# Default Rave Shindig database settings with in memory H2 database
-rave-shindig.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
-rave-shindig.dataSource.driver=org.h2.Driver
-rave-shindig.dataSource.username=sa
-rave-shindig.dataSource.password=local
-
-rave-shindig.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
-rave-shindig.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
-rave-shindig.jpaVendorAdapter.database=H2
+jpa.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
+jpa.dataSource.driver=org.h2.Driver
+jpa.dataSource.username=sa
+jpa.dataSource.password=local
+
+jpa.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
+jpa.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
+jpa.jpaVendorAdapter.database=H2
# General Rave Shindig database settings
-rave-shindig.jpaVendorAdapter.showSql=true
-rave-shindig.openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=WARN
-rave-shindig.openjpa.RuntimeUnenhancedClasses=supported
-rave-shindig.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
-rave-shindig.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+jpa.jpaVendorAdapter.showSql=true
+jpa.openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=WARN
+jpa.openjpa.RuntimeUnenhancedClasses=supported
+jpa.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
+jpa.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
#########################################################
## These are the properties that came from Shindig ##
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/pom.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/pom.xml (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/pom.xml Thu Jan 3 18:48:47 2013
@@ -59,10 +59,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.rave</groupId>
- <artifactId>rave-jpa</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.shindig</groupId>
<artifactId>shindig-server</artifactId>
<type>war</type>
@@ -134,4 +130,29 @@
</build>
+ <profiles>
+ <profile>
+ <id>jpa</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-jpa</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mongodb</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-mongodb</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+
</project>
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave-shindig-applicationContext.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave-shindig-applicationContext.xml?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave-shindig-applicationContext.xml (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave-shindig-applicationContext.xml Thu Jan 3 18:48:47 2013
@@ -50,39 +50,8 @@
<context:component-scan base-package="org.apache.rave.opensocial" annotation-config="true"/>
<context:component-scan base-package="org.apache.rave.service" annotation-config="true"/>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
-
- <tx:annotation-driven transaction-manager="transactionManager"/>
+ <import resource="classpath*:org/apache/rave/persistence-applicationContext.xml" />
- <bean id="entityManagerFactory"
- class="org.apache.rave.persistence.jpa.PopulatedLocalContainerEntityManagerFactory">
- <property name="persistenceUnitName" value="ravePersistenceUnit"/>
- <property name="dataSource" ref="dataSource"/>
- <property name="populator" ref="dataSourcePopulator"/>
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"
- p:databasePlatform="${rave-shindig.jpaVendorAdapter.databasePlatform}"
- p:database="${rave-shindig.jpaVendorAdapter.database}"
- p:showSql="${rave-shindig.jpaVendorAdapter.showSql}"/>
- </property>
- <property name="jpaPropertyMap">
- <map>
- <entry key="openjpa.Log" value="${rave-shindig.openjpa.Log}"/>
- <entry key="openjpa.RuntimeUnenhancedClasses" value="${rave-shindig.openjpa.RuntimeUnenhancedClasses}"/>
- <entry key="openjpa.jdbc.SynchronizeMappings" value="${rave-shindig.openjpa.jdbc.SynchronizeMappings}"/>
- <entry key="openjpa.jdbc.MappingDefaults" value="${rave-shindig.openjpa.jdbc.MappingDefaults}"/>
- </map>
- </property>
- </bean>
-
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="url" value="${rave-shindig.dataSource.url}"/>
- <property name="driverClassName" value="${rave-shindig.dataSource.driver}"/>
- <property name="username" value="${rave-shindig.dataSource.username}"/>
- <property name="password" value="${rave-shindig.dataSource.password}"/>
- </bean>
<bean id="oAuthStore" class="org.apache.rave.gadgets.oauth.inject.DefaultOAuthStore">
<constructor-arg name="defaultCallbackUrl" value="${shindig.signing.global-callback-url}"/>
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties
URL: http://svn.apache.org/viewvc/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties?rev=1428544&r1=1428543&r2=1428544&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/rave.shindig.properties Thu Jan 3 18:48:47 2013
@@ -35,21 +35,31 @@ shindig.spring.base-package=org.apache.r
# Default Rave Shindig database settings with in memory H2 database
# rave.database.location is replaced during the build
-rave-shindig.dataSource.url=jdbc:h2:${rave.database.location};AUTO_SERVER=TRUE
-rave-shindig.dataSource.driver=org.h2.Driver
-rave-shindig.dataSource.username=sa
-rave-shindig.dataSource.password=local
-
-rave-shindig.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
-rave-shindig.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
-rave-shindig.jpaVendorAdapter.database=H2
+jpa.dataSource.url=jdbc:h2:${rave.database.location};AUTO_SERVER=TRUE
+jpa.dataSource.driver=org.h2.Driver
+jpa.dataSource.username=sa
+jpa.dataSource.password=local
+
+jpa.jpaDialect=org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect
+jpa.jpaVendorAdapter.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary
+jpa.jpaVendorAdapter.database=H2
# General Rave Shindig database settings
-rave-shindig.jpaVendorAdapter.showSql=true
-rave-shindig.openjpa.Log=DefaultLevel=WARN, Runtime=WARN, Tool=WARN, SQL=WARN
-rave-shindig.openjpa.RuntimeUnenhancedClasses=warn
-rave-shindig.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
-rave-shindig.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+jpa.jpaVendorAdapter.showSql=true
+jpa.openjpa.Log=DefaultLevel=WARN, Runtime=WARN, Tool=WARN, SQL=WARN
+jpa.openjpa.RuntimeUnenhancedClasses=warn
+jpa.openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)
+jpa.openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict
+
+###################################################################
+# Properties related to the Rave MongoDB implementation #
+###################################################################
+mongo.host=localhost
+mongo.port=27017
+mongo.database=rave
+mongo.username=
+mongo.password=
+
#################################################################################
## These properties are a copy/paste from the default shindig.properties file. ##