Author: remi
Date: 2009-10-16 11:47:50 +0200 (Fri, 16 Oct 2009)
New Revision: 5714
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetOnline.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsOnlineContainer.py
Log:
* Parent plugin uuid of the online gadgets are now checked before to show
gadgets in the online page
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetOnline.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetOnline.py
2009-10-16 09:41:56 UTC (rev 5713)
+++
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetOnline.py
2009-10-16 09:47:50 UTC (rev 5714)
@@ -143,3 +143,15 @@
result = "%sscg/%s.scg" % (ONLINE_GADGETS_BASE_URL,
self.getSymbolicName())
return result
+
+ #
--------------------------------------------------------------------------
+ # Get the parent plugin Uuid.
+ #
--------------------------------------------------------------------------
+ def getParentPluginUuid(self):
+ """Get the parent plugin Uuid.
+ @return: The parent plugin Uuid.
+ """
+ if self.__dictionary.has_key('parentPluginUuid'):
+ return self.__dictionary['parentPluginUuid']
+ else:
+ return "0"
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
2009-10-16 09:41:56 UTC (rev 5713)
+++
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsContainer.py
2009-10-16 09:47:50 UTC (rev 5714)
@@ -100,6 +100,15 @@
return self.__gadgetsOnlineContainer
#
--------------------------------------------------------------------------
+ # Get the plugins container.
+ #
--------------------------------------------------------------------------
+ def getPluginsContainer(self):
+ """Get the plugins container.
+ @return: A PluginsContainer object.
+ """
+ return self.__pluginsContainer
+
+ #
--------------------------------------------------------------------------
# Generate a single name.
#
--------------------------------------------------------------------------
def generateSingleName(self, gadgetName, language):
@@ -167,6 +176,7 @@
gadgetData['category'] = gadget.getDescription().getCategory()
gadgetData['author'] = gadget.getDescription().getAuthor()
gadgetData['platform'] = gadget.getDescription().getPlatform()
+ gadgetData['parentPluginUuid'] =
gadget.getParentPlugin().getDescription().getUuid()
gadgetData['name'] = {}
gadgetData['description'] = {}
gadgetData['helpFile'] = {}
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsOnlineContainer.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsOnlineContainer.py
2009-10-16 09:41:56 UTC (rev 5713)
+++
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/GadgetsOnlineContainer.py
2009-10-16 09:47:50 UTC (rev 5714)
@@ -154,6 +154,13 @@
cat = onlineGadget.getCategory()
if not cat.lower() in categories:
categories.append(cat.lower())
+ # Check the parent plugin
+ parentPluginUuid = onlineGadget.getParentPluginUuid()
+ if parentPluginUuid != "0":
+ pluginsContainer =
self.__gadgetsContainer.getPluginsContainer()
+ parentPlugin =
pluginsContainer.getPluginByUuid(parentPluginUuid)
+ if parentPlugin == None:
+ continue
# Check the category
if category != "all_gadgets":
if cat.lower() != category.lower():
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn