Author: scottbw
Date: Sun Feb 9 21:54:31 2014
New Revision: 1566440
URL: http://svn.apache.org/r1566440
Log:
Removed the support for OpenSocial gadgets - not only was this way behind spec,
I think its much more obvious to run Wookie alongside Shindig rather than
expect one or the other to handle both types of widget.
Removed:
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/util/gadgets/
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/util/opensocial/
wookie/trunk/wookie-server/src/test/java/org/apache/wookie/tests/OpenSocialUtilsTest.java
wookie/trunk/wookie-server/src/test/java/org/apache/wookie/tests/integration/GadgetUtilsTest.java
Modified:
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/controller/WidgetsController.java
Modified:
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/controller/WidgetsController.java
URL:
http://svn.apache.org/viewvc/wookie/trunk/wookie-server/src/main/java/org/apache/wookie/controller/WidgetsController.java?rev=1566440&r1=1566439&r2=1566440&view=diff
==============================================================================
---
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/controller/WidgetsController.java
(original)
+++
wookie/trunk/wookie-server/src/main/java/org/apache/wookie/controller/WidgetsController.java
Sun Feb 9 21:54:31 2014
@@ -41,7 +41,6 @@ import org.apache.wookie.util.NewWidgetB
import org.apache.wookie.util.W3CWidgetFactoryUtils;
import org.apache.wookie.util.WidgetFileUtils;
import org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer;
-import org.apache.wookie.util.gadgets.GadgetUtils;
import org.apache.wookie.w3c.W3CWidget;
import org.apache.wookie.w3c.W3CWidgetFactory;
import org.apache.wookie.w3c.exceptions.BadManifestException;
@@ -191,14 +190,6 @@ public class WidgetsController extends C
protected boolean create(String resourceId, HttpServletRequest request,
HttpServletResponse response)
throws ResourceDuplicationException, InvalidParametersException,
UnauthorizedAccessException {
-
- //
- // Check for a "url" parameter in the request, indicating this is a remote
widget or opensocial gadget xml file
- //
- String url = request.getParameter("url");
- if (url != null && url.trim().length() != 0){
- return createGadget(request, url);
- }
//
// Get the path to the upload folder, and the widget install folder
@@ -299,36 +290,5 @@ public class WidgetsController extends C
}
}
-
- /**
- * Register a gadget
- * @param request
- * @param gadgetUrl
- * @return true if the gadget is added; false if it was already
registered
- * @throws InvalidParametersException
- * @throws Exception
- */
- public boolean createGadget(HttpServletRequest request, String
gadgetUrl) throws InvalidParametersException{
-
- //
- // Create a new widget from the gadget URL
- //
- W3CWidget widget;
- try {
- widget = GadgetUtils.createWidget(request);
- } catch (Exception e) {
- throw new InvalidParametersException();
- }
-
- //
- // If the gadget is not already registered, add it
- //
-
if(WidgetMetadataService.Factory.getInstance().getWidget(widget.getIdentifier())
== null){
- WidgetFactory.addNewWidget(widget);
- return true;
- } else {
- return false;
- }
- }
}