summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/edit')
-rw-r--r--sca-cpp/trunk/modules/edit/apps.py11
-rw-r--r--sca-cpp/trunk/modules/edit/apps/me360/app.composite (renamed from sca-cpp/trunk/modules/edit/apps/myprofile/app.composite)0
-rw-r--r--sca-cpp/trunk/modules/edit/apps/me360/app.html (renamed from sca-cpp/trunk/modules/edit/apps/myprofile/app.html)0
-rw-r--r--sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite118
-rw-r--r--sca-cpp/trunk/modules/edit/apps/myprofile2/app.html45
-rw-r--r--sca-cpp/trunk/modules/edit/apps/nearme2/app.composite123
-rw-r--r--sca-cpp/trunk/modules/edit/apps/nearme2/app.html20
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store/app.composite60
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store/app.html47
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store2/app.composite60
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store2/app.html47
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store3/app.composite60
-rw-r--r--sca-cpp/trunk/modules/edit/apps/store3/app.html47
-rw-r--r--sca-cpp/trunk/modules/edit/apps/travel/app.composite181
-rw-r--r--sca-cpp/trunk/modules/edit/apps/travel/app.html27
-rw-r--r--sca-cpp/trunk/modules/edit/dashboard.py17
-rw-r--r--sca-cpp/trunk/modules/edit/dashboards/joe@localhost2
-rw-r--r--sca-cpp/trunk/modules/edit/dashboards/joe@sca-store.com2
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/app/app.html21
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/graph/graph.html16
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/page/page.html16
-rw-r--r--sca-cpp/trunk/modules/edit/pages.py11
-rw-r--r--sca-cpp/trunk/modules/edit/palettes.py4
-rw-r--r--sca-cpp/trunk/modules/edit/util.py6
25 files changed, 68 insertions, 893 deletions
diff --git a/sca-cpp/trunk/modules/edit/apps.py b/sca-cpp/trunk/modules/edit/apps.py
index d0a54ac7ed..2980a9e5e3 100644
--- a/sca-cpp/trunk/modules/edit/apps.py
+++ b/sca-cpp/trunk/modules/edit/apps.py
@@ -39,14 +39,14 @@ def mkapplink(id):
# Post a new app to the apps db
def post(collection, app, cache):
id = appid((str(uuid.uuid1()),))
- comp = caddr(app)
+ 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 = caddr(app)
+ comp = cdr(cadddr(car(app)))
cache.put(appid(id), comp)
mkapplink(id)
return True
@@ -54,8 +54,11 @@ def put(id, app, cache):
# Get an app from the apps db
def get(id, cache):
if isNil(id):
- return ("Apps", "apps")
- return (car(id), car(id), cache.get(appid(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))),)
# Delete an app from the apps db
def delete(id, cache):
diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite b/sca-cpp/trunk/modules/edit/apps/me360/app.composite
index c75b7c7179..c75b7c7179 100644
--- a/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite
+++ b/sca-cpp/trunk/modules/edit/apps/me360/app.composite
diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile/app.html b/sca-cpp/trunk/modules/edit/apps/me360/app.html
index b09564dc5c..b09564dc5c 100644
--- a/sca-cpp/trunk/modules/edit/apps/myprofile/app.html
+++ b/sca-cpp/trunk/modules/edit/apps/me360/app.html
diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite
deleted file mode 100644
index 86a6ce6cd1..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://myprofile2" name="myprofile2">
- <service name="opened" promote="opened"/>
- <component t:x="0" t:y="13" name="opened" t:title="when page opened" t:color="green1">
- <t:implementation.python script="opened.py"/>
- <service name="opened" t:visible="false"/>
- <reference target="nothing" name="content"/>
- </component>
- <component t:x="133" t:y="11" name="nothing" t:color="orange1">
- <t:implementation.python script="text.py"/>
- <service name="nothing"/>
- </component>
- <service name="getProfiles" promote="getProfiles"/>
- <component name="getProfiles" t:x="0" t:y="99" t:title="when clicked" t:color="green1">
- <t:implementation.python script="clicked.py"/>
- <service name="clicked" t:visible="false"/>
- <property>getProfiles</property>
- <reference target="list5" name="content"/>
- </component>
- <component t:x="98" t:y="100" name="list5" t:title="make list" t:color="yellow1">
- <t:implementation.python script="list_.py"/>
- <service name="list"/>
- <reference target="assoc" name="first"/>
- <reference target="list6" name="rest"/>
- </component>
- <component t:x="223" t:y="140" name="fbprofile2" t:title="facebook profile" t:color="blue1">
- <t:implementation.python script="fbprofile.py"/>
- <service name="fbprofile"/>
- <reference target="find3" name="id"/>
- </component>
- <component t:x="176" t:y="144" name="list6" t:title="make list" t:color="yellow1">
- <t:implementation.python script="list_.py"/>
- <service name="list"/>
- <reference target="assoc2" name="first"/>
- <reference target="empty" name="rest"/>
- </component>
- <component t:x="176" t:y="99" name="assoc" t:title="assoc" t:color="orange1">
- <t:implementation.python script="assoc.py"/>
- <service name="assoc"/>
- <reference target="name" name="name"/>
- <reference target="fbprofile2" name="value"/>
- </component>
- <component t:x="299" t:y="269" name="twprofile2" t:title="twitter profile" t:color="blue1">
- <t:implementation.python script="twprofile.py"/>
- <service name="twprofile"/>
- <reference target="find4" name="id"/>
- </component>
- <component t:x="337" t:y="142" name="find3" t:title="find by name" t:color="yellow1">
- <t:implementation.python script="find.py"/>
- <service name="find"/>
- <reference target="name4" name="name"/>
- <reference target="params3" name="assoc"/>
- </component>
- <component t:x="439" t:y="140" name="name4" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>fbid</property>
- </component>
- <component t:x="399" t:y="344" name="find4" t:title="find by name" t:color="yellow1">
- <t:implementation.python script="find.py"/>
- <service name="find"/>
- <reference target="name5" name="name"/>
- <reference target="params4" name="assoc"/>
- </component>
- <component t:x="495" t:y="345" name="name5" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>twid</property>
- </component>
- <component t:x="221" t:y="99" name="name" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>fbprofile</property>
- </component>
- <component t:x="256" t:y="262" name="assoc2" t:title="assoc" t:color="orange1">
- <t:implementation.python script="assoc.py"/>
- <service name="assoc"/>
- <reference target="name3" name="name"/>
- <reference target="twprofile2" name="value"/>
- </component>
- <component t:x="256" t:y="424" name="empty" t:title="empty list" t:color="yellow1">
- <t:implementation.python script="empty.py"/>
- <service name="empty"/>
- </component>
- <component t:x="298" t:y="261" name="name3" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>twprofile</property>
- </component>
- <component t:x="436" t:y="183" name="params3" t:title="?params" t:color="green1">
- <t:implementation.python script="params.py"/>
- <service name="params"/>
- <property>fbid=1234567&amp;twid=joe</property>
- </component>
- <component t:x="495" t:y="345" name="params4" t:title="?params" t:color="green1">
- <t:implementation.python script="params.py"/>
- <service name="params"/>
- <property>fbid=1234567&amp;twid=joe</property>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html
deleted file mode 100644
index b09564dc5c..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page">
- <SPAN id="h1" class="h1" style="position: absolute; top: 6px; left: 0px; ">
- <H1>My social profiles</H1>
- </SPAN>
- <SPAN id="getProfiles" class="button" style="position: absolute; top: 144px; left: 0px; ">
- <INPUT type="button" value="Get my profiles"/>
- </SPAN>
- <SPAN id="h2" class="h2" style="position: absolute; top: 198px; left: 0px; ">
- <H2>Facebook profile</H2>
- </SPAN>
- <SPAN id="fbprofile" class="text" style="position: absolute; top: 240px; left: 3px; ">
- <SPAN>text</SPAN>
- </SPAN>
- <SPAN id="h2" class="h2" style="position: absolute; top: 283px; left: 1px; ">
- <H2>Twitter profile</H2>
- </SPAN>
- <SPAN id="twprofile" class="text" style="position: absolute; top: 331px; left: 2px; ">
- <SPAN>text</SPAN>
- </SPAN>
- <SPAN id="twid" class="entry" style="position: absolute; top: 99px; left: 0px; ">
- <INPUT type="text" value="field" size="5"/>
- </SPAN>
- <SPAN id="fbid" class="entry" style="position: absolute; top: 56px; left: 0px; ">
- <INPUT type="text" value="field" size="5"/>
- </SPAN>
-</DIV>
diff --git a/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite b/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite
deleted file mode 100644
index 11c967111a..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://nearme2" name="nearme2">
- <service name="every" promote="every"/>
- <component t:x="0" t:y="25" name="every" t:title="every n secs" t:color="green1">
- <t:implementation.python script="every.py"/>
- <service name="every" t:visible="false"/>
- <property>60</property>
- <reference target="gtalksend" name="content"/>
- </component>
- <component t:x="100" t:y="25" name="gtalksend" t:title="send gtalk" t:color="blue1">
- <t:implementation.python script="gtalksend.py"/>
- <service name="gtalksend"/>
- <reference target="filter" name="jid"/>
- <reference target="user" name="to"/>
- <reference target="text" name="msg"/>
- </component>
- <component t:x="184" t:y="54" name="user" t:title="user" t:color="green1">
- <t:implementation.python script="user.py"/>
- <service name="user"/>
- <property name="user"/>
- </component>
- <component t:x="183" t:y="97" name="text" t:title="text" t:color="orange1">
- <t:implementation.python script="text.py"/>
- <service name="text"/>
- <property>Hey I'm here!</property>
- </component>
- <component t:x="184" t:y="24" name="filter" t:title="filter" t:color="yellow1">
- <t:implementation.python script="filter_.py"/>
- <service name="filter"/>
- <reference target="fbfriend" name="item"/>
- <reference target="lesser" name="condition"/>
- <reference target="fbfriends" name="list"/>
- </component>
- <component t:x="234" t:y="25" name="fbfriend" t:color="yellow1">
- <t:implementation.python script="item.py"/>
- <service name="item"/>
- <property name="property"/>
- </component>
- <component t:x="233" t:y="97" name="fbfriends" t:title="facebook friends" t:color="blue1">
- <t:implementation.python script="fbfriends.py"/>
- <service name="fbfriends"/>
- <reference target="find" name="id"/>
- </component>
- <component t:x="352" t:y="96" name="find" t:title="find by name" t:color="yellow1">
- <t:implementation.python script="find.py"/>
- <service name="find"/>
- <reference target="name" name="name"/>
- <reference target="params" name="assoc"/>
- </component>
- <component t:x="453" t:y="97" name="name" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>fbid</property>
- </component>
- <component t:x="453" t:y="138" name="params" t:title="?params" t:color="green1">
- <t:implementation.python script="params.py"/>
- <service name="params"/>
- <property>fbid=1234567</property>
- </component>
- <component t:x="235" t:y="67" name="lesser" t:title="lt" t:color="magenta1">
- <t:implementation.python script="lesser.py"/>
- <service name="lesser"/>
- <reference target="subtract" name="value1"/>
- <reference target="mile" name="value2"/>
- </component>
- <component t:x="274" t:y="97" name="mile" t:title="number" t:color="orange1">
- <t:implementation.python script="number.py"/>
- <service name="number"/>
- <property>1</property>
- </component>
- <component t:x="274" t:y="67" name="subtract" t:title="-" t:color="magenta1">
- <t:implementation.python script="subtract.py"/>
- <service name="subtract">
- <documentation>-</documentation>
- </service>
- <reference target="location" name="value1"/>
- <reference target="location2" name="value2"/>
- </component>
- <component t:x="316" t:y="68" name="location" t:title="location" t:color="red1">
- <t:implementation.python script="location.py"/>
- <service name="location"/>
- <reference target="find2" name="user"/>
- </component>
- <component t:x="316" t:y="122" name="location2" t:title="location" t:color="red1">
- <t:implementation.python script="location.py"/>
- <service name="location"/>
- <reference target="user2" name="user"/>
- </component>
- <component t:x="386" t:y="118" name="user2" t:title="user" t:color="green1">
- <t:implementation.python script="user.py"/>
- <service name="user"/>
- <property name="user"/>
- </component>
- <component t:x="386" t:y="69" name="find2" t:title="find by name" t:color="yellow1">
- <t:implementation.python script="find.py"/>
- <service name="find"/>
- <reference target="name2" name="name"/>
- <reference target="fbfriend" name="assoc"/>
- </component>
- <component t:x="484" t:y="68" name="name2" t:title="name" t:color="orange1">
- <t:implementation.python script="name.py"/>
- <service name="name"/>
- <property>id</property>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/nearme2/app.html b/sca-cpp/trunk/modules/edit/apps/nearme2/app.html
deleted file mode 100644
index 5c7c7219bb..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/nearme2/app.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page"/>
diff --git a/sca-cpp/trunk/modules/edit/apps/store/app.composite b/sca-cpp/trunk/modules/edit/apps/store/app.composite
deleted file mode 100644
index 0c676c19b9..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store/app.composite
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://store" name="store">
- <service name="Store" promote="Store"/>
- <service name="ShoppingCart" promote="ShoppingCart"/>
- <component name="Store" t:color="green1">
- <t:implementation.python script="store.py"/>
- <service name="Widget">
- <t:binding.http uri="store"/>
- </service>
- <reference name="catalog" target="Catalog"/>
- <reference name="shoppingCart" target="ShoppingCart"/>
- <reference name="shoppingTotal" target="ShoppingCart"/>
- </component>
- <component name="Catalog" t:color="yellow1">
- <t:implementation.python script="fruits-catalog.py"/>
- <property>USD</property>
- <service name="Catalog">
- <t:binding.jsonrpc uri="catalog"/>
- </service>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
- <component name="ShoppingCart" t:color="magenta1">
- <t:implementation.python script="shopping-cart.py"/>
- <service name="ShoppingCart">
- <t:binding.http uri="shoppingCart"/>
- </service>
- <reference name="cache" target="Cache"/>
- </component>
- <component name="CurrencyConverter" t:color="blue1">
- <t:implementation.python script="currency-converter.py"/>
- <service name="CurrencyConverter">
- <t:binding.jsonrpc uri="currencyConverter"/>
- </service>
- </component>
- <component name="Cache" t:color="orange1">
- <implementation.cpp path="../../components/cache" library="libmemcache"/>
- <service name="Cache">
- <t:binding.atom uri="cache"/>
- </service>
- <property>localhost:11211</property>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/store/app.html b/sca-cpp/trunk/modules/edit/apps/store/app.html
deleted file mode 100644
index 593d0a6648..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store/app.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page">
- <SPAN id="storeh1" class="h1" style="position: absolute; top: 0px; left: 0px; ">
- <H1>Store</H1>
- </SPAN>
- <SPAN id="catalogh2" class="h2" style="position: absolute; top: 40px; left: 0px; ">
- <H2>Catalog</H2>
- </SPAN>
- <SPAN id="addToCart" class="button" style="position: absolute; top: 160px; left: 0px; ">
- <INPUT type="button" value="Add to Cart"/>
- </SPAN>
- <SPAN id="carth2" class="h2" style="position: absolute; top: 200px; left: 0px; ">
- <H2>Your Shopping Cart</H2>
- </SPAN>
- <SPAN id="total" class="text" style="position: absolute; top: 300px; left: 0px; ">
- <SPAN>total</SPAN>
- </SPAN>
- <SPAN id="checkout" class="button" style="position: absolute; top: 340px; left: 0px; ">
- <INPUT type="button" value="Checkout"/>
- </SPAN>
- <SPAN id="empty" class="button" style="position: absolute; top: 340px; left: 120px; ">
- <INPUT type="button" value="Empty"/>
- </SPAN>
- <SPAN id="feed" class="link" style="position: absolute; top: 340px; left: 240px; ">
- <A href="shoppingCart/">
- <SPAN>(feed)</SPAN>
- </A>
- </SPAN>
-</DIV>
diff --git a/sca-cpp/trunk/modules/edit/apps/store2/app.composite b/sca-cpp/trunk/modules/edit/apps/store2/app.composite
deleted file mode 100644
index b75877c67f..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store2/app.composite
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://store" name="store">
- <service name="Store" promote="Store"/>
- <service name="ShoppingCart" promote="ShoppingCart"/>
- <component name="Store" t:color="green1">
- <t:implementation.python script="store.py"/>
- <service name="Widget">
- <t:binding.http uri="store"/>
- </service>
- <reference name="catalog" target="Catalog" t:align="bottom"/>
- <reference name="shoppingCart" target="ShoppingCart"/>
- <reference name="shoppingTotal" target="ShoppingCart"/>
- </component>
- <component name="Catalog" t:color="yellow1">
- <t:implementation.python script="fruits-catalog.py"/>
- <property>USD</property>
- <service name="Catalog" t:align="top">
- <t:binding.jsonrpc uri="catalog"/>
- </service>
- <reference name="currencyConverter" t:align="bottom" target="CurrencyConverter"/>
- </component>
- <component name="ShoppingCart" t:color="magenta1">
- <t:implementation.python script="shopping-cart.py"/>
- <service name="ShoppingCart">
- <t:binding.http uri="shoppingCart"/>
- </service>
- <reference name="cache" target="Cache"/>
- </component>
- <component name="CurrencyConverter" t:color="blue1">
- <t:implementation.python script="currency-converter.py"/>
- <service name="CurrencyConverter" t:align="top">
- <t:binding.jsonrpc uri="currencyConverter"/>
- </service>
- </component>
- <component name="Cache" t:color="orange1">
- <implementation.cpp path="../../components/cache" library="libmemcache"/>
- <service name="Cache">
- <t:binding.atom uri="cache"/>
- </service>
- <property>localhost:11211</property>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/store2/app.html b/sca-cpp/trunk/modules/edit/apps/store2/app.html
deleted file mode 100644
index 593d0a6648..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store2/app.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page">
- <SPAN id="storeh1" class="h1" style="position: absolute; top: 0px; left: 0px; ">
- <H1>Store</H1>
- </SPAN>
- <SPAN id="catalogh2" class="h2" style="position: absolute; top: 40px; left: 0px; ">
- <H2>Catalog</H2>
- </SPAN>
- <SPAN id="addToCart" class="button" style="position: absolute; top: 160px; left: 0px; ">
- <INPUT type="button" value="Add to Cart"/>
- </SPAN>
- <SPAN id="carth2" class="h2" style="position: absolute; top: 200px; left: 0px; ">
- <H2>Your Shopping Cart</H2>
- </SPAN>
- <SPAN id="total" class="text" style="position: absolute; top: 300px; left: 0px; ">
- <SPAN>total</SPAN>
- </SPAN>
- <SPAN id="checkout" class="button" style="position: absolute; top: 340px; left: 0px; ">
- <INPUT type="button" value="Checkout"/>
- </SPAN>
- <SPAN id="empty" class="button" style="position: absolute; top: 340px; left: 120px; ">
- <INPUT type="button" value="Empty"/>
- </SPAN>
- <SPAN id="feed" class="link" style="position: absolute; top: 340px; left: 240px; ">
- <A href="shoppingCart/">
- <SPAN>(feed)</SPAN>
- </A>
- </SPAN>
-</DIV>
diff --git a/sca-cpp/trunk/modules/edit/apps/store3/app.composite b/sca-cpp/trunk/modules/edit/apps/store3/app.composite
deleted file mode 100644
index 735052fe03..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store3/app.composite
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://store" name="store">
- <service name="Store" promote="Store"/>
- <service name="ShoppingCart" promote="ShoppingCart"/>
- <component name="Store" t:color="green1">
- <t:implementation.python script="store.py"/>
- <service name="Widget">
- <t:binding.http uri="store"/>
- </service>
- <reference name="catalog" target="Catalog"/>
- <reference name="shoppingCart" target="ShoppingCart"/>
- <reference name="shoppingTotal" target="ShoppingCart"/>
- </component>
- <component name="Catalog" t:color="yellow1">
- <t:implementation.python script="fruits-catalog.py"/>
- <property>USD</property>
- <service name="Catalog">
- <t:binding.jsonrpc uri="catalog"/>
- </service>
- <reference name="currencyConverter" t:align="bottom" target="CurrencyConverter"/>
- </component>
- <component name="ShoppingCart" t:color="magenta1">
- <t:implementation.python script="shopping-cart.py"/>
- <service name="ShoppingCart">
- <t:binding.http uri="shoppingCart"/>
- </service>
- <reference name="cache" target="Cache"/>
- </component>
- <component name="CurrencyConverter" t:color="blue1">
- <t:implementation.python script="currency-converter.py"/>
- <service name="CurrencyConverter" t:align="top">
- <t:binding.jsonrpc uri="currencyConverter"/>
- </service>
- </component>
- <component name="Cache" t:color="orange1">
- <implementation.cpp path="../../components/cache" library="libmemcache"/>
- <service name="Cache">
- <t:binding.atom uri="cache"/>
- </service>
- <property>localhost:11211</property>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/store3/app.html b/sca-cpp/trunk/modules/edit/apps/store3/app.html
deleted file mode 100644
index 593d0a6648..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/store3/app.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page">
- <SPAN id="storeh1" class="h1" style="position: absolute; top: 0px; left: 0px; ">
- <H1>Store</H1>
- </SPAN>
- <SPAN id="catalogh2" class="h2" style="position: absolute; top: 40px; left: 0px; ">
- <H2>Catalog</H2>
- </SPAN>
- <SPAN id="addToCart" class="button" style="position: absolute; top: 160px; left: 0px; ">
- <INPUT type="button" value="Add to Cart"/>
- </SPAN>
- <SPAN id="carth2" class="h2" style="position: absolute; top: 200px; left: 0px; ">
- <H2>Your Shopping Cart</H2>
- </SPAN>
- <SPAN id="total" class="text" style="position: absolute; top: 300px; left: 0px; ">
- <SPAN>total</SPAN>
- </SPAN>
- <SPAN id="checkout" class="button" style="position: absolute; top: 340px; left: 0px; ">
- <INPUT type="button" value="Checkout"/>
- </SPAN>
- <SPAN id="empty" class="button" style="position: absolute; top: 340px; left: 120px; ">
- <INPUT type="button" value="Empty"/>
- </SPAN>
- <SPAN id="feed" class="link" style="position: absolute; top: 340px; left: 240px; ">
- <A href="shoppingCart/">
- <SPAN>(feed)</SPAN>
- </A>
- </SPAN>
-</DIV>
diff --git a/sca-cpp/trunk/modules/edit/apps/travel/app.composite b/sca-cpp/trunk/modules/edit/apps/travel/app.composite
deleted file mode 100644
index 40a260e0a9..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/travel/app.composite
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://tuscanyscatours.com/" name="travel">
- <service name="SCAToursUserInterface" promote="SCAToursUserInterface"/>
- <component name="SCAToursUserInterface" t:color="green1">
- <t:implementation.widget location="scatours.html"/>
- <service name="Widget">
- <t:binding.http uri="/scatours"/>
- </service>
- <reference name="scaToursCatalog" target="SCATours/SCAToursSearch" t:align="bottom">
- <t:binding.jsonrpc></t:binding.jsonrpc>
- </reference>
- </component>
- <component name="SCATours">
- <implementation.java class="com.tuscanyscatours.impl.SCAToursImpl"/>
- <service name="SCAToursSearch" t:align="top">
- <t:binding.jsonrpc></t:binding.jsonrpc>
- </service>
- <reference name="travelCatalogSearch" target="TravelCatalog/TravelCatalogSearch"/>
- <reference name="tripBooking" target="TripBooking"/>
- <reference name="cartCheckout" target="ShoppingCart/CartCheckout"/>
- </component>
- <component name="CreditCardPayment">
- <implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl"/>
- <service name="CreditCardPayment">
- <interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)"/>
- <binding.ws uri="http://localhost:8082/CreditCardPayment" requires="authentication"/>
- <binding.sca></binding.sca>
- </service>
- </component>
- <component name="CurrencyConverter">
- <implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/>
- <service name="CurrencyConverter"/>
- </component>
- <component name="HotelPartner" t:color="orange1">
- <implementation.java class="com.tuscanyscatours.hotel.impl.HotelImpl"/>
- <service name="Search">
- <binding.ws name="searchws" uri="http://localhost:8086/Hotel/Search"/>
- <callback>
- <binding.ws></binding.ws>
- </callback>
- </service>
- <service name="Book"/>
- </component>
- <component name="FlightPartner" t:color="orange1">
- <implementation.java class="com.tuscanyscatours.flight.impl.FlightImpl"/>
- <service name="Search">
- <interface.java interface="com.tuscanyscatours.common.Search" callbackInterface="com.tuscanyscatours.common.SearchCallback"/>
- <binding.ws name="searchws" uri="http://localhost:8086/Flight/Search"/>
- <t:binding.jsonrpc name="searchjsonrpc"/>
- <callback>
- <binding.ws></binding.ws>
- </callback>
- </service>
- <service name="Book"/>
- </component>
- <component name="CarPartner" t:color="orange1">
- <implementation.java class="com.tuscanyscatours.car.impl.CarImpl"/>
- <service name="Search">
- <binding.ws name="searchws" uri="http://localhost:8086/Car/Search"/>
- <t:binding.jsonrpc name="searchjsonrpc"/>
- <callback>
- <binding.ws></binding.ws>
- </callback>
- </service>
- <service name="Book"/>
- </component>
- <component name="TravelCatalog">
- <implementation.java class="com.tuscanyscatours.travelcatalog.impl.TravelCatalogImpl"/>
- <service name="TravelCatalogSearch"/>
- <reference name="hotelSearch" target="HotelSearch">
- <binding.ws uri="http://localhost:8086/Hotel/Search"/>
- <callback>
- <binding.ws name="callback" uri="http://localhost:8084/Hotel/SearchCallback"/>
- </callback>
- </reference>
- <reference name="flightSearch" target="FlightSearch">
- <interface.java interface="com.tuscanyscatours.common.Search" callbackInterface="com.tuscanyscatours.common.SearchCallback"/>
- <binding.ws uri="http://localhost:8086/Flight/Search"/>
- <callback>
- <binding.ws name="callback" uri="http://localhost:8084/Flight/SearchCallback"/>
- </callback>
- </reference>
- <reference name="carSearch" target="CarSearch">
- <binding.ws uri="http://localhost:8086/Car/Search"/>
- <callback>
- <binding.ws name="callback" uri="http://localhost:8084/Car/SearchCallback"/>
- </callback>
- </reference>
- <reference name="tripSearch" target="TripSearch">
- <binding.ws uri="http://localhost:8085/Trip/Search"/>
- <callback>
- <binding.ws name="callback" uri="http://localhost:8084/Trip/SearchCallback"/>
- </callback>
- </reference>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- <property>GBP</property>
- </component>
- <component name="TripBooking">
- <implementation.java class="com.tuscanyscatours.tripbooking.impl.TripBookingImpl"/>
- <service name="TripBooking"/>
- <reference name="hotelBook" target="HotelPartner/Book"/>
- <reference name="flightBook" target="FlightPartner/Book"/>
- <reference name="carBook" target="CarPartner/Book"/>
- <reference name="tripBook" target="TripPartner/Book"/>
- <reference name="cartUpdates" target="ShoppingCart/CartUpdates"/>
- </component>
- <component name="TripPartner" t:color="orange1">
- <implementation.java class="com.tuscanyscatours.trip.impl.TripImpl"/>
- <service name="Search">
- <binding.ws name="searchws" uri="http://localhost:8085/Trip/Search"/>
- <t:binding.jsonrpc name="searchjsonrpc"/>
- <callback>
- <binding.ws></binding.ws>
- </callback>
- </service>
- <service name="Book"/>
- </component>
- <component name="ShoppingCart">
- <implementation.java class="com.tuscanyscatours.shoppingcart.impl.ShoppingCartImpl"/>
- <reference name="cartStore" target="CartStore" t:align="bottom"/>
- <reference name="payment" target="Payment">
- <binding.ws uri="http://localhost:8081/Payment"/>
- </reference>
- </component>
- <component name="CartStore" t:color="yellow1">
- <service name="CartStore" t:align="top"/>
- <implementation.java class="com.tuscanyscatours.shoppingcart.impl.CartStoreImpl"/>
- </component>
- <component name="Payment">
- <implementation.spring location="Payment-context.xml"/>
- <service name="Payment">
- <binding.ws uri="http://localhost:8081/Payment"/>
- </service>
- <reference name="creditCardPaymentReference" target="CreditCardPayment">
- <binding.ws uri="http://localhost:8082/CreditCardPayment" requires="authentication"/>
- </reference>
- <reference name="emailGateway" target="EmailGateway"/>
- <reference name="customerRegistry" target="CustomerRegistry"/>
- <property>1.23</property>
- </component>
- <component name="CustomerRegistry">
- <implementation.java class="com.tuscanyscatours.customer.impl.CustomerRegistryImpl"/>
- </component>
- <component name="EmailGateway">
- <implementation.java class="com.tuscanyscatours.emailgateway.impl.EmailGatewayImpl"/>
- </component>
- <component name="HotelSearch" t:color="red1">
- <service name="HotelSearch"/>
- <implementation.java class="com.tuscanyscatours.PlaceHolderImpl"/>
- </component>
- <component name="FlightSearch" t:color="red1">
- <service name="FlightSearch"/>
- <implementation.java class="com.tuscanyscatours.PlaceHolderImpl"/>
- </component>
- <component name="CarSearch" t:color="red1">
- <service name="CarSearch"/>
- <implementation.java class="com.tuscanyscatours.PlaceHolderImpl"/>
- </component>
- <component name="TripSearch" t:color="red1">
- <service name="TripSearch"/>
- <implementation.java class="com.tuscanyscatours.PlaceHolderImpl"/>
- </component>
-</composite>
diff --git a/sca-cpp/trunk/modules/edit/apps/travel/app.html b/sca-cpp/trunk/modules/edit/apps/travel/app.html
deleted file mode 100644
index ff320ac5b0..0000000000
--- a/sca-cpp/trunk/modules/edit/apps/travel/app.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<DIV id="page">
- <SPAN id="header" class="h1" style="position: absolute; top: 0px; left: 0px; ">
- <H1>Welcome to SCATours Online Travel</H1>
- </SPAN>
- <SPAN id="book" class="button" style="position: absolute; top: 60px; left: 0px; ">
- <INPUT type="button" value="Book a Trip"/>
- </SPAN>
-</DIV>
diff --git a/sca-cpp/trunk/modules/edit/dashboard.py b/sca-cpp/trunk/modules/edit/dashboard.py
index 825bf8b405..4dd48ccc17 100644
--- a/sca-cpp/trunk/modules/edit/dashboard.py
+++ b/sca-cpp/trunk/modules/edit/dashboard.py
@@ -34,7 +34,8 @@ def getdashboard(id, cache):
# Post a new app to the user's dashboard
def post(collection, app, user, cache):
id = (str(uuid.uuid1()),)
- dashboard = cons((car(app), car(id), caddr(app)), getdashboard(dashboardid(user), cache))
+ 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
@@ -42,9 +43,9 @@ def post(collection, app, user, cache):
def put(id, app, user, cache):
def putapp(app, dashboard):
if isNil(dashboard):
- return (app,)
- if cadr(app) == cadr(car(dashboard)):
- return cons(app, cdr(dashboard))
+ return app
+ if cadr(caddr(car(app))) == cadr(caddr(car(dashboard))):
+ return cons(car(app), cdr(dashboard))
return cons(car(dashboard), putapp(app, cdr(dashboard)))
dashboard = putapp(app, getdashboard(dashboardid(user), cache))
@@ -56,12 +57,12 @@ def get(id, user, cache):
def findapp(id, dashboard):
if isNil(dashboard):
return None
- if car(id) == cadr(car(dashboard)):
- return car(dashboard)
+ if car(id) == cadr(caddr(car(dashboard))):
+ return (car(dashboard),)
return findapp(id, cdr(dashboard))
if isNil(id):
- return ("Your Apps", user.id()) + getdashboard(dashboardid(user), cache)
+ return ((("'feed", ("'title", "Your Apps"), ("'id", user.id())) + getdashboard(dashboardid(user), cache)),)
return findapp(id, getdashboard(dashboardid(user), cache))
# Delete apps from the user's dashboard
@@ -72,7 +73,7 @@ def delete(id, user, cache):
def deleteapp(id, dashboard):
if isNil(dashboard):
return ()
- if car(id) == cadr(car(dashboard)):
+ if car(id) == cadr(caddr(car(dashboard))):
return cdr(dashboard)
return cons(car(dashboard), deleteapp(id, cdr(dashboard)))
diff --git a/sca-cpp/trunk/modules/edit/dashboards/joe@localhost b/sca-cpp/trunk/modules/edit/dashboards/joe@localhost
index 0d5faf04f6..5771c2f9de 100644
--- a/sca-cpp/trunk/modules/edit/dashboards/joe@localhost
+++ b/sca-cpp/trunk/modules/edit/dashboards/joe@localhost
@@ -1 +1 @@
-(("An App that shows my Aggregated Social Profile" "myprofile" ()) ("An advanced version of the Aggregated Social Profile App" "myprofile2" ()) ("An App that shows Friends Near Me" "nearme" ()) ("An advanced version of the Friends Near Me App" "nearme2" ()) ("Sample Online Store App" "store" ()) ("Layout Variation of the Online Store App" "store2" ()) ("Another Variation of the Online Store App" "store3" ()) ("Travel Tutorial App" "travel" ()) ("An Empty Test App" "test" ()) ("Test Values and Lists" "testvalues" ()) ("Test Social Components" "testsocial" ()) ("Test URL Components" "testurl" ()) ("Test Logic Components" "testlogic" ()) ("Test Text Processing Components" "testtext" ())) \ No newline at end of file
+((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values and Lists") (id "testvalues")) (entry (title "Test Social Components") (id "testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry (title "Test Logic Components") (id "testlogic")) (entry (title "Test Text Processing Components") (id "testtext")) (entry (title "An App that shows my Social Profiles") (id "me360")) (entry (title "An App that shows Friends Near Me") (id "nearme")))
diff --git a/sca-cpp/trunk/modules/edit/dashboards/joe@sca-store.com b/sca-cpp/trunk/modules/edit/dashboards/joe@sca-store.com
index 0d5faf04f6..5771c2f9de 100644
--- a/sca-cpp/trunk/modules/edit/dashboards/joe@sca-store.com
+++ b/sca-cpp/trunk/modules/edit/dashboards/joe@sca-store.com
@@ -1 +1 @@
-(("An App that shows my Aggregated Social Profile" "myprofile" ()) ("An advanced version of the Aggregated Social Profile App" "myprofile2" ()) ("An App that shows Friends Near Me" "nearme" ()) ("An advanced version of the Friends Near Me App" "nearme2" ()) ("Sample Online Store App" "store" ()) ("Layout Variation of the Online Store App" "store2" ()) ("Another Variation of the Online Store App" "store3" ()) ("Travel Tutorial App" "travel" ()) ("An Empty Test App" "test" ()) ("Test Values and Lists" "testvalues" ()) ("Test Social Components" "testsocial" ()) ("Test URL Components" "testurl" ()) ("Test Logic Components" "testlogic" ()) ("Test Text Processing Components" "testtext" ())) \ No newline at end of file
+((entry (title "An Empty Test App") (id "test")) (entry (title "Test Values and Lists") (id "testvalues")) (entry (title "Test Social Components") (id "testsocial")) (entry (title "Test URL Components") (id "testurl")) (entry (title "Test Logic Components") (id "testlogic")) (entry (title "Test Text Processing Components") (id "testtext")) (entry (title "An App that shows my Social Profiles") (id "me360")) (entry (title "An App that shows Friends Near Me") (id "nearme")))
diff --git a/sca-cpp/trunk/modules/edit/htdocs/app/app.html b/sca-cpp/trunk/modules/edit/htdocs/app/app.html
index c4bc54a8d7..faf0372179 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/app/app.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/app/app.html
@@ -36,7 +36,6 @@
<th class="thl thr">Settings</th>
<th class="thl thr" style="padding-top: 0px; padding-bottom: 0px; padding-right: 0px; text-align: right;">
-<span id="source" style="font-weight: normal;">[atom]</span>
<input type="button" id="saveButton" style="font-weight: bold;" Value="Saved"/>
</th>
</tr>
@@ -71,7 +70,6 @@ var dashboard = sca.reference(editWidget, "dashboard");
* The current app name.
*/
var appname = ui.queryParams()['app'];
-$('source').innerHTML = '[<a href="/apps/' + appname + '">atom</a>]';
/**
* The current app entry and corresponding saved XML content.
@@ -92,12 +90,13 @@ var defdesc = 'Enter a short description of your app here';
*/
function getapp(name) {
dashboard.get(name, function(doc) {
- appentry = doc != null? atom.readATOMEntryDocument(doc) : mklist('', name);
- $('appTitle').value = car(appentry) != ''? car(appentry) : deftitle;
+ appentry = doc != null? car(elementsToValues(atom.readATOMEntry(mklist(doc)))) : mklist("'entry", mklist("'title", ''), mklist("'id", name));
+ var title = cadr(assoc("'title", cdr(appentry)));
+ $('appTitle').value = title != ''? title : deftitle;
$('appCategory').value = defcategory;
$('appUpdated').innerHTML = defdate;
$('appDescription').innerHTML = defdesc;
- savedappentryxml = car(atom.writeATOMEntry(appentry));
+ savedappentryxml = car(atom.writeATOMEntry(valuesToElements(mklist(appentry))));
});
}
@@ -114,10 +113,10 @@ $('saveButton').onclick = function() {
function save() {
$('saveButton').value = 'Saving';
var title = $('appTitle').value;
- appentry = mklist(title != deftitle && title != ''? title : appname, appname, mklist());
- savedappentryxml = car(atom.writeATOMEntry(appentry));
+ var appentry = mklist("'entry", mklist("'title", title != deftitle && title != ''? title : appname), mklist("'id", appname));
+ savedappentryxml = car(atom.writeATOMEntry(valuesToElements(mklist(appentry))));
dashboard.put(appname, savedappentryxml, function() {
- if (savedappentryxml == car(atom.writeATOMEntry(appentry)))
+ if (savedappentryxml == car(atom.writeATOMEntry(valuesToElements(mklist(appentry)))))
$('saveButton').value = 'Saved';
return true;
});
@@ -129,14 +128,14 @@ function save() {
*/
function onappchange() {
var title = $('appTitle').value;
- appentry = mklist(title != deftitle && title != ''? title : appname, appname, mklist());
- if (savedappentryxml == car(atom.writeATOMEntry(appentry)))
+ var appentry = mklist("'entry", mklist("'title", title != deftitle && title != ''? title : appname), mklist("'id", appname));
+ if (savedappentryxml == car(atom.writeATOMEntry(valuesToElements(mklist(appentry)))))
return false;
$('saveButton').value = 'Save now';
// Autosave after 3 seconds
setTimeout(function() {
- if (savedappentryxml == car(atom.writeATOMEntry(appentry)))
+ if (savedappentryxml == car(atom.writeATOMEntry(valuesToElements(mklist(appentry)))))
return false;
return save();
}, 3000);
diff --git a/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html b/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html
index 3307d193ca..a261f75057 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html
@@ -79,20 +79,14 @@ function getapps(sync) {
var apps = '<table style="width: 100%;">';
apps += '<tr><th class="thl thr">App</th>' +
'<th class="thr thl">Title</th>' +
- '<th class="thr thl" style="padding-top: 4px; padding-bottom: 4px; padding-right: 2px; text-align: right;">' +
- '<span style="font-weight: normal;">' +
- '[<a href="/dashboard">atom</a> <a href="/dashboardcache/joe@localhost">json</a>]' +
- '</span></th></tr>';
+ '<th class="thr thl" style="padding-top: 4px; padding-bottom: 4px; padding-right: 2px; text-align: right;"></th></tr>';
- var entries = cddr(atom.readATOMFeedDocument(doc));
+ var feed = car(elementsToValues(atom.readATOMFeed(mklist(doc))));
+ var entries = cadr(assoc("'entry", cdr(feed)));
for (var i = 0; i < length(entries); i++) {
var entry = entries[i];
- var item = caddr(entry);
- var composite = cddr(item);
- var comps = scdl.components(composite);
-
- name = cadr(entry);
- title = car(entry);
+ title = cadr(assoc("'title", entry))
+ name = cadr(assoc("'id", entry))
apps += '<tr>';
apps += '<td><a href=\"' + '/graph/?app=' + name + '\" target=\"_parent\">' + name + '</a></td>';
@@ -142,8 +136,8 @@ $('createAppOKButton').onclick = function() {
if (name == '')
return false;
var title = $('appTitle').value;
- var app = mklist(title != deftitle && title != ''? title : name, name, mklist());
- var entry = atom.writeATOMEntry(app);
+ var app = mklist(mklist("'entry", mklist("'title", title != deftitle && title != ''? title : name), mklist("'id", name)));
+ var entry = atom.writeATOMEntry(valuesToElements(app));
dashboard.put(name, car(entry));
getapps();
$('newApp').style.visibility = 'hidden';
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html
index 2a92a5d11e..4a973a1ed6 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html
@@ -43,7 +43,6 @@
</th>
<th class="thl thr" style="padding-top: 0px; padding-bottom: 0px; padding-right: 0px; text-align: right;">
-<span id="source" style="font-weight: normal;">[atom json]</span>
<input type="button" id="saveButton" style="font-weight: bold;" Value="Saved"/>
</th>
</tr>
@@ -67,7 +66,6 @@ var apps = sca.reference(editWidget, "apps");
* The current app name.
*/
var appname = ui.queryParams()['app'];
-$('source').innerHTML = '[<a href="/apps/' + appname + '">atom</a> <a href="/appcache/' + appname + '/app.composite">json</a>]';
/**
* The current app composite and corresponding saved XML content.
@@ -79,9 +77,13 @@ var composite;
* Return the composite in an ATOM entry.
*/
function atomcomposite(doc) {
- var entry = atom.readATOMEntryDocument(doc);
- var item = caddr(entry);
- return cddr(item);
+ var entry = atom.readATOMEntry(mklist(doc));
+ if (isNil(entry))
+ return mklist();
+ var content = namedElementChild("'content", car(entry));
+ if (content == null)
+ return mklist();
+ return elementChildren(content);
}
/**
@@ -151,8 +153,8 @@ function save() {
$('saveButton').value = 'Saving';
savedcomposxml = car(writeXML(composite, false));
var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml"><item>' +
- savedcomposxml + '</item></content></entry>';
+ '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml">' +
+ savedcomposxml + '</content></entry>';
apps.put(appname, entry, function() {
if (savedcomposxml == car(writeXML(composite, false)))
$('saveButton').value = 'Saved';
diff --git a/sca-cpp/trunk/modules/edit/htdocs/page/page.html b/sca-cpp/trunk/modules/edit/htdocs/page/page.html
index 7ace732526..297e5c5a69 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/page/page.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/page/page.html
@@ -42,7 +42,6 @@
</th>
<th class="thl thr" style="padding-top: 0px; padding-bottom: 0px; padding-right: 0px; text-align: right;">
-<span id="source" style="font-weight: normal;">[atom json]</span>
<input type="button" id="saveButton" style="font-weight: bold;" Value="Saved"/>
</th>
</tr>
@@ -80,15 +79,18 @@ var pages = sca.reference(editWidget, "pages");
* The current app name.
*/
var appname = ui.queryParams()['app'];
-$('source').innerHTML = '[<a href="/pages/' + appname + '">atom</a> <a href="/appcache/' + appname + '/app.html">json</a>]';
/**
* Return the page in an ATOM entry.
*/
function atompage(doc) {
- var entry = atom.readATOMEntryDocument(doc);
- var item = caddr(entry);
- return cddr(item);
+ var entry = atom.readATOMEntry(mklist(doc));
+ if (isNil(entry))
+ return mklist();
+ var content = namedElementChild("'content", car(entry));
+ if (content == null)
+ return mklist();
+ return elementChildren(content);
}
/**
@@ -180,8 +182,8 @@ function save() {
// Update the page ATOM entry
var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml"><item>' +
- savedpagexhtml + '</item></content></entry>';
+ '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml">' +
+ savedpagexhtml + '</content></entry>';
pages.put(appname, entry, function(e) {
if (savedpagexhtml == pagexhtml())
diff --git a/sca-cpp/trunk/modules/edit/pages.py b/sca-cpp/trunk/modules/edit/pages.py
index e96e503730..1fe475b67e 100644
--- a/sca-cpp/trunk/modules/edit/pages.py
+++ b/sca-cpp/trunk/modules/edit/pages.py
@@ -28,21 +28,24 @@ def appid(id):
# Post a new app page to the apps db
def post(collection, app, cache):
id = appid((str(uuid.uuid1()),))
- xhtml = caddr(app);
+ xhtml = cdr(cadddr(car(app)))
cache.put((id,), xhtml)
return id
# Put an app page into the apps db
def put(id, app, cache):
- xhtml = caddr(app);
+ xhtml = cdr(cadddr(car(app)))
cache.put(appid(id), xhtml)
return True
# Get an app page from the apps db
def get(id, cache):
if isNil(id):
- return ("Pages", "pages")
- return (car(id), car(id), cache.get(appid(id)))
+ return (("'feed", ("'title", "Pages"), ("'id", "pages")),)
+ xhtml = cache.get(appid(id))
+ if (isNil(xhtml) or xhtml is None):
+ return (("'entry", ("'title", car(id)), ("'id", car(id))),)
+ return (("'entry", ("'title", car(id)), ("'id", car(id)), ("'content", car(xhtml))),)
# Delete an app page from the apps db
def delete(id, cache):
diff --git a/sca-cpp/trunk/modules/edit/palettes.py b/sca-cpp/trunk/modules/edit/palettes.py
index 9d07973cef..7872bb3db7 100644
--- a/sca-cpp/trunk/modules/edit/palettes.py
+++ b/sca-cpp/trunk/modules/edit/palettes.py
@@ -27,6 +27,6 @@ def paletteid(id):
# Get a palette from the palettes db
def get(id, cache):
if isNil(id):
- return ("Palettes", "palettes")
- return (car(id), car(id), cache.get(paletteid(id)))
+ return (("'feed", ("'title", "Palettes"), ("'id", "palettes")),)
+ return (("'entry", ("'title", car(id)), ("'id", car(id)), ("'content", car(cache.get(paletteid(id))))),)
diff --git a/sca-cpp/trunk/modules/edit/util.py b/sca-cpp/trunk/modules/edit/util.py
index 80bc7db101..24467fd2cb 100644
--- a/sca-cpp/trunk/modules/edit/util.py
+++ b/sca-cpp/trunk/modules/edit/util.py
@@ -43,6 +43,12 @@ def cddr(l):
def caddr(l):
return car(cddr(l))
+def cdddr(l):
+ return cdr(cdr(cdr(l)))
+
+def cadddr(l):
+ return car(cdddr(l))
+
def append(a, b):
return a + b