summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sandbox/slaws/modules/domain-model-xml/DISCLAIMER8
-rw-r--r--sandbox/slaws/modules/domain-model-xml/LICENSE205
-rw-r--r--sandbox/slaws/modules/domain-model-xml/NOTICE6
-rw-r--r--sandbox/slaws/modules/domain-model-xml/pom.xml74
-rw-r--r--sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/Constants.java42
-rw-r--r--sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/DomainProcessor.java181
-rw-r--r--sandbox/slaws/modules/domain-model-xml/src/test/java/org/apache/tuscany/sca/domain/model/xml/ReadTestCase.java71
-rw-r--r--sandbox/slaws/modules/domain-model-xml/src/test/resources/org/apache/tuscany/sca/domain/model/xml/test.domain36
-rw-r--r--sandbox/slaws/modules/domain-model/DISCLAIMER8
-rw-r--r--sandbox/slaws/modules/domain-model/LICENSE205
-rw-r--r--sandbox/slaws/modules/domain-model/NOTICE6
-rw-r--r--sandbox/slaws/modules/domain-model/pom.xml49
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Domain.java68
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/DomainFactory.java50
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Node.java65
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java60
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainlFactoryImpl.java46
-rw-r--r--sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java51
-rw-r--r--sandbox/slaws/modules/domain-rework/DISCLAIMER8
-rw-r--r--sandbox/slaws/modules/domain-rework/LICENSE205
-rw-r--r--sandbox/slaws/modules/domain-rework/NOTICE6
-rw-r--r--sandbox/slaws/modules/domain-rework/build-dojo.xml92
-rw-r--r--sandbox/slaws/modules/domain-rework/pom.xml264
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculator.java35
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculatorExtensionPoint.java52
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/DefaultBindingURICalculatorExtensionPoint.java124
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/feed/atom/AtomBindingURICalculator.java41
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingURICalculator.java40
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingURICalculator.java41
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingURICalculator.java41
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingURICalculator.java41
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/ArtifactImpl.java57
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainService.java37
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceImpl.java638
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceInit.java43
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/Launcher.java225
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/NodeService.java34
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeAssigner.java300
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeInfo.java63
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.BindingURICalculator23
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/domain/domain.composite60
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/domain/nodes.composite51
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/sample-calculator.jarbin9079 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-assets.jarbin62028 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-cloud.jarbin38258 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-store.jarbin35539 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/webroot/binding-jsonrpc.js492
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.html105
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.pngbin718 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/webroot/node.pngbin296 -> 0 bytes
-rw-r--r--sandbox/slaws/modules/domain-rework/src/main/resources/webroot/style.css176
-rw-r--r--sandbox/slaws/scatours/calculator.svg329
-rw-r--r--sandbox/slaws/scatours/calendar/pom.xml57
-rw-r--r--sandbox/slaws/scatours/calendar/src/main/java/calendar/Calendar.java28
-rw-r--r--sandbox/slaws/scatours/calendar/src/main/java/calendar/CalendarImpl.java48
-rw-r--r--sandbox/slaws/scatours/calendar/src/main/resources/calendar.composite29
-rw-r--r--sandbox/slaws/scatours/calendar/src/test/java/calendar/CalendarTestCase.java47
-rw-r--r--sandbox/slaws/scatours/currencyconverter/pom.xml57
-rw-r--r--sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverter.java28
-rw-r--r--sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverterImpl.java35
-rw-r--r--sandbox/slaws/scatours/currencyconverter/src/main/resources/currencyconverter.composite29
-rw-r--r--sandbox/slaws/scatours/currencyconverter/src/test/java/currencyconverter/CurrencyConverterTestCase.java47
-rw-r--r--sandbox/slaws/scatours/gettingstarted/pom.xml57
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/client/CurrencyConverterClient.java38
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/client/TripClient.java37
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverter.java30
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverterImpl.java33
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/trip/Trip.java26
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/java/trip/TripImpl.java46
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/resources/currencyconverter.composite29
-rw-r--r--sandbox/slaws/scatours/gettingstarted/src/main/resources/trip.composite34
-rw-r--r--sandbox/slaws/scatours/pom.xml47
72 files changed, 0 insertions, 5636 deletions
diff --git a/sandbox/slaws/modules/domain-model-xml/DISCLAIMER b/sandbox/slaws/modules/domain-model-xml/DISCLAIMER
deleted file mode 100644
index d68a410903..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Tuscany is an effort undergoing incubation at The Apache Software
-Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
-required of all newly accepted projects until a further review indicates that
-the infrastructure, communications, and decision making process have stabilized
-in a manner consistent with other successful ASF projects. While incubation
-status is not necessarily a reflection of the completeness or stability of the
-code, it does indicate that the project has yet to be fully endorsed by the ASF.
-
diff --git a/sandbox/slaws/modules/domain-model-xml/LICENSE b/sandbox/slaws/modules/domain-model-xml/LICENSE
deleted file mode 100644
index 6e529a25c4..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
-
-
diff --git a/sandbox/slaws/modules/domain-model-xml/NOTICE b/sandbox/slaws/modules/domain-model-xml/NOTICE
deleted file mode 100644
index 1325efd8bf..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-${pom.name}
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/sandbox/slaws/modules/domain-model-xml/pom.xml b/sandbox/slaws/modules/domain-model-xml/pom.xml
deleted file mode 100644
index 7d0d4472d9..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/pom.xml
+++ /dev/null
@@ -1,74 +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.
--->
-<project>
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tuscany-domain-model-xml</artifactId>
- <name>Apache Tuscany SCA Domain Model XML</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-domain-model</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>1.0.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- <version>3.2.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/Constants.java b/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/Constants.java
deleted file mode 100644
index 1e3111c029..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/Constants.java
+++ /dev/null
@@ -1,42 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.xml;
-
-import javax.xml.namespace.QName;
-
-/**
- * Constants used in SCA assembly XML files.
- */
-public interface Constants {
-
- String DOMAIN = "domain";
- QName DOMAIN_QNAME = new QName(org.apache.tuscany.sca.assembly.xml.Constants.SCA10_TUSCANY_NS, DOMAIN);
-
- String NODE = "node";
- QName NODE_QNAME = new QName(org.apache.tuscany.sca.assembly.xml.Constants.SCA10_TUSCANY_NS, NODE);
-
- String COMPOSITE = "composite";
- QName COMPOSITE_QNAME = new QName(org.apache.tuscany.sca.assembly.xml.Constants.SCA10_TUSCANY_NS, COMPOSITE);
-
- String CONTRIBUTION = "contribution";
- QName CONTRIBUTION_QNAME = new QName(org.apache.tuscany.sca.assembly.xml.Constants.SCA10_TUSCANY_NS, COMPOSITE);
-
-
-}
diff --git a/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/DomainProcessor.java b/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/DomainProcessor.java
deleted file mode 100644
index 8f39edfa8b..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/src/main/java/org/apache/tuscany/sca/domain/model/xml/DomainProcessor.java
+++ /dev/null
@@ -1,181 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.xml;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Callback;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentProperty;
-import org.apache.tuscany.sca.assembly.ComponentReference;
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.CompositeReference;
-import org.apache.tuscany.sca.assembly.CompositeService;
-import org.apache.tuscany.sca.assembly.ConfiguredOperation;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Contract;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.assembly.OperationsConfigurator;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.Wire;
-import org.apache.tuscany.sca.contribution.Artifact;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.domain.model.Contribution;
-import org.apache.tuscany.sca.domain.model.Domain;
-import org.apache.tuscany.sca.domain.model.DomainFactory;
-import org.apache.tuscany.sca.domain.model.Node;
-import org.apache.tuscany.sca.domain.model.impl.DomainlFactoryImpl;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.w3c.dom.Document;
-
-/**
- * A domain processor.
- *
- * @version $Rev: 615632 $ $Date: 2008-01-27 19:14:25 +0000 (Sun, 27 Jan 2008) $
- */
-public class DomainProcessor extends BaseStAXArtifactProcessor implements Constants, StAXArtifactProcessor<Domain> {
-
- DomainFactory domainFactory;
-
- /**
- * Construct a new domain processor
- *
- * @param extensionProcessor
- */
- public DomainProcessor(StAXArtifactProcessor extensionProcessor) {
- domainFactory = new DomainlFactoryImpl();
- }
-
- /**
- * Read and XML stream and Construct a new domain
- *
- * @param reader the input XML stream
- */
-
- public Domain read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- Domain domain = null;
- Node node = null;
- Contribution contribution = null;
-
- QName name;
-
- // Read the composite document
- while (reader.hasNext()) {
- int event = reader.getEventType();
- switch (event) {
- case START_ELEMENT:
- name = reader.getName();
-
- if (DOMAIN_QNAME.equals(name)) {
-
- // Read a <domain>
- domain = domainFactory.createDomain();
- domain.setDomainURI(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.URI));
-
- } else if (NODE_QNAME.equals(name)) {
-
- // Read a <node>
- node = domainFactory.createNode();
- node.setNodeURI(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.URI));
- domain.getNodes().add(node);
-
- } else if (COMPOSITE_QNAME.equals(name)) {
-
- // Read a <composite>
- QName compositeQName = getQName(reader, org.apache.tuscany.sca.assembly.xml.Constants.NAME);
- node.setCompositeName(compositeQName);
- } else if (CONTRIBUTION_QNAME.equals(name)) {
-
- // Read a <contribution>
- contribution = domainFactory.createContribution();
- contribution.setContributionName(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.NAME));
- domain.getContributions().add(contribution);
- }
-
- break;
-
- case XMLStreamConstants.CHARACTERS:
- break;
-
- case END_ELEMENT:
- name = reader.getName();
-
- // Clear current state when reading end element
- if (NODE_QNAME.equals(name)) {
- node = null;
- } else if (CONTRIBUTION_QNAME.equals(name)) {
- contribution = null;
- }
- break;
- }
-
- // Read the next element
- if (reader.hasNext()) {
- reader.next();
- }
- }
- return domain;
- }
-
- public void write(Domain domain, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
-
- }
-
- public void resolve(Domain domain, ModelResolver resolver) throws ContributionResolveException {
-
-
- }
-
- public QName getArtifactType() {
- return DOMAIN_QNAME;
- }
-
- public Class<Domain> getModelType() {
- return Domain.class;
- }
-}
diff --git a/sandbox/slaws/modules/domain-model-xml/src/test/java/org/apache/tuscany/sca/domain/model/xml/ReadTestCase.java b/sandbox/slaws/modules/domain-model-xml/src/test/java/org/apache/tuscany/sca/domain/model/xml/ReadTestCase.java
deleted file mode 100644
index 42f42cd2c5..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/src/test/java/org/apache/tuscany/sca/domain/model/xml/ReadTestCase.java
+++ /dev/null
@@ -1,71 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.xml;
-
-import java.io.InputStream;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamReader;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
-import org.apache.tuscany.sca.contribution.DefaultContributionFactory;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
-import org.apache.tuscany.sca.policy.DefaultPolicyFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-
-/**
- * Test reading SCA XML assemblies.
- *
- * @version $Rev: 615735 $ $Date: 2008-01-28 06:13:25 +0000 (Mon, 28 Jan 2008) $
- */
-public class ReadTestCase extends TestCase {
-
- private XMLInputFactory inputFactory;
- private DefaultStAXArtifactProcessorExtensionPoint staxProcessors;
- private ExtensibleStAXArtifactProcessor staxProcessor;
-
- @Override
- public void setUp() throws Exception {
-
- inputFactory = XMLInputFactory.newInstance();
- staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
- staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
- }
-
- @Override
- public void tearDown() throws Exception {
- }
-
- public void testReadDomain() throws Exception {
- InputStream is = getClass().getResourceAsStream("test.domain");
- DomainProcessor compositeReader = new DomainProcessor(staxProcessor);
- XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
- assertNotNull(compositeReader.read(reader));
- is.close();
- }
-}
diff --git a/sandbox/slaws/modules/domain-model-xml/src/test/resources/org/apache/tuscany/sca/domain/model/xml/test.domain b/sandbox/slaws/modules/domain-model-xml/src/test/resources/org/apache/tuscany/sca/domain/model/xml/test.domain
deleted file mode 100644
index d7fb2e178c..0000000000
--- a/sandbox/slaws/modules/domain-model-xml/src/test/resources/org/apache/tuscany/sca/domain/model/xml/test.domain
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<domain xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://test"
- xmlns:test="http://test"
- uri="http://localhost:8080/domainA"
- respository="repository">
-
- <node uri="nodeA">
- <composite name="test:compositeA"/>
- <!-- TODO
- <bindingConfiguration name="binding.ws">
- <baseURI>http://localhost:8081/nodeA</baseURI>
- </bindingConfiguration>
- -->
- </node>
-
- <contribution name="sample-calculator.jar"/>
-</domain> \ No newline at end of file
diff --git a/sandbox/slaws/modules/domain-model/DISCLAIMER b/sandbox/slaws/modules/domain-model/DISCLAIMER
deleted file mode 100644
index d68a410903..0000000000
--- a/sandbox/slaws/modules/domain-model/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Tuscany is an effort undergoing incubation at The Apache Software
-Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
-required of all newly accepted projects until a further review indicates that
-the infrastructure, communications, and decision making process have stabilized
-in a manner consistent with other successful ASF projects. While incubation
-status is not necessarily a reflection of the completeness or stability of the
-code, it does indicate that the project has yet to be fully endorsed by the ASF.
-
diff --git a/sandbox/slaws/modules/domain-model/LICENSE b/sandbox/slaws/modules/domain-model/LICENSE
deleted file mode 100644
index 6e529a25c4..0000000000
--- a/sandbox/slaws/modules/domain-model/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
-
-
diff --git a/sandbox/slaws/modules/domain-model/NOTICE b/sandbox/slaws/modules/domain-model/NOTICE
deleted file mode 100644
index 1325efd8bf..0000000000
--- a/sandbox/slaws/modules/domain-model/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-${pom.name}
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/sandbox/slaws/modules/domain-model/pom.xml b/sandbox/slaws/modules/domain-model/pom.xml
deleted file mode 100644
index 1110005f74..0000000000
--- a/sandbox/slaws/modules/domain-model/pom.xml
+++ /dev/null
@@ -1,49 +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.
--->
-<project>
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tuscany-domain-model</artifactId>
- <name>Apache Tuscany SCA Domain Model</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Domain.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Domain.java
deleted file mode 100644
index 95ca8db756..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Domain.java
+++ /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.
- */
-
-package org.apache.tuscany.sca.domain.model;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.Composite;
-
-
-/**
- * A domain. Represents a namespace for SCA applications and comprises
- * a collection of nodes running SCA composites
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public interface Domain {
-
- /**
- * Retrieve the domain uri
- *
- * @return domain uri
- */
- public String getDomainURI();
-
- /**
- * Set the domain uri
- *
- * @param domainURI
- */
- public void setDomainURI(String domainURI);
-
- /**
- * Returns a list of nodes that are part of this domain
- *
- * @return list of nodes in the domain
- */
- public List<Node> getNodes();
-
- /**
- * Returns a list of contributions that are part of this domain
- *
- * @return list of contributions in the domain
- */
- public List<Contribution> getContributions();
-
-}
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/DomainFactory.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/DomainFactory.java
deleted file mode 100644
index adc85cd9e9..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/DomainFactory.java
+++ /dev/null
@@ -1,50 +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.
- */
-
-package org.apache.tuscany.sca.domain.model;
-
-/**
- * A node. Runs SCA composites
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public interface DomainFactory {
-
- /**
- * Create a new domain model
- *
- * @return new domain model
- */
- public Domain createDomain();
-
- /**
- * Create a new node model
- *
- * @return new node model
- */
- public Node createNode();
-
- /**
- * Create a new contribution model
- *
- * @return new contribution model
- */
- public Contribution createContribution();
-
-}
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Node.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Node.java
deleted file mode 100644
index 6288aeee33..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/Node.java
+++ /dev/null
@@ -1,65 +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.
- */
-
-package org.apache.tuscany.sca.domain.model;
-
-import java.io.Externalizable;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * A node. Runs SCA composites
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public interface Node {
-
- /**
- * Retrieve the node uri
- *
- * @return the node uri
- */
- public String getNodeURI();
-
- /**
- * Set the node uri
- *
- * @param nodeURI the node uri
- */
- public void setNodeURI(String nodeURI);
-
- /**
- * Returns the name of the composite for this node
- *
- * @return the name of the composite for this node
- */
- QName getCompositeName();
-
- /**
- * Sets the name of the composite for this node
- *
- * @param name the name of the composite for this node
- */
- void setCompositeName(QName name);
-
-}
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java
deleted file mode 100644
index 9bf429ecd3..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java
+++ /dev/null
@@ -1,60 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.impl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.model.Contribution;
-import org.apache.tuscany.sca.domain.model.Domain;
-import org.apache.tuscany.sca.domain.model.Node;
-
-/**
- * A domain. Represents a namespace for SCA applications and comprises
- * a collection of nodes running SCA composites
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class DomainImpl implements Domain {
-
- private String domainURI;
- private List<Node> nodes = new ArrayList<Node>();
- private List<Contribution> contributions = new ArrayList<Contribution>();
-
- public String getDomainURI(){
- return domainURI;
- }
-
- public void setDomainURI(String domainURI){
- this.domainURI = domainURI;
- }
-
- public List<Node> getNodes(){
- return nodes;
- }
-
- public List<Contribution> getContributions(){
- return contributions;
- }
-}
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainlFactoryImpl.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainlFactoryImpl.java
deleted file mode 100644
index 960bcc73fd..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainlFactoryImpl.java
+++ /dev/null
@@ -1,46 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.impl;
-
-import org.apache.tuscany.sca.domain.model.Contribution;
-import org.apache.tuscany.sca.domain.model.Domain;
-import org.apache.tuscany.sca.domain.model.DomainFactory;
-import org.apache.tuscany.sca.domain.model.Node;
-
-/**
- * The factory used to create domain model elements
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class DomainlFactoryImpl implements DomainFactory {
-
- public Domain createDomain(){
- return new DomainImpl();
- }
-
- public Node createNode(){
- return new NodeImpl();
- }
-
- public Contribution createContribution(){
- return new ContributionImpl();
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java b/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java
deleted file mode 100644
index daec1c0624..0000000000
--- a/sandbox/slaws/modules/domain-model/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java
+++ /dev/null
@@ -1,51 +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.
- */
-
-package org.apache.tuscany.sca.domain.model.impl;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.model.Node;
-
-/**
- * A node. Runs SCA composites
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class NodeImpl implements Node {
-
- private String nodeURI;
- private QName compositeName;
-
- public String getNodeURI(){
- return nodeURI;
- }
-
- public void setNodeURI(String nodeURI){
- this.nodeURI = nodeURI;
- }
-
- public QName getCompositeName() {
- return compositeName;
- }
-
- public void setCompositeName(QName compositeName){
- this.compositeName = compositeName;
- }
-}
diff --git a/sandbox/slaws/modules/domain-rework/DISCLAIMER b/sandbox/slaws/modules/domain-rework/DISCLAIMER
deleted file mode 100644
index 8e5c524323..0000000000
--- a/sandbox/slaws/modules/domain-rework/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Tuscany is an effort undergoing incubation at The Apache Software
-Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
-required of all newly accepted projects until a further review indicates that
-the infrastructure, communications, and decision making process have stabilized
-in a manner consistent with other successful ASF projects. While incubation
-status is not necessarily a reflection of the completeness or stability of the
-code, it does indicate that the project has yet to be fully endorsed by the ASF.
-
diff --git a/sandbox/slaws/modules/domain-rework/LICENSE b/sandbox/slaws/modules/domain-rework/LICENSE
deleted file mode 100644
index 8aa906c321..0000000000
--- a/sandbox/slaws/modules/domain-rework/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
-
-
diff --git a/sandbox/slaws/modules/domain-rework/NOTICE b/sandbox/slaws/modules/domain-rework/NOTICE
deleted file mode 100644
index fdfa0e9faa..0000000000
--- a/sandbox/slaws/modules/domain-rework/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-${pom.name}
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/sandbox/slaws/modules/domain-rework/build-dojo.xml b/sandbox/slaws/modules/domain-rework/build-dojo.xml
deleted file mode 100644
index 6fd9897025..0000000000
--- a/sandbox/slaws/modules/domain-rework/build-dojo.xml
+++ /dev/null
@@ -1,92 +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.
--->
-<project name="DojoZipInstaller">
-
-
- <property name="dojo.version" value="1.0.0"/>
- <property name="unpack.location" value="${basedir}/src/main/resources/webroot/dojo"/>
-
-
- <target name="check-dojo-installed">
- <condition property="already.installed" >
- <available file="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
- </condition>
- <condition property="maven.suffix" value="">
- <os family="unix"/>
- </condition>
- <condition property="maven.suffix" value=".bat">
- <os family="windows"/>
- </condition>
- </target>
-
-
- <target name="check-dojo-unpacked">
- <condition property="already.unpacked" >
- <available file="${unpack.location}"/>
- </condition>
- </target>
-
- <target name="install-dojo" depends="check-dojo-installed" unless="already.installed">
- <mkdir dir="${basedir}/target/dojo-download/"/>
- <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
- dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
- verbose="true"
- usetimestamp="true"/>
- <exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
- <arg line="install:install-file -DgroupId=dojo -DartifactId=dojo -Dversion=${dojo.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"/>
- </exec>
- </target>
-
- <target name="install-dojo-nomaven" depends="check-dojo-installed" unless="already.installed">
- <mkdir dir="${basedir}/target/dojo-download/"/>
- <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
- dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
- verbose="true"
- usetimestamp="true"/>
- <copy file="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
- tofile="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
- </target>
-
-
- <target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked">
- <fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/>
- <mkdir dir="${basedir}/target/dojo-unpack-temp/"/>
- <unzip src="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"
- dest="${basedir}/target/dojo-unpack-temp/"
- overwrite="false">
- <patternset>
- <include name="dojo-release-${dojo.version}/dojo/**"/>
- <exclude name="dojo-release-${dojo.version}/dojo/tests/**"/>
- <include name="dojo-release-${dojo.version}/dijit/**"/>
- <exclude name="dojo-release-${dojo.version}/dojox/**"/>
- <exclude name="dojo-release-${dojo.version}/util/**"/>
- </patternset>
- </unzip>
- <move file="${basedir}/target/dojo-unpack-temp/dojo-release-${dojo.version}"
- tofile="${unpack.location}"
- verbose="true"/>
- <delete dir="${basedir}/target/dojo-unpack-temp/"/>
- </target>
-
-
- <target name="clean-dojo-files">
- <delete dir="${unpack.location}"/>
- </target>
-</project>
diff --git a/sandbox/slaws/modules/domain-rework/pom.xml b/sandbox/slaws/modules/domain-rework/pom.xml
deleted file mode 100644
index f256fbf0ab..0000000000
--- a/sandbox/slaws/modules/domain-rework/pom.xml
+++ /dev/null
@@ -1,264 +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.
--->
-<project>
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-modules</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tuscany-domain-rework</artifactId>
- <name>Apache Tuscany SCA Domain Rework</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-contribution-impl</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-contribution-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-http</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-domain-impl</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-adb</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-node</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-node-runtime</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-node-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-sca-axis2</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonrpc</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-http</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-resource</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-widget</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-workspace</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-workspace-xml</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-workspace-impl</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <!--plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
-
- <dependencies>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.6.5</version>
- </dependency>
- </dependencies>
-
- <executions>
- <execution>
- <id>install-dojo</id>
- <phase>validate</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="./build-dojo.xml" target="install-dojo">
- <property name="localRepository" value="${settings.localRepository}" />
- </ant>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <id>copy-dojo-files</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="./build-dojo.xml" target="unpack-dojo-files">
- <property name="localRepository" value="${settings.localRepository}" />
- </ant>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <id>clean-dojo-files</id>
- <phase>clean</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="./build-dojo.xml" target="clean-dojo-files">
- <property name="localRepository" value="${settings.localRepository}" />
- </ant>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin-->
- </plugins>
- </build>
-</project>
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculator.java
deleted file mode 100644
index c37188a5dd..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculator.java
+++ /dev/null
@@ -1,35 +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.
- */
-
-package org.apache.tuscany.sca.binding;
-
-import org.apache.tuscany.sca.assembly.Binding;
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public interface BindingURICalculator {
-
- public String getBindingType();
-
- public String getProtocol(Binding binding);
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculatorExtensionPoint.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculatorExtensionPoint.java
deleted file mode 100644
index d0148381d6..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/BindingURICalculatorExtensionPoint.java
+++ /dev/null
@@ -1,52 +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.
- */
-package org.apache.tuscany.sca.binding;
-
-import org.apache.tuscany.sca.assembly.Binding;
-
-/**
- * An extension point for binding URI calculators
- *
- * @version $Rev$ $Date$
- */
-public interface BindingURICalculatorExtensionPoint {
-
- /**
- * Add a BindingURICalculator using the contribution type as the key.
- *
- * @param bindingURICalculator The binding URI calculator
- */
- void addBindingURICalculator(BindingURICalculator bindingURICalculator);
-
- /**
- * Remove a BindingURICalculator.
- *
- * @param bindingURICalculator The binding URI calculator
- */
- void removeBindingURICalculator(BindingURICalculator bindingURICalculator);
-
- /**
- * Returns the BindingURICalculator for the given contribution type.
- *
- * @param binding The binding for which the URI calculator is required
- * @return The binding URI calculator
- */
- BindingURICalculator getBindingURICalculator(Binding binding);
-
-} \ No newline at end of file
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/DefaultBindingURICalculatorExtensionPoint.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/DefaultBindingURICalculatorExtensionPoint.java
deleted file mode 100644
index ae8b33a006..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/DefaultBindingURICalculatorExtensionPoint.java
+++ /dev/null
@@ -1,124 +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.
- */
-
-package org.apache.tuscany.sca.binding;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.contribution.service.ContributionException;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.util.ServiceDeclaration;
-import org.apache.tuscany.sca.contribution.util.ServiceDiscovery;
-
-/**
- * Default implementation of a binding URI calculator extension point.
- *
- * @version $Rev$ $Date$
- */
-public class DefaultBindingURICalculatorExtensionPoint implements BindingURICalculatorExtensionPoint {
-
- private Map<String, BindingURICalculator> bindingURICalculators = new HashMap<String, BindingURICalculator>();
- private boolean loaded;
-
- public DefaultBindingURICalculatorExtensionPoint() {
- }
-
- public void addBindingURICalculator(BindingURICalculator bindingURICalculator) {
- bindingURICalculators.put(bindingURICalculator.getBindingType(), bindingURICalculator);
- }
-
- public void removeBindingURICalculator(BindingURICalculator bindingURICalculator) {
- bindingURICalculators.remove(bindingURICalculator.getBindingType());
- }
-
- public BindingURICalculator getBindingURICalculator(Binding binding) {
- loadbindingURICalculators();
- return bindingURICalculators.get(binding.getClass().getName());
- }
-
- private void loadbindingURICalculators() {
- if (loaded)
- return;
-
- // Get the bindingURICalculator service declarations
- Set<ServiceDeclaration> bindingURICalculatorDeclarations;
- try {
- bindingURICalculatorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(BindingURICalculator.class);
- } catch (IOException e) {
- throw new IllegalStateException(e);
- }
-
- for (ServiceDeclaration bindingURICalculatorDeclaration: bindingURICalculatorDeclarations) {
- Map<String, String> attributes = bindingURICalculatorDeclaration.getAttributes();
-
- // Load a URL artifact bindingURICalculator
- String bindingType = attributes.get("binding");
-
- // Create a bindingURICalculator wrapper and register it
- BindingURICalculator bindingURICalculator = new LazyBindingURICalculator(bindingType, bindingURICalculatorDeclaration);
- addBindingURICalculator(bindingURICalculator);
- }
-
- loaded = true;
- }
-
- /**
- * A facade for contribution bindingURICalculators.
- */
- private static class LazyBindingURICalculator implements BindingURICalculator {
-
- private ServiceDeclaration bindingURICalculatorDeclaration;
- private String bindingType;
- private BindingURICalculator bindingURICalculator;
-
- private LazyBindingURICalculator(String contributionType, ServiceDeclaration bindingURICalculatorDeclaration) {
- this.bindingURICalculatorDeclaration = bindingURICalculatorDeclaration;
- this.bindingType = contributionType;
- }
-
- public String getBindingType() {
- return bindingType;
- }
-
- public String getProtocol(Binding binding) {
- return getbindingURICalculator().getProtocol(binding);
- }
-
- private BindingURICalculator getbindingURICalculator() {
- if (bindingURICalculator == null) {
- try {
- Class<BindingURICalculator> bindingURICalculatorClass = (Class<BindingURICalculator>)bindingURICalculatorDeclaration.loadClass();
- Constructor<BindingURICalculator> constructor = bindingURICalculatorClass.getConstructor();
- bindingURICalculator = constructor.newInstance();
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return bindingURICalculator;
- }
- }
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/feed/atom/AtomBindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/feed/atom/AtomBindingURICalculator.java
deleted file mode 100644
index 97aa08f744..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/feed/atom/AtomBindingURICalculator.java
+++ /dev/null
@@ -1,41 +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.
- */
-
-package org.apache.tuscany.sca.binding.feed.atom;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-import org.apache.tuscany.sca.binding.feed.AtomBinding;
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public class AtomBindingURICalculator implements BindingURICalculator {
-
- public String getBindingType(){
- return AtomBinding.class.getName();
- }
-
- public String getProtocol(Binding binding){
- return "http";
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingURICalculator.java
deleted file mode 100644
index 7d0f8fbc26..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingURICalculator.java
+++ /dev/null
@@ -1,40 +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.
- */
-
-package org.apache.tuscany.sca.binding.http;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public class HTTPBindingURICalculator implements BindingURICalculator {
-
- public String getBindingType(){
- return HTTPBinding.class.getName();
- }
-
- public String getProtocol(Binding binding){
- return "http";
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingURICalculator.java
deleted file mode 100644
index 1debd96286..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingURICalculator.java
+++ /dev/null
@@ -1,41 +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.
- */
-
-package org.apache.tuscany.sca.binding.jsonrpc;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public class JSONRPCBindingURICalculator implements BindingURICalculator {
-
- public String getBindingType(){
- return JSONRPCBinding.class.getName();
- }
-
- public String getProtocol(Binding binding){
- return "http";
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingURICalculator.java
deleted file mode 100644
index 60b693f96b..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingURICalculator.java
+++ /dev/null
@@ -1,41 +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.
- */
-
-package org.apache.tuscany.sca.binding.sca;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.SCABinding;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public class SCABindingURICalculator implements BindingURICalculator {
-
- public String getBindingType(){
- return SCABinding.class.getName();
- }
-
- public String getProtocol(Binding binding){
- return "http";
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingURICalculator.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingURICalculator.java
deleted file mode 100644
index 515188b011..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingURICalculator.java
+++ /dev/null
@@ -1,41 +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.
- */
-
-package org.apache.tuscany.sca.binding.ws.axis2;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-
-/**
- * A class with binding specific functions related to binding URI calculation
- *
- * @version $Rev$ $Date$
- */
-public class Axis2BindingURICalculator implements BindingURICalculator {
-
- public String getBindingType(){
- return WebServiceBinding.class.getName();
- }
-
- public String getProtocol(Binding binding){
- return "http";
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/ArtifactImpl.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/ArtifactImpl.java
deleted file mode 100644
index ceff209344..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/ArtifactImpl.java
+++ /dev/null
@@ -1,57 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.management.ContributionInfo;
-/**
- * Information relating to an exposed artifact in the contribution or composite
- *
- * @version $Rev$ $Date$
- */
-public class ArtifactImpl implements Serializable {
-
- static final long serialVersionUID = 7669181086005969428L;
-
- private String name;
- private String URL;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name){
- this.name = name;
- }
-
- public String getURL() {
- return URL;
- }
-
- public void setURL(String URL){
- this.URL = URL;
- }
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainService.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainService.java
deleted file mode 100644
index 62dbe2c77b..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainService.java
+++ /dev/null
@@ -1,37 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * Domain level operations
- *
- * @version $Rev$ $Date$
- */
-@Remotable
-public interface DomainService {
-
- public List<ArtifactImpl> getContributions();
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceImpl.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceImpl.java
deleted file mode 100644
index 876e1be73a..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceImpl.java
+++ /dev/null
@@ -1,638 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.Artifact;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.DefaultContributionFactory;
-import org.apache.tuscany.sca.contribution.Export;
-import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.java.JavaExport;
-import org.apache.tuscany.sca.contribution.java.JavaImport;
-import org.apache.tuscany.sca.contribution.namespace.NamespaceExport;
-import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
-import org.apache.tuscany.sca.contribution.processor.ExtensiblePackageProcessor;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.PackageProcessor;
-import org.apache.tuscany.sca.contribution.processor.PackageProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.contribution.service.ContributionException;
-import org.apache.tuscany.sca.contribution.service.ContributionListenerExtensionPoint;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionRepository;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.contribution.service.ExtensibleContributionListener;
-import org.apache.tuscany.sca.contribution.service.TypeDescriber;
-import org.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryImpl;
-import org.apache.tuscany.sca.contribution.service.impl.PackageTypeDescriberImpl;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor;
-import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
-import org.apache.tuscany.sca.implementation.node.NodeImplementation;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-import org.apache.tuscany.sca.workspace.DefaultWorkspaceFactory;
-import org.apache.tuscany.sca.workspace.Workspace;
-import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.configuration.impl.NodeAssigner;
-import org.apache.tuscany.sca.workspace.configuration.impl.NodeInfo;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-import org.osoa.sca.ServiceRuntimeException;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * Stores details of services exposed and retrieves details of remote services
- *
- * @version $Rev$ $Date$
- */
-@Scope("COMPOSITE")
-@Service(interfaces = {DomainServiceInit.class, DomainService.class})
-public class DomainServiceImpl implements DomainServiceInit, DomainService {
-
- private final static Logger logger = Logger.getLogger(DomainServiceImpl.class.getName());
-
- private ReallySmallRuntime runtime;
- private String domainURI;
-
- private File uploaded;
- private File repository;
-
- private ExtensionPointRegistry registry;
-
- private ContributionFactory contributionFactory;
- private ContributionRepository contributionRepository;
-
- private WorkspaceFactory workspaceFactory;
- private Workspace contributionWorkspace;
-
- private XMLInputFactory xmlFactory;
- private XMLOutputFactory xmlOutputFactory;
-
- private PackageProcessor packageProcessor;
-
- private ExtensibleURLArtifactProcessor artifactProcessor;
-
- private ExtensibleStAXArtifactProcessor staxProcessor;
-
- private ExtensibleContributionListener contributionListener;
-
- private ModelResolverExtensionPoint modelResolvers;
-
- private ModelFactoryExtensionPoint modelFactories;
-
- private AssemblyFactory assemblyFactory;
-
- private ModelResolver domainModelResolver;
-
- private CompositeBuilder compositeBuilder;
-
- private CompositeProcessor compositeProcessor;
-
- private PolicyFactory policyFactory;
-
- private DocumentBuilder documentBuilder;
-
- private Composite domainComposite;
-
- @Property
- protected String repositoryLocation;
-
- //@Reference
- //protected Collection<NodeService> nodes;
-
- public DomainServiceImpl(){
- }
-
- // from tuscany-runtime
- private List<URL> getJARsInFolder(File repository) {
-
- String[] jarNames = repository.list(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return name.endsWith(".jar");
- }
- });
-
- List<URL> contributionJars = new ArrayList<URL>();
- if (jarNames != null) {
- for (String jar : jarNames) {
- try {
- contributionJars.add(new File(repository, jar).toURL());
- } catch (MalformedURLException e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- return contributionJars;
- }
-
- // from domain impl
- private String getComposite(Composite composite){
- ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
-
- StAXArtifactProcessorExtensionPoint staxProcessors =
- registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-
- StAXArtifactProcessor<Composite> processor = staxProcessors.getProcessor(Composite.class);
-
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
- //outputFactory.setProperty("javax.xml.stream.isPrefixDefaulting",Boolean.TRUE);
- XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos);
-
- processor.write(composite, writer);
- writer.flush();
- writer.close();
- } catch (Exception ex) {
- System.out.println(ex.toString());
- }
-
- String compositeString = bos.toString();
-
- return compositeString;
- }
-
- // from ContributionService
- private void findContributionArtifacts(Contribution contribution){
- try {
- // read contribution meta data
- URL contributionURL = new URL(contribution.getLocation());
- URL[] clUrls = {contributionURL};
- URLClassLoader cl = new URLClassLoader(clUrls, null);
-
- ContributionMetadataDocumentProcessor metadataDocumentProcessor =
- new ContributionMetadataDocumentProcessor(staxProcessor, xmlFactory);
-
- for (String path: new String[]{
- Contribution.SCA_CONTRIBUTION_GENERATED_META,
- Contribution.SCA_CONTRIBUTION_META}) {
- URL url = cl.getResource(path);
- if (url != null) {
- Contribution tmpContribution = metadataDocumentProcessor.read(contributionURL, URI.create(path), url);
- contribution.getImports().addAll(tmpContribution.getImports());
- contribution.getExports().addAll(tmpContribution.getExports());
- contribution.getDeployables().addAll(tmpContribution.getDeployables());
- }
- }
-
- // set the model resolver
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, domainModelResolver);
- contribution.setModelResolver(modelResolver);
-
- // find all the contribution artifacts
- InputStream contributionStream = contributionURL.openStream();
- List<URI> contributionArtifacts = this.packageProcessor.getArtifacts(contributionURL, contributionStream);
-
- // add the artifacts to the contribution model
- for (URI anArtifactUri : contributionArtifacts) {
- URL artifactURL = packageProcessor.getArtifactURL(new URL(contribution.getLocation()), anArtifactUri);
- System.out.println(" Artifact URL: " + artifactURL.toString());
- Artifact artifact = contributionFactory.createArtifact();
- artifact.setURI(anArtifactUri.toString());
- artifact.setLocation(artifactURL.toString());
- contribution.getArtifacts().add(artifact);
- modelResolver.addModel(artifact);
- }
-
- } catch(Exception ex){
- logger.warning(ex.toString());
- }
- }
-
- private void readContributionArtifacts(Contribution contribution){
- try {
- // add the artifacts to the contribution model
- for (Artifact artifact : contribution.getArtifacts()) {
- Object model = null;
-
- // WARNING - I've missed out Venkat's "applies to" function to make life a
- // little clearer
- model = artifactProcessor.read(new URL(contribution.getLocation()),
- new URI(artifact.getURI()),
- new URL(artifact.getLocation()));
-
- if (model != null) {
- artifact.setModel(model);
-
- // Add the loaded model to the model resolver
- contribution.getModelResolver().addModel(model);
-
- if ( model instanceof Composite) {
- ((Composite)model).setURI(artifact.getURI());
- }
-
- /*
- if ( model instanceof SCADefinitions ) {
- contributionSCADefinitions.add((SCADefinitions)model);
- updatePolicySetMap((SCADefinitions)model);
- }
- */
- }
-
- }
-
- } catch(Exception ex){
- logger.warning(ex.toString());
- }
- }
-
- private void resolveContributionArtifacts(Contribution contribution){
- try {
- for (Artifact artifact : contribution.getArtifacts()) {
- // resolve the model object
- if (/*(artifact.getURI().endsWith(".composite") == false) &&*/ (artifact.getModel() != null)) {
- artifactProcessor.resolve(artifact.getModel(), contribution.getModelResolver());
- }
- }
- } catch(Exception ex){
- logger.warning(ex.toString());
- }
- }
-
- /*
- private void resolveComposite(Contribution contribution, Composite composite){
- try {
- artifactProcessor.resolve(composite, contribution.getModelResolver());
- } catch(Exception ex){
- logger.warning(ex.toString());
- }
- }
- */
-
-
-
-
- /**
- * A test method to fire up the various steps in the process of handling contributions
- * So I can get to the stage of being able to process contributions
- * TODO - replace with real workspace that Sebastien is working on
- */
- public void test(){
-
- try {
- // set up the repository where contributions will be stored
- repository = new File(repositoryLocation);
-
- if ((!repository.exists()) || (!repository.isDirectory())){
- logger.warning("Can't find repository - " + repositoryLocation);
- }
-
- // set up the dummy location where contributions are uploaded to
- String uploadedLocation = repository.getParent() + "/uploaded";
- uploaded = new File(uploadedLocation);
-
- if ((!uploaded.exists()) || (!uploaded.isDirectory())){
- logger.warning("Can't find uploaded dir");
- }
-
- // create the repository and the workspace
- contributionRepository = new ContributionRepositoryImpl(repositoryLocation,
- XMLInputFactory.newInstance());
- contributionWorkspace = workspaceFactory.createWorkspace();
-
-
- // pretend that contributions are being added by reading the list of jars in the
- // uploaded dir
- List<URL> contributionJars = getJARsInFolder(uploaded);
-
- // copy uploaded contributions to the repository
- // TODO - no clear how this relates to the workspace. Need more info on workspace
- // but for now just create a contribution model and add to the workspace
- for (URL contributionURL : contributionJars){
- String contributionName = new File(contributionURL.toURI()).getName();
- System.out.println("Processing: " + contributionName);
-
- contributionRepository.store(contributionName, contributionURL);
-
- Contribution contribution = contributionFactory.createContribution();
- contribution.setURI(contributionName);
- contribution.setLocation(contributionURL.toString());
-
- contributionWorkspace.getContributions().add(contribution);
- }
-
- // find the artifacts in the contributions in the workspace
- for (Contribution contribution : contributionWorkspace.getContributions()){
- findContributionArtifacts(contribution);
- }
-
- // read the artifacts in the contributions in the workspace
- for (Contribution contribution : contributionWorkspace.getContributions()){
- readContributionArtifacts(contribution);
- }
-
- // resolve the artifacts in the contributions in the workspace
- for (Contribution contribution : contributionWorkspace.getContributions()){
- resolveContributionArtifacts(contribution);
- }
-
- /*
- // parse the contributions into a model
- for (URL contributionURL : contributions){
-
- Contribution contribution = runtime.getContributionService().contribute(new File(contributionURL.toURI()).getName(),
- contributionURL,
- false);
- // workspace or repository?
- //contributionRepository.addContribution(contribution);
- contributionWorkspace.getContributions().add(contribution);
- }
- */
-
- // For interest look at contribution contents
- for (Contribution contribution : contributionWorkspace.getContributions()){
- System.out.println("Contribution URI: " + contribution.getURI());
-
- for (Artifact artifact : contribution.getArtifacts()){
- System.out.println(" Artifact URI: " + artifact.getURI().toString());
- }
-
- // report which contribution satisfies which import
- for (Import anImport : contribution.getImports()){
- if (anImport instanceof JavaImport){
- System.out.println(" Java Import: " + ((JavaImport)anImport).getPackage());
- }
- if (anImport instanceof NamespaceImport){
- System.out.println(" Namespace Import: " + ((NamespaceImport)anImport).getNamespace());
- }
- /*
- for (Contribution importContribution : anImport.getExportContributions()){
- System.out.println(" Import contribution: " + importContribution.getURI().toString());
- }
- */
- }
-
- for (Export anExport : contribution.getExports()){
- if (anExport instanceof JavaExport){
- System.out.println(" Java Export: " + ((JavaExport)anExport).getPackage());
- }
- if (anExport instanceof NamespaceExport){
- System.out.println(" Namespace Export: " + ((NamespaceExport)anExport).getNamespace());
- }
- }
-
- for (Composite composite : contribution.getDeployables()){
- System.out.println(" Deployable Composite URI: " + composite.getName().toString());
- }
- }
-
- // create a domain level virtual composite
- AssemblyFactory assemblyFactory = runtime.getAssemblyFactory();
- domainComposite = assemblyFactory.createComposite();
- domainComposite.setName(new QName(Constants.SCA10_NS, "domainComposite"));
- domainComposite.setURI(domainURI);
-
- // Use the deployable composite list to find the composites to load into the domain
- // TODO - there will be some selection process here
- for (Contribution contribution : contributionWorkspace.getContributions()){
- for (Composite deployableComposite : contribution.getDeployables()) {
- Composite deployable = contribution.getModelResolver().resolveModel(Composite.class, deployableComposite);
- domainComposite.getIncludes().add(deployable);
- }
- }
-
-
- System.out.println("\nVANILLA");
- System.out.println("========================================================================");
- writeComposite(domainComposite);
- for (Composite composite : domainComposite.getIncludes()){
- writeComposite(composite);
- }
-
- // assign individual deployed composites to nodes
- // Use the node model on disc to do this in lieu of user input
- URL contributionURL = DomainServiceImpl.class.getClassLoader().getResource("domain/nodes.composite");
- Contribution contribution = contributionFactory.createContribution();
- contribution.setURI("nodes");
- String contributionURLString = contributionURL.toString();
- contribution.setLocation(contributionURLString.substring(0, contributionURLString.lastIndexOf("nodes.composite")));
-
- findContributionArtifacts(contribution);
- readContributionArtifacts(contribution);
- resolveContributionArtifacts(contribution);
-
- // find node.composite
- Artifact nodeArtifact = null;
- for (Artifact artifact : contribution.getArtifacts()){
- System.out.println(" Artifact URI: " + artifact.getURI());
- if (artifact.getURI().equals("nodes.composite")){
- nodeArtifact = artifact;
- }
- }
-
- Composite nodes = (Composite)nodeArtifact.getModel();
-
- // Configure the endpoints of services based on the defaults found in the
- // nodes configuration
- NodeAssigner nodeAssigner = new NodeAssigner(registry);
-
- for (Component node : nodes.getComponents()){
- QName compositeName = ((NodeImplementation)node.getImplementation()).getComposite().getName();
-
- Composite compositeModel = null;
-
- // find the named composite in the domain
- for (Composite deployable : domainComposite.getIncludes()){
- if (deployable.getName().equals(compositeName)){
- compositeModel = deployable;
- break;
- }
- }
-
- if (compositeModel != null){
- // configure the composite
-
- NodeInfo nodeInfo = new NodeInfo(node);
- nodeAssigner.assignEndpointsToServiceBinding(nodeInfo, compositeModel, null);
- }
- }
-
- System.out.println("\nAFTER ENDPOINT INITIALIZATION");
- System.out.println("========================================================================");
- writeComposite(domainComposite);
- for (Composite composite : domainComposite.getIncludes()){
- writeComposite(composite);
- }
-
- // build the domain composite
- compositeBuilder.build(domainComposite);
-
- // print out the domain composite
- System.out.println("\nAFTER BUILDING");
- System.out.println("========================================================================");
- writeComposite(domainComposite);
- for (Composite composite : domainComposite.getIncludes()){
- writeComposite(composite);
- }
-
- // remove the contributions from the repository
- for (URL jarURL : contributionJars){
- contributionRepository.remove(new File(jarURL.toURI()).getName());
- }
-
- } catch (Exception ex) {
- logger.warning(ex.toString());
- }
-
- }
-
- private void writeComposite(Composite composite) throws Exception {
- // First write to a byte stream
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- XMLStreamWriter writer = xmlOutputFactory.createXMLStreamWriter(bos);
- compositeProcessor.write(composite, writer);
-
- // Parse again to pretty format the document
- Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray()));
-
- OutputFormat format = new OutputFormat();
- format.setIndenting(true);
- format.setIndent(2);
-
- // Write to domain.composite
- //FileOutputStream os = new FileOutputStream(new File(compositeFileName));
- XMLSerializer serializer = new XMLSerializer(System.out, format);
- serializer.serialize(document);
-
- }
-
- // DomainServiceInit methods
- public void setDomainURI(String domainURI){
- this.domainURI = domainURI;
- }
-
- // We use an existing runtime to save much repeated work in this test class
- // TODO - look at how we get hold of these things for real
- public void setRuntime(ReallySmallRuntime domainRuntime){
- try {
- this.runtime = domainRuntime;
-
- registry = runtime.getExtensionPointRegistry();
-
- xmlFactory = XMLInputFactory.newInstance();
-
- TypeDescriber describer = new PackageTypeDescriberImpl();
- packageProcessor = new ExtensiblePackageProcessor(registry.getExtensionPoint(PackageProcessorExtensionPoint.class), describer);
-
- artifactProcessor = new ExtensibleURLArtifactProcessor(registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class));
-
- staxProcessor = new ExtensibleStAXArtifactProcessor(registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class), xmlFactory, XMLOutputFactory.newInstance());
-
- contributionListener = new ExtensibleContributionListener(registry.getExtensionPoint(ContributionListenerExtensionPoint.class));
-
- modelResolvers = registry.getExtensionPoint(ModelResolverExtensionPoint.class);
-
- modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
-
- assemblyFactory = runtime.getAssemblyFactory();
-
- contributionFactory = new DefaultContributionFactory();
-
- workspaceFactory = new DefaultWorkspaceFactory();
-
- URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
- SCADefinitionsDocumentProcessor definitionsDocumentProcessor = (SCADefinitionsDocumentProcessor)documentProcessors.getProcessor(SCADefinitions.class);
- domainModelResolver = definitionsDocumentProcessor.getSCADefinitionsResolver();
-
- compositeBuilder = runtime.getCompositeBuilder();
-
- policyFactory = modelFactories.getFactory(PolicyFactory.class);
- compositeProcessor = new CompositeProcessor(contributionFactory, assemblyFactory, policyFactory, staxProcessor);
-
- xmlOutputFactory = modelFactories.getFactory(XMLOutputFactory.class);
-
- documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-
- /*
- this.domainResolver = domainResolver;
- this.systemSCADefinitions = scaDefinitions;
- */
-
- } catch (Exception ex) {
- System.out.println("Exception setting runtime on domain service " + ex.toString());
- }
- }
-
- // DomainService methods
- public List<ArtifactImpl> getContributions(){
- List<ArtifactImpl> artifacts = new ArrayList<ArtifactImpl>();
-
- for (Contribution contribution : contributionWorkspace.getContributions()){
- ArtifactImpl artifact = new ArtifactImpl();
-
- artifact.setName(contribution.getURI());
- artifact.setURL(contribution.getLocation());
- artifacts.add(artifact);
- }
-
- return artifacts;
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceInit.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceInit.java
deleted file mode 100644
index 1df7cf1e57..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/DomainServiceInit.java
+++ /dev/null
@@ -1,43 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.domain.DomainException;
-import org.apache.tuscany.sca.domain.management.DomainInfo;
-import org.apache.tuscany.sca.domain.management.NodeInfo;
-import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * Domain configuration operations
- *
- * @version $Rev$ $Date$
- */
-public interface DomainServiceInit {
-
- public void setRuntime(ReallySmallRuntime domainRuntime);
- public void setDomainURI(String domainURI);
-
-
- public void test();
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/Launcher.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/Launcher.java
deleted file mode 100644
index 2ec8d23222..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/Launcher.java
+++ /dev/null
@@ -1,225 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import java.io.ByteArrayOutputStream;
-import java.io.Externalizable;
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.CompositeService;
-import org.apache.tuscany.sca.assembly.SCABinding;
-import org.apache.tuscany.sca.assembly.SCABindingFactory;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.builder.DomainBuilder;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.Artifact;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.DeployedArtifact;
-import org.apache.tuscany.sca.contribution.Export;
-import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.assembly.ActivationException;
-import org.apache.tuscany.sca.core.context.ServiceReferenceImpl;
-import org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter.Base64Binary;
-import org.apache.tuscany.sca.domain.DomainException;
-import org.apache.tuscany.sca.domain.SCADomain;
-import org.apache.tuscany.sca.domain.SCADomainEventService;
-import org.apache.tuscany.sca.domain.SCADomainSPI;
-import org.apache.tuscany.sca.domain.management.SCADomainManagerInitService;
-import org.apache.tuscany.sca.domain.model.CompositeModel;
-import org.apache.tuscany.sca.domain.model.ContributionModel;
-import org.apache.tuscany.sca.domain.model.DomainModel;
-import org.apache.tuscany.sca.domain.model.DomainModelFactory;
-import org.apache.tuscany.sca.domain.model.NodeModel;
-import org.apache.tuscany.sca.domain.model.ServiceModel;
-import org.apache.tuscany.sca.domain.model.NodeModel.LifecyleState;
-import org.apache.tuscany.sca.domain.model.impl.DomainModelFactoryImpl;
-import org.apache.tuscany.sca.domain.model.impl.NodeModelImpl;
-import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
-import org.apache.tuscany.sca.host.http.ServletHost;
-import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-import org.apache.tuscany.sca.node.NodeException;
-import org.apache.tuscany.sca.node.NodeFactoryImpl;
-import org.apache.tuscany.sca.node.util.SCAContributionUtil;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.osoa.sca.CallableReference;
-import org.osoa.sca.ServiceReference;
-import org.osoa.sca.ServiceRuntimeException;
-
-/**
- * The SCA domain repository that manages domain contributions
- *
- * @version $Rev$ $Date$
- */
-public class Launcher {
-
- private final static Logger logger = Logger.getLogger(Launcher.class.getName());
-
-
- // class loader used to get the runtime going
- private ClassLoader domainClassLoader;
-
- // domain management application runtime
- private ReallySmallRuntime domainRepositoryRuntime;
- private ContributionService domainRepositoryContributionService;
- private Contribution domainRepositoryContribution;
- private Composite domainRepositoryComposite;
-
- // domain service
- private DomainServiceInit domainService;
-
- // Implementation methods
-
- /**
- * Create a domain giving the URI for the domain.
- *
- * @throws DomainException
- */
- public Launcher() throws DomainException {
- this.domainClassLoader = Launcher.class.getClassLoader();
- init();
- }
-
- /**
- * Create a runtime for the repository app
- * TODO: we need a better wrapper for this that isn't an SCADomain - too confusing!
- */
- protected void init() throws DomainException {
- try {
-
- // create a runtime for the domain repository services to run on
- domainRepositoryRuntime = new ReallySmallRuntime(domainClassLoader);
- domainRepositoryRuntime.start();
-
- // Create an in-memory domain level management composite
- AssemblyFactory assemblyFactory = domainRepositoryRuntime.getAssemblyFactory();
- domainRepositoryComposite = assemblyFactory.createComposite();
- domainRepositoryComposite.setName(new QName(Constants.SCA10_NS, "domainManagement"));
- domainRepositoryComposite.setURI("domainManagement");
-
- // Find the composite that will configure the domain
- String domainCompositeName = "domain/domain.composite";
- URL contributionURL = SCAContributionUtil.findContributionFromResource(domainClassLoader, domainCompositeName);
-
-
- if ( contributionURL != null ){
- logger.log(Level.INFO, "Domain configured from " + contributionURL);
-
- // add domain.composite to the management domain
- domainRepositoryContributionService = domainRepositoryRuntime.getContributionService();
- Contribution contribution = null;
- contribution = domainRepositoryContributionService.contribute("domainRepository",
- contributionURL,
- false);
-
- // update the runtime for all SCA Definitions processed from the contribution.
- // so that the policyset determination done during 'build' has the all the defined
- // intents and policysets from the management contribution
- domainRepositoryRuntime.updateSCADefinitions(domainRepositoryContributionService.getContributionSCADefinitions());
-
- Composite composite = null;
- for (Artifact artifact: contribution.getArtifacts()) {
- if (domainCompositeName.equals(artifact.getURI())) {
- composite = (Composite)artifact.getModel();
- }
- }
-
- if (composite != null) {
-
- domainRepositoryRuntime.buildComposite(composite);
- domainRepositoryRuntime.getCompositeActivator().activate(composite);
- domainRepositoryRuntime.getCompositeActivator().start(composite);
-
- // find the domain service
- Component component = null;
-
- for (Component compositeComponent: composite.getComponents()) {
- if (compositeComponent.getName().equals("DomainService")) {
- component = compositeComponent;
- }
- }
-
- RuntimeComponentContext componentContext = ((RuntimeComponent)component).getComponentContext();
- domainService = componentContext.createSelfReference(DomainServiceInit.class, "DomainServiceInit").getService();
-
- // set up the domain service. Could work out what the URI
- // is by looking at the service URL or could put it in the
- // config file
- domainService.setDomainURI("http://localhost:8080");
- domainService.setRuntime(domainRepositoryRuntime);
-
- } else {
- throw new ActivationException("Domain repository contribution " +
- contributionURL +
- " found but could not be loaded");
- }
- } else {
- throw new ActivationException("Domain repository contribution " +
- domainCompositeName +
- " not found on the classpath");
- }
-
-
- } catch(Exception ex) {
- throw new DomainException(ex);
- }
- }
-
- public static void main(String[] args) throws Exception {
- System.out.println("Starting ...");
-
- Launcher domainLauncher = new Launcher();
-
- System.out.println("domain repository started");
-
- // start contribution processing
- domainLauncher.domainService.test();
-
- System.out.println("Running ...");
- // System.in.read();
-
-
- System.out.println("Stopping ...");
- }
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/NodeService.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/NodeService.java
deleted file mode 100644
index 564cdeca65..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/domain/rework/NodeService.java
+++ /dev/null
@@ -1,34 +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.
- */
-
-package org.apache.tuscany.sca.domain.rework;
-
-import org.apache.tuscany.sca.domain.management.DomainInfo;
-import org.apache.tuscany.sca.domain.management.NodeInfo;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * Node configuration operations
- *
- * @version $Rev$ $Date$
- */
-@Remotable
-public interface NodeService {
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeAssigner.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeAssigner.java
deleted file mode 100644
index 13de5db234..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeAssigner.java
+++ /dev/null
@@ -1,300 +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.
- */
-
-package org.apache.tuscany.sca.workspace.configuration.impl;
-
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Logger;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentProperty;
-import org.apache.tuscany.sca.assembly.ComponentReference;
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.SCABinding;
-import org.apache.tuscany.sca.assembly.SCABindingFactory;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.builder.ComponentPreProcessor;
-import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
-import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.binding.BindingURICalculator;
-import org.apache.tuscany.sca.binding.DefaultBindingURICalculatorExtensionPoint;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.Export;
-import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.host.http.ServletMappingException;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.workspace.Workspace;
-
-/**
- * Changes the configuration of a composite to effect assignment to a node
- *
- * @version $Rev$ $Date$
- */
-public class NodeAssigner {
-
- private final static Logger logger = Logger.getLogger(NodeAssigner.class.getName());
-
- SCABindingFactory scaBindingFactory;
- IntentAttachPointTypeFactory intentAttachPointTypeFactory;
- DefaultBindingURICalculatorExtensionPoint bindingURICalcualtorExtensionPoint;
-
- /**
- * Constructs a new NodeAssigner
- */
- public NodeAssigner(ExtensionPointRegistry registry) {
-
- //Get factory extension point
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
-
- scaBindingFactory = factories.getFactory(SCABindingFactory.class);
- IntentAttachPointTypeFactory intentAttachPointTypeFactory = factories.getFactory(IntentAttachPointTypeFactory.class);
-
- //InterfaceContractMapper mapper = new InterfaceContractMapperImpl();
-
- bindingURICalcualtorExtensionPoint = new DefaultBindingURICalculatorExtensionPoint();
- }
-
-
- public void assignEndpointsToServiceBinding(NodeInfo nodeInfo, Composite composite, String uri){
-
- String parentComponentURI = uri;
-
- // Process nested composites recursively
- for (Component component : composite.getComponents()) {
-
- // Initialize component URI
- String componentURI;
- if (parentComponentURI == null) {
- componentURI = component.getName();
- } else {
- componentURI = URI.create(parentComponentURI + '/').resolve(component.getName()).toString();
- }
- component.setURI(componentURI);
-
- Implementation implementation = component.getImplementation();
- if (implementation instanceof Composite) {
-
- // Process nested composite
- assignEndpointsToServiceBinding(nodeInfo, (Composite)implementation, componentURI);
- }
- }
-
- // Initialize composite service binding URIs
- List<Service> compositeServices = composite.getServices();
- for (Service service : compositeServices) {
- // Set default binding names
-
- // Create default SCA binding
- if (service.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
- service.getBindings().add(scaBinding);
- }
-
- // Initialize binding names and URIs
- for (Binding binding : service.getBindings()) {
- constructBindingName(service, binding);
- constructBindingURI(parentComponentURI, composite, service, binding, nodeInfo);
- }
- }
-
- // Initialize component service binding URIs
- for (Component component : composite.getComponents()) {
- for (ComponentService service : component.getServices()) {
-
- // Create default SCA binding
- if (service.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
- service.getBindings().add(scaBinding);
- }
-
- // Initialize binding names and URIs
- for (Binding binding : service.getBindings()) {
-
- constructBindingName(service, binding);
- constructBindingURI(component, service, binding, nodeInfo);
- }
- }
- }
- }
-
- private SCABinding createSCABinding() {
- SCABinding scaBinding = scaBindingFactory.createSCABinding();
- IntentAttachPointType bindingType = intentAttachPointTypeFactory.createBindingType();
- bindingType.setName(Constants.BINDING_SCA_QNAME);
- bindingType.setUnresolved(true);
- ((PolicySetAttachPoint)scaBinding).setType(bindingType);
-
- return scaBinding;
- }
-
- private void constructBindingName(Service service, Binding binding){
-
- // set the default binding name if one is required
- // if there is no name on the binding then set it to the service name
- if (binding.getName() == null){
- binding.setName(service.getName());
-
- // if multiple bindings don't have a name raise an error as
- // binding must be uniquely named
- for (Binding serviceBinding : service.getBindings()){
- if ((!binding.equals(serviceBinding)) &&
- (serviceBinding.getName().equals(service.getName()))){
- // TODO collate errors
- logger.warning("Multiple bindings for service " + service.getName() + " have no name");
- }
- }
- }
- }
-
- /**
- * URI construction from Assembly spec section 1.7.2
- * @return
- */
- private void constructBindingURI(String parentComponentURI, Composite composite, Service service, Binding binding, NodeInfo nodeInfo ) {
- // This is a composite service so there is no component to provide a component URI
- // The path to this composite (through nested composites) is used.
- constructBindingURI(parentComponentURI, service, binding, composite.getServices().size() > 1, nodeInfo);
- }
-
- private void constructBindingURI(Component component, Service service, Binding binding, NodeInfo nodeInfo ) {
- String componentURIString = null;
-
- // if a URI is specified on the component use it otherwise use the component name
- if (component.getURI() != null){
- componentURIString = component.getURI();
- } else {
- componentURIString = component.getName();
- }
-
- constructBindingURI(componentURIString, service, binding, component.getServices().size() > 1, nodeInfo);
- }
-
- private void constructBindingURI(String componentURIString, Service service, Binding binding, boolean includeServiceBindingURI, NodeInfo nodeInfo ){
-
- try {
- URI baseURI = null;
- URI componentURI = null;
- URI serviceBindingURI = null;
-
- // calculate the service binding URI
- if (binding.getURI() == null){
- serviceBindingURI = new URI(binding.getName());
- } else {
- serviceBindingURI = new URI(binding.getURI());
- }
-
- // if the user has provided an absolute binding URI then use it
- if (serviceBindingURI != null && serviceBindingURI.isAbsolute()){
- binding.setURI(serviceBindingURI.toString());
- return;
- }
-
- // calculate the component URI
- if (componentURIString != null) {
- componentURI = new URI(componentURIString);
- } else {
- componentURI = null;
- }
-
- // if the user has provided an absolute component URI then use it
- if (componentURI != null && componentURI.isAbsolute()){
- binding.setURI(concatenateModelURI(null, componentURI, serviceBindingURI, includeServiceBindingURI).toString());
- return;
- }
-
- // calculate the base URI
-
- // get the protocol for this binding/URI
- BindingURICalculator uriCalculator = bindingURICalcualtorExtensionPoint.getBindingURICalculator(binding);
-
- if (uriCalculator != null){
- logger.warning("Binding calculator found for binding " + binding.getName() + " " + binding.getClass().getName());
- String protocol = uriCalculator.getProtocol(binding);
-
- // find the default binding with the right protocol
- Binding defaultBinding = nodeInfo.getBindingDefault(binding, protocol);
-
- if (defaultBinding != null){
- baseURI = new URI(defaultBinding.getURI());
- } else {
- baseURI = null;
- }
-
- } else {
- logger.warning("Binding calculator not found for binding " + binding.getName() + " " + binding.getClass().getName());
- baseURI = null;
- }
-
- binding.setURI(concatenateModelURI(baseURI, componentURI, serviceBindingURI,includeServiceBindingURI).toString());
- } catch (Exception ex){
- // TODO collate errors
- logger.warning("Error during URL creation " + ex.toString());
- }
- }
-
- private URI concatenateModelURI(URI baseURI, URI componentURI, URI serviceBindingURI, boolean includeServiceBindingURI){
-
- if (baseURI == null){
- if (componentURI == null){
- return serviceBindingURI;
- } else {
- if (includeServiceBindingURI){
- return componentURI.resolve("/").resolve(serviceBindingURI);
- } else {
- return componentURI;
- }
- }
- } else {
- if (componentURI == null){
- if (includeServiceBindingURI){
- return baseURI.resolve("/").resolve(serviceBindingURI);
- } else {
- return baseURI;
- }
- } else {
- if (includeServiceBindingURI){
- return baseURI.resolve("/").resolve(componentURI).resolve("/").resolve(serviceBindingURI);
- } else {
- return baseURI.resolve("/").resolve(componentURI);
- }
- }
- }
- }
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeInfo.java b/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeInfo.java
deleted file mode 100644
index 71a45a5558..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/java/org/apache/tuscany/sca/workspace/configuration/impl/NodeInfo.java
+++ /dev/null
@@ -1,63 +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.
- */
-
-package org.apache.tuscany.sca.workspace.configuration.impl;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.ComponentService;
-
-/**
- * A class which wraps a node component and provides helper methods
- *
- * @version $Rev$ $Date$
- */
-public class NodeInfo {
-
- private Component node;
- private Map<String, Binding> defaultBindings = new HashMap<String, Binding>();
-
- public NodeInfo(Component node) throws URISyntaxException {
-
- this.node = node;
-
- // Cache the default binding info for the node
- ComponentService defaultService = node.getServices().get(0);
- for (Binding binding : defaultService.getBindings()){
-
- if (binding.getURI() != null){
- // get the schema from the binding URI
- URI bindingURI = new URI(binding.getURI());
-
- // store the binding away indexed on type and scheme
- defaultBindings.put(binding.getClass().getName() + ":" + bindingURI.getScheme(), binding);
- }
- }
- }
-
- public Binding getBindingDefault(Binding binding, String protocol){
- return defaultBindings.get(binding.getClass().getName() + ":" + protocol);
- }
-
-}
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.BindingURICalculator b/sandbox/slaws/modules/domain-rework/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.BindingURICalculator
deleted file mode 100644
index 5300021161..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.BindingURICalculator
+++ /dev/null
@@ -1,23 +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.
-
-# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.sca.SCABindingURICalculator;binding=org.apache.tuscany.sca.binding.sca.impl.SCABindingImpl
-org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingURICalculator;binding=org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingImpl
-org.apache.tuscany.sca.binding.http.HTTPBindingURICalculator;binding=org.apache.tuscany.sca.binding.http.impl.HTTPBindingImpl
-org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBindingURICalculator;binding=org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding
-org.apache.tuscany.sca.binding.feed.atom.AtomBindingURICalculator;binding=org.apache.tuscany.sca.binding.feed.atom.impl.AtomBindingImpl
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/domain/domain.composite b/sandbox/slaws/modules/domain-rework/src/main/resources/domain/domain.composite
deleted file mode 100644
index b78d59d855..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/domain/domain.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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://tuscany.apache.org/xmlns/tuscany/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="Domain">
-
- <component name="DomainUI">
- <t:implementation.widget location="webroot/domain.html"/>
- <service name="Widget">
- <t:binding.http/>
- </service>
- <reference name="domainService" target="DomainService/DomainService">
- <t:binding.jsonrpc/>
- </reference>
- </component>
-
- <!--component name="Domain">
- <t:implementation.resource location="webroot"/>
- <service name="Resource">
- <t:binding.http/>
- </service>
- </component-->
-
- <component name="DomainService">
- <implementation.java class="org.apache.tuscany.sca.domain.rework.DomainServiceImpl"/>
- <service name="DomainServiceInit">
- <interface.java interface="org.apache.tuscany.sca.domain.rework.DomainServiceInit"/>
- <binding.sca/>
- </service>
- <service name="DomainService">
- <interface.java interface="org.apache.tuscany.sca.domain.rework.DomainService"/>
- <binding.sca/>
- <t:binding.jsonrpc/>
- </service>
-
- <!--reference name="nodes" target="NodeA NodeB"/-->
-
- <property name="repositoryLocation" type="xsd:string">target/classes/repository</property>
- </component>
-
-</composite> \ No newline at end of file
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/domain/nodes.composite b/sandbox/slaws/modules/domain-rework/src/main/resources/domain/nodes.composite
deleted file mode 100644
index dd44b1bbdc..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/domain/nodes.composite
+++ /dev/null
@@ -1,51 +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"
- targetNamespace="http://tuscany.apache.org/xmlns/tuscany/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:store="http://store"
- xmlns:cloud="http://cloud"
- name="Nodes">
-
- <component name="NodeA">
- <t:implementation.node composite="store:store"/>
- <service name="Default">
- <binding.sca uri="http://myhost1:8080"/>
- <binding.ws uri="http://myhost1:8080"/>
- <binding.ws uri="https://myhost1:443"/>
- <t:binding.http uri="https://myhost1:8080"/>
- <t:binding.jsonrpc uri="https://myhost1:8080"/>
- <t:binding.atom uri="https://myhost1:8080"/>
- </service>
- </component>
-
- <component name="NodeB">
- <t:implementation.node composite="cloud:catalogs"/>
- <service name="Default">
- <binding.sca uri="http://myhost2:8081"/>
- <binding.ws uri="http://myhost2:8081"/>
- <t:binding.http uri="https://myhost1:8081"/>
- <t:binding.jsonrpc uri="https://myhost1:8081"/>
- <t:binding.atom uri="https://myhost1:8081"/>
- </service>
- </component>
-
-</composite> \ No newline at end of file
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/sample-calculator.jar b/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/sample-calculator.jar
deleted file mode 100644
index 9e56c3c79a..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/sample-calculator.jar
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-assets.jar b/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-assets.jar
deleted file mode 100644
index 7335529299..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-assets.jar
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-cloud.jar b/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-cloud.jar
deleted file mode 100644
index c14b66b977..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-cloud.jar
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-store.jar b/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-store.jar
deleted file mode 100644
index b2f555044f..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/uploaded/tutorial-store.jar
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/binding-jsonrpc.js b/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/binding-jsonrpc.js
deleted file mode 100644
index ca3c2a8605..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/binding-jsonrpc.js
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * JSON-RPC JavaScript client
- *
- * $Id: jsonrpc.js,v 1.36.2.3 2006/03/08 15:09:37 mclark Exp $
- *
- * Copyright (c) 2003-2004 Jan-Klaas Kollhof
- * Copyright (c) 2005 Michael Clark, Metaparadigm Pte Ltd
- *
- * This code is based on Jan-Klaas' JavaScript o lait library (jsolait).
- *
- * Licensed 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.
- *
- */
-
-/*
- * Modifications for Apache Tuscany:
- * - JSONRpcClient_createMethod changed so callback is last arg
- */
-
-/* escape a character */
-
-escapeJSONChar =
-function escapeJSONChar(c)
-{
- if(c == "\"" || c == "\\") return "\\" + c;
- else if (c == "\b") return "\\b";
- else if (c == "\f") return "\\f";
- else if (c == "\n") return "\\n";
- else if (c == "\r") return "\\r";
- else if (c == "\t") return "\\t";
- var hex = c.charCodeAt(0).toString(16);
- if(hex.length == 1) return "\\u000" + hex;
- else if(hex.length == 2) return "\\u00" + hex;
- else if(hex.length == 3) return "\\u0" + hex;
- else return "\\u" + hex;
-};
-
-
-/* encode a string into JSON format */
-
-escapeJSONString =
-function escapeJSONString(s)
-{
- /* The following should suffice but Safari's regex is b0rken
- (doesn't support callback substitutions)
- return "\"" + s.replace(/([^\u0020-\u007f]|[\\\"])/g,
- escapeJSONChar) + "\"";
- */
-
- /* Rather inefficient way to do it */
- var parts = s.split("");
- for(var i=0; i < parts.length; i++) {
- var c =parts[i];
- if(c == '"' ||
- c == '\\' ||
- c.charCodeAt(0) < 32 ||
- c.charCodeAt(0) >= 128)
- parts[i] = escapeJSONChar(parts[i]);
- }
- return "\"" + parts.join("") + "\"";
-};
-
-
-/* Marshall objects to JSON format */
-
-toJSON = function toJSON(o)
-{
- if(o == null) {
- return "null";
- } else if(o.constructor == String) {
- return escapeJSONString(o);
- } else if(o.constructor == Number) {
- return o.toString();
- } else if(o.constructor == Boolean) {
- return o.toString();
- } else if(o.constructor == Date) {
- return '{javaClass: "java.util.Date", time: ' + o.valueOf() +'}';
- } else if(o.constructor == Array) {
- var v = [];
- for(var i = 0; i < o.length; i++) v.push(toJSON(o[i]));
- return "[" + v.join(", ") + "]";
- } else {
- var v = [];
- for(attr in o) {
- if(o[attr] == null) v.push("\"" + attr + "\": null");
- else if(typeof o[attr] == "function"); /* skip */
- else v.push(escapeJSONString(attr) + ": " + toJSON(o[attr]));
- }
- return "{" + v.join(", ") + "}";
- }
-};
-
-
-/* JSONRpcClient constructor */
-
-JSONRpcClient =
-function JSONRpcClient_ctor(serverURL, user, pass, objectID)
-{
- this.serverURL = serverURL;
- this.user = user;
- this.pass = pass;
- this.objectID = objectID;
-
- /* Add standard methods */
- if(this.objectID) {
- this._addMethods(["listMethods"]);
- var req = this._makeRequest("listMethods", []);
- } else {
- this._addMethods(["system.listMethods"]);
- var req = this._makeRequest("system.listMethods", []);
- }
- var m = this._sendRequest(req);
- this._addMethods(m);
-};
-
-
-/* JSONRpcCLient.Exception */
-
-JSONRpcClient.Exception =
-function JSONRpcClient_Exception_ctor(code, message, javaStack)
-{
- this.code = code;
- var name;
- if(javaStack) {
- this.javaStack = javaStack;
- var m = javaStack.match(/^([^:]*)/);
- if(m) name = m[0];
- }
- if(name) this.name = name;
- else this.name = "JSONRpcClientException";
- this.message = message;
-};
-
-JSONRpcClient.Exception.CODE_REMOTE_EXCEPTION = 490;
-JSONRpcClient.Exception.CODE_ERR_CLIENT = 550;
-JSONRpcClient.Exception.CODE_ERR_PARSE = 590;
-JSONRpcClient.Exception.CODE_ERR_NOMETHOD = 591;
-JSONRpcClient.Exception.CODE_ERR_UNMARSHALL = 592;
-JSONRpcClient.Exception.CODE_ERR_MARSHALL = 593;
-
-JSONRpcClient.Exception.prototype = new Error();
-
-JSONRpcClient.Exception.prototype.toString =
-function JSONRpcClient_Exception_toString(code, msg)
-{
- return this.name + ": " + this.message;
-};
-
-
-/* Default top level exception handler */
-
-JSONRpcClient.default_ex_handler =
-function JSONRpcClient_default_ex_handler(e) { alert(e); };
-
-
-/* Client settable variables */
-
-JSONRpcClient.toplevel_ex_handler = JSONRpcClient.default_ex_handler;
-JSONRpcClient.profile_async = false;
-JSONRpcClient.max_req_active = 1;
-JSONRpcClient.requestId = 1;
-
-
-/* JSONRpcClient implementation */
-
-JSONRpcClient.prototype._createMethod =
-function JSONRpcClient_createMethod(methodName)
-{
- var fn=function()
- {
- var args = [];
- var callback = null;
- for(var i=0;i<arguments.length;i++) args.push(arguments[i]);
-
-/* TUSCANY change callback to be last arg instead of first to match binding.ajax
- if(typeof args[0] == "function") callback = args.shift();
-*/
- if(typeof args[arguments.length-1] == "function") callback = args.pop();
-
- var req = fn.client._makeRequest.call(fn.client, fn.methodName,
- args, callback);
- if(callback == null) {
- return fn.client._sendRequest.call(fn.client, req);
- } else {
- JSONRpcClient.async_requests.push(req);
- JSONRpcClient.kick_async();
- return req.requestId;
- }
- };
- fn.client = this;
- fn.methodName = methodName;
- return fn;
-};
-
-JSONRpcClient.prototype._addMethods =
-function JSONRpcClient_addMethods(methodNames)
-{
- for(var i=0; i<methodNames.length; i++) {
- var obj = this;
- var names = methodNames[i].split(".");
- for(var n=0; n<names.length-1; n++) {
- var name = names[n];
- if(obj[name]) {
- obj = obj[name];
- } else {
- obj[name] = new Object();
- obj = obj[name];
- }
- }
- var name = names[names.length-1];
- if(!obj[name]) {
- var method = this._createMethod(methodNames[i]);
- obj[name] = method;
- }
- }
-};
-
-JSONRpcClient._getCharsetFromHeaders =
-function JSONRpcClient_getCharsetFromHeaders(http)
-{
- try {
- var contentType = http.getResponseHeader("Content-type");
- var parts = contentType.split(/\s*;\s*/);
- for(var i =0; i < parts.length; i++) {
- if(parts[i].substring(0, 8) == "charset=")
- return parts[i].substring(8, parts[i].length);
- }
- } catch (e) {}
- return "UTF-8"; /* default */
-};
-
-/* Async queue globals */
-JSONRpcClient.async_requests = [];
-JSONRpcClient.async_inflight = {};
-JSONRpcClient.async_responses = [];
-JSONRpcClient.async_timeout = null;
-JSONRpcClient.num_req_active = 0;
-
-JSONRpcClient._async_handler =
-function JSONRpcClient_async_handler()
-{
- JSONRpcClient.async_timeout = null;
-
- while(JSONRpcClient.async_responses.length > 0) {
- var res = JSONRpcClient.async_responses.shift();
- if(res.canceled) continue;
- if(res.profile) res.profile.dispatch = new Date();
- try {
- res.cb(res.result, res.ex, res.profile);
- } catch(e) {
- JSONRpcClient.toplevel_ex_handler(e);
- }
- }
-
- while(JSONRpcClient.async_requests.length > 0 &&
- JSONRpcClient.num_req_active < JSONRpcClient.max_req_active) {
- var req = JSONRpcClient.async_requests.shift();
- if(req.canceled) continue;
- req.client._sendRequest.call(req.client, req);
- }
-};
-
-JSONRpcClient.kick_async =
-function JSONRpcClient_kick_async()
-{
- if(JSONRpcClient.async_timeout == null)
- JSONRpcClient.async_timeout =
- setTimeout(JSONRpcClient._async_handler, 0);
-};
-
-JSONRpcClient.cancelRequest =
-function JSONRpcClient_cancelRequest(requestId)
-{
- /* If it is in flight then mark it as canceled in the inflight map
- and the XMLHttpRequest callback will discard the reply. */
- if(JSONRpcClient.async_inflight[requestId]) {
- JSONRpcClient.async_inflight[requestId].canceled = true;
- return true;
- }
-
- /* If its not in flight yet then we can just mark it as canceled in
- the the request queue and it will get discarded before being sent. */
- for(var i in JSONRpcClient.async_requests) {
- if(JSONRpcClient.async_requests[i].requestId == requestId) {
- JSONRpcClient.async_requests[i].canceled = true;
- return true;
- }
- }
-
- /* It may have returned from the network and be waiting for its callback
- to be dispatched, so mark it as canceled in the response queue
- and the response will get discarded before calling the callback. */
- for(var i in JSONRpcClient.async_responses) {
- if(JSONRpcClient.async_responses[i].requestId == requestId) {
- JSONRpcClient.async_responses[i].canceled = true;
- return true;
- }
- }
-
- return false;
-};
-
-JSONRpcClient.prototype._makeRequest =
-function JSONRpcClient_makeRequest(methodName, args, cb)
-{
- var req = {};
- req.client = this;
- req.requestId = JSONRpcClient.requestId++;
-
- var obj = {};
- obj.id = req.requestId;
- if (this.objectID)
- obj.method = ".obj#" + this.objectID + "." + methodName;
- else
- obj.method = methodName;
- obj.params = args;
-
- if (cb) req.cb = cb;
- if (JSONRpcClient.profile_async)
- req.profile = { "submit": new Date() };
- req.data = toJSON(obj);
-
- return req;
-};
-
-JSONRpcClient.prototype._sendRequest =
-function JSONRpcClient_sendRequest(req)
-{
- if(req.profile) req.profile.start = new Date();
-
- /* Get free http object from the pool */
- var http = JSONRpcClient.poolGetHTTPRequest();
- JSONRpcClient.num_req_active++;
-
- /* Send the request */
- if (typeof(this.user) == "undefined") {
- http.open("POST", this.serverURL, (req.cb != null));
- } else {
- http.open("POST", this.serverURL, (req.cb != null), this.user, this.pass);
- }
-
- /* setRequestHeader is missing in Opera 8 Beta */
- try { http.setRequestHeader("Content-type", "text/plain"); } catch(e) {}
-
- /* Construct call back if we have one */
- if(req.cb) {
- var self = this;
- http.onreadystatechange = function() {
- if(http.readyState == 4) {
- http.onreadystatechange = function () {};
- var res = { "cb": req.cb, "result": null, "ex": null};
- if (req.profile) {
- res.profile = req.profile;
- res.profile.end = new Date();
- }
- try { res.result = self._handleResponse(http); }
- catch(e) { res.ex = e; }
- if(!JSONRpcClient.async_inflight[req.requestId].canceled)
- JSONRpcClient.async_responses.push(res);
- delete JSONRpcClient.async_inflight[req.requestId];
- JSONRpcClient.kick_async();
- }
- };
- } else {
- http.onreadystatechange = function() {};
- }
-
- JSONRpcClient.async_inflight[req.requestId] = req;
-
- try {
- http.send(req.data);
- } catch(e) {
- JSONRpcClient.poolReturnHTTPRequest(http);
- JSONRpcClient.num_req_active--;
- throw new JSONRpcClient.Exception
- (JSONRpcClient.Exception.CODE_ERR_CLIENT, "Connection failed");
- }
-
- if(!req.cb) return this._handleResponse(http);
-};
-
-JSONRpcClient.prototype._handleResponse =
-function JSONRpcClient_handleResponse(http)
-{
- /* Get the charset */
- if(!this.charset) {
- this.charset = JSONRpcClient._getCharsetFromHeaders(http);
- }
-
- /* Get request results */
- var status, statusText, data;
- try {
- status = http.status;
- statusText = http.statusText;
- data = http.responseText;
- } catch(e) {
- JSONRpcClient.poolReturnHTTPRequest(http);
- JSONRpcClient.num_req_active--;
- JSONRpcClient.kick_async();
- throw new JSONRpcClient.Exception
- (JSONRpcClient.Exception.CODE_ERR_CLIENT, "Connection failed");
- }
-
- /* Return http object to the pool; */
- JSONRpcClient.poolReturnHTTPRequest(http);
- JSONRpcClient.num_req_active--;
-
- /* Unmarshall the response */
- if(status != 200) {
- throw new JSONRpcClient.Exception(status, statusText);
- }
- var obj;
- try {
- eval("obj = " + data);
- } catch(e) {
- throw new JSONRpcClient.Exception(550, "error parsing result");
- }
- if(obj.error)
- throw new JSONRpcClient.Exception(obj.error.code, obj.error.msg,
- obj.error.trace);
- var res = obj.result;
-
- /* Handle CallableProxy */
- if(res && res.objectID && res.JSONRPCType == "CallableReference")
- return new JSONRpcClient(this.serverURL, this.user,
- this.pass, res.objectID);
-
- return res;
-};
-
-
-/* XMLHttpRequest wrapper code */
-
-/* XMLHttpRequest pool globals */
-JSONRpcClient.http_spare = [];
-JSONRpcClient.http_max_spare = 8;
-
-JSONRpcClient.poolGetHTTPRequest =
-function JSONRpcClient_pool_getHTTPRequest()
-{
- if(JSONRpcClient.http_spare.length > 0) {
- return JSONRpcClient.http_spare.pop();
- }
- return JSONRpcClient.getHTTPRequest();
-};
-
-JSONRpcClient.poolReturnHTTPRequest =
-function JSONRpcClient_poolReturnHTTPRequest(http)
-{
- if(JSONRpcClient.http_spare.length >= JSONRpcClient.http_max_spare)
- delete http;
- else
- JSONRpcClient.http_spare.push(http);
-};
-
-JSONRpcClient.msxmlNames = [ "MSXML2.XMLHTTP.5.0",
- "MSXML2.XMLHTTP.4.0",
- "MSXML2.XMLHTTP.3.0",
- "MSXML2.XMLHTTP",
- "Microsoft.XMLHTTP" ];
-
-JSONRpcClient.getHTTPRequest =
-function JSONRpcClient_getHTTPRequest()
-{
- /* Mozilla XMLHttpRequest */
- try {
- JSONRpcClient.httpObjectName = "XMLHttpRequest";
- return new XMLHttpRequest();
- } catch(e) {}
-
- /* Microsoft MSXML ActiveX */
- for (var i=0;i < JSONRpcClient.msxmlNames.length; i++) {
- try {
- JSONRpcClient.httpObjectName = JSONRpcClient.msxmlNames[i];
- return new ActiveXObject(JSONRpcClient.msxmlNames[i]);
- } catch (e) {}
- }
-
- /* None found */
- JSONRpcClient.httpObjectName = null;
- throw new JSONRpcClient.Exception(0, "Can't create XMLHttpRequest object");
-};
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.html b/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.html
deleted file mode 100644
index a75560ff92..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<html>
-<!--
- * 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.
- -->
-<head>
-<title>Apache Tuscany Domain</TITLE>
-
-<!--script type="text/javascript" src="dojo/dojo/dojo.js">
-</script>
-<script type="text/javascript" src="dojo/dijit/dijit.js">
-</script>
-
-<script type="text/javascript">
- dojo.require("dojo.data.ItemFileReadStore");
- dojo.require("dijit.Tree");
-</script-->
-
-<script type="text/javascript" src="domain.js">
-</script>
-
-<script language="JavaScript">
-
- //@Reference
- var domainService = new Reference("domainService");
-
- var contributions;
-
- function anItemType(name, type){
- this.name = name;
- this.type = type;
- }
-
- function getContributions() {
- domainService.getContributions(handleGetContributions);
- }
-
- function handleGetContributions(result) {
- var text = "";
-
- text = text + "<H2>Contributions</H2>";
-
- for (var i in result.list){
- var contribution = result.list[i];
-
- text = text + contribution.name + " " + contribution.URI + "<p/>";
- }
-
- document.getElementById('contributions').innerHTML=text;
-
- /*
- var data = {data: { label: 'name',
- identifier: 'name',
- items: [] } };
-
- for (var i in result.nodes.list){
- var node = result.nodes.list[i];
-
- for (var j in node.leaves.list){
- var leaf = node.leaves.list[j];
-
- var item = new anItemType(leaf.value, node.type);
- data.data.items[i] = item;
- }
- }
-
-
- var store=new dojo.data.ItemFileReadStore(data);
- var tree=new dijit.Tree({store:store,
- labelAttr:'name',
- typeAttr:'type',
- query:{ type: "contribution" }}, dojo.byId("contributions"));
- tree.startup();
-
- */
- }
-
-
- </script>
-
- <link rel="stylesheet" type="text/css" href="style.css" />
-</head>
-
-<body onload="getContributions()">
-
-<h1 id="top">Apache Tuscany Domain</h1>
-
-<div id="contributions"></div>
-
-</body>
-</html>
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.png b/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.png
deleted file mode 100644
index e88c4f882a..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/domain.png
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/node.png b/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/node.png
deleted file mode 100644
index fa01e64272..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/node.png
+++ /dev/null
Binary files differ
diff --git a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/style.css b/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/style.css
deleted file mode 100644
index f5bbf23379..0000000000
--- a/sandbox/slaws/modules/domain-rework/src/main/resources/webroot/style.css
+++ /dev/null
@@ -1,176 +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.
- */
-
-p,table,li,h1,h2,h3
-{
-font-family: verdana, arial, 'sans serif';
-}
-
-p, h1, h2, h3, table, li, hr
-{
-margin-left: 10pt;
-}
-
-table
-{
-border-color: black;
-border-collapse: separate;
-border-spacing: 0px 1px;
-
-margin-right: 10pt;
-margin-left: 10pt;
-width: 800px;
-}
-
-.sourceDetailsTable
-{
-width: 600px;
-}
-
-tr, td
-{
-margin-left: 0pt;
-margin-right: 0pt;
-padding-left: 10pt;
-font-size: 90%;
-}
-
-p,li,th
-{
-font-size: 90%;
-margin-left: 10pt;
-}
-
-pre
-{
-margin-left: 10pt;
-}
-
-body
-{
-#ffffff;
-}
-
-h1,h2,h3,hr
-{
-color: firebrick;
-}
-
-a:link {COLOR: firebrick;}
-a:visited {COLOR: firebrick;}
-a:active {COLOR: navy;}
-
-.link
-{
-COLOR: firebrick;
-text-decoration: underline;
-}
-
-.clickable
-{
-cursor: pointer
-}
-
-.unread_title
-{
-font-weight: bold;
-}
-
-.read_title
-{
-font-weight: normal;
-}
-
-.summary
-{
-color: DimGrey;
-}
-
-.hidden
-{
-display: none;
-}
-
-.source_name
-{
-width: 600px;
-}
-
-.alert_text
-{
-width: 600px;
-}
-
-.alert_data
-{
-margin-left: 10px;
-width: 800px;
-height: 800px;
-}
-
-.source_0
-{
-background-color: LightGreen;
-}
-
-.source_1
-{
-background-color: LightSkyBlue;
-}
-
-.source_2
-{
-background-color: Khaki;
-}
-
-.source_3
-{
-background-color: LightPink;
-}
-
-.source_4
-{
-background-color: Orange;
-}
-
-.source_5
-{
-background-color: LightCoral;
-}
-
-.source_6
-{
-background-color: Orchid;
-}
-
-.source_7
-{
-background-color: Peru;
-}
-
-.source_8
-{
-background-color: SpringGreen;
-}
-
-.source_9
-{
-background-color: LightGrey;
-}
-
diff --git a/sandbox/slaws/scatours/calculator.svg b/sandbox/slaws/scatours/calculator.svg
deleted file mode 100644
index af34f07e04..0000000000
--- a/sandbox/slaws/scatours/calculator.svg
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * 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.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator"
- sodipodi:docname="calculator.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator\calculator.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="471.80491"
- inkscape:cy="378.84265"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="59"
- inkscape:window-y="79" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1,0,0,1.144214,0,-27.53557)">
- <rect
- rx="15.307091"
- ry="12.692303"
- y="192.00233"
- x="258.31146"
- height="299.99988"
- width="495.71429"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">Calculator</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="191.57716"
- x="339.91632"
- y="262.1673"
- rx="6.9961648"
- ry="15.892869" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(79.61125,62.65764)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">Calculator</flowPara><flowPara
- id="flowPara1895">Service</flowPara><flowPara
- id="flowPara1897">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z "
- id="path3019" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z "
- id="path1883" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1885"
- transform="translate(-46.16225,128.7269)"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion
- id="flowRegion1887"><rect
- id="rect1889"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara
- id="flowPara1891">Calculator</flowPara><flowPara
- id="flowPara1893">Service</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1899"
- width="115.66247"
- height="70.148659"
- x="594.75488"
- y="209.73451"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1901"
- transform="translate(334.4498,10.22481)"><flowRegion
- id="flowRegion1903"><rect
- id="rect1905"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1907">Add</flowPara><flowPara
- id="flowPara1909">Service</flowPara><flowPara
- id="flowPara1911">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z "
- id="path1913" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1917"
- width="115.66247"
- height="70.148659"
- x="594.06543"
- y="292.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1919"
- transform="translate(333.7604,93.08188)"><flowRegion
- id="flowRegion1921"><rect
- id="rect1923"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1925">Subtract</flowPara><flowPara
- id="flowPara1927">Service</flowPara><flowPara
- id="flowPara1929">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z "
- id="path1931" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1933"
- width="115.66247"
- height="70.148659"
- x="594.77979"
- y="371.87729"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1935"
- transform="translate(334.4747,172.3676)"><flowRegion
- id="flowRegion1937"><rect
- id="rect1939"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1941">Multiply</flowPara><flowPara
- id="flowPara1943">Service</flowPara><flowPara
- id="flowPara1945">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z "
- id="path1947" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1949"
- width="115.66247"
- height="70.148659"
- x="596.20831"
- y="452.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1951"
- transform="translate(335.9032,253.0819)"><flowRegion
- id="flowRegion1953"><rect
- id="rect1955"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1957">Divide</flowPara><flowPara
- id="flowPara1959">Service</flowPara><flowPara
- id="flowPara1961">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z "
- id="path1963" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1965"
- transform="translate(161.0221,114.967)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1967"><rect
- id="rect1969"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1973">add</flowPara><flowPara
- id="flowPara1977">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z "
- id="path1979" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1981"
- transform="translate(160.6632,150.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1983"><rect
- id="rect1985"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1987">subtract</flowPara><flowPara
- id="flowPara1989">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z "
- id="path1991" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1993"
- transform="translate(161.3775,184.2583)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1995"><rect
- id="rect1997"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1999">multiply</flowPara><flowPara
- id="flowPara2001">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z "
- id="path2003" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2005"
- transform="translate(159.9489,215.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2007"><rect
- id="rect2009"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara2011">divide</flowPara><flowPara
- id="flowPara2013">Service</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305"
- id="path2015" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877"
- id="path2017" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591"
- id="path2019" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734"
- id="path2021" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 292.85714,355.52305 L 330,354.80877"
- id="path2023" />
- </g>
-</svg>
diff --git a/sandbox/slaws/scatours/calendar/pom.xml b/sandbox/slaws/scatours/calendar/pom.xml
deleted file mode 100644
index c17101ecfd..0000000000
--- a/sandbox/slaws/scatours/calendar/pom.xml
+++ /dev/null
@@ -1,57 +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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>scatours-calendar</artifactId>
- <name>Apache Tuscany SCA Tours Calendar Component</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sandbox/slaws/scatours/calendar/src/main/java/calendar/Calendar.java b/sandbox/slaws/scatours/calendar/src/main/java/calendar/Calendar.java
deleted file mode 100644
index 90736b92b4..0000000000
--- a/sandbox/slaws/scatours/calendar/src/main/java/calendar/Calendar.java
+++ /dev/null
@@ -1,28 +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.
- */
-package calendar;
-
-/**
- * The Add service interface
- */
-public interface Calendar {
-
- String getEndDate(String startDate, int duration);
-
-}
diff --git a/sandbox/slaws/scatours/calendar/src/main/java/calendar/CalendarImpl.java b/sandbox/slaws/scatours/calendar/src/main/java/calendar/CalendarImpl.java
deleted file mode 100644
index 343926da65..0000000000
--- a/sandbox/slaws/scatours/calendar/src/main/java/calendar/CalendarImpl.java
+++ /dev/null
@@ -1,48 +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.
- */
-package calendar;
-
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Add service
- */
-public class CalendarImpl implements Calendar {
-
- public String getEndDate(String startDate, int duration){
- String returnDate = "Invalid Date";
-
- try {
- Date date = DateFormat.getInstance().parse(startDate);
- java.util.Calendar calendar = java.util.Calendar.getInstance();
- calendar.setTime(date);
- calendar.add(java.util.Calendar.DATE, duration);
- returnDate = DateFormat.getInstance().format(calendar.getTime());
- } catch (Exception ex){
- // do nothing
- System.out.println(ex.toString());
- }
-
- return returnDate;
- }
-}
diff --git a/sandbox/slaws/scatours/calendar/src/main/resources/calendar.composite b/sandbox/slaws/scatours/calendar/src/main/resources/calendar.composite
deleted file mode 100644
index b72c450446..0000000000
--- a/sandbox/slaws/scatours/calendar/src/main/resources/calendar.composite
+++ /dev/null
@@ -1,29 +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"
- targetNamespace="http://travel"
- xmlns:sample="http://travel"
- name="calendar">
-
- <component name="CalendarComponent">
- <implementation.java class="calendar.CalendarImpl"/>
- </component>
-
-</composite>
diff --git a/sandbox/slaws/scatours/calendar/src/test/java/calendar/CalendarTestCase.java b/sandbox/slaws/scatours/calendar/src/test/java/calendar/CalendarTestCase.java
deleted file mode 100644
index fee00fbb0a..0000000000
--- a/sandbox/slaws/scatours/calendar/src/test/java/calendar/CalendarTestCase.java
+++ /dev/null
@@ -1,47 +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.
- */
-package calendar;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CalendarTestCase extends TestCase {
-
- private Calendar calendar;
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("calendar.composite");
- calendar = scaDomain.getService(Calendar.class, "CalendarComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testCalculator() throws Exception {
- System.out.println(calendar.getEndDate("07/10/96 04:05", 3));
- }
-}
diff --git a/sandbox/slaws/scatours/currencyconverter/pom.xml b/sandbox/slaws/scatours/currencyconverter/pom.xml
deleted file mode 100644
index 3209790341..0000000000
--- a/sandbox/slaws/scatours/currencyconverter/pom.xml
+++ /dev/null
@@ -1,57 +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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>scatours-currencyconverter</artifactId>
- <name>Apache Tuscany SCA Tours Currency Converter Component</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverter.java b/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverter.java
deleted file mode 100644
index b73f35c40c..0000000000
--- a/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverter.java
+++ /dev/null
@@ -1,28 +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.
- */
-package currencyconverter;
-
-/**
- * The CurrencyConverter service interface
- */
-public interface CurrencyConverter {
-
- double getExchangeRate(String fromCurrency, String toCurrency);
-
-}
diff --git a/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverterImpl.java b/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverterImpl.java
deleted file mode 100644
index 6769239b56..0000000000
--- a/sandbox/slaws/scatours/currencyconverter/src/main/java/currencyconverter/CurrencyConverterImpl.java
+++ /dev/null
@@ -1,35 +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.
- */
-package currencyconverter;
-
-
-/**
- * An implementation of the CurrencyConverter service
- */
-public class CurrencyConverterImpl implements CurrencyConverter {
-
- public double getExchangeRate(String fromCurrencyCode, String toCurrencyCode){
- // regardless of which currencies are specified return the same value
- return 1.98;
- }
-
- public double convert(String fromCurrencyCode, String toCurrencyCode, double amount){
- return amount * getExchangeRate(fromCurrencyCode, toCurrencyCode);
- }
-}
diff --git a/sandbox/slaws/scatours/currencyconverter/src/main/resources/currencyconverter.composite b/sandbox/slaws/scatours/currencyconverter/src/main/resources/currencyconverter.composite
deleted file mode 100644
index ae94401f6c..0000000000
--- a/sandbox/slaws/scatours/currencyconverter/src/main/resources/currencyconverter.composite
+++ /dev/null
@@ -1,29 +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"
- targetNamespace="http://scatours"
- xmlns:sample="http://scatours"
- name="currencyconverter">
-
- <component name="CurrencyConverterComponent">
- <implementation.java class="currencyconverter.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/sandbox/slaws/scatours/currencyconverter/src/test/java/currencyconverter/CurrencyConverterTestCase.java b/sandbox/slaws/scatours/currencyconverter/src/test/java/currencyconverter/CurrencyConverterTestCase.java
deleted file mode 100644
index 6bdf32dd0d..0000000000
--- a/sandbox/slaws/scatours/currencyconverter/src/test/java/currencyconverter/CurrencyConverterTestCase.java
+++ /dev/null
@@ -1,47 +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.
- */
-package currencyconverter;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CurrencyConverterTestCase extends TestCase {
-
- private CurrencyConverter currencyConverter;
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("currencyconverter.composite");
- currencyConverter = scaDomain.getService(CurrencyConverter.class, "CurrencyConverterComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testCurrecncyConverter() throws Exception {
- System.out.println(currencyConverter.getExchangeRate("GBP", "USD"));
- }
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/pom.xml b/sandbox/slaws/scatours/gettingstarted/pom.xml
deleted file mode 100644
index 122d04b272..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/pom.xml
+++ /dev/null
@@ -1,57 +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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>scatours-gettingstarted</artifactId>
- <name>Apache Tuscany SCA Tours Getting Started</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/client/CurrencyConverterClient.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/client/CurrencyConverterClient.java
deleted file mode 100644
index 80d2f4603c..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/client/CurrencyConverterClient.java
+++ /dev/null
@@ -1,38 +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.
- */
-package client;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import currencyconverter.CurrencyConverter;
-
-/**
- * This shows how to run the CurrencyConverter component.
- */
-public class CurrencyConverterClient {
-
- public final static void main(String[] args) throws Exception {
- SCADomain scaDomain =
- SCADomain.newInstance("currencyconverter.composite");
- CurrencyConverter currencyConverter =
- scaDomain.getService(CurrencyConverter.class,
- "CurrencyConverterComponent");
- System.out.println(currencyConverter.convert("GBP", "USD", 27.65));
- scaDomain.close();
- }
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/client/TripClient.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/client/TripClient.java
deleted file mode 100644
index 73aa5e2146..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/client/TripClient.java
+++ /dev/null
@@ -1,37 +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.
- */
-package client;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import trip.Trip;
-
-/**
- * This shows how to run the CurrencyConverter component.
- */
-public class TripClient {
-
- public final static void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance("trip.composite");
- Trip trip = scaDomain.getService(Trip.class, "TripComponent");
- System.out.println(trip.getTotalPrice());
-
- scaDomain.close();
- }
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverter.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverter.java
deleted file mode 100644
index dbae9cbe53..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverter.java
+++ /dev/null
@@ -1,30 +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.
- */
-package currencyconverter;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * The CurrencyConverter service interface
- */
-public interface CurrencyConverter {
- double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount);
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverterImpl.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverterImpl.java
deleted file mode 100644
index ed7e2691ff..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/currencyconverter/CurrencyConverterImpl.java
+++ /dev/null
@@ -1,33 +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.
- */
-package currencyconverter;
-
-
-/**
- * An implementation of the CurrencyConverter service
- */
-public class CurrencyConverterImpl implements CurrencyConverter {
- public double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount){
- // regardless of which currencies are specified the
- // conversion is the same!
- return amount * 1.23;
- }
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/Trip.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/Trip.java
deleted file mode 100644
index c7f930c631..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/Trip.java
+++ /dev/null
@@ -1,26 +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.
- */
-package trip;
-
-/**
- * The Trip service interface
- */
-public interface Trip {
- double getTotalPrice();
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/TripImpl.java b/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/TripImpl.java
deleted file mode 100644
index 6b3f3c7836..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/java/trip/TripImpl.java
+++ /dev/null
@@ -1,46 +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.
- */
-package trip;
-
-import org.osoa.sca.annotations.Reference;
-
-import currencyconverter.CurrencyConverter;
-
-/**
- * An implementation of the Trip service
- */
-public class TripImpl implements Trip {
-
- private CurrencyConverter currencyConverter;
-
- private double totalPrice = 123.45;
- private String supplierCurrency = "USD";
- private String quoteCurrency = "GBP";
-
- @Reference
- public void setCurrencyConverter(CurrencyConverter currencyConverter){
- this.currencyConverter = currencyConverter;
- }
-
- public double getTotalPrice(){
- return currencyConverter.convert(supplierCurrency,
- quoteCurrency,
- totalPrice);
- }
-}
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/resources/currencyconverter.composite b/sandbox/slaws/scatours/gettingstarted/src/main/resources/currencyconverter.composite
deleted file mode 100644
index ae94401f6c..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/resources/currencyconverter.composite
+++ /dev/null
@@ -1,29 +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"
- targetNamespace="http://scatours"
- xmlns:sample="http://scatours"
- name="currencyconverter">
-
- <component name="CurrencyConverterComponent">
- <implementation.java class="currencyconverter.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/sandbox/slaws/scatours/gettingstarted/src/main/resources/trip.composite b/sandbox/slaws/scatours/gettingstarted/src/main/resources/trip.composite
deleted file mode 100644
index ee5c6812db..0000000000
--- a/sandbox/slaws/scatours/gettingstarted/src/main/resources/trip.composite
+++ /dev/null
@@ -1,34 +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"
- targetNamespace="http://scatours"
- xmlns:sample="http://scatours"
- name="trip">
-
- <component name="TripComponent">
- <implementation.java class="trip.TripImpl"/>
- <reference name="currencyConverter" target="CurrencyConverterComponent"/>
- </component>
-
- <component name="CurrencyConverterComponent">
- <implementation.java class="currencyconverter.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/sandbox/slaws/scatours/pom.xml b/sandbox/slaws/scatours/pom.xml
deleted file mode 100644
index 6568384acb..0000000000
--- a/sandbox/slaws/scatours/pom.xml
+++ /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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-scatours</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Tours Sample</name>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>calendar</module>
- <module>currencyconverter</module>
- <module>gettingstarted</module>
- </modules>
- </profile>
-
- </profiles>
-
-</project>