From 4ed0ed906e82c9484b384419fa4ef4c980768731 Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 13 Nov 2008 20:02:36 +0000 Subject: Creating Java SCA 1.x branch git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@713805 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/resources/DomainManager.composite | 281 ++++++++++++++ .../src/main/resources/cloud-gadget.html | 408 +++++++++++++++++++++ .../domain-manager/src/main/resources/cloud.html | 68 ++++ .../src/main/resources/composite-gadget.html | 277 ++++++++++++++ .../src/main/resources/composite.html | 66 ++++ .../src/main/resources/files-gadget.html | 124 +++++++ .../domain-manager/src/main/resources/files.html | 64 ++++ .../src/main/resources/home-gadget.html | 45 +++ .../domain-manager/src/main/resources/home.html | 65 ++++ .../src/main/resources/icons/feed-icon.png | Bin 0 -> 818 bytes .../domain-manager/src/main/resources/manager.css | 104 ++++++ .../src/main/resources/toolbar-gadget.html | 47 +++ .../domain-manager/src/main/resources/utils.js | 246 +++++++++++++ .../src/main/resources/workspace-gadget.html | 232 ++++++++++++ .../src/main/resources/workspace.html | 65 ++++ 15 files changed, 2092 insertions(+) create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/DomainManager.composite create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/files-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/files.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/home-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/home.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/icons/feed-icon.png create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/manager.css create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/toolbar-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/utils.js create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace-gadget.html create mode 100644 branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace.html (limited to 'branches/sca-java-1.x/modules/domain-manager/src/main/resources') diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/DomainManager.composite b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/DomainManager.composite new file mode 100644 index 0000000000..ba57ea45d1 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/DomainManager.composite @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + workspace.xml + cloud + + + + + + + + + + + + + + + + + files + + + + + + + + + files + + + + + + + + + domain.composite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cloud.composite + cloud + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud-gadget.html new file mode 100644 index 0000000000..619df54ede --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud-gadget.html @@ -0,0 +1,408 @@ + + + +SCA Domain - Cloud + + + + + + + + +
+ +
+
+
+ >Add +  Delete +    + Start +  Stop +
+ + + +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud.html new file mode 100644 index 0000000000..d661d5d38b --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/cloud.html @@ -0,0 +1,68 @@ + + + +SCA Domain - Cloud + + + + + + + +
+
+ + + SCA Domain

+ Cloud  +
+
+ Here is the list of SCA nodes configured in your SCA domain cloud. +

+ +
+ + + + + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite-gadget.html new file mode 100644 index 0000000000..82855a410a --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite-gadget.html @@ -0,0 +1,277 @@ + + + +SCA Domain - Domain Composite + + + + + + + + +
+ +
+
+
+ >Add +  Delete +
+ + + +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite.html new file mode 100644 index 0000000000..b0631e1d66 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/composite.html @@ -0,0 +1,66 @@ + + + +SCA Domain - Domain Composite + + + + + + + +
+
+ + + SCA Domain

+ Domain Composite  +
+
+ Here is the list of SCA composites currently included as top-level composites in your SCA domain. +

+ +
+ + + + + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files-gadget.html new file mode 100644 index 0000000000..83315a1957 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files-gadget.html @@ -0,0 +1,124 @@ + + + +SCA Domain - Contribution File Server + + + + + + + + +
+ +
+
+
+ >Upload +  Delete +
+ + + +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files.html new file mode 100644 index 0000000000..37d89e7665 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/files.html @@ -0,0 +1,64 @@ + + + +SCA Domain - Contribution File Server + + + + + + + +
+
+ + + SCA Domain

+ File Server  +
+
+ This is a simple ATOM-based file server useful to share files if you don't have an FTP, SVN or Maven repository. +

