summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.2/modules/workspace-admin/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.2/modules/workspace-admin/src/main/resources')
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/DomainManager.composite188
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/admin.css73
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/cloud.html266
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/composite.html172
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/files.html114
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/home.html59
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/icons/feed-icon.pngbin818 -> 0 bytes
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/utils.js68
-rw-r--r--branches/sca-java-1.2/modules/workspace-admin/src/main/resources/workspace.html162
9 files changed, 0 insertions, 1102 deletions
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/DomainManager.composite b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/DomainManager.composite
deleted file mode 100644
index 3f793405b1..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/DomainManager.composite
+++ /dev/null
@@ -1,188 +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://www.osoa.org/xmlns/sca/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
- name="DomainManager">
-
- <component name="AdminUI">
- <t:implementation.widget location="home.html"/>
- <service name="Widget">
- <t:binding.http uri="http://localhost:9990/ui/home"/>
- </service>
- </component>
-
- <component name="ContributionUI">
- <t:implementation.widget location="workspace.html"/>
- <service name="Widget">
- <t:binding.http uri="http://localhost:9990/ui/workspace"/>
- </service>
- <reference name="workspace" target="ContributionCollectionComponent/ItemCollection">
- <t:binding.atom/>
- </reference>
- </component>
-
- <component name="FilesUI">
- <t:implementation.widget location="files.html"/>
- <service name="Widget">
- <t:binding.http uri="http://localhost:9990/ui/files"/>
- </service>
- <reference name="files" target="FileCollectionComponent">
- <t:binding.atom/>
- </reference>
- </component>
-
- <component name="DomainCompositeUI">
- <t:implementation.widget location="composite.html"/>
- <service name="Widget">
- <t:binding.http uri="http://localhost:9990/ui/composite"/>
- </service>
- <reference name="domainComposite" target="DomainCompositeCollectionComponent/ItemCollection">
- <t:binding.atom/>
- </reference>
- </component>
-
- <component name="CloudUI">
- <t:implementation.widget location="cloud.html"/>
- <service name="Widget">
- <t:binding.http uri="http://localhost:9990/ui/cloud"/>
- </service>
- <reference name="cloudComposite" target="CloudCollectionComponent/ItemCollection">
- <t:binding.atom/>
- </reference>
- <reference name="processCollection" target="NodeProcessCollectionFacadeComponent/ItemCollection">
- <t:binding.atom/>
- </reference>
- </component>
-
- <component name="ContributionCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.ContributionCollectionImpl"/>
- <property name="workspaceFile">workspace.xml</property>
- <property name="deploymentContributionDirectory">cloud</property>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/workspace" title="Contributions"/>
- </service>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/contribution"/>
- </service>
- </component>
-
- <component name="FileCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.FileCollectionImpl"/>
- <property name="directoryName">files</property>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/feed/files" title="Files"/>
- </service>
- </component>
-
- <component name="FileServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.FileServiceImpl"/>
- <property name="directoryName">files</property>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/files"/>
- </service>
- </component>
-
- <component name="DomainCompositeCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.DeployedCompositeCollectionImpl"/>
- <property name="compositeFile">domain.composite</property>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/composite" title="Domain Composites"/>
- </service>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/composite-source"/>
- </service>
- <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
- </component>
-
- <component name="DeployableCompositeCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.DeployableCompositeCollectionImpl"/>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/deployable" title="Deployable Composites"/>
- </service>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/composite-resolved"/>
- </service>
- <reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
- <reference name="domainCompositeCollection" target="DomainCompositeCollectionComponent/LocalItemCollection"/>
- <reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
- </component>
-
- <component name="CloudCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.DeployedCompositeCollectionImpl"/>
- <property name="compositeFile">cloud.composite</property>
- <property name="deploymentContributionDirectory">cloud</property>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/cloud" title="Nodes"/>
- </service>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/cloud-source"/>
- </service>
- <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
- <reference name="processCollection" target="NodeProcessCollectionFacadeComponent/LocalItemCollection"/>
- </component>
-
- <component name="CompositeImageCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.CompositeImageCollectionImpl"/>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/composite-image" title="Install Image"/>
- </service>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/node-image"/>
- </service>
- <reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
- <reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
- </component>
-
- <component name="QuickStartServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.QuickStartServiceImpl"/>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/quickstart"/>
- </service>
- <reference name="contributionCollection" target="ContributionCollectionComponent/LocalItemCollection"/>
- <reference name="deployableCollection" target="DeployableCompositeCollectionComponent/LocalItemCollection"/>
- <reference name="domainCompositeCollection" target="DomainCompositeCollectionComponent/LocalItemCollection"/>
- <reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
- <reference name="processCollection" target="NodeProcessCollectionComponent/LocalItemCollection"/>
- </component>
-
- <component name="NodeProcessCollectionFacadeComponent">
- <implementation.java class="org.apache.tuscany.sca.workspace.admin.impl.NodeProcessCollectionFacadeImpl"/>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/processes" title="Log"/>
- </service>
- <reference name="cloudCollection" target="CloudCollectionComponent/LocalItemCollection"/>
- </component>
-
- <component name="NodeProcessCollectionComponent">
- <implementation.java class="org.apache.tuscany.sca.implementation.node.launcher.NodeProcessCollectionImpl"/>
- <service name="ItemCollection">
- <t:binding.atom uri="http://localhost:9990/node/processes" title="Log"/>
- </service>
- </component>
-
- <component name="PingServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.implementation.node.launcher.PingServiceImpl"/>
- <service name="Servlet">
- <t:binding.http uri="http://localhost:9990/ping"/>
- </service>
- </component>
-
-</composite>
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/admin.css b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/admin.css
deleted file mode 100644
index aa6e910f85..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/admin.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-
-body {
- white-space: nowrap
-}
-
-table {
- border: 1px; border-collapse: separate
-}
-
-th {
- font-weight: bold; white-space: nowrap; background-color: #e5ecf9; color: #598edd;
- text-align: left; padding-left: 2px; padding-right: 20px; padding-top: 2px; padding-bottom: 2px; vertical-align: text-top;
- border-top: 1px; border-bottom: 1px; border-left: 0px; border-right: 0px;
- border-style: solid; border-top-color: #a2bae7; border-bottom-color: #d1d3d4
-}
-
-td {
- padding-left: 2px; padding-top: 2px; padding-right: 20px; white-space: nowrap; vertical-align: text-top
-}
-
-input {
- vertical-align: middle
-}
-
-a:link {
- color: blue
-}
-
-a:visited {
- color: blue
-}
-
-.tdw {
- padding-left: 2px; padding-top: 2px; padding-right: 20px; white-space: normal; vertical-align: text-top
-}
-
-.hd1 {
- font-size:150%; font-weight: bold
-}
-
-.tbar {
- margin: 0px;
- padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 3px;
- border-bottom: 1px solid #a2bae7
-}
-
-.ltbar {
- padding-left: 0px; padding-top: 0px; padding-right: 20px; white-space: nowrap; vertical-align: top
-}
-
-.rtbar {
- padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top;
- text-align: right
-}
-
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/cloud.html b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/cloud.html
deleted file mode 100644
index 193e30bb49..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/cloud.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<!--
- * 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.
--->
-<html>
-<head>
-<title>SCA Domain - Cloud</title>
-
-<script type="text/javascript" src="cloud.js"></script>
-<script type="text/javascript" src="utils.js"></script>
-
-<script language="JavaScript">
-
- //@Reference
- var cloudComposite = new Reference("cloudComposite");
-
- //@Reference
- var processCollection = new Reference("processCollection");
-
- function getComposites() {
- cloudComposite.get("", getCompositesResponse);
- }
-
- function contributionURI(id) {
- var i = id.indexOf(';');
- return id.substring(10, i);
- }
-
- function compositeName(id) {
- var i = id.indexOf(';');
- return id.substring(i + 1);
- }
-
- function compositeLocalName(id) {
- name = compositeName(id);
- var i = name.indexOf(';');
- return name.substring(i + 1);
- }
-
- var nodeNames;
-
- function getCompositesResponse(feed) {
- nodeNames = new Array();
- if (feed != null) {
- var entries = feed.getElementsByTagName("entry");
- var composites = "";
- composites += '<table width="100%">';
- composites += '<tr><th>Node</th><th>Composite</th><th>Contribution</th><th>Install Image</th>' +
- '<th>Log</th></tr>';
-
- for (var i=0; i<entries.length; i++) {
- var nodeId = entries[i].getElementsByTagName("id")[0].firstChild.nodeValue;
- var links = entries[i].getElementsByTagName("link");
- var nodeLink = undefined;
- var compositeLink = undefined;
- var compositeId = "composite:undefined;undefined;undefined";
- var uri = '<span style="color: red">unknown</span>';
- var qname = undefined;
- for (var l = 0; l < links.length; l++) {
- var a = links[l].getAttribute('rel');
- if (a == undefined) {
- nodeLink = links[l].getAttribute('href');
- } else if (a == 'related') {
- compositeLink = links[l].getAttribute('href');
- var c = compositeLink.indexOf('composite:');
- compositeId = compositeLink.substring(c);
- uri = contributionURI(compositeId);
- qname = compositeName(compositeId);
- }
- }
-
- var nodeName = compositeLocalName(nodeId);
- nodeNames[i] = nodeName;
-
- var content = "";
- if (entries[i].getElementsByTagName("content")[0].firstChild != null) {
- content = entries[i].getElementsByTagName("content")[0].firstChild.nodeValue;
- }
-
- composites += '<tr>'
- if (content.indexOf('<span id="problem"') != -1) {
- composites += '<td><input name="composites" type="checkbox" value="' + nodeId + '">' +
- '<a href=\"' + nodeLink + '\">' + nodeName + '</a></td>';
- composites += '<td>' + content + '</td>';
- composites += '<td>' + uri + '</td>';
- } else {
- composites += '<td><input name="composites" type="checkbox" value="' + nodeId + '">' +
- '<a href=\"' + nodeLink + '\">' + nodeName + '</a></td>';
- composites += '<td><a href=\"' + compositeLink + '\">' + qname + '</a></td>';
- composites += '<td><a href="/contribution/' + uri + '">' + uri + '</a></td>';
- }
- composites += '<td><a href="/node-image/' + nodeName + '"><img src="icons/feed-icon.png" border="0"></a></td>';
- composites += '<td><a href="/processes/?node=' + nodeName + '"><img src="icons/feed-icon.png" border="0"></a></td>';
- composites += '</tr>';
- }
- composites += '</table>';
- document.getElementById("composites").innerHTML = composites;
- }
- }
-
- function deleteComposite() {
- var composites = array(document.cloudCompositeForm.composites);
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- var id = composites[i].value;
- cloudComposite.del(id, deleteCompositeResponse);
- }
- }
- }
-
- function deleteCompositeResponse() {
- getComposites();
- }
-
- function addComposite() {
- var nodeName = document.newCompositeForm.nodeName.value;
- var nodeURI = document.newCompositeForm.nodeURI.value;
- var compositeNamespace = document.newCompositeForm.compositeNamespace.value;
- var compositeName = document.newCompositeForm.compositeName.value;
- var contributionURI = document.newCompositeForm.contributionURI.value;
- var id = 'composite:' +
- 'http://tuscany.apache.org/cloud' + ';' +
- 'http://tuscany.apache.org/cloud' + ';' +
- nodeName;
-
- var entry = '<entry xmlns="http://www.w3.org/2005/Atom">\n' +
- '<id>' + id + '</id>\n' +
- '<content type="text/xml">\n' +
- '<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"\n' +
- ' xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"\n' +
- ' targetNamespace="http://tuscany.apache.org/cloud"\n' +
- ' xmlns:c="' + compositeNamespace + '"\n' +
- ' name="' + nodeName + '">\n' +
- '\n' +
- ' <component name="' + nodeName + '">\n' +
- ' <t:implementation.node uri="' + contributionURI + '" composite="c:' + compositeName + '"/>\n' +
- ' <service name="Node">\n' +
- ' <binding.ws uri="' + nodeURI + '"/>\n' +
- ' <t:binding.http uri="' + nodeURI + '"/>\n' +
- ' <t:binding.jsonrpc uri="' + nodeURI + '"/>\n' +
- ' <t:binding.atom uri="' + nodeURI + '"/>\n' +
- ' </service>\n' +
- ' </component>\n' +
- '</composite>' +
- '</content>' +
- '</entry>';
- cloudComposite.post(entry, addCompositeResponse);
- }
-
- function addCompositeResponse() {
- document.newCompositeForm.nodeName.value = "";
- document.newCompositeForm.nodeURI.value = "";
- document.newCompositeForm.compositeNamespace.value = "";
- document.newCompositeForm.compositeName.value = "";
- document.newCompositeForm.contributionURI.value = "";
- getComposites();
- }
-
- function startComposite() {
- var composites = array(document.cloudCompositeForm.composites);
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- var id = nodeNames[i];
-
- var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<id>' + id + '</id>' +
- '</entry>';
- processCollection.post(entry, startCompositeResponse);
- }
- }
- }
-
- function startCompositeResponse() {
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- composites[i].checked = false;
- }
- }
- }
-
- function stopComposite() {
- var composites = array(document.cloudCompositeForm.composites);
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- var id = nodeNames[i];
- processCollection.del(id, stopCompositeResponse);
- }
- }
- }
-
- function stopCompositeResponse() {
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- composites[i].checked = false;
- }
- }
- }
-
- function init() {
- toolbar();
- getComposites();
- }
-
-</script>
-
-<link rel="stylesheet" type="text/css" href="admin.css">
-</head>
-
-<body onload="init()">
- <div id="toolbar"></div>
-
- <div id="cloudComposite">
- <br>
- <span class=hd1>
- SCA Domain<br><br>
- Cloud</b>&nbsp;<a href="/cloud/"><img src="icons/feed-icon.png" border="0"></a>
- </span>
- <br><br>
- Here is the list of SCA nodes configured in your SCA domain cloud.
- <br><br>
-
- <form name="cloudCompositeForm">
- <div id="composites" ></div>
- <br>
- <input type="button" onClick="startComposite()" value="Start" />
- <input type="button" onClick="stopComposite()" value="Stop" />
- &nbsp;&nbsp;
- <input type="button" onClick="deleteComposite()" value="Delete" />
- </form>
-
- <br><br>
-
- <form name="newCompositeForm">
- <table width="100%">
- <tr><th>Add a Node</th></tr>
- <tr><td>Add a node to the cloud. The node will run the SCA components declared in the specified composite.</td></tr>
- </table>
- <br>
- <table>
- <tr><td>Node name:</td><td><input type="text" name="nodeName" size="50"/></td><td>e.g. MyNode</td></tr>
- <tr><td>Node URI:</td><td><input type="text" name="nodeURI" size="50"/></td></td><td>e.g. http://host:8080</td></tr>
- <tr><td>Composite namespace:</td><td><input type="text" name="compositeNamespace" size="50"/></td></td><td>e.g. http://my/namespace</td></tr>
- <tr><td>Composite name:</td><td><input type="text" name="compositeName" size="50"/></td></td><td>e.g. mycomposite</td></tr>
- <tr><td>Contribution URI:</td><td><input type="text" name="contributionURI" size="50"/></td></td><td>e.g. mycontrib, http://mycontrib</td></tr>
- </table>
- <input type="button" onClick="addComposite()" value="Add" />
- </form>
-
- </div>
-</body>
-
-</html>
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/composite.html b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/composite.html
deleted file mode 100644
index 96cf59c7c2..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/composite.html
+++ /dev/null
@@ -1,172 +0,0 @@
-<!--
- * 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.
--->
-<html>
-<head>
-<title>SCA Domain - Domain Composite</title>
-
-<script type="text/javascript" src="composite.js"></script>
-<script type="text/javascript" src="utils.js"></script>
-
-<script language="JavaScript">
-
- //@Reference
- var domainComposite = new Reference("domainComposite");
-
- function getComposites() {
- domainComposite.get("", getCompositesResponse);
- }
-
- function contributionURI(id) {
- var i = id.indexOf(';');
- return id.substring(10, i);
- }
-
- function compositeName(id) {
- var i = id.indexOf(';');
- return id.substring(i + 1);
- }
-
- function getCompositesResponse(feed) {
- if (feed != null) {
- var entries = feed.getElementsByTagName("entry");
- var composites = "";
- composites += '<table width="100%">';
- composites += '<tr><th>Composite</th>' +
- '<th>Contribution</th>' +
- '<th>Components</th>' +
- '</tr>';
- //'<th>Composite Install Image</th>' +
-
- for (var i=0; i<entries.length; i++) {
- var id = entries[i].getElementsByTagName("id")[0].firstChild.nodeValue;
- var link = entries[i].getElementsByTagName("link")[0].getAttribute("href");
- var uri = contributionURI(id);
- var qname = compositeName(id);
-
- var content = "";
- if (entries[i].getElementsByTagName("content")[0].firstChild != null) {
- content = entries[i].getElementsByTagName("content")[0].firstChild.nodeValue;
- }
- var components = '';
- var bs = content.indexOf('<span id="components">');
- if (bs != -1) {
- var es = content.indexOf('</span>', bs);
- components = content.substring(bs, es + 7);
- } else {
- bs = content.indexOf('<span id="problem"');
- if (bs != -1) {
- var es = content.indexOf('</span>', bs);
- components = content.substring(bs, es + 7);
- }
- }
-
- composites += '<tr>'
- composites += '<td><input name="composites" type="checkbox" value="' + id + '">';
- composites += '<a href=\"' + link + '\">' + qname + '</a></td>';
- composites += '<td><a href="/contribution/' + uri + '">' + uri + '</a></td>';
- composites += '<td class=tdw>' + components + '</td>';
- //composites += '<td><a href="/composite-image/?composite=' + id + '"><img src="icons/feed-icon.png" border="0"></a></td>';
- composites += '</tr>';
- }
- composites += '</table>';
- document.getElementById("composites").innerHTML = composites;
- }
- }
-
- function deleteComposite() {
- var composites = array(document.domainCompositeForm.composites);
- for (var i = 0; i < composites.length; i++) {
- if (composites[i].checked) {
- var id = composites[i].value;
- domainComposite.del(id, deleteCompositeResponse);
- }
- }
- }
-
- function deleteCompositeResponse() {
- getComposites();
- }
-
- function addComposite() {
- var id = 'composite:' +
- document.newCompositeForm.contributionURI.value + ';' +
- document.newCompositeForm.compositeNamespace.value + ';' +
- document.newCompositeForm.compositeName.value;
- var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<title>' + id +'</title>' +
- '<id>' + id + '</id>' +
- '</entry>';
- domainComposite.post(entry, addCompositeResponse);
- }
-
- function addCompositeResponse() {
- document.newCompositeForm.compositeNamespace.value = "";
- document.newCompositeForm.compositeName.value = "";
- document.newCompositeForm.contributionURI.value = "";
- getComposites();
- }
-
- function init() {
- toolbar();
- getComposites();
- }
-
-</script>
-
-<link rel="stylesheet" type="text/css" href="admin.css">
-</head>
-
-<body onload="init()">
- <div id="toolbar"></div>
-
- <div id="domainComposite">
- <br>
- <span class=hd1>
- SCA Domain<br><br>
- Domain Composite&nbsp;<a href="/composite/"><img src="icons/feed-icon.png" border="0"></a>
- </span>
- <br><br>
- Here is the list of SCA composites currently included as top-level composites in your SCA domain.
- <br><br>
-
- <form name="domainCompositeForm">
- <div id="composites" ></div>
- <br>
- <input type="button" onClick="deleteComposite()" value="Delete" />
- </form>
-
- <br><br>
-
- <form name="newCompositeForm">
- <table width="100%">
- <tr><th>Add Composite</th></tr>
- <tr><td>Add an SCA composite describing your SCA service components.</td></tr>
- </table>
- <br>
- <table>
- <tr><td>Composite namespace:</td><td><input type="text" name="compositeNamespace" size="50"/></td><td>e.g. http://my/namespace</td></tr>
- <tr><td>Composite name:</td><td><input type="text" name="compositeName" size="50"/></td><td>e.g. mycomposite</td></tr>
- <tr><td>Contribution URI:</td><td><input type="text" name="contributionURI" size="50"/></td><td>e.g. mycontrib, http://mycontrib</td></tr>
- </table>
- <input type="button" onClick="addComposite()" value="Add" />
- </form>
-
- </div>
-</body>
-</html>
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/files.html b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/files.html
deleted file mode 100644
index d29b913bf5..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/files.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!--
- * 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.
--->
-<html>
-<head>
-<title>SCA Domain - Contribution File Server</title>
-
-<script type="text/javascript" src="files.js"></script>
-<script type="text/javascript" src="utils.js"></script>
-
-<script language="JavaScript">
-
- //@Reference
- var files = new Reference("files");
-
- function getFiles() {
- files.get("", getFilesResponse);
- }
-
- function getFilesResponse(feed) {
- if (feed != null) {
- var entries = feed.getElementsByTagName("entry");
- var list = '<table width="100%"><tr><th>Files</th></tr>';
- for (var i=0; i<entries.length; i++) {
- var id = entries[i].getElementsByTagName("id")[0].firstChild.nodeValue;
- var location = entries[i].getElementsByTagName("link")[0].getAttribute("href");
- list += '<tr><td><input name="files" type="checkbox" value="' + id + '">' +
- '<a href=\"' + location + '\">' + id + '</a></td></tr>';
- }
- list += "</table>";
- document.getElementById("files").innerHTML = list;
- }
- }
-
- function deleteFile() {
- var list = array(document.filesForm.files);
- for (var i=0; i < list.length; i++) {
- if (list[i].checked) {
- var id = list[i].value;
- files.del(id, deleteFileResponse);
- }
- }
- }
-
- function deleteFileResponse() {
- getFiles();
- }
-
- function uploadFile() {
- document.uploadFileForm.submit();
- }
-
- function init() {
- toolbar();
- getFiles();
- }
-
-</script>
-
-<link rel="stylesheet" type="text/css" href="admin.css">
-</head>
-
-<body onload="init()">
- <div id="toolbar"></div>
-
- <div id="fileServer">
- <br>
- <span class=hd1>
- SCA Domain<br><br>
- File Server&nbsp;<a href="/feed/files/"><img src="icons/feed-icon.png" border="0"></a>
- </span>
- <br><br>
- This is a simple ATOM-based file server useful to share files if you don't have an FTP, SVN or Maven repository.
- <br><br>
-
- <form name="filesForm">
- <div id="files" ></div>
- <br/>
- <input type="button" onClick="deleteFile()" value="Delete" />
- </form>
-
- <br><br>
-
- <form method="post" name="uploadFileForm" enctype='multipart/form-data' action='/files'>
- <table width="100%">
- <tr><th>Upload File</th></tr>
- <tr><td>Upload a file to the server.</td></tr>
- </table>
- <br>
- <table border="0">
- <tr><td>File:</td><td><input type="file" name="file" size="50"/></td></tr>
- </table>
- <br/>
- <input type="button" onClick="uploadFile()" value="Upload" />
- </form>
-
- </div>
-</body>
-</html>
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/home.html b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/home.html
deleted file mode 100644
index 02b70e688e..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/home.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
- * 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.
--->
-<html>
-<head>
-<title>SCA Domain - Home</title>
-
-<script type="text/javascript" src="home.js"></script>
-<script type="text/javascript" src="utils.js"></script>
-
-<script language="JavaScript">
-
- function init() {
- toolbar();
- }
-
-
-</script>
-
-<link rel="stylesheet" type="text/css" href="admin.css">
-</head>
-
-<body onload="init()">
- <div id="toolbar"></div>
-
- <br>
- <span class=hd1>
- SCA Domain
- </span>
-
- <br><br><br><br><br>
-
- <form>
- <table border="0" align="center">
- <tr><td valign="top"><span style="font-size:150%; color: blue">Search:</span></td><td><input type="text" name="search" size="50"/></td></tr>
- <tr><td></td><td align="center"><input type="button" name="search" value="Search" /></td></tr>
- </table>
- </form>
-
- <br><br><br><br><br><br><br>
- <center>This page is under construction, searching the domain is not implemented yet.</center>
-
-</body>
-</html>
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/icons/feed-icon.png b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/icons/feed-icon.png
deleted file mode 100644
index a59728b2ad..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/icons/feed-icon.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/utils.js b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/utils.js
deleted file mode 100644
index 853ce5d235..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/utils.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.
- */
-
-function Tool(name, href) {
- this.name = name;
- this.href = href;
-}
-
-Tool.prototype.print = function() {
- var loc = '' + location;
- if (loc.match(this.href) == null) {
- return '<a href="' + this.href + '">' + this.name + '</a>';
- } else {
- return '<span>' + this.name + '</span>';
- }
-}
-
-function toolbar() {
-
- var toolbar = '<table width="100%" cellpadding="0" cellspacing="0" class=tbar><tr>' +
- '<td class=ltbar><table border="0" cellspacing="0" cellpadding="0"><tr>';
-
- for (var i = 0; i < tools.length; i++) {
- toolbar = toolbar + '<td class=ltbar>' +tools[i].print() + '</td>'
- }
-
- toolbar = toolbar + '</tr></table></td>' +
- '<td class=rtbar><table border="0" cellpadding="0" cellspacing="0" align="right"><tr>' +
- '<td class=rtbar>' + home.print() + '</td></tr></table></td>' +
- '</tr></table>';
-
- document.getElementById('toolbar').innerHTML = toolbar;
-}
-
-function array(obj) {
- if (obj.length == undefined) {
- var a = new Array();
- a[0] = obj;
- return a;
- }
- else {
- return obj;
- }
-}
-
-var tools = new Array();
-tools[0] = new Tool("Contributions", "/ui/workspace");
-tools[1] = new Tool("Composites", "/ui/composite");
-tools[2] = new Tool("Cloud", "/ui/cloud");
-tools[3] = new Tool("Files", "/ui/files");
-
-var home = new Tool("Home", "/ui/home");
diff --git a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/workspace.html b/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/workspace.html
deleted file mode 100644
index fb00b4c8c1..0000000000
--- a/branches/sca-java-1.2/modules/workspace-admin/src/main/resources/workspace.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!--
- * 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.
--->
-<html>
-<head>
-<title>SCA Domain - Contributions</title>
-
-<script type="text/javascript" src="workspace.js"></script>
-<script type="text/javascript" src="utils.js"></script>
-
-<script language="JavaScript">
-
- //@Reference
- var workspace = new Reference("workspace");
-
- function getContributions() {
- workspace.get("", getContributionsResponse);
- }
-
- function getContributionsResponse(feed) {
- if (feed != null) {
- var entries = feed.getElementsByTagName("entry");
- var contributions = "";
- contributions += '<table width="100%">';
- contributions += '<tr><th>Contribution</th><th>Dependencies</td><th>Deployable Composites</th></tr>';
- for (var i=0; i<entries.length; i++) {
- var id = entries[i].getElementsByTagName("id")[0].firstChild.nodeValue;
- var location = entries[i].getElementsByTagName("link")[0].getAttribute("href");
- var content = '';
- if (entries[i].getElementsByTagName("content")[0].firstChild != null) {
- content = entries[i].getElementsByTagName("content")[0].firstChild.nodeValue;
- }
-
- contributions += '<tr>';
- contributions += '<td><input name="contributions" type="checkbox" value="' + id + '">' +
- '<a href=\"' + location + '\">' + id + '</a></td>';
-
- var dependencies = '';
- var bs = content.indexOf('<span id="dependencies">');
- if (bs != -1) {
- var es = content.indexOf('</span>', bs);
- dependencies = content.substring(bs, es + 7);
- }
-
- var deployables = '';
- var bs = content.indexOf('<span id="deployables">');
- if (bs != -1) {
- var es = content.indexOf('</span>', bs);
- deployables = content.substring(bs, es + 7);
- }
-
- var problems = "";
- var bs = content.indexOf('<span id="problems" ');
- if (bs != -1) {
- var es = content.indexOf('</span>', bs);
- if (dependencies.length != 0) {
- problems = '<br>';
- }
- problems += content.substring(bs, es + 7);
- }
-
- contributions += '<td class=tdw>' + dependencies + problems + ' </td>';
- contributions += '<td class=tdw>' + deployables + '</td>';
- contributions += '</tr>';
- }
- contributions += '</table>';
- document.getElementById("contributions").innerHTML = contributions;
- }
- }
-
- function deleteContribution() {
- var contributions = array(document.workspaceForm.contributions);
- for (var i=0; i < contributions.length; i++) {
- if (contributions[i].checked) {
- var id = contributions[i].value;
- workspace.del(id, deleteContributionResponse);
- }
- }
- }
-
- function deleteContributionResponse() {
- getContributions();
- }
-
- function addContribution() {
- var id = document.newContributionForm.contributionID.value;
- var location = document.newContributionForm.contributionLocation.value;
- var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<title>Contribution - ' + id +'</title>' +
- '<id>' + id + '</id>' +
- '<link href="' + location + '" />' +
- '</entry>';
- workspace.post(entry, addContributionResponse);
- }
-
- function addContributionResponse() {
- document.newContributionForm.contributionID.value = "";
- document.newContributionForm.contributionLocation.value = "";
- getContributions();
- }
-
- function init() {
- toolbar();
- getContributions();
- }
-
-</script>
-
-<link rel="stylesheet" type="text/css" href="admin.css">
-</head>
-
-<body onload="init()">
- <div id="toolbar"></div>
-
- <div id="workspace">
- <br>
- <span class=hd1>
- SCA Domain<br><br>
- Contributions</b>&nbsp;<a href="/workspace/"><img src="icons/feed-icon.png" border="0"></a> </span>
- <br><br>
- Here is the list of SCA contributions currently available in your SCA domain.
- <br><br>
-
- <form name="workspaceForm">
- <div id="contributions" ></div>
- <br>
- <input type="button" onClick="deleteContribution()" value="Delete" />
- </form>
-
- <br><br>
-
- <form name="newContributionForm">
- <table width="100%">
- <tr><th>Add Contribution</th></tr>
- <tr><td>Add an SCA contribution containing your application artifacts to the SCA domain.</td></tr>
- </table>
- <br>
- <table>
- <tr><td>Contribution URI:</td><td><input type="text" name="contributionID" size="50"/></td></td><td>e.g. mycontrib, http://mycontrib</td></tr>
- <tr><td>Location:</td><td><input type="text" name="contributionLocation" size="50"/></td></td><td>e.g. http://host/myjar.jar, file:/mydir, file:/myjar.jar</td></tr>
- </table>
- <input type="button" onClick="addContribution()" value="Add" />
- </form>
-
- </div>
-</body>
-</html>