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/23 20:57:22 UTC
svn commit: r1437666 - in /rave/trunk:
rave-components/rave-mongodb/src/test/resources/
rave-portal-resources/src/main/resources/ rave-portal/src/test/resources/
rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/ra...
Author: mfranklin
Date: Wed Jan 23 19:57:21 2013
New Revision: 1437666
URL: http://svn.apache.org/viewvc?rev=1437666&view=rev
Log:
Applying patch for RAVE-877 from Trevor Mack
Modified:
rave/trunk/rave-components/rave-mongodb/src/test/resources/portal.properties
rave/trunk/rave-portal-resources/src/main/resources/portal.properties
rave/trunk/rave-portal/src/test/resources/portal.properties
rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java
Modified: rave/trunk/rave-components/rave-mongodb/src/test/resources/portal.properties
URL: http://svn.apache.org/viewvc/rave/trunk/rave-components/rave-mongodb/src/test/resources/portal.properties?rev=1437666&r1=1437665&r2=1437666&view=diff
==============================================================================
--- rave/trunk/rave-components/rave-mongodb/src/test/resources/portal.properties (original)
+++ rave/trunk/rave-components/rave-mongodb/src/test/resources/portal.properties Wed Jan 23 19:57:21 2013
@@ -25,6 +25,7 @@
portal.opensocial_engine.protocol=http
portal.opensocial_engine.root=localhost:8080
portal.opensocial_engine.gadget_path=/gadgets
+portal.opensocial_engine.container_features=container:pubsub-2:open-views
portal.opensocial_security.encryptionkey=classpath:security_token_encryption_key.txt
portal.opensocial_security.container=default
@@ -76,4 +77,4 @@ portal.user.account.needapproval=false
portal.user.account.admin.email=
portal.user.account.admin.subject=Rave User Approval
portal.user.account.admin.template=admin_approval.ftl
-portal.mail.service.loginpage=http://localhost:8080/portal/
\ No newline at end of file
+portal.mail.service.loginpage=http://localhost:8080/portal/
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=1437666&r1=1437665&r2=1437666&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/resources/portal.properties (original)
+++ rave/trunk/rave-portal-resources/src/main/resources/portal.properties Wed Jan 23 19:57:21 2013
@@ -27,6 +27,7 @@ portal.version=${project.version}
portal.opensocial_engine.protocol=http
portal.opensocial_engine.root=localhost:8080
portal.opensocial_engine.gadget_path=/gadgets
+portal.opensocial_engine.container_features=container:pubsub-2:open-views
portal.opensocial_security.encryptionkey=classpath:security_token_encryption_key.txt
portal.opensocial_security.container=default
@@ -110,4 +111,4 @@ portal.user.account.admin.subject=Rave U
portal.user.account.admin.template=admin_approval.ftl
portal.mail.service.loginpage=http://localhost:8080/portal/
# Enable/disable omdl import and export in UI
-portal.export.ui.enable=false
\ No newline at end of file
+portal.export.ui.enable=false
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=1437666&r1=1437665&r2=1437666&view=diff
==============================================================================
--- rave/trunk/rave-portal/src/test/resources/portal.properties (original)
+++ rave/trunk/rave-portal/src/test/resources/portal.properties Wed Jan 23 19:57:21 2013
@@ -25,6 +25,7 @@
portal.opensocial_engine.protocol=http
portal.opensocial_engine.root=localhost:8080
portal.opensocial_engine.gadget_path=/gadgets
+portal.opensocial_engine.container_features=container:pubsub-2:open-views
portal.opensocial_security.encryptionkey=classpath:security_token_encryption_key.txt
portal.opensocial_security.container=default
@@ -96,4 +97,4 @@ portal.user.account.needapproval=false
portal.user.account.admin.email=
portal.user.account.admin.subject=Rave User Approval
portal.user.account.admin.template=admin_approval.ftl
-portal.mail.service.loginpage=http://localhost:8080/portal/
\ No newline at end of file
+portal.mail.service.loginpage=http://localhost:8080/portal/
Modified: rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.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/config/OpenSocialEnvironment.java?rev=1437666&r1=1437665&r2=1437666&view=diff
==============================================================================
--- rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java (original)
+++ rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java Wed Jan 23 19:57:21 2013
@@ -42,13 +42,13 @@ import javax.annotation.PostConstruct;
public class OpenSocialEnvironment implements PortalPreferenceJavascriptDebugModeEventListener{
private static final Log log = LogFactory.getLog(OpenSocialEnvironment.class);
-
+
private static final String CONTAINER_JS_KEY = "containerJs";
private static final String SCRIPT_RENDER_DEBUG_ON = "1";
- private final static String SCRIPT_TEMPLATE = "<script src=\"%1$s://%2$s%3$s/js/container:pubsub-2:open-views.js?c=1&container=default&debug=%4$s\"></script>";
+ private final static String SCRIPT_TEMPLATE = "<script src=\"%1$s://%2$s%3$s/js/%4$s.js?c=1&container=default&debug=%5$s\"></script>";
private String currentDebugMode;
-
+
private ScriptManager scriptManager;
/**
@@ -63,13 +63,17 @@ public class OpenSocialEnvironment imple
* Path after the root for gadgets (gadgets)
*/
private String engineGadgetPath;
+ /**
+ * The features to request from epensocial engine
+ */
+ private String containerFeatures;
@Autowired
RaveEventManager eventManager;
@Autowired
PortalPreferenceService portalPreferenceService;
-
+
@PostConstruct
public void init() {
eventManager.addListener(PortalPreferenceJavascriptDebugModeSaveEvent.class, this);
@@ -118,6 +122,15 @@ public class OpenSocialEnvironment imple
return engineGadgetPath;
}
+ @Value("${portal.opensocial_engine.container_features}")
+ public void setContainerFeatures(String containerFeatures) {
+ this.containerFeatures = containerFeatures;
+ }
+
+ public String getContainerFeatures() {
+ return containerFeatures;
+ }
+
public String getCurrentDebugMode() {
return currentDebugMode;
}
@@ -133,11 +146,11 @@ public class OpenSocialEnvironment imple
log.debug("found event to change debug mode of JS new value =" + this.getCurrentDebugMode());
registerScriptBlock();
} else {
- log.warn("Unhandled event received. " + event.getClass());
+ log.warn("Unhandled event received. " + event.getClass());
}
}
private void registerScriptBlock(){
- scriptManager.registerScriptBlock(CONTAINER_JS_KEY, String.format(SCRIPT_TEMPLATE, engineProtocol, engineRoot, engineGadgetPath, this.getCurrentDebugMode()), ScriptLocation.BEFORE_RAVE);
+ scriptManager.registerScriptBlock(CONTAINER_JS_KEY, String.format(SCRIPT_TEMPLATE, engineProtocol, engineRoot, engineGadgetPath, containerFeatures, this.getCurrentDebugMode()), ScriptLocation.BEFORE_RAVE);
}
}