From ac95e27326e7399610ad07fa53341af8e4fd123a Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 12 Nov 2009 11:41:48 +0000 Subject: move more stuff into old git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835348 13f79535-47bb-0310-9956-ffa450edef68 --- .../contribution-processor/LICENSE | 205 ------ .../contribution-processor/NOTICE | 6 - .../contribution-processor/pom.xml | 180 ----- .../tuscany/sca/bc/ContributionProcessorImpl.java | 617 ----------------- .../sca/bc/ConributionProcessorTestCase.java | 42 -- sandbox/slaws/backward-compatibility/pom.xml | 97 --- .../backward-compatibility/references/pom.xml | 61 -- .../tuscany/sca/itest/references/AComponent.java | 40 -- .../sca/itest/references/AComponentImpl.java | 126 ---- .../tuscany/sca/itest/references/BComponent.java | 26 - .../sca/itest/references/BComponentImpl.java | 39 -- .../references/BComponentWrongTargetImpl.java | 39 -- .../tuscany/sca/itest/references/CComponent.java | 24 - .../sca/itest/references/CComponentImpl.java | 27 - .../tuscany/sca/itest/references/DComponent.java | 27 - .../sca/itest/references/DComponentImpl.java | 35 - .../resources/ManualWiredReferencesTest.composite | 64 -- .../references/ManualWiredReferenceTestCase.java | 113 ---- .../distributed-runtime/calculator-distributed.svg | 403 ----------- .../distributed-runtime/calculator-standalone.svg | 370 ----------- .../distributed-runtime/distributed-abstract.svg | 570 ---------------- .../distributed-cardinality.svg | 471 ------------- .../distributed-runtime/distributed-overview.svg | 715 -------------------- .../slaws/distributed-runtime/distribution1.svg | 276 -------- .../slaws/distributed-runtime/distribution2.svg | 367 ---------- .../slaws/distributed-runtime/distribution3.svg | 736 --------------------- .../slaws/distributed-runtime/distribution4.svg | 374 ----------- .../distributionCardinality.svg | 335 ---------- .../distributed-runtime/multi-node-abstract.svg | 579 ---------------- .../distributed-runtime/single-node-abstract.svg | 188 ------ sandbox/slaws/httpserver.php/README | 28 - sandbox/slaws/httpserver.php/conf/httpd.conf | 28 - sandbox/slaws/httpserver.php/conf/mime.types | 607 ----------------- .../slaws/httpserver.php/htdocs/AlertDisplay.php | 274 -------- .../httpserver.php/htdocs/AlertDisplayJson.php | 56 -- sandbox/slaws/httpserver.php/htdocs/Alerter.xsd | 74 --- sandbox/slaws/httpserver.php/htdocs/Alerts.wsdl | 88 --- sandbox/slaws/httpserver.php/htdocs/Alerts.xsd | 80 --- .../slaws/httpserver.php/htdocs/AlertsSources.wsdl | 124 ---- .../slaws/httpserver.php/htdocs/Cached_Alerts.xml | 2 - sandbox/slaws/httpserver.php/htdocs/index.html | 280 -------- sandbox/slaws/httpserver.php/htdocs/phpinfo.php | 5 - sandbox/slaws/httpserver.php/htdocs/pop.png | Bin 244 -> 0 bytes sandbox/slaws/httpserver.php/htdocs/rss.png | Bin 689 -> 0 bytes sandbox/slaws/httpserver.php/htdocs/service.smd | 1 - sandbox/slaws/httpserver.php/htdocs/style.css | 166 ----- sandbox/slaws/httpserver.php/startserver.bat | 78 --- .../contribution-processor/LICENSE | 205 ++++++ .../contribution-processor/NOTICE | 6 + .../contribution-processor/pom.xml | 180 +++++ .../tuscany/sca/bc/ContributionProcessorImpl.java | 617 +++++++++++++++++ .../sca/bc/ConributionProcessorTestCase.java | 42 ++ sandbox/slaws/old/backward-compatibility/pom.xml | 97 +++ .../old/backward-compatibility/references/pom.xml | 61 ++ .../tuscany/sca/itest/references/AComponent.java | 40 ++ .../sca/itest/references/AComponentImpl.java | 126 ++++ .../tuscany/sca/itest/references/BComponent.java | 26 + .../sca/itest/references/BComponentImpl.java | 39 ++ .../references/BComponentWrongTargetImpl.java | 39 ++ .../tuscany/sca/itest/references/CComponent.java | 24 + .../sca/itest/references/CComponentImpl.java | 27 + .../tuscany/sca/itest/references/DComponent.java | 27 + .../sca/itest/references/DComponentImpl.java | 35 + .../resources/ManualWiredReferencesTest.composite | 64 ++ .../references/ManualWiredReferenceTestCase.java | 113 ++++ .../distributed-runtime/calculator-distributed.svg | 403 +++++++++++ .../distributed-runtime/calculator-standalone.svg | 370 +++++++++++ .../distributed-runtime/distributed-abstract.svg | 570 ++++++++++++++++ .../distributed-cardinality.svg | 471 +++++++++++++ .../distributed-runtime/distributed-overview.svg | 715 ++++++++++++++++++++ .../old/distributed-runtime/distribution1.svg | 276 ++++++++ .../old/distributed-runtime/distribution2.svg | 367 ++++++++++ .../old/distributed-runtime/distribution3.svg | 736 +++++++++++++++++++++ .../old/distributed-runtime/distribution4.svg | 374 +++++++++++ .../distributionCardinality.svg | 335 ++++++++++ .../distributed-runtime/multi-node-abstract.svg | 579 ++++++++++++++++ .../distributed-runtime/single-node-abstract.svg | 188 ++++++ sandbox/slaws/old/httpserver.php/README | 28 + sandbox/slaws/old/httpserver.php/conf/httpd.conf | 28 + sandbox/slaws/old/httpserver.php/conf/mime.types | 607 +++++++++++++++++ .../old/httpserver.php/htdocs/AlertDisplay.php | 274 ++++++++ .../old/httpserver.php/htdocs/AlertDisplayJson.php | 56 ++ .../slaws/old/httpserver.php/htdocs/Alerter.xsd | 74 +++ .../slaws/old/httpserver.php/htdocs/Alerts.wsdl | 88 +++ sandbox/slaws/old/httpserver.php/htdocs/Alerts.xsd | 80 +++ .../old/httpserver.php/htdocs/AlertsSources.wsdl | 124 ++++ .../old/httpserver.php/htdocs/Cached_Alerts.xml | 2 + sandbox/slaws/old/httpserver.php/htdocs/index.html | 280 ++++++++ .../slaws/old/httpserver.php/htdocs/phpinfo.php | 5 + sandbox/slaws/old/httpserver.php/htdocs/pop.png | Bin 0 -> 244 bytes sandbox/slaws/old/httpserver.php/htdocs/rss.png | Bin 0 -> 689 bytes .../slaws/old/httpserver.php/htdocs/service.smd | 1 + sandbox/slaws/old/httpserver.php/htdocs/style.css | 166 +++++ sandbox/slaws/old/httpserver.php/startserver.bat | 78 +++ 94 files changed, 9043 insertions(+), 9043 deletions(-) delete mode 100644 sandbox/slaws/backward-compatibility/contribution-processor/LICENSE delete mode 100644 sandbox/slaws/backward-compatibility/contribution-processor/NOTICE delete mode 100644 sandbox/slaws/backward-compatibility/contribution-processor/pom.xml delete mode 100644 sandbox/slaws/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java delete mode 100644 sandbox/slaws/backward-compatibility/pom.xml delete mode 100644 sandbox/slaws/backward-compatibility/references/pom.xml delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java delete mode 100644 sandbox/slaws/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite delete mode 100644 sandbox/slaws/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java delete mode 100644 sandbox/slaws/distributed-runtime/calculator-distributed.svg delete mode 100644 sandbox/slaws/distributed-runtime/calculator-standalone.svg delete mode 100644 sandbox/slaws/distributed-runtime/distributed-abstract.svg delete mode 100644 sandbox/slaws/distributed-runtime/distributed-cardinality.svg delete mode 100644 sandbox/slaws/distributed-runtime/distributed-overview.svg delete mode 100644 sandbox/slaws/distributed-runtime/distribution1.svg delete mode 100644 sandbox/slaws/distributed-runtime/distribution2.svg delete mode 100644 sandbox/slaws/distributed-runtime/distribution3.svg delete mode 100644 sandbox/slaws/distributed-runtime/distribution4.svg delete mode 100644 sandbox/slaws/distributed-runtime/distributionCardinality.svg delete mode 100644 sandbox/slaws/distributed-runtime/multi-node-abstract.svg delete mode 100644 sandbox/slaws/distributed-runtime/single-node-abstract.svg delete mode 100644 sandbox/slaws/httpserver.php/README delete mode 100644 sandbox/slaws/httpserver.php/conf/httpd.conf delete mode 100644 sandbox/slaws/httpserver.php/conf/mime.types delete mode 100644 sandbox/slaws/httpserver.php/htdocs/AlertDisplay.php delete mode 100644 sandbox/slaws/httpserver.php/htdocs/AlertDisplayJson.php delete mode 100644 sandbox/slaws/httpserver.php/htdocs/Alerter.xsd delete mode 100644 sandbox/slaws/httpserver.php/htdocs/Alerts.wsdl delete mode 100644 sandbox/slaws/httpserver.php/htdocs/Alerts.xsd delete mode 100644 sandbox/slaws/httpserver.php/htdocs/AlertsSources.wsdl delete mode 100644 sandbox/slaws/httpserver.php/htdocs/Cached_Alerts.xml delete mode 100644 sandbox/slaws/httpserver.php/htdocs/index.html delete mode 100644 sandbox/slaws/httpserver.php/htdocs/phpinfo.php delete mode 100644 sandbox/slaws/httpserver.php/htdocs/pop.png delete mode 100644 sandbox/slaws/httpserver.php/htdocs/rss.png delete mode 100644 sandbox/slaws/httpserver.php/htdocs/service.smd delete mode 100644 sandbox/slaws/httpserver.php/htdocs/style.css delete mode 100644 sandbox/slaws/httpserver.php/startserver.bat create mode 100644 sandbox/slaws/old/backward-compatibility/contribution-processor/LICENSE create mode 100644 sandbox/slaws/old/backward-compatibility/contribution-processor/NOTICE create mode 100644 sandbox/slaws/old/backward-compatibility/contribution-processor/pom.xml create mode 100644 sandbox/slaws/old/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java create mode 100644 sandbox/slaws/old/backward-compatibility/pom.xml create mode 100644 sandbox/slaws/old/backward-compatibility/references/pom.xml create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite create mode 100644 sandbox/slaws/old/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java create mode 100644 sandbox/slaws/old/distributed-runtime/calculator-distributed.svg create mode 100644 sandbox/slaws/old/distributed-runtime/calculator-standalone.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distributed-abstract.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distributed-cardinality.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distributed-overview.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distribution1.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distribution2.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distribution3.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distribution4.svg create mode 100644 sandbox/slaws/old/distributed-runtime/distributionCardinality.svg create mode 100644 sandbox/slaws/old/distributed-runtime/multi-node-abstract.svg create mode 100644 sandbox/slaws/old/distributed-runtime/single-node-abstract.svg create mode 100644 sandbox/slaws/old/httpserver.php/README create mode 100644 sandbox/slaws/old/httpserver.php/conf/httpd.conf create mode 100644 sandbox/slaws/old/httpserver.php/conf/mime.types create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/AlertDisplay.php create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/AlertDisplayJson.php create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/Alerter.xsd create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/Alerts.wsdl create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/Alerts.xsd create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/AlertsSources.wsdl create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/Cached_Alerts.xml create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/index.html create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/phpinfo.php create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/pop.png create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/rss.png create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/service.smd create mode 100644 sandbox/slaws/old/httpserver.php/htdocs/style.css create mode 100644 sandbox/slaws/old/httpserver.php/startserver.bat diff --git a/sandbox/slaws/backward-compatibility/contribution-processor/LICENSE b/sandbox/slaws/backward-compatibility/contribution-processor/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/sandbox/slaws/backward-compatibility/contribution-processor/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/backward-compatibility/contribution-processor/NOTICE b/sandbox/slaws/backward-compatibility/contribution-processor/NOTICE deleted file mode 100644 index 25bb89c9b2..0000000000 --- a/sandbox/slaws/backward-compatibility/contribution-processor/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/sandbox/slaws/backward-compatibility/contribution-processor/pom.xml b/sandbox/slaws/backward-compatibility/contribution-processor/pom.xml deleted file mode 100644 index edc344fd12..0000000000 --- a/sandbox/slaws/backward-compatibility/contribution-processor/pom.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-modules - 2.0-SNAPSHOT - ../pom.xml - - - bc-contribution-processor - Apache Tuscany SCA Contribution Processor - - - - - org.apache.tuscany.sca - tuscany-assembly - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-assembly-xml - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace-impl - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-definitions-xml - 2.0-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-binding-sca - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-policy-xml - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-core-databinding - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-assembly-xsd - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-endpoint - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - test - - - - - - org.apache.tuscany.sca - tuscany-assembly-xsd-osoa - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-assembly-xml-osoa - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-sca-xml-osoa - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-xml-osoa - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-sca-api-osoa - 2.0-SNAPSHOT - - - - - diff --git a/sandbox/slaws/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java b/sandbox/slaws/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java deleted file mode 100644 index a82378268a..0000000000 --- a/sandbox/slaws/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java +++ /dev/null @@ -1,617 +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.bc; - -import static java.lang.System.currentTimeMillis; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.InputStream; -import java.net.URI; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -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.builder.CompositeBuilder; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; -import org.apache.tuscany.sca.client.impl.SCAClientImpl; -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.DefaultImport; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; -import org.apache.tuscany.sca.contribution.processor.ExtendedURLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint; -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.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.core.assembly.ActivationException; -import org.apache.tuscany.sca.core.assembly.CompositeActivator; -import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; -import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; -import org.apache.tuscany.sca.core.invocation.ProxyFactory; -import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.Definitions; -import org.apache.tuscany.sca.definitions.DefinitionsFactory; -import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; -import org.apache.tuscany.sca.definitions.xml.DefinitionsExtensionPoint; -import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation; -import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.provider.DefinitionsProvider; -import org.apache.tuscany.sca.provider.DefinitionsProviderException; -import org.apache.tuscany.sca.provider.DefinitionsProviderExtensionPoint; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentContext; -import org.apache.tuscany.sca.work.WorkScheduler; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionBuilder; -import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint; -import org.oasisopen.sca.CallableReference; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.ServiceRuntimeException; -import org.oasisopen.sca.client.SCAClient; - -/** - * Represents an SCA runtime node. - * - * @version $Rev$ $Date$ - */ -public class ContributionProcessorImpl { - - private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; - - private static final Logger logger = Logger.getLogger(ContributionProcessorImpl.class.getName()); - - // The node configuration name, used for logging - private String configurationName; - - // The composite loaded into this node - private Composite composite; - private boolean useDeploymentComposite; - - private ExtensionPointRegistry extensionPoints; - private Monitor monitor; - private ExtendedURLArtifactProcessor contributionProcessor; - private ModelResolverExtensionPoint modelResolvers; - private FactoryExtensionPoint modelFactories; - private WorkspaceFactory workspaceFactory; - private ContributionFactory contributionFactory; - private AssemblyFactory assemblyFactory; - private XMLInputFactory inputFactory; - private ContributionBuilder contributionDependencyBuilder; - private CompositeBuilder compositeBuilder; - private CompositeBuilder endpointReferenceBuilder; - private StAXArtifactProcessorExtensionPoint xmlProcessors; - private StAXArtifactProcessor compositeProcessor; - private ProxyFactory proxyFactory; - private List moduleActivators = new ArrayList(); - private CompositeActivator compositeActivator; - private WorkScheduler workScheduler; - private Contribution systemContribution; - private Definitions systemDefinitions; - // Added MJE 28/04/2009 - private URLArtifactProcessor compositeDocumentProcessor; - - - /** - * Constructs a new SCA node. - * - * @param compositeURI - * @param contributions - */ - ContributionProcessorImpl(org.apache.tuscany.sca.node.Contribution[] contributions) { - configurationName = "temp"; - logger.log(Level.INFO, "Creating contribution processor: " + configurationName); - - try { - // Initialize the runtime - init(); - - // Create a node configuration - NodeImplementationFactory nodeImplementationFactory = - modelFactories.getFactory(NodeImplementationFactory.class); - ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation(); - - // Create contribution models - for (org.apache.tuscany.sca.node.Contribution c : contributions) { - Contribution contribution = contribution(contributionFactory, c); - configuration.getContributions().add(contribution); - } - - // Configure the node - configureNode(configuration); - - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - - static Contribution contribution(ContributionFactory contributionFactory, org.apache.tuscany.sca.node.Contribution c) { - Contribution contribution = contributionFactory.createContribution(); - contribution.setURI(c.getURI()); - contribution.setLocation(c.getLocation()); - contribution.setUnresolved(true); - return contribution; - } - - - - private static String getSystemProperty(final String name) { - return AccessController.doPrivileged(new PrivilegedAction() { - public String run() { - return System.getProperty(name); - } - }); - } - - static URI createURI(String uri) { - if (uri.indexOf(' ') != -1) { - uri = uri.replace(" ", "%20"); - } - return URI.create(uri); - } - - private void init() { - long start = currentTimeMillis(); - - // Create extension point registry - extensionPoints = new DefaultExtensionPointRegistry(); - - // Enable schema validation only of the logger level is FINE or higher - ValidationSchemaExtensionPoint schemas = - extensionPoints.getExtensionPoint(ValidationSchemaExtensionPoint.class); - if (schemas != null) { - String enabled = getSystemProperty(ValidationSchemaExtensionPoint.class.getName() + ".enabled"); - if (enabled == null) { - enabled = "true"; - } - boolean debug = logger.isLoggable(Level.FINE); - schemas.setEnabled("true".equals(enabled) || debug); - } - - // Use the runtime-enabled assembly factory - modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); - assemblyFactory = new RuntimeAssemblyFactory(); - modelFactories.addFactory(assemblyFactory); - - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - monitor = monitorFactory.createMonitor(); - - // Initialize the Tuscany module activators - ModuleActivatorExtensionPoint activators = - extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); - for (ModuleActivator moduleActivator : activators.getModuleActivators()) { - try { - moduleActivator.start(extensionPoints); - moduleActivators.add(moduleActivator); - } catch (Throwable e) { - // Ignore the failing module for now - logger.log(Level.SEVERE, e.getMessage(), e); - } - } - - // Get XML input/output factories - inputFactory = modelFactories.getFactory(XMLInputFactory.class); - - // Get contribution workspace and assembly model factories - contributionFactory = modelFactories.getFactory(ContributionFactory.class); - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - - // Create XML artifact processors - xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - compositeProcessor = xmlProcessors.getProcessor(Composite.class); - - // Create contribution content processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = - extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = (ExtendedURLArtifactProcessor) docProcessorExtensions.getProcessor(Contribution.class); - - // Added MJE 28/04/2009 - // Create Composite Document processor - compositeDocumentProcessor = docProcessorExtensions.getProcessor(Composite.class); - - // Get the model resolvers - modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); - - // Get a contribution dependency builder - ContributionBuilderExtensionPoint contributionBuilders = - extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class); - contributionDependencyBuilder = - contributionBuilders - .getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder"); - - // Get composite builders - CompositeBuilderExtensionPoint compositeBuilders = - extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class); - compositeBuilder = - compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); - - // Get endpoint builders - // TODO - new extension point? - endpointReferenceBuilder = - compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.endpoint.impl.EndpointReferenceBuilderImpl"); - - // Initialize runtime - - // Get proxy factory - ProxyFactoryExtensionPoint proxyFactories = extensionPoints.getExtensionPoint(ProxyFactoryExtensionPoint.class); - proxyFactory = new ExtensibleProxyFactory(proxyFactories); - - // Get the composite activator - compositeActivator = utilities.getUtility(CompositeActivator.class); - - workScheduler = utilities.getUtility(WorkScheduler.class); - - DefinitionsFactory definitionsFactory = modelFactories.getFactory(DefinitionsFactory.class); - systemDefinitions = definitionsFactory.createDefinitions(); - - DefinitionsExtensionPoint definitionsExtensionPoint = - extensionPoints.getExtensionPoint(DefinitionsExtensionPoint.class); - for (Definitions defs : definitionsExtensionPoint.getDefinitions()) { - DefinitionsUtil.aggregate(systemDefinitions, defs); - } - - // Load the system definitions.xml from all of the loaded extension points - DefinitionsProviderExtensionPoint definitionsProviders = - extensionPoints.getExtensionPoint(DefinitionsProviderExtensionPoint.class); - - // aggregate all the definitions into a single definitions model - try { - for (DefinitionsProvider definitionsProvider : definitionsProviders.getDefinitionsProviders()) { - DefinitionsUtil.aggregate(definitionsProvider.getDefinitions(), systemDefinitions); - } - } catch (DefinitionsProviderException e) { - throw new IllegalStateException(e); - } - - // create a system contribution to hold the definitions. The contribution - // will be extended later with definitions from application contributions - systemContribution = contributionFactory.createContribution(); - systemContribution.setURI("http://tuscany.apache.org/SystemContribution"); - systemContribution.setLocation("http://tuscany.apache.org/SystemContribution"); - ModelResolver modelResolver = new ExtensibleModelResolver(systemContribution, modelResolvers, modelFactories); - systemContribution.setModelResolver(modelResolver); - systemContribution.setUnresolved(true); - - // create an artifact to represent the system defintions and - // add it to the contribution - List artifacts = systemContribution.getArtifacts(); - Artifact artifact = contributionFactory.createArtifact(); - artifact.setURI("http://tuscany.apache.org/SystemContribution/Definitions"); - artifact.setLocation("Derived"); - artifact.setModel(systemDefinitions); - artifacts.add(artifact); - - // don't resolve the system contribution until all the application - // level definitions have been added - - // - // // Configure a resolver for the system definitions - // ModelResolver definitionsResolver = new DefaultModelResolver(); - // for (Intent intent : systemDefinitions.getPolicyIntents()) { - // definitionsResolver.addModel(intent); - // } - // for (PolicySet policySet : systemDefinitions.getPolicySets()) { - // definitionsResolver.addModel(policySet); - // } - // for (ExtensionType bindingType : systemDefinitions.getBindingTypes()) { - // definitionsResolver.addModel(bindingType); - // } - // for (ExtensionType implementationType : systemDefinitions.getImplementationTypes()) { - // definitionsResolver.addModel(implementationType); - // } - // - // // Now that all system sca definitions have been read, let's resolve them - // URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - // URLArtifactProcessor definitionsProcessor = documentProcessors.getProcessor(Definitions.class); - // try { - // definitionsProcessor.resolve(systemDefinitions, definitionsResolver); - // } catch (ContributionResolveException e) { - // throw new IllegalStateException(e); - // } - - if (logger.isLoggable(Level.FINE)) { - long end = currentTimeMillis(); - logger.fine("The tuscany runtime started in " + (end - start) + " ms."); - } - } - - private void configureNode(ConfiguredNodeImplementation configuration) throws Exception { - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); - - // Load the specified contributions - for (Contribution c : configuration.getContributions()) { - URI contributionURI = URI.create(c.getURI()); - - URI uri = createURI(c.getLocation()); - if (uri.getScheme() == null) { - uri = new File(c.getLocation()).toURI(); - } - URL contributionURL = uri.toURL(); - - // Load the contribution - logger.log(Level.INFO, "Loading contribution: " + contributionURL); - Contribution contribution = contributionProcessor.read(null, contributionURI, contributionURL); - workspace.getContributions().add(contribution); - analyzeProblems(); - } - - // Build an aggregated SCA definitions model. Must be done before we try and - // resolve any contributions or composites as they may depend on the full - // definitions.xml picture - - // get all definitions.xml artifacts from contributions and aggregate - // into the system contribution. In turn add a default import into - // each contribution so that for unresolved items the resolution - // processing will look in the system contribution - for (Contribution contribution : workspace.getContributions()) { - // aggregate definitions - for (Artifact artifact : contribution.getArtifacts()) { - Object model = artifact.getModel(); - if (model instanceof Definitions) { - DefinitionsUtil.aggregate((Definitions)model, systemDefinitions); - } - } - - // create a default import and wire it up to the system contribution - // model resolver. This is the trick that makes the resolution processing - // skip over to the system contribution if resolution is unsuccessful - // in the current contribution - DefaultImport defaultImport = contributionFactory.createDefaultImport(); - defaultImport.setModelResolver(systemContribution.getModelResolver()); - contribution.getImports().add(defaultImport); - } - - // now resolve the system contribution and add the contribution - // to the workspace - contributionProcessor.resolve(systemContribution, workspace.getModelResolver()); - workspace.getContributions().add(systemContribution); - - // TODO - Now we can calculate applicable policy sets for each composite - - // pre-resolve the contributions - contributionsPreresolve( workspace.getContributions(), workspace.getModelResolver() ); - - // Build the contribution dependencies - Set resolved = new HashSet(); - for (Contribution contribution : workspace.getContributions()) { - contributionDependencyBuilder.build(contribution, workspace, monitor); - - // Resolve contributions - for (Contribution dependency : contribution.getDependencies()) { - if (!resolved.contains(dependency)) { - resolved.add(dependency); - contributionProcessor.resolve(dependency, workspace.getModelResolver()); - } - } - } - - // Create a top level composite to host our composites - // This is temporary to make the activator happy - composite = assemblyFactory.createComposite(); - composite.setName(new QName(SCA11_TUSCANY_NS, "_tempComposite")); - composite.setURI(SCA11_TUSCANY_NS); - - for (Contribution contribution : workspace.getContributions()) { - // find all the (deployable) composites - for (Composite deployable: contribution.getDeployables()) { - composite.getIncludes().add(deployable); - } - } - - // Build the composite and wire the components included in it - compositeBuilder.build(composite, systemDefinitions, monitor); - analyzeProblems(); - - // build the endpoint references - endpointReferenceBuilder.build(composite, systemDefinitions, monitor); - analyzeProblems(); - - - - -/* - composite = configuration.getComposite(); - - // If a composite was not originally supplied when the Node was created, pick one of the deployable - // composites from the supplied contributions. Note: throws an exception if none can be found. - if (composite == null) { - setDefaultComposite(configuration, workspace); - } - - // Find the composite in the given contributions - boolean found = false; - if (!useDeploymentComposite) { - Artifact compositeFile = contributionFactory.createArtifact(); - compositeFile.setUnresolved(true); - compositeFile.setURI(composite.getURI()); - for (Contribution contribution : workspace.getContributions()) { - ModelResolver resolver = contribution.getModelResolver(); - - Artifact resolvedArtifact = resolver.resolveModel(Artifact.class, compositeFile); - if (!resolvedArtifact.isUnresolved() && resolvedArtifact.getModel() instanceof Composite) { - - if (!composite.isUnresolved()) { - - // The composite content was passed into the node and read into a composite model, - // don't use the composite found in the contribution, use that composite, but just resolve - // it within the context of the contribution - compositeProcessor.resolve(composite, resolver); - - } else { - - // Use the resolved composite we've found in the contribution - composite = (Composite)resolvedArtifact.getModel(); - } - found = true; - break; - } // end if - } // end for - } - - if (!found) { - if (!useDeploymentComposite) { - // If the composite was not found, then it must be a separate composite file outside any of the contributions - // - a "composite by value" - this requires its URI to be absolute and pointing at the composite file itself. - // First read in the composite file to create a composite model object... - URI compositeURI = new URI(composite.getURI()); - URL compositeURL = compositeURI.toURL(); - composite = compositeDocumentProcessor.read(compositeURL, compositeURI, compositeURL); - if (composite == null) { - throw new IllegalArgumentException("Composite not found: " + compositeURI); - } - } - - // Resolve the "composite by value" against the FIRST contribution - Contribution contribution = workspace.getContributions().get(0); - ModelResolver resolver = contribution.getModelResolver(); - compositeProcessor.resolve(composite, resolver); - if (composite.isUnresolved()) { - throw new IllegalArgumentException("Could not resolve composite: " + composite.getURI() - + " in contribution " - + contribution.getURI()); - } - } // end if - - // Build the composite and wire the components included in it - compositeBuilder.build(composite, systemDefinitions, monitor); - analyzeProblems(); - - // build the endpoint references - endpointReferenceBuilder.build(composite, systemDefinitions, monitor); - analyzeProblems(); - - // Create a top level composite to host our composite - // This is temporary to make the activator happy - Composite tempComposite = assemblyFactory.createComposite(); - tempComposite.setName(new QName(SCA11_TUSCANY_NS, "_tempComposite")); - tempComposite.setURI(SCA11_TUSCANY_NS); - - // Include the node composite in the top-level composite - tempComposite.getIncludes().add(composite); - - // Set the top level composite on the composite activator as - // logic in callable reference resolution relies on this being - // available - compositeActivator.setDomainComposite(tempComposite); -*/ - - } - - /** - * Pre-resolve phase for contributions, to set up handling of imports and exports prior to full resolution - * @param contributions - the contributions to preresolve - * @param resolver - the ModelResolver to use - * @throws ContributionResolveException - */ - private void contributionsPreresolve( List contributions, ModelResolver resolver ) - throws ContributionResolveException { - - for( Contribution contribution : contributions ) { - contributionProcessor.preResolve(contribution, resolver); - } // end for - } // end method contributionsPreresolve - - - - - /** - * Analyze problems reported by the artifact processors and builders. - * - * @throws Exception - */ - private void analyzeProblems() throws Exception { - for (Problem problem : monitor.getProblems()) { - if ((problem.getSeverity() == Severity.ERROR) && (!problem.getMessageId().equals("SchemaError"))) { - if (problem.getCause() != null) { - throw problem.getCause(); - } else { - throw new ServiceRuntimeException(problem.toString()); - } - } - } - } - - /* - * Sets a default composite by using any deployable one. - */ - private void setDefaultComposite(ConfiguredNodeImplementation configuration, Workspace workspace) { - // just use the first deployable composite - for (Contribution contribution : workspace.getContributions()) { - for (Composite c : contribution.getDeployables()) { - // Ensure that we pick a composite that has actually been found in its contribution!! - if( c.getURI() != null ) { - composite = assemblyFactory.createComposite(); - composite.setURI(c.getURI()); - composite.setUnresolved(true); - configuration.setComposite(composite); - return; - } // end if - } // end for - } // end for - throw new ServiceRuntimeException("No deployable composite found"); - } // end method setDefaultComposite - - public ExtensionPointRegistry getExtensionPoints() { - return extensionPoints; - } - - -} diff --git a/sandbox/slaws/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java b/sandbox/slaws/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java deleted file mode 100644 index 0a06f4bcd7..0000000000 --- a/sandbox/slaws/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.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.bc; - - -import java.io.File; - -import org.apache.tuscany.sca.node.Contribution; -import org.junit.Test; - -/** - * Test case for NodeImpl - */ -public class ConributionProcessorTestCase { - - @Test - public void testContributionProcessor() { - Contribution contribution = new Contribution("c1", new File("../references/target/classes").toURI().toString()); - Contribution[] contributions = new Contribution[]{contribution}; - - ContributionProcessorImpl cp = new ContributionProcessorImpl(contributions); - - } - -} diff --git a/sandbox/slaws/backward-compatibility/pom.xml b/sandbox/slaws/backward-compatibility/pom.xml deleted file mode 100644 index 9e672f9fef..0000000000 --- a/sandbox/slaws/backward-compatibility/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../pom.xml - - tuscany-itest-backward-compatibility - pom - Apache Tuscany SCA Integration Test Backward Compatibility - - - - junit - junit - 4.5 - compile - - - - org.easymock - easymock - 2.4 - test - - - - - ${basedir}/build-was-integration.xml - ${basedir}/wasAdmin.py - - - - - - - default - - true - - - contribution-processor - references - - - - - eclipse - - contribution-processor - references - - - org.apache.tuscany.maven.plugins:maven-bundle-plugin:eclipse - - - - org.apache.tuscany.maven.plugins - maven-bundle-plugin - 1.0.2 - true - - - org.apache.maven.plugins - maven-eclipse-plugin - - true - - - - - - - - - - diff --git a/sandbox/slaws/backward-compatibility/references/pom.xml b/sandbox/slaws/backward-compatibility/references/pom.xml deleted file mode 100644 index 36c2b4ccc7..0000000000 --- a/sandbox/slaws/backward-compatibility/references/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-SNAPSHOT - ../pom.xml - - bc-itest-references - Apache Tuscany SCA Backward Compat iTest References - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-api - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-core - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-webservice - pom - 2.0-SNAPSHOT - - - - diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java deleted file mode 100644 index f8c0850118..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.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.itest.references; - -public interface AComponent { - - String fooB(); - - String fooC(); - - String fooBC(); - - String fooD1(); - - String fooD2(); - - String fooMultipleD(); - - String fooMultipleDArray(); - - String fooMultipleDServiceRef(); - - DComponent getDReference(); -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java deleted file mode 100644 index 647fff0159..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java +++ /dev/null @@ -1,126 +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.itest.references; - -import java.util.Collection; -import java.util.List; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; - -public class AComponentImpl implements AComponent { - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - protected CComponent cReference; - - @Reference(required = false) - protected DComponent dReference; - - @Reference(name = "dReferences") - public Collection dReferences; - - @Reference(name = "dReferenceArray") - public DComponent[] dReferenceArray; - - - @Reference(name = "dServiceReferences") - public List> dServiceReferences; - - private DComponent dReference1; - - private DComponent dReference2; - - @Reference(name = "dReference1") - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - @Reference - public void setDReference2(DComponent dReference2) { - this.dReference2 = dReference2; - } - - public String fooB() { - return b.bFoo(); - } - - public String fooC() { - return cReference.cFoo(); - } - - public String fooBC() { - return b.fooC(); - } - - public String fooD() { - return dReference1.dFoo(); - } - - public String fooD1() { - return dReference1.dFoo(); - } - - public String fooD2() { - return dReference2.dFoo(); - } - - public String fooMultipleDArray() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferenceArray) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleD() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferences) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleDServiceRef() { - StringBuffer str = new StringBuffer(); - for (ServiceReference d : dServiceReferences) { - str.append(d.getService().getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public DComponent getDReference() { - return dReference; - } - -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java deleted file mode 100644 index 785920bb2d..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.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 org.apache.tuscany.sca.itest.references; - -public interface BComponent { - - String bFoo(); - - String fooC(); -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java deleted file mode 100644 index 6b1065ab0d..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java +++ /dev/null @@ -1,39 +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.itest.references; - -import org.osoa.sca.annotations.Reference; - -public class BComponentImpl implements BComponent { - - protected CComponent cReference; - - public BComponentImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponent"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java deleted file mode 100644 index 1cd7cb7fe5..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java +++ /dev/null @@ -1,39 +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.itest.references; - -import org.osoa.sca.annotations.Reference; - -public class BComponentWrongTargetImpl implements BComponent { - - protected CComponent cReference; - - public BComponentWrongTargetImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponentWrongTarget"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java deleted file mode 100644 index d436c28adc..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java +++ /dev/null @@ -1,24 +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.itest.references; - -public interface CComponent { - - String cFoo(); -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java deleted file mode 100644 index a1823e1cdc..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java +++ /dev/null @@ -1,27 +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.itest.references; - -public class CComponentImpl implements CComponent { - - public String cFoo() { - return "CComponent"; - } - -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java deleted file mode 100644 index 2618ec7095..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java +++ /dev/null @@ -1,27 +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.itest.references; - -import org.osoa.sca.annotations.Remotable; - -public interface DComponent { - - String dFoo(); - String getComponentName(); -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java deleted file mode 100644 index 79c802bc97..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.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.itest.references; - -import org.osoa.sca.annotations.ComponentName; - -public class DComponentImpl implements DComponent { - @ComponentName - public String name; - - public String dFoo() { - return "DComponent"; - } - - public String getComponentName() { - return name; - } - -} diff --git a/sandbox/slaws/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite b/sandbox/slaws/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite deleted file mode 100644 index 3cfd80cde5..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/slaws/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/sandbox/slaws/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java deleted file mode 100644 index 98e736df00..0000000000 --- a/sandbox/slaws/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java +++ /dev/null @@ -1,113 +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.itest.references; - -import static junit.framework.Assert.assertEquals; -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.launcher.Contribution; -import org.apache.tuscany.sca.node.launcher.NodeLauncher; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -public class ManualWiredReferenceTestCase { - private static NodeLauncher launcher; - private static Node node; - private static AComponent acomponent; - - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - launcher = NodeLauncher.newInstance(); - node = launcher.createNode("ManualWiredReferencesTest.composite", - new Contribution("test", "./target/classes")); - - try { - node.start(); - } catch (Exception ex) { - String status = ex.toString(); - System.out.println(status); - } - - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node.destroy(); - } - if (launcher != null) { - //launcher.destroy(); - } - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testD1Reference() { - acomponent.fooD1(); - } - - @Ignore - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.getDReference().dFoo(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/sandbox/slaws/distributed-runtime/calculator-distributed.svg b/sandbox/slaws/distributed-runtime/calculator-distributed.svg deleted file mode 100644 index 341af29994..0000000000 --- a/sandbox/slaws/distributed-runtime/calculator-distributed.svg +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - - nodeB nodeC - nodeA - Domain - diff --git a/sandbox/slaws/distributed-runtime/calculator-standalone.svg b/sandbox/slaws/distributed-runtime/calculator-standalone.svg deleted file mode 100644 index 40f782e4f1..0000000000 --- a/sandbox/slaws/distributed-runtime/calculator-standalone.svg +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator Composite - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - - Node Domain - diff --git a/sandbox/slaws/distributed-runtime/distributed-abstract.svg b/sandbox/slaws/distributed-runtime/distributed-abstract.svg deleted file mode 100644 index 3f91a86484..0000000000 --- a/sandbox/slaws/distributed-runtime/distributed-abstract.svg +++ /dev/null @@ -1,570 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - SCA Domain - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - diff --git a/sandbox/slaws/distributed-runtime/distributed-cardinality.svg b/sandbox/slaws/distributed-runtime/distributed-cardinality.svg deleted file mode 100644 index 5a14ed4575..0000000000 --- a/sandbox/slaws/distributed-runtime/distributed-cardinality.svg +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - LogicalDomain - - TuscanyRuntime - - Node - - Domain - - DomainLevelComposite - - - Component - n - 1 - - - 1 - 1 - 1 - n - - LogicalDomainLevelComposite - - LogicalComponent - - - 1 - 1 - 1 - n - n - - - - 1 - 1 - n - - - - The physical artifacts on the left represent the role this nodeplays in the wider (logical) domain - - diff --git a/sandbox/slaws/distributed-runtime/distributed-overview.svg b/sandbox/slaws/distributed-runtime/distributed-overview.svg deleted file mode 100644 index c8c32a35a8..0000000000 --- a/sandbox/slaws/distributed-runtime/distributed-overview.svg +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - nodeB - - - - nodeA nodeC - DomainNodeManager - - - DistrubtedDomain - - - - events configurationchanges - DomainNodeManager - - - - - - events configurationchanges - DomainNodeManager - - - - - - events configurationchanges - DistributedDomainManager - - - - - DistributedSCA Binding LocalSCABinding LocalSCABinding DistributedSCA Binding - diff --git a/sandbox/slaws/distributed-runtime/distribution1.svg b/sandbox/slaws/distributed-runtime/distribution1.svg deleted file mode 100644 index 9fef91247c..0000000000 --- a/sandbox/slaws/distributed-runtime/distribution1.svg +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - Composite A - - ComponentA(CA) - - - ComponentB(CB) - - - - - Node1 (N1) Node2 (N2) - - SCA Model Runtime Nodes Physical - I think we can ignore for the time being - diff --git a/sandbox/slaws/distributed-runtime/distribution2.svg b/sandbox/slaws/distributed-runtime/distribution2.svg deleted file mode 100644 index e341fa62f6..0000000000 --- a/sandbox/slaws/distributed-runtime/distribution2.svg +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - Composite A - - ComponentA(CA) - - - ComponentB(CB) - - - - Node1 (N1) Node2 (N2) - - - - - - - - - - - - Domain - - - - - - - diff --git a/sandbox/slaws/distributed-runtime/distribution3.svg b/sandbox/slaws/distributed-runtime/distribution3.svg deleted file mode 100644 index 48e071f7b2..0000000000 --- a/sandbox/slaws/distributed-runtime/distribution3.svg +++ /dev/null @@ -1,736 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - Composite A - - ComponentA(CA) - - - ComponentB(CB) - - - - - - - - - - - - - - Domain 2. Componentsassociated withruntimes 3. Instance creation and execution - - - - - - - - 1. Runtimes startedon physical processors - - - - - - - - - - - - - - RuntimeNode RuntimeNode - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/slaws/distributed-runtime/distribution4.svg b/sandbox/slaws/distributed-runtime/distribution4.svg deleted file mode 100644 index f453bfea67..0000000000 --- a/sandbox/slaws/distributed-runtime/distribution4.svg +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - Composite A - - ComponentA(CA) - - - ComponentB(CB) - - - - - - - - Domain - - - - - - - - - - - - - - RuntimeNodeA RuntimeNodeB - Events Messages Configuration DomainConfiguration - diff --git a/sandbox/slaws/distributed-runtime/distributionCardinality.svg b/sandbox/slaws/distributed-runtime/distributionCardinality.svg deleted file mode 100644 index 5e09bcbe2a..0000000000 --- a/sandbox/slaws/distributed-runtime/distributionCardinality.svg +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - Domain - - Node - n - - 1 - - DomainLevelComposite - - Component - - - 1 - 1 - n - - 1 - 1 - 1 - - NodeLevelComposite - - - Subset Of - n - 1 - - diff --git a/sandbox/slaws/distributed-runtime/multi-node-abstract.svg b/sandbox/slaws/distributed-runtime/multi-node-abstract.svg deleted file mode 100644 index f770e3e5f3..0000000000 --- a/sandbox/slaws/distributed-runtime/multi-node-abstract.svg +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - Distributed SCA Domain - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - Node - - - Component - - - - diff --git a/sandbox/slaws/distributed-runtime/single-node-abstract.svg b/sandbox/slaws/distributed-runtime/single-node-abstract.svg deleted file mode 100644 index 60392a2636..0000000000 --- a/sandbox/slaws/distributed-runtime/single-node-abstract.svg +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - StandaloneSCA Domain - - Node - - - - Component - - - - diff --git a/sandbox/slaws/httpserver.php/README b/sandbox/slaws/httpserver.php/README deleted file mode 100644 index b318a289f2..0000000000 --- a/sandbox/slaws/httpserver.php/README +++ /dev/null @@ -1,28 +0,0 @@ -Alert Aggregator - PHP Display Component -======================================== - -This httpserver configuration includes a PHP implementation of the -feed aggregator display component - -The startserver script can be used to start up an HTTPD server -configured to run the display component. It relies on two environment -variables being correctl configured. See the top of startserver.bat. - -PHP must be configured to include the PHP SCA_SDO v1.2.1 extension from PECL. - -http://pecl.php.net/package/sca_sdo - -This provides the SCA and SDO support that the display component relies on. - -To run the display component on windows. - -> cd httpserver.php - -fix up the paths at the top of startserver.bat and then - -> startserver.bat - -then point your browser at - -http://localhost:9091/index.html - diff --git a/sandbox/slaws/httpserver.php/conf/httpd.conf b/sandbox/slaws/httpserver.php/conf/httpd.conf deleted file mode 100644 index 92026c9717..0000000000 --- a/sandbox/slaws/httpserver.php/conf/httpd.conf +++ /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. - -# This is the main Apache HTTP server configuration file. It contains the -# configuration directives that give the server its instructions. -# See for detailed information. - -Listen 9091 - -# Generated by the startserver script -Include conf/base.conf - -# SCA rest module not required for the PHP part -# Include conf/tuscany_sca_mod_rest.conf diff --git a/sandbox/slaws/httpserver.php/conf/mime.types b/sandbox/slaws/httpserver.php/conf/mime.types deleted file mode 100644 index 4279f51bca..0000000000 --- a/sandbox/slaws/httpserver.php/conf/mime.types +++ /dev/null @@ -1,607 +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. - -# This file controls what Internet media types are sent to the client for -# given file extension(s). Sending the correct media type to the client -# is important so they know how to handle the content of the file. -# Extra types can either be added here or by using an AddType directive -# in your config files. For more information about Internet media types, -# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type -# registry is at . - -# MIME type Extensions -application/activemessage -application/andrew-inset ez -application/applefile -application/atom+xml atom -application/atomicmail -application/batch-smtp -application/beep+xml -application/cals-1840 -application/cnrp+xml -application/commonground -application/cpl+xml -application/cybercash -application/dca-rft -application/dec-dx -application/dvcs -application/edi-consent -application/edifact -application/edi-x12 -application/eshop -application/font-tdpfr -application/http -application/hyperstudio -application/iges -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc -application/mathematica -application/mathml+xml mathml -application/msword doc -application/news-message-id -application/news-transmission -application/ocsp-request -application/ocsp-response -application/octet-stream bin dms lha lzh exe class so dll dmg -application/oda oda -application/ogg ogg -application/parityfec -application/pdf pdf -application/pgp-encrypted -application/pgp-keys -application/pgp-signature -application/pkcs10 -application/pkcs7-mime -application/pkcs7-signature -application/pkix-cert -application/pkix-crl -application/pkixcmp -application/postscript ai eps ps -application/prs.alvestrand.titrax-sheet -application/prs.cww -application/prs.nprend -application/prs.plucker -application/qsig -application/rdf+xml rdf -application/reginfo+xml -application/remote-printing -application/riscos -application/rtf -application/sdp -application/set-payment -application/set-payment-initiation -application/set-registration -application/set-registration-initiation -application/sgml -application/sgml-open-catalog -application/sieve -application/slate -application/smil smi smil -application/srgs gram -application/srgs+xml grxml -application/timestamp-query -application/timestamp-reply -application/tve-trigger -application/vemmi -application/vnd.3gpp.pic-bw-large -application/vnd.3gpp.pic-bw-small -application/vnd.3gpp.pic-bw-var -application/vnd.3gpp.sms -application/vnd.3m.post-it-notes -application/vnd.accpac.simply.aso -application/vnd.accpac.simply.imp -application/vnd.acucobol -application/vnd.acucorp -application/vnd.adobe.xfdf -application/vnd.aether.imp -application/vnd.amiga.ami -application/vnd.anser-web-certificate-issue-initiation -application/vnd.anser-web-funds-transfer-initiation -application/vnd.audiograph -application/vnd.blueice.multipass -application/vnd.bmi -application/vnd.businessobjects -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cinderella -application/vnd.claymore -application/vnd.commerce-battelle -application/vnd.commonspace -application/vnd.contact.cmsg -application/vnd.cosmocaller -application/vnd.criticaltools.wbs+xml -application/vnd.ctc-posml -application/vnd.cups-postscript -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.curl -application/vnd.cybank -application/vnd.data-vision.rdz -application/vnd.dna -application/vnd.dpgraph -application/vnd.dreamfactory -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven -application/vnd.epson.esf -application/vnd.epson.msf -application/vnd.epson.quickanime -application/vnd.epson.salt -application/vnd.epson.ssf -application/vnd.ericsson.quickcall -application/vnd.eudora.data -application/vnd.fdf -application/vnd.ffsns -application/vnd.fints -application/vnd.flographit -application/vnd.framemaker -application/vnd.fsc.weblaunch -application/vnd.fujitsu.oasys -application/vnd.fujitsu.oasys2 -application/vnd.fujitsu.oasys3 -application/vnd.fujitsu.oasysgp -application/vnd.fujitsu.oasysprs -application/vnd.fujixerox.ddd -application/vnd.fujixerox.docuworks -application/vnd.fujixerox.docuworks.binder -application/vnd.fut-misnet -application/vnd.grafeq -application/vnd.groove-account -application/vnd.groove-help -application/vnd.groove-identity-message -application/vnd.groove-injector -application/vnd.groove-tool-message -application/vnd.groove-tool-template -application/vnd.groove-vcard -application/vnd.hbci -application/vnd.hhe.lesson-player -application/vnd.hp-hpgl -application/vnd.hp-hpid -application/vnd.hp-hps -application/vnd.hp-pcl -application/vnd.hp-pclxl -application/vnd.httphone -application/vnd.hzn-3d-crossword -application/vnd.ibm.afplinedata -application/vnd.ibm.electronic-media -application/vnd.ibm.minipay -application/vnd.ibm.modcap -application/vnd.ibm.rights-management -application/vnd.ibm.secure-container -application/vnd.informix-visionary -application/vnd.intercon.formnet -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo -application/vnd.intu.qfx -application/vnd.irepository.package+xml -application/vnd.is-xpr -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.jisp -application/vnd.kde.karbon -application/vnd.kde.kchart -application/vnd.kde.kformula -application/vnd.kde.kivio -application/vnd.kde.kontour -application/vnd.kde.kpresenter -application/vnd.kde.kspread -application/vnd.kde.kword -application/vnd.kenameaapp -application/vnd.koan -application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop -application/vnd.llamagraphics.life-balance.exchange+xml -application/vnd.lotus-1-2-3 -application/vnd.lotus-approach -application/vnd.lotus-freelance -application/vnd.lotus-notes -application/vnd.lotus-organizer -application/vnd.lotus-screencam -application/vnd.lotus-wordpro -application/vnd.mcd -application/vnd.mediastation.cdkey -application/vnd.meridian-slingshot -application/vnd.micrografx.flo -application/vnd.micrografx.igx -application/vnd.mif mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf -application/vnd.mobius.dis -application/vnd.mobius.mbk -application/vnd.mobius.mqy -application/vnd.mobius.msl -application/vnd.mobius.plc -application/vnd.mobius.txf -application/vnd.mophun.application -application/vnd.mophun.certificate -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry -application/vnd.ms-asf -application/vnd.ms-excel xls -application/vnd.ms-lrm -application/vnd.ms-powerpoint ppt -application/vnd.ms-project -application/vnd.ms-tnef -application/vnd.ms-works -application/vnd.ms-wpl -application/vnd.mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician -application/vnd.netfpx -application/vnd.noblenet-directory -application/vnd.noblenet-sealer -application/vnd.noblenet-web -application/vnd.novadigm.edm -application/vnd.novadigm.edx -application/vnd.novadigm.ext -application/vnd.obn -application/vnd.osa.netdeploy -application/vnd.palm -application/vnd.pg.format -application/vnd.pg.osasli -application/vnd.powerbuilder6 -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.previewsystems.box -application/vnd.publishare-delta-tree -application/vnd.pvi.ptid1 -application/vnd.pwg-multiplexed -application/vnd.pwg-xhtml-print+xml -application/vnd.quark.quarkxpress -application/vnd.rapid -application/vnd.s3sms -application/vnd.sealed.net -application/vnd.seemail -application/vnd.shana.informed.formdata -application/vnd.shana.informed.formtemplate -application/vnd.shana.informed.interchange -application/vnd.shana.informed.package -application/vnd.smaf -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.street-stream -application/vnd.svd -application/vnd.swiftview-ics -application/vnd.triscape.mxs -application/vnd.trueapp -application/vnd.truedoc -application/vnd.ufdl -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio -application/vnd.visionary -application/vnd.vividence.scriptfile -application/vnd.vsf -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf -application/vnd.wv.csp+wbxml -application/vnd.xara -application/vnd.xfdl -application/vnd.yamaha.hv-dic -application/vnd.yamaha.hv-script -application/vnd.yamaha.hv-voice -application/vnd.yellowriver-custom-menu -application/voicexml+xml vxml -application/watcherinfo+xml -application/whoispp-query -application/whoispp-response -application/wita -application/wordperfect5.1 -application/x-bcpio bcpio -application/x-cdlink vcd -application/x-chess-pgn pgn -application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-director dcr dir dxr -application/x-dvi dvi -application/x-futuresplash spl -application/x-gtar gtar -application/x-gzip -application/x-hdf hdf -application/x-javascript js -application/x-koan skp skd skt skm -application/x-latex latex -application/x-netcdf nc cdf -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-stuffit sit -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-texinfo texinfo texi -application/x-troff t tr roff -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-wais-source src -application/x400-bp -application/xhtml+xml xhtml xht -application/xslt+xml xslt -application/xml xml xsl -application/xml-dtd dtd -application/xml-external-parsed-entity -application/zip zip -audio/32kadpcm -audio/amr -audio/amr-wb -audio/basic au snd -audio/cn -audio/dat12 -audio/dsr-es201108 -audio/dvi4 -audio/evrc -audio/evrc0 -audio/g722 -audio/g.722.1 -audio/g723 -audio/g726-16 -audio/g726-24 -audio/g726-32 -audio/g726-40 -audio/g728 -audio/g729 -audio/g729D -audio/g729E -audio/gsm -audio/gsm-efr -audio/l8 -audio/l16 -audio/l20 -audio/l24 -audio/lpc -audio/midi mid midi kar -audio/mpa -audio/mpa-robust -audio/mp4a-latm -audio/mpeg mpga mp2 mp3 -audio/parityfec -audio/pcma -audio/pcmu -audio/prs.sid -audio/qcelp -audio/red -audio/smv -audio/smv0 -audio/telephone-event -audio/tone -audio/vdvi -audio/vnd.3gpp.iufp -audio/vnd.cisco.nse -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds -audio/vnd.everad.plj -audio/vnd.lucent.voice -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 -audio/vnd.nuera.ecelp7470 -audio/vnd.nuera.ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.vmx.cvsd -audio/x-aiff aif aiff aifc -audio/x-alaw-basic -audio/x-mpegurl m3u -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin -application/vnd.rn-realmedia rm -audio/x-wav wav -chemical/x-pdb pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -image/g3fax -image/gif gif -image/ief ief -image/jpeg jpeg jpg jpe -image/naplps -image/png png -image/prs.btif -image/prs.pti -image/svg+xml svg -image/t38 -image/tiff tiff tif -image/tiff-fx -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg -image/vnd.dxf -image/vnd.fastbidsheet -image/vnd.fpx -image/vnd.fst -image/vnd.fujixerox.edmics-mmr -image/vnd.fujixerox.edmics-rlc -image/vnd.globalgraphics.pgb -image/vnd.mix -image/vnd.ms-modi -image/vnd.net-fpx -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff -image/x-cmu-raster ras -image/x-icon ico -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/news -message/partial -message/rfc822 -message/s-http -message/sip -message/sipfrag -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf -model/vnd.flatland.3dml -model/vnd.gdl -model/vnd.gs-gdl -model/vnd.gtw -model/vnd.mts -model/vnd.parasolid.transmit.binary -model/vnd.parasolid.transmit.text -model/vnd.vtu -model/vrml wrl vrml -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message -text/calendar ics ifb -text/css css -text/directory -text/enriched -text/html html htm -text/parityfec -text/plain asc txt -text/prs.lines.tag -text/rfc822-headers -text/richtext rtx -text/rtf rtf -text/sgml sgml sgm -text/t140 -text/tab-separated-values tsv -text/uri-list -text/vnd.abc -text/vnd.curl -text/vnd.dmclientscript -text/vnd.fly -text/vnd.fmi.flexstor -text/vnd.in3d.3dml -text/vnd.in3d.spot -text/vnd.iptc.nitf -text/vnd.iptc.newsml -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.net2phone.commcenter.command -text/vnd.sun.j2me.app-descriptor -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-setext etx -text/xml -text/xml-external-parsed-entity -video/bmpeg -video/bt656 -video/celb -video/dv -video/h261 -video/h263 -video/h263-1998 -video/h263-2000 -video/jpeg -video/mp1s -video/mp2p -video/mp2t -video/mp4v-es -video/mpv -video/mpeg mpeg mpg mpe -video/nv -video/parityfec -video/pointer -video/quicktime qt mov -video/smpte292m -video/vnd.fvt -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.nokia.interleaved-multimedia -video/vnd.objectvideo -video/vnd.vivo -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice diff --git a/sandbox/slaws/httpserver.php/htdocs/AlertDisplay.php b/sandbox/slaws/httpserver.php/htdocs/AlertDisplay.php deleted file mode 100644 index 94b5352818..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/AlertDisplay.php +++ /dev/null @@ -1,274 +0,0 @@ - -loadFile("./Cached_Alerts.xml"); - $cached_alerts = $doc->getRootDataObject(); - - // Use the alertService reference - $request = $this->alert_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/service", - "getAllNewAlerts"); - $request->parm = "AString"; - $new_alerts = $this->alert_service->getAllNewAlerts($request); - - foreach($new_alerts->parm->Alert as $alert){ - $new_alert = $cached_alerts->createDataObject('Alert'); - $new_alert->Title = $alert->Title; - $new_alert->Summary = $alert->Summary; - $new_alert->Address = $alert->Address; - $new_alert->Date = $alert->Date; - $new_alert->SourceId = $alert->SourceId; - $new_alert->Unread = true; - } - - $return_table = ""; - $alert_id_number = 0; - foreach($cached_alerts->Alert as $alert){ - $alert->Id = "alert_" . $alert_id_number; - $title = substr($alert->Title,0,80); - $summary = substr($alert->Summary,0,40); - $unread_string = $alert->Unread ? "unread_title" : "read_title"; - $return_row = << - - - -ALERTROW; - $return_table = $return_table . $return_row; - $alert_id_number += 1; - } - $return_table = $return_table . "
- $title - - $summary ... - - $alert->Date -
"; - - // as php is one shot we have to save away the alerts we want to cache - $xmldas->saveFile($doc, "./Cached_Alerts.xml"); - - return $return_table; - } - - /** - * @param string $alert_id - * @return string - */ - public function readAlert($alert_id) - { - $xmldas = SDO_DAS_XML::create("./Alerter.xsd"); - $doc = $xmldas->loadFile("./Cached_Alerts.xml"); - $cached_alerts = $doc->getRootDataObject(); - - $return_summary = ""; - - foreach($cached_alerts->alert as $alert){ - if (strcmp($alert->Id,$alert_Id) == 0){ - SCA::$logger->log("Match"); - $alert->Unread = false; - $return_summary = "
" . $alert->Summary . "
"; - } - } - - // as php is one shot we have to save away the alerts we want to cache - $xmldas->saveFile($doc, "./Cached_Alerts.xml"); - - return $return_summary; - } - - /** - * @return string - */ - public function getAlertSourcesHTMLTable() - { - $request = $this->alert_sources_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/sources", - "getAlertSources"); - $request->parm = "AString"; - $alert_sources = $this->alert_sources_service->getAlertSources($request); - - $return_table = "\n"; - - $no_of_sources = 0; - - foreach ($alert_sources->parm->Source as $alert_source){ - $source_id = $alert_source->Id; - $return_row = << - - - - - - - -SOURCEROW; - $return_table = $return_table . $return_row; - $no_of_sources = $no_of_sources + 1; - } - - $source_id = $no_of_sources + 1; - - $return_row = << - - - - - -ADDROW; - - $return_table = $return_table . $return_row; - $return_table = $return_table . "
-   $alert_source->Name -
\n"; - return $return_table; - } - - /** - * @param integer $source_id - * @return string - */ - public function deleteAlertSource($source_id){ - $this->alert_sources_service->removeAlertSource($source_id); - } - - /** - * @param SingleSourceType $alert_source http://tuscany.apache.org/sca/samples/aggregator/types - */ - public function addAlertSource($alert_source){ - $request = $this->alert_sources_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/sources", - "addAlertSource"); - $source = $request->createDataObject("parm"); - - $source->Name = $alert_source->Name; - $source->Address = $alert_source->Address; - $source->Id = $alert_source->Id; - $source->Type = $alert_source->Type; - - $this->alert_sources_service->addAlertSource($request); - } - - /** - * @param SourceType $alert_source http://tuscany.apache.org/sca/samples/aggregator/types - */ - public function updateAlertSource($alert_source){ - $this->alert_sources_service->updateAlertSource($alert_source); - } -} - -/* Some debugging lines -ob_start(); -print_r( $new_alerts ); -$debug = ob_get_contents(); -ob_end_clean(); -SCA::$logger->log($debug); -*/ -?> - - - diff --git a/sandbox/slaws/httpserver.php/htdocs/AlertDisplayJson.php b/sandbox/slaws/httpserver.php/htdocs/AlertDisplayJson.php deleted file mode 100644 index 5953f02209..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/AlertDisplayJson.php +++ /dev/null @@ -1,56 +0,0 @@ -alert_service->getAllNewAlerts("SomeString"); - - return $alerts; - - } -} - -?> diff --git a/sandbox/slaws/httpserver.php/htdocs/Alerter.xsd b/sandbox/slaws/httpserver.php/htdocs/Alerter.xsd deleted file mode 100644 index 58b9982d38..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/Alerter.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/slaws/httpserver.php/htdocs/Alerts.wsdl b/sandbox/slaws/httpserver.php/htdocs/Alerts.wsdl deleted file mode 100644 index 9150abbaf4..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/Alerts.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/slaws/httpserver.php/htdocs/Alerts.xsd b/sandbox/slaws/httpserver.php/htdocs/Alerts.xsd deleted file mode 100644 index 1e80da0487..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/Alerts.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/slaws/httpserver.php/htdocs/AlertsSources.wsdl b/sandbox/slaws/httpserver.php/htdocs/AlertsSources.wsdl deleted file mode 100644 index 82422c82ef..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/AlertsSources.wsdl +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/slaws/httpserver.php/htdocs/Cached_Alerts.xml b/sandbox/slaws/httpserver.php/htdocs/Cached_Alerts.xml deleted file mode 100644 index e208c8d9e4..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/Cached_Alerts.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/sandbox/slaws/httpserver.php/htdocs/index.html b/sandbox/slaws/httpserver.php/htdocs/index.html deleted file mode 100644 index f952f08bc8..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/index.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - Apache Tuscany Feed Aggregator Sample - - - - - -

