summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/js/htdocs/scdl.js
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-01-06 07:12:30 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-01-06 07:12:30 +0000
commit6860b985ae504a1375ee3dfadc1f5a59fe198bac (patch)
treed8dc4556b9feda788e3a07a381d42e881dbfec9f /sca-cpp/trunk/modules/js/htdocs/scdl.js
parentb175edffceb282100b0359db6d90715ce70b4864 (diff)
Support service promotion and improve component layout algorithm.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1055767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/scdl.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/scdl.js b/sca-cpp/trunk/modules/js/htdocs/scdl.js
index baba0078fe..08cde5ed3d 100644
--- a/sca-cpp/trunk/modules/js/htdocs/scdl.js
+++ b/sca-cpp/trunk/modules/js/htdocs/scdl.js
@@ -33,6 +33,26 @@ scdl.components = function(l) {
};
/**
+ * Returns a list of service promotions in a composite.
+ */
+scdl.promotions = function(l) {
+ var cs = namedElementChildren("'composite", l);
+ if (isNil(cs))
+ return cs;
+ return namedElementChildren("'service", car(cs));
+};
+
+/**
+ * Returns the target of a service promotion.
+ */
+scdl.promote = function(l) {
+ var puri = namedAttributeValue("'promote", l);
+ if (isNil(puri))
+ return puri;
+ return car(tokens(puri));
+};
+
+/**
* Returns the name of a component, service or reference.
*/
scdl.name = function(l) {
@@ -121,7 +141,7 @@ scdl.target = function(l) {
function bindingsTarget(l) {
if (isNil(l))
return null;
- var u = uri(car(l));
+ var u = scdl.uri(car(l));
if (!isNil(u))
return u;
return bindingsTarget(cdr(l));