Author: jsdelfino
Date: Mon May 2 05:58:59 2011
New Revision: 1098491
URL: http://svn.apache.org/viewvc?rev=1098491&view=rev
Log:
Change app data model a bit. Store app properties in separate files and support
app cloning.
Added:
tuscany/sca-cpp/trunk/modules/edit/apps/me360/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/nearme/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/slice/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/test/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testdb/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testevents/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testtext/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testurl/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats
tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats
tuscany/sca-cpp/trunk/modules/edit/composites.py
- copied, changed from r1098490,
tuscany/sca-cpp/trunk/modules/edit/pages.py
Modified:
tuscany/sca-cpp/trunk/modules/edit/apps.py
tuscany/sca-cpp/trunk/modules/edit/dashboard.py
tuscany/sca-cpp/trunk/modules/edit/edit.composite
tuscany/sca-cpp/trunk/modules/edit/log.py
tuscany/sca-cpp/trunk/modules/edit/pages.py
tuscany/sca-cpp/trunk/modules/edit/palettes.py
tuscany/sca-cpp/trunk/modules/edit/store.py
Modified: tuscany/sca-cpp/trunk/modules/edit/apps.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/apps.py Mon May 2 05:58:59 2011
@@ -15,15 +15,13 @@
# specific language governing permissions and limitations
# under the License.
-# Apps collection implementation
-import uuid
-import sys
+# App collection implementation
import os
from util import *
# Convert an id to an app id
def appid(id):
- return ("'" + car(id), "'app.composite")
+ return ("'" + car(id), "'app.stats")
# Link implementation resources into an app
def mkapplink(id):
@@ -31,45 +29,41 @@ def mkapplink(id):
os.symlink('../../../../../nuvem/nuvem-parallel/nuvem', 'apps/' +
car(id) + '/nuvem')
os.symlink('../../../../components', 'apps/' + car(id) + '/lib')
os.mkdir('apps/' + car(id) + '/htdocs')
- os.symlink('../../../htdocs/cache-manifest.cmf', 'apps/' + car(id) +
'/htdocs/cache-manifest.cmf');
- os.symlink('../../../htdocs/login', 'apps/' + car(id) +
'/htdocs/login');
- os.symlink('../../../htdocs/logout', 'apps/' + car(id) +
'/htdocs/logout');
- os.symlink('../../../htdocs/public', 'apps/' + car(id) +
'/htdocs/public');
- os.symlink('../../../htdocs/data', 'apps/' + car(id) + '/htdocs/data');
- os.symlink('../../../htdocs/app/index.html', 'apps/' + car(id) +
'/htdocs/index.html');
- os.symlink('../../../htdocs/robots.txt', 'apps/' + car(id) +
'/htdocs/robots.txt');
- os.symlink('../../../htdocs/favicon.ico', 'apps/' + car(id) +
'/htdocs/favicon.ico');
- os.symlink('../app.html', 'apps/' + car(id) + '/htdocs/app.html');
except:
pass
return True
-# Post a new app to the apps db
-def post(collection, app, cache):
- id = appid((str(uuid.uuid1()),))
- comp = cdr(cadddr(car(app)))
- cache.put((id,), comp)
- mkapplink((id,))
- return id
-
# Put an app into the apps db
-def put(id, app, cache):
- comp = cdr(cadddr(car(app)))
- cache.put(appid(id), comp)
+def put(id, app, cache, store, composites, pages):
+ eid = cadr(caddr(car(app)))
+ appentry = (("'entry", cadr(car(app)), ("'id", car(id))),)
+
+ # Update app in apps db
+ if car(id) == eid:
+ cache.put(appid(id), appentry)
+ mkapplink(id)
+ return True
+
+ # Clone an app's composite and page
+ cache.put(appid(id), appentry)
mkapplink(id)
+ composites.put(id, composites.get((eid,)))
+ pages.put(id, pages.get((eid,)))
return True
# Get an app from the apps db
-def get(id, cache):
+def get(id, cache, store, composites, pages):
if isNil(id):
return (("'feed", ("'title", "Apps"), ("'id", "apps")),)
app = cache.get(appid(id));
if (isNil(app) or app is None):
return (("'entry", ("'title", car(id)), ("'id", car(id))),)
- return (("'entry", ("'title", car(id)), ("'id", car(id)), ("'content",
car(app))),)
+ return app
# Delete an app from the apps db
-def delete(id, cache):
+def delete(id, cache, store, composites, pages):
cache.delete(appid(id))
+ composites.delete(id)
+ pages.delete(id)
return True
Added: tuscany/sca-cpp/trunk/modules/edit/apps/me360/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/me360/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/me360/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/me360/app.stats Mon May 2 05:58:59
2011
@@ -0,0 +1 @@
+((entry (title "Check my public social data") (id "me360")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/nearme/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/nearme/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/nearme/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/nearme/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Where are my friends") (id "nearme")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Our photos of an event") (id "ourphotos")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "My online store") (id "shoppingcart")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/slice/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/slice/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/slice/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/slice/app.stats Mon May 2 05:58:59
2011
@@ -0,0 +1 @@
+((entry (title "Slice") (id "slice")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/test/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/test/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/test/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/test/app.stats Mon May 2 05:58:59
2011
@@ -0,0 +1 @@
+((entry (title "An empty test app") (id "test")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testdb/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testdb/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testdb/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testdb/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test database components") (id "testdb")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testevents/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testevents/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testevents/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testevents/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test event components") (id "testevents")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test HTTP components") (id "testhttp")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test logic components") (id "testlogic")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test search components") (id "testsearch")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test social components") (id "testsocial")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testtext/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testtext/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testtext/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testtext/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test text processing components") (id "testtext")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testurl/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testurl/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testurl/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testurl/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test URL components") (id "testurl")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test values and lists") (id "testvalues")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test widgets") (id "testwidgets")))
\ No newline at end of file
Added: tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats?rev=1098491&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats (added)
+++ tuscany/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats Mon May 2
05:58:59 2011
@@ -0,0 +1 @@
+((entry (title "Test more widgets") (id "testwidgets2")))
\ No newline at end of file
Copied: tuscany/sca-cpp/trunk/modules/edit/composites.py (from r1098490,
tuscany/sca-cpp/trunk/modules/edit/pages.py)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/composites.py?p2=tuscany/sca-cpp/trunk/modules/edit/composites.py&p1=tuscany/sca-cpp/trunk/modules/edit/pages.py&r1=1098490&r2=1098491&rev=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/pages.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/composites.py Mon May 2 05:58:59 2011
@@ -15,39 +15,29 @@
# specific language governing permissions and limitations
# under the License.
-# App pages collection implementation
-import uuid
-import sys
-from sys import stderr
+# App composites collection implementation
from util import *
# Convert an id to an app id
def appid(id):
- return ("'" + car(id), "'app.html")
+ return ("'" + car(id), "'app.composite")
-# Post a new app page to the apps db
-def post(collection, app, cache):
- id = appid((str(uuid.uuid1()),))
- xhtml = cdr(cadddr(car(app)))
- cache.put((id,), xhtml)
- return id
-
-# Put an app page into the apps db
+# Put an app into the apps db
def put(id, app, cache):
- xhtml = cdr(cadddr(car(app)))
- cache.put(appid(id), xhtml)
+ comp = cdr(cadddr(car(app)))
+ cache.put(appid(id), comp)
return True
-# Get an app page from the apps db
+# Get an app from the apps db
def get(id, cache):
if isNil(id):
- return (("'feed", ("'title", "Pages"), ("'id", "pages")),)
- xhtml = cache.get(appid(id))
- if (isNil(xhtml) or xhtml is None):
+ return (("'feed", ("'title", "Composites"), ("'id", "composites")),)
+ app = cache.get(appid(id));
+ if (isNil(app) or app is None):
return (("'entry", ("'title", car(id)), ("'id", car(id))),)
- return (("'entry", ("'title", car(id)), ("'id", car(id)), ("'content",
car(xhtml))),)
+ return (("'entry", ("'title", car(id)), ("'id", car(id)), ("'content",
car(app))),)
-# Delete an app page from the apps db
+# Delete an app from the apps db
def delete(id, cache):
cache.delete(appid(id))
return True
Modified: tuscany/sca-cpp/trunk/modules/edit/dashboard.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/dashboard.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/dashboard.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/dashboard.py Mon May 2 05:58:59 2011
@@ -16,8 +16,6 @@
# under the License.
# Dashboards collection implementation
-import uuid
-import sys
from util import *
# Convert a particular user email to a dashboard id
@@ -31,16 +29,8 @@ def getdashboard(id, cache):
return ()
return dashboard
-# Post a new app to the user's dashboard
-def post(collection, app, user, cache):
- id = (str(uuid.uuid1()),)
- newapp = list("'entry", cadr(car(app)), list("'id", id), cadddr(car(app)))
- dashboard = cons(newapp, getdashboard(dashboardid(user), cache))
- cache.put(dashboardid(user), dashboard)
- return id
-
# Put an app into the user's dashboard
-def put(id, app, user, cache):
+def put(id, app, user, cache, apps):
def putapp(app, dashboard):
if isNil(dashboard):
return app
@@ -48,12 +38,16 @@ def put(id, app, user, cache):
return cons(car(app), cdr(dashboard))
return cons(car(dashboard), putapp(app, cdr(dashboard)))
- dashboard = putapp(app, getdashboard(dashboardid(user), cache))
+ appentry = (("'entry", cadr(car(app)), ("'id", car(id))),)
+ dashboard = putapp(appentry, getdashboard(dashboardid(user), cache))
cache.put(dashboardid(user), dashboard)
+
+ # Update app in app repository
+ apps.put(id, app);
return True
# Get apps from the user's dashboard
-def get(id, user, cache):
+def get(id, user, cache, apps):
def findapp(id, dashboard):
if isNil(dashboard):
return None
@@ -66,7 +60,7 @@ def get(id, user, cache):
return findapp(id, getdashboard(dashboardid(user), cache))
# Delete apps from the user's dashboard
-def delete(id, user, cache):
+def delete(id, user, cache, apps):
if isNil(id):
return cache.delete(dashboardid(user))
@@ -79,5 +73,8 @@ def delete(id, user, cache):
dashboard = deleteapp(id, getdashboard(dashboardid(user), cache))
cache.put(dashboardid(user), dashboard)
+
+ # Delete app from app repository
+ apps.delete(id);
return True
Modified: tuscany/sca-cpp/trunk/modules/edit/edit.composite
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/edit.composite?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/edit.composite (original)
+++ tuscany/sca-cpp/trunk/modules/edit/edit.composite Mon May 2 05:58:59 2011
@@ -44,9 +44,10 @@
<component name="EditWidget">
<t:implementation.widget location="/index.html"/>
<reference name="dashboard" target="Dashboard"/>
+ <reference name="apps" target="Apps"/>
<reference name="store" target="AppStore"/>
<reference name="palettes" target="Palettes"/>
- <reference name="apps" target="Apps"/>
+ <reference name="composites" target="Composites"/>
<reference name="pages" target="Pages"/>
<reference name="log" target="Log"/>
</component>
@@ -58,6 +59,7 @@
</service>
<reference name="user" target="User"/>
<reference name="cache" target="DashboardCache"/>
+ <reference name="apps" target="Apps"/>
</component>
<component name="AppStore">
@@ -74,6 +76,17 @@
<t:binding.http uri="apps"/>
</service>
<reference name="cache" target="AppCache"/>
+ <reference name="store" target="AppStore"/>
+ <reference name="composites" target="Composites"/>
+ <reference name="pages" target="Pages"/>
+ </component>
+
+ <component name="Composites">
+ <t:implementation.python script="composites.py"/>
+ <service name="Composites">
+ <t:binding.http uri="composites"/>
+ </service>
+ <reference name="cache" target="AppDocCache"/>
</component>
<component name="Pages">
@@ -81,7 +94,7 @@
<service name="Pages">
<t:binding.http uri="pages"/>
</service>
- <reference name="cache" target="AppCache"/>
+ <reference name="cache" target="AppDocCache"/>
</component>
<component name="Palettes">
@@ -89,7 +102,7 @@
<service name="Palettes">
<t:binding.http uri="palettes"/>
</service>
- <reference name="cache" target="PaletteCache"/>
+ <reference name="cache" target="PaletteDocCache"/>
</component>
<component name="DashboardCache">
@@ -146,29 +159,49 @@
<component name="AppDB">
<implementation.cpp path="../../components/filedb"
library="libfiledb"/>
<property name="dbname">apps</property>
- <property name="format">xml</property>
+ <property name="format">scheme</property>
<service name="AppDB">
<t:binding.http uri="appdb"/>
</service>
</component>
- <component name="PaletteCache">
+ <component name="AppDocCache">
+ <implementation.cpp path="../../components/cache"
library="libdatacache"/>
+ <service name="AppDocCache">
+ <t:binding.http uri="appdoccache"/>
+ </service>
+ <reference name="l1reader" target="Memcache"/>
+ <reference name="l1writer" target="Memcache"/>
+ <reference name="l2reader" target="AppDocDB"/>
+ <reference name="l2writer" target="AppDocDB"/>
+ </component>
+
+ <component name="AppDocDB">
+ <implementation.cpp path="../../components/filedb"
library="libfiledb"/>
+ <property name="dbname">apps</property>
+ <property name="format">xml</property>
+ <service name="AppDocDB">
+ <t:binding.http uri="appdocdb"/>
+ </service>
+ </component>
+
+ <component name="PaletteDocCache">
<implementation.cpp path="../../components/cache"
library="libdatacache"/>
- <service name="PaletteCache">
- <t:binding.http uri="palettecache"/>
+ <service name="PaletteDocCache">
+ <t:binding.http uri="palettedoccache"/>
</service>
<reference name="l1reader" target="Memcache"/>
<reference name="l1writer" target="Memcache"/>
- <reference name="l2reader" target="PaletteDB"/>
- <reference name="l2writer" target="PaletteDB"/>
+ <reference name="l2reader" target="PaletteDocDB"/>
+ <reference name="l2writer" target="PaletteDocDB"/>
</component>
- <component name="PaletteDB">
+ <component name="PaletteDocDB">
<implementation.cpp path="../../components/filedb"
library="libfiledb"/>
<property name="dbname">palettes</property>
<property name="format">xml</property>
- <service name="PaletteDB">
- <t:binding.http uri="palettedb"/>
+ <service name="PaletteDocDB">
+ <t:binding.http uri="palettedocdb"/>
</service>
</component>
Modified: tuscany/sca-cpp/trunk/modules/edit/log.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/log.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/log.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/log.py Mon May 2 05:58:59 2011
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-# User info service component
+# Log service component
from sys import stderr
# Log a message
Modified: tuscany/sca-cpp/trunk/modules/edit/pages.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/pages.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/pages.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/pages.py Mon May 2 05:58:59 2011
@@ -16,21 +16,11 @@
# under the License.
# App pages collection implementation
-import uuid
-import sys
-from sys import stderr
from util import *
# Convert an id to an app id
def appid(id):
- return ("'" + car(id), "'app.html")
-
-# Post a new app page to the apps db
-def post(collection, app, cache):
- id = appid((str(uuid.uuid1()),))
- xhtml = cdr(cadddr(car(app)))
- cache.put((id,), xhtml)
- return id
+ return ("'" + car(id), "'htdocs", "'app.html")
# Put an app page into the apps db
def put(id, app, cache):
Modified: tuscany/sca-cpp/trunk/modules/edit/palettes.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/palettes.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/palettes.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/palettes.py Mon May 2 05:58:59 2011
@@ -16,8 +16,6 @@
# under the License.
# Palettes collection implementation
-import uuid
-import sys
from util import *
# Convert an id to a palette id
Modified: tuscany/sca-cpp/trunk/modules/edit/store.py
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/store.py?rev=1098491&r1=1098490&r2=1098491&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/edit/store.py (original)
+++ tuscany/sca-cpp/trunk/modules/edit/store.py Mon May 2 05:58:59 2011
@@ -16,8 +16,6 @@
# under the License.
# stores collection implementation
-import uuid
-import sys
from util import *
# Convert a particular store tag to a store id
@@ -31,15 +29,6 @@ def getstore(id, cache):
return ()
return store
-# Post a new app to a store
-def post(collection, app, cache):
- tag = car(collection)
- id = (str(uuid.uuid1()),)
- newapp = list("'entry", cadr(car(app)), list("'id", id), cadddr(car(app)))
- store = cons(newapp, getstore(storeid(tag), cache))
- cache.put(storeid(tag), store)
- return id
-
# Put an app into a store
def put(key, app, cache):
def putapp(app, store):