summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit/apps
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/edit/apps.py48
-rw-r--r--sca-cpp/trunk/modules/edit/apps/me360/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/nearme/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/slice/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/test/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testdb/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testevents/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testhttp/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testlogic/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testsearch/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testsocial/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testtext/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testurl/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testvalues/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats1
-rw-r--r--sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats1
18 files changed, 38 insertions, 27 deletions
diff --git a/sca-cpp/trunk/modules/edit/apps.py b/sca-cpp/trunk/modules/edit/apps.py
index 4add10a239..a820f969cb 100644
--- a/sca-cpp/trunk/modules/edit/apps.py
+++ b/sca-cpp/trunk/modules/edit/apps.py
@@ -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
diff --git a/sca-cpp/trunk/modules/edit/apps/me360/app.stats b/sca-cpp/trunk/modules/edit/apps/me360/app.stats
new file mode 100644
index 0000000000..a46c727280
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/me360/app.stats
@@ -0,0 +1 @@
+((entry (title "Check my public social data") (id "me360"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/nearme/app.stats b/sca-cpp/trunk/modules/edit/apps/nearme/app.stats
new file mode 100644
index 0000000000..b2f5c5ea79
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/nearme/app.stats
@@ -0,0 +1 @@
+((entry (title "Where are my friends") (id "nearme"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats b/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats
new file mode 100644
index 0000000000..e685d930dd
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/ourphotos/app.stats
@@ -0,0 +1 @@
+((entry (title "Our photos of an event") (id "ourphotos"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats b/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats
new file mode 100644
index 0000000000..4529005b54
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/shoppingcart/app.stats
@@ -0,0 +1 @@
+((entry (title "My online store") (id "shoppingcart"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/slice/app.stats b/sca-cpp/trunk/modules/edit/apps/slice/app.stats
new file mode 100644
index 0000000000..96700a9085
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/slice/app.stats
@@ -0,0 +1 @@
+((entry (title "Slice") (id "slice"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/test/app.stats b/sca-cpp/trunk/modules/edit/apps/test/app.stats
new file mode 100644
index 0000000000..9adad8c1a6
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/test/app.stats
@@ -0,0 +1 @@
+((entry (title "An empty test app") (id "test"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testdb/app.stats b/sca-cpp/trunk/modules/edit/apps/testdb/app.stats
new file mode 100644
index 0000000000..1128933dfd
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testdb/app.stats
@@ -0,0 +1 @@
+((entry (title "Test database components") (id "testdb"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testevents/app.stats b/sca-cpp/trunk/modules/edit/apps/testevents/app.stats
new file mode 100644
index 0000000000..51d6a0388e
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testevents/app.stats
@@ -0,0 +1 @@
+((entry (title "Test event components") (id "testevents"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats b/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats
new file mode 100644
index 0000000000..be1fc6d254
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testhttp/app.stats
@@ -0,0 +1 @@
+((entry (title "Test HTTP components") (id "testhttp"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats b/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats
new file mode 100644
index 0000000000..e557346327
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testlogic/app.stats
@@ -0,0 +1 @@
+((entry (title "Test logic components") (id "testlogic"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats b/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats
new file mode 100644
index 0000000000..691c43875d
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testsearch/app.stats
@@ -0,0 +1 @@
+((entry (title "Test search components") (id "testsearch"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats b/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats
new file mode 100644
index 0000000000..fa487f4d81
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testsocial/app.stats
@@ -0,0 +1 @@
+((entry (title "Test social components") (id "testsocial"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testtext/app.stats b/sca-cpp/trunk/modules/edit/apps/testtext/app.stats
new file mode 100644
index 0000000000..35e43ff383
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testtext/app.stats
@@ -0,0 +1 @@
+((entry (title "Test text processing components") (id "testtext"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testurl/app.stats b/sca-cpp/trunk/modules/edit/apps/testurl/app.stats
new file mode 100644
index 0000000000..b4142f40cf
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testurl/app.stats
@@ -0,0 +1 @@
+((entry (title "Test URL components") (id "testurl"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats b/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats
new file mode 100644
index 0000000000..4b7a09cd38
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testvalues/app.stats
@@ -0,0 +1 @@
+((entry (title "Test values and lists") (id "testvalues"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats b/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats
new file mode 100644
index 0000000000..6a66748ab1
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testwidgets/app.stats
@@ -0,0 +1 @@
+((entry (title "Test widgets") (id "testwidgets"))) \ No newline at end of file
diff --git a/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats b/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats
new file mode 100644
index 0000000000..18f0cb50f8
--- /dev/null
+++ b/sca-cpp/trunk/modules/edit/apps/testwidgets2/app.stats
@@ -0,0 +1 @@
+((entry (title "Test more widgets") (id "testwidgets2"))) \ No newline at end of file