Apache Tuscany Alert Aggregator Sample

-

Alert Sources:

-
-

Recent Alerts (Refresh):

-
-

Back to top

-
- - - - diff --git a/sandbox/slaws/httpserver.php/htdocs/phpinfo.php b/sandbox/slaws/httpserver.php/htdocs/phpinfo.php deleted file mode 100644 index 1cf8044fe2..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/phpinfo.php +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/sandbox/slaws/httpserver.php/htdocs/pop.png b/sandbox/slaws/httpserver.php/htdocs/pop.png deleted file mode 100644 index 1cf1df24a7..0000000000 Binary files a/sandbox/slaws/httpserver.php/htdocs/pop.png and /dev/null differ diff --git a/sandbox/slaws/httpserver.php/htdocs/rss.png b/sandbox/slaws/httpserver.php/htdocs/rss.png deleted file mode 100644 index b3c949d224..0000000000 Binary files a/sandbox/slaws/httpserver.php/htdocs/rss.png and /dev/null differ diff --git a/sandbox/slaws/httpserver.php/htdocs/service.smd b/sandbox/slaws/httpserver.php/htdocs/service.smd deleted file mode 100644 index bc77e39bf9..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/service.smd +++ /dev/null @@ -1 +0,0 @@ -{"SMDVersion":".1","objectName":"AlertsService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/sample-feed-aggregator/services/AlertsServiceJSONRPC","methods":[{"name":"getAllNewAlerts","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/sandbox/slaws/httpserver.php/htdocs/style.css b/sandbox/slaws/httpserver.php/htdocs/style.css deleted file mode 100644 index cd377e90e5..0000000000 --- a/sandbox/slaws/httpserver.php/htdocs/style.css +++ /dev/null @@ -1,166 +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; -} - -.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/httpserver.php/startserver.bat b/sandbox/slaws/httpserver.php/startserver.bat deleted file mode 100644 index 339460c70f..0000000000 --- a/sandbox/slaws/httpserver.php/startserver.bat +++ /dev/null @@ -1,78 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -set HTTPD_HOME=C:\simon\apps\apache2.0.55\Apache2 -set PHP_HOME=C:\simon\Projects\Tuscany\php\branch-build\php-5.2.0\Debug_TS - -set APFULLDIR=%~d0%~p0 -echo Running from %APFULLDIR% - -REM if "%TUSCANY_SCACPP%" == "" ( -REM echo "TUSCANY_SCACPP not set" -REM goto end -REM ) -REM echo Using SCA installed at %TUSCANY_SCACPP% - -REM if "%TUSCANY_SDOCPP%" == "" ( -REM echo "TUSCANY_SDOCPP not set" -REM goto end -REM ) -REM echo Using SDO installed at %TUSCANY_SDOCPP% - -if "%HTTPD_HOME%" == "" ( -echo "HTTPD_HOME not set" -goto end -) -echo Using HTTPD installed at %HTTPD_HOME% - -set PATH=%HTTPD_HOME%\bin;%PHP_HOME%;%PATH% - -REM set TUSCANY_SCACPP_ROOT=%APFULLDIR%\..\ -REM set TUSCANY_SCACPP_BASE_URI=http://localhost:9091 - -@REM Generate the tuscany_sca_mod_rest configuration -REM if not exist %APFULLDIR%\conf\tuscany_sca_mod_rest.conf ( -REM echo LoadModule sca_rest_module %TUSCANY_SCACPP%/extensions/rest\service/bin/tuscany_sca_mod_rest.dll > %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM echo TuscanyHome %TUSCANY_SCACPP% >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM echo ^ >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM echo SetHandler sca_rest_module >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM echo TuscanyRoot %TUSCANY_SCACPP_ROOT% >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM echo ^ >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf -REM ) - -@REM Generate the base HTTPD configuration -if not exist %APFULLDIR%\conf\base.conf ( - echo LoadModule mime_module %HTTPD_HOME%\modules\mod_mime.so > %APFULLDIR%\conf\base.conf - echo LoadModule dir_module %HTTPD_HOME%\modules\mod_dir.so >> %APFULLDIR%\conf\base.conf - echo DocumentRoot %APFULLDIR%\htdocs >> %APFULLDIR%\conf\base.conf - echo LoadModule php5_module %PHP_HOME%\php5apache2.dll >> %APFULLDIR%\conf\base.conf - echo AddType application/x-httpd-php .php >> %APFULLDIR%\conf\base.conf - echo PHPIniDir %PHP_HOME% >> %APFULLDIR%\conf\base.conf -) - -@REM Create logs directory -REM if not exist %APFULLDIR%\logs mkdir %APFULLDIR%\logs -REM set TUSCANY_SCACPP_LOG=%APFULLDIR%\logs\tuscany-server.log -REM set TUSCANY_SCACPP_LOGGING=9 - -@REM Start the HTTP server -echo Starting Apache httpd -%HTTPD_HOME%\bin\apache -d %APFULLDIR% diff --git a/sandbox/slaws/old/backward-compatibility/contribution-processor/LICENSE b/sandbox/slaws/old/backward-compatibility/contribution-processor/LICENSE new file mode 100644 index 0000000000..8aa906c321 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/contribution-processor/LICENSE @@ -0,0 +1,205 @@ + + 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/old/backward-compatibility/contribution-processor/NOTICE b/sandbox/slaws/old/backward-compatibility/contribution-processor/NOTICE new file mode 100644 index 0000000000..25bb89c9b2 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/contribution-processor/NOTICE @@ -0,0 +1,6 @@ +${pom.name} +Copyright (c) 2005 - 2009 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sandbox/slaws/old/backward-compatibility/contribution-processor/pom.xml b/sandbox/slaws/old/backward-compatibility/contribution-processor/pom.xml new file mode 100644 index 0000000000..edc344fd12 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/contribution-processor/pom.xml @@ -0,0 +1,180 @@ + + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0-SNAPSHOT + ../pom.xml + + + bc-contribution-processor + Apache Tuscany SCA Contribution Processor + + + + + org.apache.tuscany.sca + tuscany-assembly + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-contribution + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-node + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-core + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-contribution + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-workspace + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-workspace-impl + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-definitions-xml + 2.0-SNAPSHOT + compile + + + + org.apache.tuscany.sca + tuscany-sca-client-impl + 2.0-SNAPSHOT + compile + + + + org.apache.tuscany.sca + tuscany-binding-sca + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-policy-xml + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-core-databinding + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-assembly-xsd + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-endpoint + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + test + + + + + + org.apache.tuscany.sca + tuscany-assembly-xsd-osoa + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-assembly-xml-osoa + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-binding-sca-xml-osoa + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-xml-osoa + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-sca-api-osoa + 2.0-SNAPSHOT + + + + + diff --git a/sandbox/slaws/old/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java b/sandbox/slaws/old/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java new file mode 100644 index 0000000000..a82378268a --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/contribution-processor/src/main/java/org/apache/tuscany/sca/bc/ContributionProcessorImpl.java @@ -0,0 +1,617 @@ +/* +* 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.bc; + +import static java.lang.System.currentTimeMillis; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.InputStream; +import java.net.URI; +import java.net.URL; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamReader; + +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.builder.CompositeBuilder; +import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; +import org.apache.tuscany.sca.client.impl.SCAClientImpl; +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.DefaultImport; +import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; +import org.apache.tuscany.sca.contribution.processor.ExtendedURLArtifactProcessor; +import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; +import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; +import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; +import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; +import org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint; +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.core.DefaultExtensionPointRegistry; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.core.ModuleActivator; +import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; +import org.apache.tuscany.sca.core.assembly.ActivationException; +import org.apache.tuscany.sca.core.assembly.CompositeActivator; +import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; +import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; +import org.apache.tuscany.sca.core.invocation.ProxyFactory; +import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.definitions.DefinitionsFactory; +import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; +import org.apache.tuscany.sca.definitions.xml.DefinitionsExtensionPoint; +import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation; +import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; +import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.MonitorFactory; +import org.apache.tuscany.sca.monitor.Problem; +import org.apache.tuscany.sca.monitor.Problem.Severity; +import org.apache.tuscany.sca.node.Client; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; +import org.apache.tuscany.sca.provider.DefinitionsProviderExtensionPoint; +import org.apache.tuscany.sca.runtime.RuntimeComponent; +import org.apache.tuscany.sca.runtime.RuntimeComponentContext; +import org.apache.tuscany.sca.work.WorkScheduler; +import org.apache.tuscany.sca.workspace.Workspace; +import org.apache.tuscany.sca.workspace.WorkspaceFactory; +import org.apache.tuscany.sca.workspace.builder.ContributionBuilder; +import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint; +import org.oasisopen.sca.CallableReference; +import org.oasisopen.sca.NoSuchDomainException; +import org.oasisopen.sca.NoSuchServiceException; +import org.oasisopen.sca.ServiceReference; +import org.oasisopen.sca.ServiceRuntimeException; +import org.oasisopen.sca.client.SCAClient; + +/** + * Represents an SCA runtime node. + * + * @version $Rev$ $Date$ + */ +public class ContributionProcessorImpl { + + private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; + + private static final Logger logger = Logger.getLogger(ContributionProcessorImpl.class.getName()); + + // The node configuration name, used for logging + private String configurationName; + + // The composite loaded into this node + private Composite composite; + private boolean useDeploymentComposite; + + private ExtensionPointRegistry extensionPoints; + private Monitor monitor; + private ExtendedURLArtifactProcessor contributionProcessor; + private ModelResolverExtensionPoint modelResolvers; + private FactoryExtensionPoint modelFactories; + private WorkspaceFactory workspaceFactory; + private ContributionFactory contributionFactory; + private AssemblyFactory assemblyFactory; + private XMLInputFactory inputFactory; + private ContributionBuilder contributionDependencyBuilder; + private CompositeBuilder compositeBuilder; + private CompositeBuilder endpointReferenceBuilder; + private StAXArtifactProcessorExtensionPoint xmlProcessors; + private StAXArtifactProcessor compositeProcessor; + private ProxyFactory proxyFactory; + private List moduleActivators = new ArrayList(); + private CompositeActivator compositeActivator; + private WorkScheduler workScheduler; + private Contribution systemContribution; + private Definitions systemDefinitions; + // Added MJE 28/04/2009 + private URLArtifactProcessor compositeDocumentProcessor; + + + /** + * Constructs a new SCA node. + * + * @param compositeURI + * @param contributions + */ + ContributionProcessorImpl(org.apache.tuscany.sca.node.Contribution[] contributions) { + configurationName = "temp"; + logger.log(Level.INFO, "Creating contribution processor: " + configurationName); + + try { + // Initialize the runtime + init(); + + // Create a node configuration + NodeImplementationFactory nodeImplementationFactory = + modelFactories.getFactory(NodeImplementationFactory.class); + ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation(); + + // Create contribution models + for (org.apache.tuscany.sca.node.Contribution c : contributions) { + Contribution contribution = contribution(contributionFactory, c); + configuration.getContributions().add(contribution); + } + + // Configure the node + configureNode(configuration); + + } catch (Exception e) { + throw new ServiceRuntimeException(e); + } + } + + static Contribution contribution(ContributionFactory contributionFactory, org.apache.tuscany.sca.node.Contribution c) { + Contribution contribution = contributionFactory.createContribution(); + contribution.setURI(c.getURI()); + contribution.setLocation(c.getLocation()); + contribution.setUnresolved(true); + return contribution; + } + + + + private static String getSystemProperty(final String name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty(name); + } + }); + } + + static URI createURI(String uri) { + if (uri.indexOf(' ') != -1) { + uri = uri.replace(" ", "%20"); + } + return URI.create(uri); + } + + private void init() { + long start = currentTimeMillis(); + + // Create extension point registry + extensionPoints = new DefaultExtensionPointRegistry(); + + // Enable schema validation only of the logger level is FINE or higher + ValidationSchemaExtensionPoint schemas = + extensionPoints.getExtensionPoint(ValidationSchemaExtensionPoint.class); + if (schemas != null) { + String enabled = getSystemProperty(ValidationSchemaExtensionPoint.class.getName() + ".enabled"); + if (enabled == null) { + enabled = "true"; + } + boolean debug = logger.isLoggable(Level.FINE); + schemas.setEnabled("true".equals(enabled) || debug); + } + + // Use the runtime-enabled assembly factory + modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); + assemblyFactory = new RuntimeAssemblyFactory(); + modelFactories.addFactory(assemblyFactory); + + // Create a monitor + UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); + MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); + monitor = monitorFactory.createMonitor(); + + // Initialize the Tuscany module activators + ModuleActivatorExtensionPoint activators = + extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); + for (ModuleActivator moduleActivator : activators.getModuleActivators()) { + try { + moduleActivator.start(extensionPoints); + moduleActivators.add(moduleActivator); + } catch (Throwable e) { + // Ignore the failing module for now + logger.log(Level.SEVERE, e.getMessage(), e); + } + } + + // Get XML input/output factories + inputFactory = modelFactories.getFactory(XMLInputFactory.class); + + // Get contribution workspace and assembly model factories + contributionFactory = modelFactories.getFactory(ContributionFactory.class); + workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); + + // Create XML artifact processors + xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); + compositeProcessor = xmlProcessors.getProcessor(Composite.class); + + // Create contribution content processor + URLArtifactProcessorExtensionPoint docProcessorExtensions = + extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); + contributionProcessor = (ExtendedURLArtifactProcessor) docProcessorExtensions.getProcessor(Contribution.class); + + // Added MJE 28/04/2009 + // Create Composite Document processor + compositeDocumentProcessor = docProcessorExtensions.getProcessor(Composite.class); + + // Get the model resolvers + modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); + + // Get a contribution dependency builder + ContributionBuilderExtensionPoint contributionBuilders = + extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class); + contributionDependencyBuilder = + contributionBuilders + .getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder"); + + // Get composite builders + CompositeBuilderExtensionPoint compositeBuilders = + extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class); + compositeBuilder = + compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); + + // Get endpoint builders + // TODO - new extension point? + endpointReferenceBuilder = + compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.endpoint.impl.EndpointReferenceBuilderImpl"); + + // Initialize runtime + + // Get proxy factory + ProxyFactoryExtensionPoint proxyFactories = extensionPoints.getExtensionPoint(ProxyFactoryExtensionPoint.class); + proxyFactory = new ExtensibleProxyFactory(proxyFactories); + + // Get the composite activator + compositeActivator = utilities.getUtility(CompositeActivator.class); + + workScheduler = utilities.getUtility(WorkScheduler.class); + + DefinitionsFactory definitionsFactory = modelFactories.getFactory(DefinitionsFactory.class); + systemDefinitions = definitionsFactory.createDefinitions(); + + DefinitionsExtensionPoint definitionsExtensionPoint = + extensionPoints.getExtensionPoint(DefinitionsExtensionPoint.class); + for (Definitions defs : definitionsExtensionPoint.getDefinitions()) { + DefinitionsUtil.aggregate(systemDefinitions, defs); + } + + // Load the system definitions.xml from all of the loaded extension points + DefinitionsProviderExtensionPoint definitionsProviders = + extensionPoints.getExtensionPoint(DefinitionsProviderExtensionPoint.class); + + // aggregate all the definitions into a single definitions model + try { + for (DefinitionsProvider definitionsProvider : definitionsProviders.getDefinitionsProviders()) { + DefinitionsUtil.aggregate(definitionsProvider.getDefinitions(), systemDefinitions); + } + } catch (DefinitionsProviderException e) { + throw new IllegalStateException(e); + } + + // create a system contribution to hold the definitions. The contribution + // will be extended later with definitions from application contributions + systemContribution = contributionFactory.createContribution(); + systemContribution.setURI("http://tuscany.apache.org/SystemContribution"); + systemContribution.setLocation("http://tuscany.apache.org/SystemContribution"); + ModelResolver modelResolver = new ExtensibleModelResolver(systemContribution, modelResolvers, modelFactories); + systemContribution.setModelResolver(modelResolver); + systemContribution.setUnresolved(true); + + // create an artifact to represent the system defintions and + // add it to the contribution + List artifacts = systemContribution.getArtifacts(); + Artifact artifact = contributionFactory.createArtifact(); + artifact.setURI("http://tuscany.apache.org/SystemContribution/Definitions"); + artifact.setLocation("Derived"); + artifact.setModel(systemDefinitions); + artifacts.add(artifact); + + // don't resolve the system contribution until all the application + // level definitions have been added + + // + // // Configure a resolver for the system definitions + // ModelResolver definitionsResolver = new DefaultModelResolver(); + // for (Intent intent : systemDefinitions.getPolicyIntents()) { + // definitionsResolver.addModel(intent); + // } + // for (PolicySet policySet : systemDefinitions.getPolicySets()) { + // definitionsResolver.addModel(policySet); + // } + // for (ExtensionType bindingType : systemDefinitions.getBindingTypes()) { + // definitionsResolver.addModel(bindingType); + // } + // for (ExtensionType implementationType : systemDefinitions.getImplementationTypes()) { + // definitionsResolver.addModel(implementationType); + // } + // + // // Now that all system sca definitions have been read, let's resolve them + // URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); + // URLArtifactProcessor definitionsProcessor = documentProcessors.getProcessor(Definitions.class); + // try { + // definitionsProcessor.resolve(systemDefinitions, definitionsResolver); + // } catch (ContributionResolveException e) { + // throw new IllegalStateException(e); + // } + + if (logger.isLoggable(Level.FINE)) { + long end = currentTimeMillis(); + logger.fine("The tuscany runtime started in " + (end - start) + " ms."); + } + } + + private void configureNode(ConfiguredNodeImplementation configuration) throws Exception { + + // Create workspace model + Workspace workspace = workspaceFactory.createWorkspace(); + workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); + + // Load the specified contributions + for (Contribution c : configuration.getContributions()) { + URI contributionURI = URI.create(c.getURI()); + + URI uri = createURI(c.getLocation()); + if (uri.getScheme() == null) { + uri = new File(c.getLocation()).toURI(); + } + URL contributionURL = uri.toURL(); + + // Load the contribution + logger.log(Level.INFO, "Loading contribution: " + contributionURL); + Contribution contribution = contributionProcessor.read(null, contributionURI, contributionURL); + workspace.getContributions().add(contribution); + analyzeProblems(); + } + + // Build an aggregated SCA definitions model. Must be done before we try and + // resolve any contributions or composites as they may depend on the full + // definitions.xml picture + + // get all definitions.xml artifacts from contributions and aggregate + // into the system contribution. In turn add a default import into + // each contribution so that for unresolved items the resolution + // processing will look in the system contribution + for (Contribution contribution : workspace.getContributions()) { + // aggregate definitions + for (Artifact artifact : contribution.getArtifacts()) { + Object model = artifact.getModel(); + if (model instanceof Definitions) { + DefinitionsUtil.aggregate((Definitions)model, systemDefinitions); + } + } + + // create a default import and wire it up to the system contribution + // model resolver. This is the trick that makes the resolution processing + // skip over to the system contribution if resolution is unsuccessful + // in the current contribution + DefaultImport defaultImport = contributionFactory.createDefaultImport(); + defaultImport.setModelResolver(systemContribution.getModelResolver()); + contribution.getImports().add(defaultImport); + } + + // now resolve the system contribution and add the contribution + // to the workspace + contributionProcessor.resolve(systemContribution, workspace.getModelResolver()); + workspace.getContributions().add(systemContribution); + + // TODO - Now we can calculate applicable policy sets for each composite + + // pre-resolve the contributions + contributionsPreresolve( workspace.getContributions(), workspace.getModelResolver() ); + + // Build the contribution dependencies + Set resolved = new HashSet(); + for (Contribution contribution : workspace.getContributions()) { + contributionDependencyBuilder.build(contribution, workspace, monitor); + + // Resolve contributions + for (Contribution dependency : contribution.getDependencies()) { + if (!resolved.contains(dependency)) { + resolved.add(dependency); + contributionProcessor.resolve(dependency, workspace.getModelResolver()); + } + } + } + + // Create a top level composite to host our composites + // This is temporary to make the activator happy + composite = assemblyFactory.createComposite(); + composite.setName(new QName(SCA11_TUSCANY_NS, "_tempComposite")); + composite.setURI(SCA11_TUSCANY_NS); + + for (Contribution contribution : workspace.getContributions()) { + // find all the (deployable) composites + for (Composite deployable: contribution.getDeployables()) { + composite.getIncludes().add(deployable); + } + } + + // Build the composite and wire the components included in it + compositeBuilder.build(composite, systemDefinitions, monitor); + analyzeProblems(); + + // build the endpoint references + endpointReferenceBuilder.build(composite, systemDefinitions, monitor); + analyzeProblems(); + + + + +/* + composite = configuration.getComposite(); + + // If a composite was not originally supplied when the Node was created, pick one of the deployable + // composites from the supplied contributions. Note: throws an exception if none can be found. + if (composite == null) { + setDefaultComposite(configuration, workspace); + } + + // Find the composite in the given contributions + boolean found = false; + if (!useDeploymentComposite) { + Artifact compositeFile = contributionFactory.createArtifact(); + compositeFile.setUnresolved(true); + compositeFile.setURI(composite.getURI()); + for (Contribution contribution : workspace.getContributions()) { + ModelResolver resolver = contribution.getModelResolver(); + + Artifact resolvedArtifact = resolver.resolveModel(Artifact.class, compositeFile); + if (!resolvedArtifact.isUnresolved() && resolvedArtifact.getModel() instanceof Composite) { + + if (!composite.isUnresolved()) { + + // The composite content was passed into the node and read into a composite model, + // don't use the composite found in the contribution, use that composite, but just resolve + // it within the context of the contribution + compositeProcessor.resolve(composite, resolver); + + } else { + + // Use the resolved composite we've found in the contribution + composite = (Composite)resolvedArtifact.getModel(); + } + found = true; + break; + } // end if + } // end for + } + + if (!found) { + if (!useDeploymentComposite) { + // If the composite was not found, then it must be a separate composite file outside any of the contributions + // - a "composite by value" - this requires its URI to be absolute and pointing at the composite file itself. + // First read in the composite file to create a composite model object... + URI compositeURI = new URI(composite.getURI()); + URL compositeURL = compositeURI.toURL(); + composite = compositeDocumentProcessor.read(compositeURL, compositeURI, compositeURL); + if (composite == null) { + throw new IllegalArgumentException("Composite not found: " + compositeURI); + } + } + + // Resolve the "composite by value" against the FIRST contribution + Contribution contribution = workspace.getContributions().get(0); + ModelResolver resolver = contribution.getModelResolver(); + compositeProcessor.resolve(composite, resolver); + if (composite.isUnresolved()) { + throw new IllegalArgumentException("Could not resolve composite: " + composite.getURI() + + " in contribution " + + contribution.getURI()); + } + } // end if + + // Build the composite and wire the components included in it + compositeBuilder.build(composite, systemDefinitions, monitor); + analyzeProblems(); + + // build the endpoint references + endpointReferenceBuilder.build(composite, systemDefinitions, monitor); + analyzeProblems(); + + // Create a top level composite to host our composite + // This is temporary to make the activator happy + Composite tempComposite = assemblyFactory.createComposite(); + tempComposite.setName(new QName(SCA11_TUSCANY_NS, "_tempComposite")); + tempComposite.setURI(SCA11_TUSCANY_NS); + + // Include the node composite in the top-level composite + tempComposite.getIncludes().add(composite); + + // Set the top level composite on the composite activator as + // logic in callable reference resolution relies on this being + // available + compositeActivator.setDomainComposite(tempComposite); +*/ + + } + + /** + * Pre-resolve phase for contributions, to set up handling of imports and exports prior to full resolution + * @param contributions - the contributions to preresolve + * @param resolver - the ModelResolver to use + * @throws ContributionResolveException + */ + private void contributionsPreresolve( List contributions, ModelResolver resolver ) + throws ContributionResolveException { + + for( Contribution contribution : contributions ) { + contributionProcessor.preResolve(contribution, resolver); + } // end for + } // end method contributionsPreresolve + + + + + /** + * Analyze problems reported by the artifact processors and builders. + * + * @throws Exception + */ + private void analyzeProblems() throws Exception { + for (Problem problem : monitor.getProblems()) { + if ((problem.getSeverity() == Severity.ERROR) && (!problem.getMessageId().equals("SchemaError"))) { + if (problem.getCause() != null) { + throw problem.getCause(); + } else { + throw new ServiceRuntimeException(problem.toString()); + } + } + } + } + + /* + * Sets a default composite by using any deployable one. + */ + private void setDefaultComposite(ConfiguredNodeImplementation configuration, Workspace workspace) { + // just use the first deployable composite + for (Contribution contribution : workspace.getContributions()) { + for (Composite c : contribution.getDeployables()) { + // Ensure that we pick a composite that has actually been found in its contribution!! + if( c.getURI() != null ) { + composite = assemblyFactory.createComposite(); + composite.setURI(c.getURI()); + composite.setUnresolved(true); + configuration.setComposite(composite); + return; + } // end if + } // end for + } // end for + throw new ServiceRuntimeException("No deployable composite found"); + } // end method setDefaultComposite + + public ExtensionPointRegistry getExtensionPoints() { + return extensionPoints; + } + + +} diff --git a/sandbox/slaws/old/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java b/sandbox/slaws/old/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java new file mode 100644 index 0000000000..0a06f4bcd7 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/contribution-processor/src/test/java/org/apache/tuscany/sca/bc/ConributionProcessorTestCase.java @@ -0,0 +1,42 @@ +/* + * 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.bc; + + +import java.io.File; + +import org.apache.tuscany.sca.node.Contribution; +import org.junit.Test; + +/** + * Test case for NodeImpl + */ +public class ConributionProcessorTestCase { + + @Test + public void testContributionProcessor() { + Contribution contribution = new Contribution("c1", new File("../references/target/classes").toURI().toString()); + Contribution[] contributions = new Contribution[]{contribution}; + + ContributionProcessorImpl cp = new ContributionProcessorImpl(contributions); + + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/pom.xml b/sandbox/slaws/old/backward-compatibility/pom.xml new file mode 100644 index 0000000000..9e672f9fef --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/pom.xml @@ -0,0 +1,97 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../pom.xml + + tuscany-itest-backward-compatibility + pom + Apache Tuscany SCA Integration Test Backward Compatibility + + + + junit + junit + 4.5 + compile + + + + org.easymock + easymock + 2.4 + test + + + + + ${basedir}/build-was-integration.xml + ${basedir}/wasAdmin.py + + + + + + + default + + true + + + contribution-processor + references + + + + + eclipse + + contribution-processor + references + + + org.apache.tuscany.maven.plugins:maven-bundle-plugin:eclipse + + + + org.apache.tuscany.maven.plugins + maven-bundle-plugin + 1.0.2 + true + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + + + + + diff --git a/sandbox/slaws/old/backward-compatibility/references/pom.xml b/sandbox/slaws/old/backward-compatibility/references/pom.xml new file mode 100644 index 0000000000..36c2b4ccc7 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/pom.xml @@ -0,0 +1,61 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + bc-itest-references + Apache Tuscany SCA Backward Compat iTest References + + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-feature-api + pom + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-feature-core + pom + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-feature-webservice + pom + 2.0-SNAPSHOT + + + + diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java new file mode 100644 index 0000000000..f8c0850118 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java @@ -0,0 +1,40 @@ +/* + * 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.itest.references; + +public interface AComponent { + + String fooB(); + + String fooC(); + + String fooBC(); + + String fooD1(); + + String fooD2(); + + String fooMultipleD(); + + String fooMultipleDArray(); + + String fooMultipleDServiceRef(); + + DComponent getDReference(); +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java new file mode 100644 index 0000000000..647fff0159 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java @@ -0,0 +1,126 @@ +/* + * 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.itest.references; + +import java.util.Collection; +import java.util.List; + +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Reference; + +public class AComponentImpl implements AComponent { + + @Reference(name = "bReference") + protected BComponent b; + + @Reference + protected CComponent cReference; + + @Reference(required = false) + protected DComponent dReference; + + @Reference(name = "dReferences") + public Collection dReferences; + + @Reference(name = "dReferenceArray") + public DComponent[] dReferenceArray; + + + @Reference(name = "dServiceReferences") + public List> dServiceReferences; + + private DComponent dReference1; + + private DComponent dReference2; + + @Reference(name = "dReference1") + public void setDReference(DComponent dReference) { + this.dReference1 = dReference; + } + + @Reference + public void setDReference2(DComponent dReference2) { + this.dReference2 = dReference2; + } + + public String fooB() { + return b.bFoo(); + } + + public String fooC() { + return cReference.cFoo(); + } + + public String fooBC() { + return b.fooC(); + } + + public String fooD() { + return dReference1.dFoo(); + } + + public String fooD1() { + return dReference1.dFoo(); + } + + public String fooD2() { + return dReference2.dFoo(); + } + + public String fooMultipleDArray() { + StringBuffer str = new StringBuffer(); + for (DComponent d : dReferenceArray) { + str.append(d.getComponentName()); + str.append(','); + } + if (str.length() > 0) { + str.deleteCharAt(str.length() - 1); + } + return str.toString(); + } + + public String fooMultipleD() { + StringBuffer str = new StringBuffer(); + for (DComponent d : dReferences) { + str.append(d.getComponentName()); + str.append(','); + } + if (str.length() > 0) { + str.deleteCharAt(str.length() - 1); + } + return str.toString(); + } + + public String fooMultipleDServiceRef() { + StringBuffer str = new StringBuffer(); + for (ServiceReference d : dServiceReferences) { + str.append(d.getService().getComponentName()); + str.append(','); + } + if (str.length() > 0) { + str.deleteCharAt(str.length() - 1); + } + return str.toString(); + } + + public DComponent getDReference() { + return dReference; + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java new file mode 100644 index 0000000000..785920bb2d --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java @@ -0,0 +1,26 @@ +/* + * 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.itest.references; + +public interface BComponent { + + String bFoo(); + + String fooC(); +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java new file mode 100644 index 0000000000..6b1065ab0d --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java @@ -0,0 +1,39 @@ +/* + * 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.itest.references; + +import org.osoa.sca.annotations.Reference; + +public class BComponentImpl implements BComponent { + + protected CComponent cReference; + + public BComponentImpl(@Reference(name = "cReference") CComponent cReference) { + this.cReference = cReference; + } + + public String bFoo() { + return "BComponent"; + } + + public String fooC() { + return "B" + cReference.cFoo(); + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java new file mode 100644 index 0000000000..1cd7cb7fe5 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java @@ -0,0 +1,39 @@ +/* + * 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.itest.references; + +import org.osoa.sca.annotations.Reference; + +public class BComponentWrongTargetImpl implements BComponent { + + protected CComponent cReference; + + public BComponentWrongTargetImpl(@Reference(name = "cReference") CComponent cReference) { + this.cReference = cReference; + } + + public String bFoo() { + return "BComponentWrongTarget"; + } + + public String fooC() { + return "B" + cReference.cFoo(); + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java new file mode 100644 index 0000000000..d436c28adc --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java @@ -0,0 +1,24 @@ +/* + * 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.itest.references; + +public interface CComponent { + + String cFoo(); +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java new file mode 100644 index 0000000000..a1823e1cdc --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java @@ -0,0 +1,27 @@ +/* + * 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.itest.references; + +public class CComponentImpl implements CComponent { + + public String cFoo() { + return "CComponent"; + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java new file mode 100644 index 0000000000..2618ec7095 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java @@ -0,0 +1,27 @@ +/* + * 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.itest.references; + +import org.osoa.sca.annotations.Remotable; + +public interface DComponent { + + String dFoo(); + String getComponentName(); +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java new file mode 100644 index 0000000000..79c802bc97 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java @@ -0,0 +1,35 @@ +/* + * 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.itest.references; + +import org.osoa.sca.annotations.ComponentName; + +public class DComponentImpl implements DComponent { + @ComponentName + public String name; + + public String dFoo() { + return "DComponent"; + } + + public String getComponentName() { + return name; + } + +} diff --git a/sandbox/slaws/old/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite b/sandbox/slaws/old/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite new file mode 100644 index 0000000000..3cfd80cde5 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/main/resources/ManualWiredReferencesTest.composite @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/slaws/old/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/sandbox/slaws/old/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java new file mode 100644 index 0000000000..98e736df00 --- /dev/null +++ b/sandbox/slaws/old/backward-compatibility/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java @@ -0,0 +1,113 @@ +/* + * 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.itest.references; + +import static junit.framework.Assert.assertEquals; +import junit.framework.Assert; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.launcher.Contribution; +import org.apache.tuscany.sca.node.launcher.NodeLauncher; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +public class ManualWiredReferenceTestCase { + private static NodeLauncher launcher; + private static Node node; + private static AComponent acomponent; + + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + launcher = NodeLauncher.newInstance(); + node = launcher.createNode("ManualWiredReferencesTest.composite", + new Contribution("test", "./target/classes")); + + try { + node.start(); + } catch (Exception ex) { + String status = ex.toString(); + System.out.println(status); + } + + acomponent = node.getService(AComponent.class, "AComponent"); + } + + @AfterClass + public static void tearDownAfterClass() throws Exception { + if (node != null) { + node.stop(); + node.destroy(); + } + if (launcher != null) { + //launcher.destroy(); + } + } + + @Test + public void testBReference() { + assertEquals("BComponent", acomponent.fooB()); + } + + @Test + public void testCReference() { + assertEquals("CComponent", acomponent.fooC()); + } + + @Test + public void testBCReference() { + assertEquals("BCComponent", acomponent.fooBC()); + } + + @Test + public void testD1Reference() { + acomponent.fooD1(); + } + + @Ignore + @Test + public void testD2Reference() { + assertEquals("DComponent", acomponent.fooD2()); + } + + @Test + public void testMultiDReferenceArray() { + String components = acomponent.fooMultipleDArray(); + Assert.assertTrue(components.contains("DComponent1")); + } + + @Test + public void testMultiDServiceReference() { + String components = acomponent.fooMultipleDServiceRef(); + Assert.assertTrue(components.contains("DComponent")); + Assert.assertTrue(components.contains("DComponent1")); + } + + @Test + public void testRequiredFalseReference() { + try { + acomponent.getDReference().dFoo(); + } catch (Exception e) { + Assert.assertTrue(true); + } + } + +} diff --git a/sandbox/slaws/old/distributed-runtime/calculator-distributed.svg b/sandbox/slaws/old/distributed-runtime/calculator-distributed.svg new file mode 100644 index 0000000000..341af29994 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/calculator-distributed.svg @@ -0,0 +1,403 @@ + + + + + + + + + + image/svg+xml + + + + + + + + Calculator + + CalculatorServiceComponent + + + CalculatorService + AddServiceComponent + + SubtractServiceComponent + + MultiplyServiceComponent + + DivideServiceComponent + addService + subtractService + multiplyService + divideService + + + + + + + nodeB nodeC + nodeA + Domain + diff --git a/sandbox/slaws/old/distributed-runtime/calculator-standalone.svg b/sandbox/slaws/old/distributed-runtime/calculator-standalone.svg new file mode 100644 index 0000000000..40f782e4f1 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/calculator-standalone.svg @@ -0,0 +1,370 @@ + + + + + + + + + + image/svg+xml + + + + + + + + Calculator Composite + + CalculatorServiceComponent + + + CalculatorService + AddServiceComponent + + SubtractServiceComponent + + MultiplyServiceComponent + + DivideServiceComponent + addService + subtractService + multiplyService + divideService + + + + + + + Node Domain + diff --git a/sandbox/slaws/old/distributed-runtime/distributed-abstract.svg b/sandbox/slaws/old/distributed-runtime/distributed-abstract.svg new file mode 100644 index 0000000000..3f91a86484 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distributed-abstract.svg @@ -0,0 +1,570 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + SCA Domain + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + diff --git a/sandbox/slaws/old/distributed-runtime/distributed-cardinality.svg b/sandbox/slaws/old/distributed-runtime/distributed-cardinality.svg new file mode 100644 index 0000000000..5a14ed4575 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distributed-cardinality.svg @@ -0,0 +1,471 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + LogicalDomain + + TuscanyRuntime + + Node + + Domain + + DomainLevelComposite + + + Component + n + 1 + + + 1 + 1 + 1 + n + + LogicalDomainLevelComposite + + LogicalComponent + + + 1 + 1 + 1 + n + n + + + + 1 + 1 + n + + + + The physical artifacts on the left represent the role this nodeplays in the wider (logical) domain + + diff --git a/sandbox/slaws/old/distributed-runtime/distributed-overview.svg b/sandbox/slaws/old/distributed-runtime/distributed-overview.svg new file mode 100644 index 0000000000..c8c32a35a8 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distributed-overview.svg @@ -0,0 +1,715 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Calculator + + CalculatorServiceComponent + + + CalculatorService + AddServiceComponent + + SubtractServiceComponent + + MultiplyServiceComponent + + DivideServiceComponent + addService + subtractService + multiplyService + divideService + + + + nodeB + + + + nodeA nodeC + DomainNodeManager + + + DistrubtedDomain + + + + events configurationchanges + DomainNodeManager + + + + + + events configurationchanges + DomainNodeManager + + + + + + events configurationchanges + DistributedDomainManager + + + + + DistributedSCA Binding LocalSCABinding LocalSCABinding DistributedSCA Binding + diff --git a/sandbox/slaws/old/distributed-runtime/distribution1.svg b/sandbox/slaws/old/distributed-runtime/distribution1.svg new file mode 100644 index 0000000000..9fef91247c --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distribution1.svg @@ -0,0 +1,276 @@ + + + + + + + + + image/svg+xml + + + + + + + + Composite A + + ComponentA(CA) + + + ComponentB(CB) + + + + + Node1 (N1) Node2 (N2) + + SCA Model Runtime Nodes Physical - I think we can ignore for the time being + diff --git a/sandbox/slaws/old/distributed-runtime/distribution2.svg b/sandbox/slaws/old/distributed-runtime/distribution2.svg new file mode 100644 index 0000000000..e341fa62f6 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distribution2.svg @@ -0,0 +1,367 @@ + + + + + + + + + image/svg+xml + + + + + + + + Composite A + + ComponentA(CA) + + + ComponentB(CB) + + + + Node1 (N1) Node2 (N2) + + + + + + + + + + + + Domain + + + + + + + diff --git a/sandbox/slaws/old/distributed-runtime/distribution3.svg b/sandbox/slaws/old/distributed-runtime/distribution3.svg new file mode 100644 index 0000000000..48e071f7b2 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distribution3.svg @@ -0,0 +1,736 @@ + + + + + + + + + image/svg+xml + + + + + + + + Composite A + + ComponentA(CA) + + + ComponentB(CB) + + + + + + + + + + + + + + Domain 2. Componentsassociated withruntimes 3. Instance creation and execution + + + + + + + + 1. Runtimes startedon physical processors + + + + + + + + + + + + + + RuntimeNode RuntimeNode + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/slaws/old/distributed-runtime/distribution4.svg b/sandbox/slaws/old/distributed-runtime/distribution4.svg new file mode 100644 index 0000000000..f453bfea67 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distribution4.svg @@ -0,0 +1,374 @@ + + + + + + + + + image/svg+xml + + + + + + + + Composite A + + ComponentA(CA) + + + ComponentB(CB) + + + + + + + + Domain + + + + + + + + + + + + + + RuntimeNodeA RuntimeNodeB + Events Messages Configuration DomainConfiguration + diff --git a/sandbox/slaws/old/distributed-runtime/distributionCardinality.svg b/sandbox/slaws/old/distributed-runtime/distributionCardinality.svg new file mode 100644 index 0000000000..5e09bcbe2a --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/distributionCardinality.svg @@ -0,0 +1,335 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + Domain + + Node + n + + 1 + + DomainLevelComposite + + Component + + + 1 + 1 + n + + 1 + 1 + 1 + + NodeLevelComposite + + + Subset Of + n + 1 + + diff --git a/sandbox/slaws/old/distributed-runtime/multi-node-abstract.svg b/sandbox/slaws/old/distributed-runtime/multi-node-abstract.svg new file mode 100644 index 0000000000..f770e3e5f3 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/multi-node-abstract.svg @@ -0,0 +1,579 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + Distributed SCA Domain + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + Node + + + Component + + + + diff --git a/sandbox/slaws/old/distributed-runtime/single-node-abstract.svg b/sandbox/slaws/old/distributed-runtime/single-node-abstract.svg new file mode 100644 index 0000000000..60392a2636 --- /dev/null +++ b/sandbox/slaws/old/distributed-runtime/single-node-abstract.svg @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + StandaloneSCA Domain + + Node + + + + Component + + + + diff --git a/sandbox/slaws/old/httpserver.php/README b/sandbox/slaws/old/httpserver.php/README new file mode 100644 index 0000000000..b318a289f2 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/README @@ -0,0 +1,28 @@ +Alert Aggregator - PHP Display Component +======================================== + +This httpserver configuration includes a PHP implementation of the +feed aggregator display component + +The startserver script can be used to start up an HTTPD server +configured to run the display component. It relies on two environment +variables being correctl configured. See the top of startserver.bat. + +PHP must be configured to include the PHP SCA_SDO v1.2.1 extension from PECL. + +http://pecl.php.net/package/sca_sdo + +This provides the SCA and SDO support that the display component relies on. + +To run the display component on windows. + +> cd httpserver.php + +fix up the paths at the top of startserver.bat and then + +> startserver.bat + +then point your browser at + +http://localhost:9091/index.html + diff --git a/sandbox/slaws/old/httpserver.php/conf/httpd.conf b/sandbox/slaws/old/httpserver.php/conf/httpd.conf new file mode 100644 index 0000000000..92026c9717 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/conf/httpd.conf @@ -0,0 +1,28 @@ +# 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. + +# This is the main Apache HTTP server configuration file. It contains the +# configuration directives that give the server its instructions. +# See for detailed information. + +Listen 9091 + +# Generated by the startserver script +Include conf/base.conf + +# SCA rest module not required for the PHP part +# Include conf/tuscany_sca_mod_rest.conf diff --git a/sandbox/slaws/old/httpserver.php/conf/mime.types b/sandbox/slaws/old/httpserver.php/conf/mime.types new file mode 100644 index 0000000000..4279f51bca --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/conf/mime.types @@ -0,0 +1,607 @@ +# 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. + +# This file controls what Internet media types are sent to the client for +# given file extension(s). Sending the correct media type to the client +# is important so they know how to handle the content of the file. +# Extra types can either be added here or by using an AddType directive +# in your config files. For more information about Internet media types, +# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type +# registry is at . + +# MIME type Extensions +application/activemessage +application/andrew-inset ez +application/applefile +application/atom+xml atom +application/atomicmail +application/batch-smtp +application/beep+xml +application/cals-1840 +application/cnrp+xml +application/commonground +application/cpl+xml +application/cybercash +application/dca-rft +application/dec-dx +application/dvcs +application/edi-consent +application/edifact +application/edi-x12 +application/eshop +application/font-tdpfr +application/http +application/hyperstudio +application/iges +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc +application/mathematica +application/mathml+xml mathml +application/msword doc +application/news-message-id +application/news-transmission +application/ocsp-request +application/ocsp-response +application/octet-stream bin dms lha lzh exe class so dll dmg +application/oda oda +application/ogg ogg +application/parityfec +application/pdf pdf +application/pgp-encrypted +application/pgp-keys +application/pgp-signature +application/pkcs10 +application/pkcs7-mime +application/pkcs7-signature +application/pkix-cert +application/pkix-crl +application/pkixcmp +application/postscript ai eps ps +application/prs.alvestrand.titrax-sheet +application/prs.cww +application/prs.nprend +application/prs.plucker +application/qsig +application/rdf+xml rdf +application/reginfo+xml +application/remote-printing +application/riscos +application/rtf +application/sdp +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/sgml +application/sgml-open-catalog +application/sieve +application/slate +application/smil smi smil +application/srgs gram +application/srgs+xml grxml +application/timestamp-query +application/timestamp-reply +application/tve-trigger +application/vemmi +application/vnd.3gpp.pic-bw-large +application/vnd.3gpp.pic-bw-small +application/vnd.3gpp.pic-bw-var +application/vnd.3gpp.sms +application/vnd.3m.post-it-notes +application/vnd.accpac.simply.aso +application/vnd.accpac.simply.imp +application/vnd.acucobol +application/vnd.acucorp +application/vnd.adobe.xfdf +application/vnd.aether.imp +application/vnd.amiga.ami +application/vnd.anser-web-certificate-issue-initiation +application/vnd.anser-web-funds-transfer-initiation +application/vnd.audiograph +application/vnd.blueice.multipass +application/vnd.bmi +application/vnd.businessobjects +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cinderella +application/vnd.claymore +application/vnd.commerce-battelle +application/vnd.commonspace +application/vnd.contact.cmsg +application/vnd.cosmocaller +application/vnd.criticaltools.wbs+xml +application/vnd.ctc-posml +application/vnd.cups-postscript +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl +application/vnd.cybank +application/vnd.data-vision.rdz +application/vnd.dna +application/vnd.dpgraph +application/vnd.dreamfactory +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven +application/vnd.epson.esf +application/vnd.epson.msf +application/vnd.epson.quickanime +application/vnd.epson.salt +application/vnd.epson.ssf +application/vnd.ericsson.quickcall +application/vnd.eudora.data +application/vnd.fdf +application/vnd.ffsns +application/vnd.fints +application/vnd.flographit +application/vnd.framemaker +application/vnd.fsc.weblaunch +application/vnd.fujitsu.oasys +application/vnd.fujitsu.oasys2 +application/vnd.fujitsu.oasys3 +application/vnd.fujitsu.oasysgp +application/vnd.fujitsu.oasysprs +application/vnd.fujixerox.ddd +application/vnd.fujixerox.docuworks +application/vnd.fujixerox.docuworks.binder +application/vnd.fut-misnet +application/vnd.grafeq +application/vnd.groove-account +application/vnd.groove-help +application/vnd.groove-identity-message +application/vnd.groove-injector +application/vnd.groove-tool-message +application/vnd.groove-tool-template +application/vnd.groove-vcard +application/vnd.hbci +application/vnd.hhe.lesson-player +application/vnd.hp-hpgl +application/vnd.hp-hpid +application/vnd.hp-hps +application/vnd.hp-pcl +application/vnd.hp-pclxl +application/vnd.httphone +application/vnd.hzn-3d-crossword +application/vnd.ibm.afplinedata +application/vnd.ibm.electronic-media +application/vnd.ibm.minipay +application/vnd.ibm.modcap +application/vnd.ibm.rights-management +application/vnd.ibm.secure-container +application/vnd.informix-visionary +application/vnd.intercon.formnet +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo +application/vnd.intu.qfx +application/vnd.irepository.package+xml +application/vnd.is-xpr +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jisp +application/vnd.kde.karbon +application/vnd.kde.kchart +application/vnd.kde.kformula +application/vnd.kde.kivio +application/vnd.kde.kontour +application/vnd.kde.kpresenter +application/vnd.kde.kspread +application/vnd.kde.kword +application/vnd.kenameaapp +application/vnd.koan +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop +application/vnd.llamagraphics.life-balance.exchange+xml +application/vnd.lotus-1-2-3 +application/vnd.lotus-approach +application/vnd.lotus-freelance +application/vnd.lotus-notes +application/vnd.lotus-organizer +application/vnd.lotus-screencam +application/vnd.lotus-wordpro +application/vnd.mcd +application/vnd.mediastation.cdkey +application/vnd.meridian-slingshot +application/vnd.micrografx.flo +application/vnd.micrografx.igx +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf +application/vnd.mobius.dis +application/vnd.mobius.mbk +application/vnd.mobius.mqy +application/vnd.mobius.msl +application/vnd.mobius.plc +application/vnd.mobius.txf +application/vnd.mophun.application +application/vnd.mophun.certificate +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry +application/vnd.ms-asf +application/vnd.ms-excel xls +application/vnd.ms-lrm +application/vnd.ms-powerpoint ppt +application/vnd.ms-project +application/vnd.ms-tnef +application/vnd.ms-works +application/vnd.ms-wpl +application/vnd.mseq +application/vnd.msign +application/vnd.music-niff +application/vnd.musician +application/vnd.netfpx +application/vnd.noblenet-directory +application/vnd.noblenet-sealer +application/vnd.noblenet-web +application/vnd.novadigm.edm +application/vnd.novadigm.edx +application/vnd.novadigm.ext +application/vnd.obn +application/vnd.osa.netdeploy +application/vnd.palm +application/vnd.pg.format +application/vnd.pg.osasli +application/vnd.powerbuilder6 +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.previewsystems.box +application/vnd.publishare-delta-tree +application/vnd.pvi.ptid1 +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.quark.quarkxpress +application/vnd.rapid +application/vnd.s3sms +application/vnd.sealed.net +application/vnd.seemail +application/vnd.shana.informed.formdata +application/vnd.shana.informed.formtemplate +application/vnd.shana.informed.interchange +application/vnd.shana.informed.package +application/vnd.smaf +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.street-stream +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.triscape.mxs +application/vnd.trueapp +application/vnd.truedoc +application/vnd.ufdl +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio +application/vnd.visionary +application/vnd.vividence.scriptfile +application/vnd.vsf +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf +application/vnd.wv.csp+wbxml +application/vnd.xara +application/vnd.xfdl +application/vnd.yamaha.hv-dic +application/vnd.yamaha.hv-script +application/vnd.yamaha.hv-voice +application/vnd.yellowriver-custom-menu +application/voicexml+xml vxml +application/watcherinfo+xml +application/whoispp-query +application/whoispp-response +application/wita +application/wordperfect5.1 +application/x-bcpio bcpio +application/x-cdlink vcd +application/x-chess-pgn pgn +application/x-compress +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr +application/x-dvi dvi +application/x-futuresplash spl +application/x-gtar gtar +application/x-gzip +application/x-hdf hdf +application/x-javascript js +application/x-koan skp skd skt skm +application/x-latex latex +application/x-netcdf nc cdf +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-stuffit sit +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texinfo texi +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x400-bp +application/xhtml+xml xhtml xht +application/xslt+xml xslt +application/xml xml xsl +application/xml-dtd dtd +application/xml-external-parsed-entity +application/zip zip +audio/32kadpcm +audio/amr +audio/amr-wb +audio/basic au snd +audio/cn +audio/dat12 +audio/dsr-es201108 +audio/dvi4 +audio/evrc +audio/evrc0 +audio/g722 +audio/g.722.1 +audio/g723 +audio/g726-16 +audio/g726-24 +audio/g726-32 +audio/g726-40 +audio/g728 +audio/g729 +audio/g729D +audio/g729E +audio/gsm +audio/gsm-efr +audio/l8 +audio/l16 +audio/l20 +audio/l24 +audio/lpc +audio/midi mid midi kar +audio/mpa +audio/mpa-robust +audio/mp4a-latm +audio/mpeg mpga mp2 mp3 +audio/parityfec +audio/pcma +audio/pcmu +audio/prs.sid +audio/qcelp +audio/red +audio/smv +audio/smv0 +audio/telephone-event +audio/tone +audio/vdvi +audio/vnd.3gpp.iufp +audio/vnd.cisco.nse +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds +audio/vnd.everad.plj +audio/vnd.lucent.voice +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 +audio/vnd.nuera.ecelp7470 +audio/vnd.nuera.ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.vmx.cvsd +audio/x-aiff aif aiff aifc +audio/x-alaw-basic +audio/x-mpegurl m3u +audio/x-pn-realaudio ram ra +audio/x-pn-realaudio-plugin +application/vnd.rn-realmedia rm +audio/x-wav wav +chemical/x-pdb pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +image/g3fax +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/naplps +image/png png +image/prs.btif +image/prs.pti +image/svg+xml svg +image/t38 +image/tiff tiff tif +image/tiff-fx +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg +image/vnd.dxf +image/vnd.fastbidsheet +image/vnd.fpx +image/vnd.fst +image/vnd.fujixerox.edmics-mmr +image/vnd.fujixerox.edmics-rlc +image/vnd.globalgraphics.pgb +image/vnd.mix +image/vnd.ms-modi +image/vnd.net-fpx +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff +image/x-cmu-raster ras +image/x-icon ico +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/news +message/partial +message/rfc822 +message/s-http +message/sip +message/sipfrag +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf +model/vnd.flatland.3dml +model/vnd.gdl +model/vnd.gs-gdl +model/vnd.gtw +model/vnd.mts +model/vnd.parasolid.transmit.binary +model/vnd.parasolid.transmit.text +model/vnd.vtu +model/vrml wrl vrml +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +text/calendar ics ifb +text/css css +text/directory +text/enriched +text/html html htm +text/parityfec +text/plain asc txt +text/prs.lines.tag +text/rfc822-headers +text/richtext rtx +text/rtf rtf +text/sgml sgml sgm +text/t140 +text/tab-separated-values tsv +text/uri-list +text/vnd.abc +text/vnd.curl +text/vnd.dmclientscript +text/vnd.fly +text/vnd.fmi.flexstor +text/vnd.in3d.3dml +text/vnd.in3d.spot +text/vnd.iptc.nitf +text/vnd.iptc.newsml +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.net2phone.commcenter.command +text/vnd.sun.j2me.app-descriptor +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-setext etx +text/xml +text/xml-external-parsed-entity +video/bmpeg +video/bt656 +video/celb +video/dv +video/h261 +video/h263 +video/h263-1998 +video/h263-2000 +video/jpeg +video/mp1s +video/mp2p +video/mp2t +video/mp4v-es +video/mpv +video/mpeg mpeg mpg mpe +video/nv +video/parityfec +video/pointer +video/quicktime qt mov +video/smpte292m +video/vnd.fvt +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.nokia.interleaved-multimedia +video/vnd.objectvideo +video/vnd.vivo +video/x-msvideo avi +video/x-sgi-movie movie +x-conference/x-cooltalk ice diff --git a/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplay.php b/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplay.php new file mode 100644 index 0000000000..94b5352818 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplay.php @@ -0,0 +1,274 @@ + +loadFile("./Cached_Alerts.xml"); + $cached_alerts = $doc->getRootDataObject(); + + // Use the alertService reference + $request = $this->alert_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/service", + "getAllNewAlerts"); + $request->parm = "AString"; + $new_alerts = $this->alert_service->getAllNewAlerts($request); + + foreach($new_alerts->parm->Alert as $alert){ + $new_alert = $cached_alerts->createDataObject('Alert'); + $new_alert->Title = $alert->Title; + $new_alert->Summary = $alert->Summary; + $new_alert->Address = $alert->Address; + $new_alert->Date = $alert->Date; + $new_alert->SourceId = $alert->SourceId; + $new_alert->Unread = true; + } + + $return_table = ""; + $alert_id_number = 0; + foreach($cached_alerts->Alert as $alert){ + $alert->Id = "alert_" . $alert_id_number; + $title = substr($alert->Title,0,80); + $summary = substr($alert->Summary,0,40); + $unread_string = $alert->Unread ? "unread_title" : "read_title"; + $return_row = << + + + +ALERTROW; + $return_table = $return_table . $return_row; + $alert_id_number += 1; + } + $return_table = $return_table . "
+ $title + - $summary ... + + $alert->Date +
"; + + // as php is one shot we have to save away the alerts we want to cache + $xmldas->saveFile($doc, "./Cached_Alerts.xml"); + + return $return_table; + } + + /** + * @param string $alert_id + * @return string + */ + public function readAlert($alert_id) + { + $xmldas = SDO_DAS_XML::create("./Alerter.xsd"); + $doc = $xmldas->loadFile("./Cached_Alerts.xml"); + $cached_alerts = $doc->getRootDataObject(); + + $return_summary = ""; + + foreach($cached_alerts->alert as $alert){ + if (strcmp($alert->Id,$alert_Id) == 0){ + SCA::$logger->log("Match"); + $alert->Unread = false; + $return_summary = "
" . $alert->Summary . "
"; + } + } + + // as php is one shot we have to save away the alerts we want to cache + $xmldas->saveFile($doc, "./Cached_Alerts.xml"); + + return $return_summary; + } + + /** + * @return string + */ + public function getAlertSourcesHTMLTable() + { + $request = $this->alert_sources_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/sources", + "getAlertSources"); + $request->parm = "AString"; + $alert_sources = $this->alert_sources_service->getAlertSources($request); + + $return_table = "\n"; + + $no_of_sources = 0; + + foreach ($alert_sources->parm->Source as $alert_source){ + $source_id = $alert_source->Id; + $return_row = << + + + + + + + +SOURCEROW; + $return_table = $return_table . $return_row; + $no_of_sources = $no_of_sources + 1; + } + + $source_id = $no_of_sources + 1; + + $return_row = << + + + + + +ADDROW; + + $return_table = $return_table . $return_row; + $return_table = $return_table . "
+   $alert_source->Name +
\n"; + return $return_table; + } + + /** + * @param integer $source_id + * @return string + */ + public function deleteAlertSource($source_id){ + $this->alert_sources_service->removeAlertSource($source_id); + } + + /** + * @param SingleSourceType $alert_source http://tuscany.apache.org/sca/samples/aggregator/types + */ + public function addAlertSource($alert_source){ + $request = $this->alert_sources_service->createDataObject("http://tuscany.apache.org/sca/samples/aggregator/sources", + "addAlertSource"); + $source = $request->createDataObject("parm"); + + $source->Name = $alert_source->Name; + $source->Address = $alert_source->Address; + $source->Id = $alert_source->Id; + $source->Type = $alert_source->Type; + + $this->alert_sources_service->addAlertSource($request); + } + + /** + * @param SourceType $alert_source http://tuscany.apache.org/sca/samples/aggregator/types + */ + public function updateAlertSource($alert_source){ + $this->alert_sources_service->updateAlertSource($alert_source); + } +} + +/* Some debugging lines +ob_start(); +print_r( $new_alerts ); +$debug = ob_get_contents(); +ob_end_clean(); +SCA::$logger->log($debug); +*/ +?> + + + diff --git a/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplayJson.php b/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplayJson.php new file mode 100644 index 0000000000..5953f02209 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/AlertDisplayJson.php @@ -0,0 +1,56 @@ +alert_service->getAllNewAlerts("SomeString"); + + return $alerts; + + } +} + +?> diff --git a/sandbox/slaws/old/httpserver.php/htdocs/Alerter.xsd b/sandbox/slaws/old/httpserver.php/htdocs/Alerter.xsd new file mode 100644 index 0000000000..58b9982d38 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/Alerter.xsd @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/slaws/old/httpserver.php/htdocs/Alerts.wsdl b/sandbox/slaws/old/httpserver.php/htdocs/Alerts.wsdl new file mode 100644 index 0000000000..9150abbaf4 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/Alerts.wsdl @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/slaws/old/httpserver.php/htdocs/Alerts.xsd b/sandbox/slaws/old/httpserver.php/htdocs/Alerts.xsd new file mode 100644 index 0000000000..1e80da0487 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/Alerts.xsd @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/slaws/old/httpserver.php/htdocs/AlertsSources.wsdl b/sandbox/slaws/old/httpserver.php/htdocs/AlertsSources.wsdl new file mode 100644 index 0000000000..82422c82ef --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/AlertsSources.wsdl @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/slaws/old/httpserver.php/htdocs/Cached_Alerts.xml b/sandbox/slaws/old/httpserver.php/htdocs/Cached_Alerts.xml new file mode 100644 index 0000000000..e208c8d9e4 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/Cached_Alerts.xml @@ -0,0 +1,2 @@ + + diff --git a/sandbox/slaws/old/httpserver.php/htdocs/index.html b/sandbox/slaws/old/httpserver.php/htdocs/index.html new file mode 100644 index 0000000000..f952f08bc8 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/index.html @@ -0,0 +1,280 @@ + + + + + Apache Tuscany Feed Aggregator Sample + + + + + +

Apache Tuscany Alert Aggregator Sample

+

Alert Sources:

+
+

Recent Alerts (Refresh):

+
+

Back to top

+
+ + + + diff --git a/sandbox/slaws/old/httpserver.php/htdocs/phpinfo.php b/sandbox/slaws/old/httpserver.php/htdocs/phpinfo.php new file mode 100644 index 0000000000..1cf8044fe2 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/phpinfo.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/sandbox/slaws/old/httpserver.php/htdocs/pop.png b/sandbox/slaws/old/httpserver.php/htdocs/pop.png new file mode 100644 index 0000000000..1cf1df24a7 Binary files /dev/null and b/sandbox/slaws/old/httpserver.php/htdocs/pop.png differ diff --git a/sandbox/slaws/old/httpserver.php/htdocs/rss.png b/sandbox/slaws/old/httpserver.php/htdocs/rss.png new file mode 100644 index 0000000000..b3c949d224 Binary files /dev/null and b/sandbox/slaws/old/httpserver.php/htdocs/rss.png differ diff --git a/sandbox/slaws/old/httpserver.php/htdocs/service.smd b/sandbox/slaws/old/httpserver.php/htdocs/service.smd new file mode 100644 index 0000000000..bc77e39bf9 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/service.smd @@ -0,0 +1 @@ +{"SMDVersion":".1","objectName":"AlertsService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/sample-feed-aggregator/services/AlertsServiceJSONRPC","methods":[{"name":"getAllNewAlerts","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/sandbox/slaws/old/httpserver.php/htdocs/style.css b/sandbox/slaws/old/httpserver.php/htdocs/style.css new file mode 100644 index 0000000000..cd377e90e5 --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/htdocs/style.css @@ -0,0 +1,166 @@ +/* + * 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; +} + +.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/old/httpserver.php/startserver.bat b/sandbox/slaws/old/httpserver.php/startserver.bat new file mode 100644 index 0000000000..339460c70f --- /dev/null +++ b/sandbox/slaws/old/httpserver.php/startserver.bat @@ -0,0 +1,78 @@ +@echo off + +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. + +setlocal + +set HTTPD_HOME=C:\simon\apps\apache2.0.55\Apache2 +set PHP_HOME=C:\simon\Projects\Tuscany\php\branch-build\php-5.2.0\Debug_TS + +set APFULLDIR=%~d0%~p0 +echo Running from %APFULLDIR% + +REM if "%TUSCANY_SCACPP%" == "" ( +REM echo "TUSCANY_SCACPP not set" +REM goto end +REM ) +REM echo Using SCA installed at %TUSCANY_SCACPP% + +REM if "%TUSCANY_SDOCPP%" == "" ( +REM echo "TUSCANY_SDOCPP not set" +REM goto end +REM ) +REM echo Using SDO installed at %TUSCANY_SDOCPP% + +if "%HTTPD_HOME%" == "" ( +echo "HTTPD_HOME not set" +goto end +) +echo Using HTTPD installed at %HTTPD_HOME% + +set PATH=%HTTPD_HOME%\bin;%PHP_HOME%;%PATH% + +REM set TUSCANY_SCACPP_ROOT=%APFULLDIR%\..\ +REM set TUSCANY_SCACPP_BASE_URI=http://localhost:9091 + +@REM Generate the tuscany_sca_mod_rest configuration +REM if not exist %APFULLDIR%\conf\tuscany_sca_mod_rest.conf ( +REM echo LoadModule sca_rest_module %TUSCANY_SCACPP%/extensions/rest\service/bin/tuscany_sca_mod_rest.dll > %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM echo TuscanyHome %TUSCANY_SCACPP% >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM echo ^ >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM echo SetHandler sca_rest_module >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM echo TuscanyRoot %TUSCANY_SCACPP_ROOT% >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM echo ^ >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf +REM ) + +@REM Generate the base HTTPD configuration +if not exist %APFULLDIR%\conf\base.conf ( + echo LoadModule mime_module %HTTPD_HOME%\modules\mod_mime.so > %APFULLDIR%\conf\base.conf + echo LoadModule dir_module %HTTPD_HOME%\modules\mod_dir.so >> %APFULLDIR%\conf\base.conf + echo DocumentRoot %APFULLDIR%\htdocs >> %APFULLDIR%\conf\base.conf + echo LoadModule php5_module %PHP_HOME%\php5apache2.dll >> %APFULLDIR%\conf\base.conf + echo AddType application/x-httpd-php .php >> %APFULLDIR%\conf\base.conf + echo PHPIniDir %PHP_HOME% >> %APFULLDIR%\conf\base.conf +) + +@REM Create logs directory +REM if not exist %APFULLDIR%\logs mkdir %APFULLDIR%\logs +REM set TUSCANY_SCACPP_LOG=%APFULLDIR%\logs\tuscany-server.log +REM set TUSCANY_SCACPP_LOGGING=9 + +@REM Start the HTTP server +echo Starting Apache httpd +%HTTPD_HOME%\bin\apache -d %APFULLDIR% -- cgit v1.2.3