+ +
+ + + + + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home-gadget.html new file mode 100644 index 0000000000..05e262e4df --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home-gadget.html @@ -0,0 +1,45 @@ + + + +SCA Domain - Home + + + + + + + + +
+ +
+ + + +
Search:
+
+ +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home.html new file mode 100644 index 0000000000..aad1856621 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/home.html @@ -0,0 +1,65 @@ + + + +SCA Domain - Home + + + + + + + +
+
+ + + SCA Domain + +





+ +
+ +






+
This page is under construction, searching the domain is not implemented yet.
+ + + + + + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/icons/feed-icon.png b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/icons/feed-icon.png new file mode 100644 index 0000000000..a59728b2ad Binary files /dev/null and b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/icons/feed-icon.png differ diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/manager.css b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/manager.css new file mode 100644 index 0000000000..e080ff1d87 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/manager.css @@ -0,0 +1,104 @@ +/* + * 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; margin: 2px; +} + +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 +} + +iframe { + visibility: hidden; +} + +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 +} + +.suggest { + background-color: #e5ecf9; color: #598edd; + border-top: 1px; border-bottom: 1px; border-left: 1px; border-right: 1px; + border-style: solid; border-top-color: #a2bae7; border-bottom-color: #d1d3d4; + border-left-color: #d1d3d4; border-right-color: #d1d3d4; + position: absolute; + overflow: auto; overflow-x: hidden; + cursor: default; + padding: 0px; margin: 0px; +} + +suggestTable { + border: 0px; border-collapse: separate; + padding-left: 5px; padding-right: 5px; padding-top: 2px; padding-bottom: 2px; + margin: 0px; +} + +.suggestItem { + padding-left: 2px; padding-top: 0px; padding-bottom: 0px; padding-right: 2px; white-space: nowrap; vertical-align: text-top; + background-color: #e5ecf9; color: #598edd; +} + +.suggestHilighted { + padding-left: 2px; padding-top: 0px; padding-bottom: 0px; padding-right: 2px; white-space: nowrap; vertical-align: text-top; + background-color: #598edd; color: #e5ecf9; +} + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/toolbar-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/toolbar-gadget.html new file mode 100644 index 0000000000..c9389affc3 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/toolbar-gadget.html @@ -0,0 +1,47 @@ + + + +SCA Domain - Toolbar + + + + + + + +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/utils.js b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/utils.js new file mode 100644 index 0000000000..77ed807e85 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/utils.js @@ -0,0 +1,246 @@ +/* + * 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. + */ + +/** + * Autocomplete / suggest support for input fields + * + * To use it declare a 'suggest' function as follows: + * function suggestItems() { + * return new Array('abc', 'def', 'ghi'); + * } + * + * then hook it to an input field as follows: + * suggest(document.yourForm.yourInputField, suggestItems); + */ +function selectSuggestion(node, value) { + for (;;) { + node = node.parentNode; + if (node.tagName.toLowerCase() == 'div') { + break; + } + } + node.selectSuggestion(value); +} + +function hilightSuggestion(node, over) { + if (over) { + node.className = 'suggestHilighted'; + } else { + node.className = 'suggestItem'; + } +} + +function suggest(input, suggestFunction) { + + input.suggest = suggestFunction; + + input.selectSuggestion = function(value) { + this.hideSuggestDiv(); + this.value = value; + } + + input.hideSuggestDiv = function() { + if (this.suggestDiv != null) { + this.suggestDiv.style.visibility = 'hidden'; + } + } + + input.showSuggestDiv = function() { + if (this.suggestDiv == null) { + this.suggestDiv = document.createElement('div'); + this.suggestDiv.input = this; + this.suggestDiv.className = 'suggest'; + input.parentNode.insertBefore(this.suggestDiv, input); + this.suggestDiv.style.visibility = 'hidden'; + this.suggestDiv.style.zIndex = '99'; + + this.suggestDiv.selectSuggestion = function(value) { + this.input.selectSuggestion(value); + } + } + + var values = this.suggest(); + var items = ""; + for (var i = 0; i < values.length; i++) { + if (values[i].indexOf(this.value) == -1) { + continue; + } + if (items.length == 0) { + items += ''; + } + items += ''; + } + if (items.length != 0) { + items += '
' + values[i] + '
'; + } + this.suggestDiv.innerHTML = items; + + if (items.length != 0) { + var node = input; + var left = 0; + var top = 0; + for (;;) { + left += node.offsetLeft; + top += node.offsetTop; + node = node.offsetParent; + if (node.tagName.toLowerCase() == 'body') { + break; + } + } + this.suggestDiv.style.left = left; + this.suggestDiv.style.top = top + input.offsetHeight; + this.suggestDiv.style.visibility = 'visible'; + } else { + this.suggestDiv.style.visibility = 'hidden'; + } + } + + input.onkeydown = function(event) { + this.showSuggestDiv(); + }; + + input.onkeyup = function(event) { + this.showSuggestDiv(); + }; + + input.onmousedown = function(event) { + this.showSuggestDiv(); + }; + + input.onblur = function(event) { + setTimeout(function() { input.hideSuggestDiv(); }, 50); + }; +} + +/** + * A Toolbar class + */ +function Tool(name, href) { + this.name = name; + this.href = href; +} + +Tool.prototype.print = function() { + var loc = '' + location; + if (loc.match(this.href) == null) { + return '' + this.name + ''; + } else { + return '' + this.name + ''; + } +} + +/** + * Initialize the toolbar + */ +function toolbar(home, tools) { + var toolbar = '' + + '' + + '' + + '
'; + + for (var i = 0; i < tools.length; i++) { + toolbar = toolbar + '' + } + + toolbar = toolbar + '
' +tools[i].print() + '
' + + '
' + home.print() + '
'; + + return toolbar; +} + +/** + * Return an non-sparse array from an array or an object. + */ +function array(obj) { + if (obj.length == undefined) { + var a = new Array(); + a[0] = obj; + return a; + } + else { + var a = new Array(); + var n = 0; + for (var i in obj) { + a[n++] = obj[i]; + } + return a; + } +} + +/** + * Dump a Javascript object to the console + */ +function dump(o) { + for (f in o) { + try { + console.log(f + '=' + o[f]); + } catch (e) {} + } +} + +/** + * Return the content document of the given window. + */ +function content(win) { + if (win.document != 'undefined' && win.document != null) { + return win.document; + } else if (win.contentDocument != 'undefined' && win.contentDocument != null) { + return win.contentDocument; + } else { + return null; + } +} + +/** + * Returns a child element with the given id. + */ +function elementByID(node, id) { + for (var i in node.childNodes) { + var child = node.childNodes[i]; + if (child.id == id) { + return child; + } else { + child = elementByID(child, id); + if (child != null) { + return child; + } + } + } + return null; +} + +/** + * Install a gadget. + */ +function gadget(win, doc) { + var ongadget = null; + try { + if (win.parent.ongadget != null && win.parent.ongadget != 'undefined') { + ongadget = win.parent.ongadget; + } + } catch (e) { + } + if (ongadget != null) { + return ongadget(win, doc); + } else { + return doc; + } +} diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace-gadget.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace-gadget.html new file mode 100644 index 0000000000..a4589b42e6 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace-gadget.html @@ -0,0 +1,232 @@ + + + +SCA Domain - Contributions + + + + + + + + +
+ +
+
+
+ >Add +  Delete +
+ + + +
+ + + + diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace.html b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace.html new file mode 100644 index 0000000000..36c02ab1e6 --- /dev/null +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/resources/workspace.html @@ -0,0 +1,65 @@ + + + +SCA Domain - Contributions + + + + + + + +
+
+ + + SCA Domain

+ Contributions 
+
+ Here is the list of SCA contributions currently available in your SCA domain. +

+ +
+ + + + + + + -- cgit v1.2.3