From e0ff67c0b32813ea48734c770a5ffc1952644e29 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:02 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835128 13f79535-47bb-0310-9956-ffa450edef68 --- .../demos/alert-aggregator-webapp/LICENSE | 205 ------- .../demos/alert-aggregator-webapp/NOTICE | 6 - .../demos/alert-aggregator-webapp/README | 82 --- .../alert-aggregator-webapp/alert-aggregator.png | Bin 36819 -> 0 bytes .../alert-aggregator-webapp/alert-aggregator.svg | 627 --------------------- .../demos/alert-aggregator-webapp/build-dojo.xml | 92 --- .../demos/alert-aggregator-webapp/build.xml | 148 ----- .../demos/alert-aggregator-webapp/pom.xml | 344 ----------- .../sca/demos/aggregator/AlertTypeNonSDOImpl.java | 339 ----------- .../demos/aggregator/AlertsFeedServiceImpl.java | 106 ---- .../sca/demos/aggregator/AlertsService.java | 40 -- .../sca/demos/aggregator/AlertsServiceImpl.java | 126 ----- .../sca/demos/aggregator/AlertsSourcesService.java | 69 --- .../demos/aggregator/AlertsSourcesServiceImpl.java | 183 ------ .../sca/demos/aggregator/AlertsTypeNonSDOImpl.java | 74 --- .../sca/demos/aggregator/ConfigTypeNonSDOImpl.java | 55 -- .../sca/demos/aggregator/RSSCheckerService.java | 30 - .../demos/aggregator/RSSCheckerServiceImpl.java | 85 --- .../sca/demos/aggregator/SourceTypeNonSDOImpl.java | 536 ------------------ .../src/main/resources/Alerts.wsdl | 88 --- .../src/main/resources/Alerts.xsd | 80 --- .../src/main/resources/AlertsSources.wsdl | 124 ---- .../src/main/resources/alerts-client.composite | 49 -- .../src/main/resources/alerts.composite | 85 --- .../src/main/resources/sources.xml | 33 -- .../src/main/webapp/AlertAggregator.html | 330 ----------- .../src/main/webapp/META-INF/sca-contribution.xml | 26 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 32 -- .../src/main/webapp/WEB-INF/web.xml | 41 -- .../src/main/webapp/pop.png | Bin 244 -> 0 bytes .../src/main/webapp/rss.png | Bin 689 -> 0 bytes .../src/main/webapp/service.smd | 1 - .../src/main/webapp/sources.smd | 1 - .../src/main/webapp/style.css | 176 ------ .../demos/aggregator/AlertsIntegrationTest.java | 99 ---- .../sca-java-1.3.1/demos/bigbank-account/LICENSE | 205 ------- .../sca-java-1.3.1/demos/bigbank-account/NOTICE | 6 - .../sca-java-1.3.1/demos/bigbank-account/README | 4 - .../demos/bigbank-account/bigbank.png | Bin 100070 -> 0 bytes .../demos/bigbank-account/bigbank.svg | 537 ------------------ .../demos/bigbank-account/build-dojo.xml | 92 --- .../sca-java-1.3.1/demos/bigbank-account/build.xml | 85 --- .../sca-java-1.3.1/demos/bigbank-account/pom.xml | 71 --- .../account/checking/CheckingAccountDetails.java | 50 -- .../account/checking/CheckingAccountService.java | 37 -- .../checking/CheckingAccountServiceImpl.java | 66 --- .../account/savings/SavingsAccountDetails.java | 52 -- .../account/savings/SavingsAccountService.java | 35 -- .../account/savings/SavingsAccountServiceImpl.java | 66 --- .../AccountsDataPasswordCallbackHandler.java | 54 -- .../account/security/BigbankCheckingsAcl.java | 48 -- ...ckingsDeptAuthImplementationPolicyProvider.java | 90 --- .../account/security/CheckingsDeptAuthPolicy.java | 46 -- .../CheckingsDeptAuthPolicyInterceptor.java | 77 --- .../CheckingsDeptAuthPolicyProviderFactory.java | 75 --- .../CheckingsDeptAuthorizationPolicyHandler.java | 65 --- .../CheckingsDeptAuthorizationPolicyProcessor.java | 72 --- .../bigbank/account/stock/StockAccountDetails.java | 68 --- .../bigbank/account/stock/StockAccountService.java | 36 -- .../account/stock/StockAccountServiceImpl.java | 60 -- .../src/main/resources/CheckingsAccount.composite | 35 -- .../main/resources/META-INF/sca-contribution.xml | 42 -- ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...rg.apache.tuscany.sca.policy.util.PolicyHandler | 20 - ...ache.tuscany.sca.provider.PolicyProviderFactory | 19 - .../src/main/resources/SavingsAccount.composite | 34 -- .../src/main/resources/StockAccount.composite | 34 -- .../src/main/resources/definitions.xml | 58 -- .../src/main/resources/web/AccountJSON.html | 92 --- .../src/main/resources/web/style.css | 22 - .../src/main/resources/wsdl/AccountService.wsdl | 91 --- .../demos/bigbank-calculator/LICENSE | 205 ------- .../sca-java-1.3.1/demos/bigbank-calculator/NOTICE | 6 - .../sca-java-1.3.1/demos/bigbank-calculator/README | 2 - .../demos/bigbank-calculator/build.xml | 68 --- .../demos/bigbank-calculator/pom.xml | 78 --- .../src/main/java/calculator/AddService.java | 25 - .../main/java/calculator/CalculatorService.java | 34 -- .../java/calculator/CalculatorServiceImpl.java | 72 --- .../src/main/java/calculator/DivideService.java | 25 - .../src/main/java/calculator/MultiplyService.java | 25 - .../src/main/java/calculator/SubtractService.java | 25 - .../java/calculator/demo/CalculatorServer.java | 44 -- .../src/main/resources/Calculator.composite | 55 -- .../main/resources/calculator/AddServiceImpl.js | 22 - .../resources/calculator/DivideServiceImpl.groovy | 22 - .../resources/calculator/MultiplyServiceImpl.py | 21 - .../resources/calculator/SubtractServiceImpl.rb | 22 - .../demos/bigbank-stockquote/LICENSE | 205 ------- .../sca-java-1.3.1/demos/bigbank-stockquote/NOTICE | 6 - .../sca-java-1.3.1/demos/bigbank-stockquote/README | 4 - .../demos/bigbank-stockquote/build.xml | 67 --- .../demos/bigbank-stockquote/pom.xml | 85 --- .../java/stockquote/PasswordCallbackHandler.java | 47 -- .../src/main/java/stockquote/StockQuoteImpl.java | 38 -- .../main/java/stockquote/StockQuoteService.java | 30 - .../java/stockquote/demo/StockQuoteServer.java | 42 -- .../src/main/resources/StockQuote.composite | 33 -- .../src/main/resources/definitions.xml | 49 -- .../src/main/resources/security.properties | 4 - .../src/main/resources/stockQuote.jks | Bin 1986 -> 0 bytes branches/sca-java-1.3.1/demos/bigbank/LICENSE | 205 ------- branches/sca-java-1.3.1/demos/bigbank/NOTICE | 6 - branches/sca-java-1.3.1/demos/bigbank/README | 127 ----- branches/sca-java-1.3.1/demos/bigbank/bigbank.png | Bin 100070 -> 0 bytes branches/sca-java-1.3.1/demos/bigbank/bigbank.svg | 537 ------------------ .../sca-java-1.3.1/demos/bigbank/build-dojo.xml | 92 --- branches/sca-java-1.3.1/demos/bigbank/build.xml | 84 --- branches/sca-java-1.3.1/demos/bigbank/pom.xml | 201 ------- .../main/java/bigbank/account/AccountService.java | 32 -- .../java/bigbank/account/AccountServiceImpl.java | 99 ---- .../java/bigbank/account/feed/AccountFeedImpl.java | 70 --- .../main/java/bigbank/client/BigBankClient.java | 50 -- .../src/main/java/bigbank/demo/BigBankServer.java | 130 ----- .../security/BigbankPasswordCallbackHandler.java | 51 -- .../main/java/calculator/CalculatorService.java | 34 -- .../main/java/stockquote/StockQuoteService.java | 29 - .../bigbank/src/main/resources/BigBank.composite | 85 --- .../main/resources/META-INF/sca-contribution.xml | 36 -- .../demos/bigbank/src/main/resources/bigbank.jks | Bin 1986 -> 0 bytes .../bigbank/src/main/resources/definitions.xml | 64 --- .../bigbank/src/main/resources/security.properties | 4 - .../src/main/resources/web/AccountJSON.html | 92 --- .../demos/bigbank/src/main/resources/web/style.css | 22 - .../src/main/resources/wsdl/AccountService.wsdl | 91 --- .../src/test/java/test/BigBankTestCase.java | 33 -- .../demos/mortgage-creditcheck/LICENSE | 205 ------- .../demos/mortgage-creditcheck/NOTICE | 6 - .../demos/mortgage-creditcheck/README | 6 - .../demos/mortgage-creditcheck/build.xml | 66 --- .../demos/mortgage-creditcheck/pom.xml | 75 --- .../src/main/java/credit/CreditCheck.java | 26 - .../src/main/java/credit/CreditCheckImpl.java | 34 -- .../src/main/java/credit/CreditCheckServer.java | 40 -- .../src/main/resources/CreditCheck.composite | 37 -- .../src/main/resources/wsdl/credit.wsdl | 81 --- .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/web.xml | 37 -- .../demos/mortgage-loanapproval/LICENSE | 205 ------- .../demos/mortgage-loanapproval/NOTICE | 6 - .../demos/mortgage-loanapproval/README | 60 -- .../demos/mortgage-loanapproval/build.xml | 66 --- .../mortgage-loanapproval/doc/credit_composite.jpg | Bin 73610 -> 0 bytes .../mortgage-loanapproval/doc/credit_composite.png | Bin 51153 -> 0 bytes .../mortgage-loanapproval/doc/loan_approval.jpg | Bin 162536 -> 0 bytes .../mortgage-loanapproval/doc/loan_approval.png | Bin 58247 -> 0 bytes .../doc/mortgage_assembly0.jpg | Bin 145053 -> 0 bytes .../doc/mortgage_assembly0.png | Bin 93773 -> 0 bytes .../doc/mortgage_assembly1.jpg | Bin 181317 -> 0 bytes .../doc/mortgage_assembly1.png | Bin 113404 -> 0 bytes .../doc/mortgage_assembly2.jpg | Bin 180240 -> 0 bytes .../doc/mortgage_assembly2.png | Bin 106656 -> 0 bytes .../doc/mortgage_composite.jpg | Bin 343699 -> 0 bytes .../doc/mortgage_composite.png | Bin 288351 -> 0 bytes .../doc/mortgage_diagrams.doc | Bin 2278400 -> 0 bytes .../doc/mortgage_package1.jpg | Bin 181031 -> 0 bytes .../doc/mortgage_package1.png | Bin 34939 -> 0 bytes .../doc/mortgage_package2.jpg | Bin 110930 -> 0 bytes .../doc/mortgage_package2.png | Bin 58993 -> 0 bytes .../doc/mortgage_scenario.jpg | Bin 225690 -> 0 bytes .../doc/mortgage_scenario.png | Bin 106791 -> 0 bytes .../mortgage-loanapproval/mortgage_assembly.png | Bin 106656 -> 0 bytes .../demos/mortgage-loanapproval/pom.xml | 83 --- .../src/main/java/mortgage/CreditCheck.java | 29 - .../src/main/java/mortgage/CreditCheckImpl.java | 34 -- .../src/main/java/mortgage/Customer.java | 76 --- .../src/main/java/mortgage/InterestRateQuote.java | 23 - .../main/java/mortgage/InterestRateQuoteImpl.java | 42 -- .../src/main/java/mortgage/LoanApproval.java | 27 - .../src/main/java/mortgage/LoanApprovalImpl.java | 84 --- .../src/main/java/mortgage/MortgageCalculator.java | 29 - .../main/java/mortgage/MortgageCalculatorImpl.java | 38 -- .../src/main/java/mortgage/MortgageClient.java | 44 -- .../src/main/java/mortgage/RiskAssessment.java | 27 - .../src/main/java/mortgage/RiskAssessmentImpl.java | 38 -- .../src/main/resources/Mortgage.composite | 48 -- .../src/main/resources/Mortgage1.composite | 57 -- .../resources/MortgageCalculator.componentType | 27 - .../src/main/resources/MortgageCalculator.js | 25 - .../src/main/resources/wsdl/credit.wsdl | 81 --- .../test/java/mortgage/MortgageClientTestCase.java | 56 -- branches/sca-java-1.3.1/demos/pom.xml | 52 -- branches/sca-java-1.3.1/demos/xml-bigbank/LICENSE | 205 ------- branches/sca-java-1.3.1/demos/xml-bigbank/NOTICE | 6 - branches/sca-java-1.3.1/demos/xml-bigbank/README | 46 -- .../sca-java-1.3.1/demos/xml-bigbank/build.xml | 63 --- branches/sca-java-1.3.1/demos/xml-bigbank/pom.xml | 115 ---- .../src/main/java/bigbank/AccountData.java | 36 -- .../src/main/java/bigbank/AccountDataImpl.java | 48 -- .../src/main/java/bigbank/AccountService.java | 32 -- .../src/main/java/bigbank/AccountServiceImpl.java | 84 --- .../src/main/java/bigbank/BigBankClient.java | 35 -- .../src/main/java/bigbank/BigBankServer.java | 40 -- .../src/main/java/bigbank/CurrencyExchange.java | 36 -- .../src/main/java/bigbank/ExchangeRate.java | 32 -- .../src/main/java/bigbank/ExchangeRateImpl.java | 84 --- .../src/main/java/bigbank/StockQuote.java | 38 -- .../src/main/java/bigbank/StockValue.java | 38 -- .../src/main/resources/BigBank.composite | 51 -- .../xml-bigbank/src/main/resources/accounts.xml | 29 - .../xml-bigbank/src/main/resources/customer.xsd | 46 -- .../demos/xml-bigbank/src/main/resources/stock.xq | 52 -- .../src/main/resources/wsdl/StockQuotes.wsdl | 23 - .../demos/xml-bigbank/xml-bigbank.png | Bin 30396 -> 0 bytes .../demos/xml-bigbank/xml-bigbank.svg | 447 --------------- 205 files changed, 13790 deletions(-) delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/README delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.png delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.svg delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build-dojo.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/sources.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/pop.png delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/rss.png delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/service.smd delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/README delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/bigbank.png delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/bigbank.svg delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/build-dojo.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/CheckingsAccount.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/SavingsAccount.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/StockAccount.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/AccountJSON.html delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/style.css delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/README delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/README delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/security.properties delete mode 100644 branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/stockQuote.jks delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/README delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/bigbank.png delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/bigbank.svg delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/build-dojo.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/java/stockquote/StockQuoteService.java delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/BigBank.composite delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/bigbank.jks delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/security.properties delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/AccountJSON.html delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/style.css delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/bigbank/src/test/java/test/BigBankTestCase.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/README delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/README delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/mortgage_assembly.png delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java delete mode 100644 branches/sca-java-1.3.1/demos/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/LICENSE delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/NOTICE delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/README delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/build.xml delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/pom.xml delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountData.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountService.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockValue.java delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/BigBank.composite delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/accounts.xml delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/customer.xsd delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/stock.xq delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.png delete mode 100644 branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.svg (limited to 'branches/sca-java-1.3.1/demos') diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/LICENSE b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/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/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/NOTICE b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/README b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/README deleted file mode 100644 index 3ec27ef65f..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/README +++ /dev/null @@ -1,82 +0,0 @@ -Apache Tuscany Alert Aggregator Demo -==================================== - -The alert aggregator demo provides an application, implemented using SCA, that -aggregates feeds together and exposes them using the following bindings. - -binding.ws -binding.jsonrpc -binding.feed - -The easiest way to get going is to build the demo - -cd alert-aggregator-webapp -ant package - -This will build a war file - -demo-alert-aggregator-webapp.war - -This war can be deployed to you web application container and tested (the war -has been tested with Tomcat 6.0.10). - -The Web Application -------------------- - -Once deployed point your browser at - -http://localhost:8080/demo-alert-aggregator-webapp - -Taking care to ensure the host name and port number match you local -configuration. - -This launches a Javascript application in the browser that uses JSONRPC -to contact the server and retrived a list of alert sources and alerts that -these sources are providing. - -There default sources that you see are stored in a file in the following -file - -demo-alert-aggregator-webapp/WEB-INF/classes/sources.xml - -This files has the following contents - - - - BBC News - http://news.bbc.co.uk/ - 10-Jun-2007 16:34:03 - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml - - - Engadget - http://www.engadget.com - 10-Jun-2007 16:34:03 - http://www.engadget.com/rss.xml - - - -You may want to adjust the "LastChecked" values to change the number of -alerts that are displayed in the first instance - -Using A Feed Reader -------------------- - -As this SCA application also uses the binding.feed binding you can use your -favourite feed reader to read the aggregated alerts. To do this point your -feed reader at - -http://localhost:8080/demo-alert-aggregator-webapp/services/AlertsFeedServiceRSS - -Again taking care to ensure that the host name and port number match you -local configuration. - -Using Web Services ------------------- - -The SCA application also uses binding.ws to provide a SOAP/HTTP interface. -The demo client that uses this interface is not yet available. - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.png b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.png deleted file mode 100644 index ae429cca94..0000000000 Binary files a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.svg b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.svg deleted file mode 100644 index 807416135e..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/alert-aggregator.svg +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - DisplayComposite - PHP - - Display - - - - - - AlerterComposite - Java - - AlertsService - - - - rest soap - - - soap - - RSS - - - AlertsSourcesService - - - - - - jsonrpc - - - - - soap - - soap - atom - jsonrpc - - - - - - - POP - Not done - - - - - - - - - HTML Web2.0 Thunderbird - - NNTP - Not done - - rss - - AlertFeedService - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build-dojo.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build-dojo.xml deleted file mode 100644 index c31c9adee8..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build.xml deleted file mode 100644 index b75842d08c..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/build.xml +++ /dev/null @@ -1,148 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/pom.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/pom.xml deleted file mode 100644 index 22db8b77cf..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/pom.xml +++ /dev/null @@ -1,344 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - - org.apache.tuscany.sca - demo-alert-aggregator-webapp - war - 1.3.1-SNAPSHOT - Apache Tuscany SCA Alert Aggregator Demo - http://cwiki.apache.org/TUSCANY - - - - junit - junit - 4.2 - test - - - httpunit - httpunit - 1.6.1 - test - - - org.apache.tuscany.sdo - tuscany-sdo-api-r2.1 - 1.1-incubating - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1-incubating - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-core-databinding - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-databinding-jaxb - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-databinding-sdo - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-databinding-axiom - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-host-embedded - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-interface-java-xml - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.3.1-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.1-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.3.1-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.3.1-SNAPSHOT - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - - demo-alert-aggregator-webapp - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1-incubating - - - generate-sdo - generate-sources - - - - ${basedir}/src/main/resources/Alerts.wsdl - org.apache.tuscany.sca.demos.aggregator.service - - - ${basedir}/src/main/resources/AlertsSources.wsdl - org.apache.tuscany.sca.demos.aggregator.sources - - - ${basedir}/src/main/resources/Alerts.xsd - org.apache.tuscany.sca.demos.aggregator.types - - - true - true - true - - - generate - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - ant - ant-trax - 1.6.5 - - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - surefire-it - integration-test - - test - - - - **/*AlertsIntegrationTest.java - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - false - - - 8080 - - - - - ${project.build.directory}/${project.build.finalName}.${project.packaging} - - http://localhost:8080/AlertsSourcesServiceJSONRPC - - - ${project.build.directory}/cargo-jetty - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.3.1-SNAPSHOT - - - - true - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java deleted file mode 100644 index 808374030c..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java +++ /dev/null @@ -1,339 +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.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; - - -public class AlertTypeNonSDOImpl implements AlertType -{ - private static final long serialVersionUID = 670364038865656196L; - -/** - * The default value of the '{@link #getTitle() Title}' attribute. - * - * - * @see #getTitle() - * @generated - * @ordered - */ - protected static final String TITLE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getTitle() Title}' attribute. - * - * - * @see #getTitle() - * @generated - * @ordered - */ - protected String title = TITLE_DEFAULT_; - - /** - * The default value of the '{@link #getSummary() Summary}' attribute. - * - * - * @see #getSummary() - * @generated - * @ordered - */ - protected static final String SUMMARY_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getSummary() Summary}' attribute. - * - * - * @see #getSummary() - * @generated - * @ordered - */ - protected String summary = SUMMARY_DEFAULT_; - - /** - * The default value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected static final String ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected String address = ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getDate() Date}' attribute. - * - * - * @see #getDate() - * @generated - * @ordered - */ - protected static final String DATE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getDate() Date}' attribute. - * - * - * @see #getDate() - * @generated - * @ordered - */ - protected String date = DATE_DEFAULT_; - - /** - * The default value of the '{@link #getSourceId() Source Id}' attribute. - * - * - * @see #getSourceId() - * @generated - * @ordered - */ - protected static final String SOURCE_ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getSourceId() Source Id}' attribute. - * - * - * @see #getSourceId() - * @generated - * @ordered - */ - protected String sourceId = SOURCE_ID_DEFAULT_; - - /** - * The default value of the '{@link #isUnread() Unread}' attribute. - * - * - * @see #isUnread() - * @generated - * @ordered - */ - protected static final boolean UNREAD_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isUnread() Unread}' attribute. - * - * - * @see #isUnread() - * @generated - * @ordered - */ - protected boolean unread = UNREAD_DEFAULT_; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_DEFAULT_; - - /** - * - * - * @generated - */ - public AlertTypeNonSDOImpl() - { - super(); - } - - - /** - * - * - * @generated - */ - public String getTitle() - { - return title; - } - /** - * - * - * @generated - */ - public void setTitle(String newTitle) - { - title = newTitle; - } - - /** - * - * - * @generated - */ - public String getSummary() - { - return summary; - } - /** - * - * - * @generated - */ - public void setSummary(String newSummary) - { - summary = newSummary; - } - - /** - * - * - * @generated - */ - public String getAddress() - { - return address; - } - /** - * - * - * @generated - */ - public void setAddress(String newAddress) - { - address = newAddress; - } - - /** - * - * - * @generated - */ - public String getDate() - { - return date; - } - /** - * - * - * @generated - */ - public void setDate(String newDate) - { - date = newDate; - } - - /** - * - * - * @generated - */ - public String getSourceId() - { - return sourceId; - } - /** - * - * - * @generated - */ - public void setSourceId(String newSourceId) - { - sourceId = newSourceId; - } - - /** - * - * - * @generated - */ - public boolean isUnread() - { - return unread; - } - /** - * - * - * @generated - */ - public void setUnread(boolean newUnread) - { - unread = newUnread; - } - - /** - * - * - * @generated - */ - public String getId() - { - return id; - } - /** - * - * - * @generated - */ - public void setId(String newId) - { - id = newId; - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (Title: "); - result.append(title); - result.append(", Summary: "); - result.append(summary); - result.append(", Address: "); - result.append(address); - result.append(", Date: "); - result.append(date); - result.append(", SourceId: "); - result.append(sourceId); - result.append(", Unread: "); - result.append(unread); - result.append(", Id: "); - result.append(id); - result.append(')'); - return result.toString(); - } - -} //AlertTypeImpl diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java deleted file mode 100644 index b062504311..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java +++ /dev/null @@ -1,106 +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.demos.aggregator; - -import java.text.DateFormat; - -import org.apache.abdera.Abdera; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.tuscany.sca.binding.atom.collection.Collection; -import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * Read all new alerts from the specified sources - * - * @version $Rev$ $Date$ - */ -@Service(Collection.class) -public class AlertsFeedServiceImpl implements Collection { - - private AlertsService alerts; - - @Reference - public void setAlerts(AlertsService alerts) { - this.alerts = alerts; - } - - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - - /** - * Return the alerts as a feed. - * - * @return the structure containing alerts - */ - public org.apache.abdera.model.Feed getFeed() { - - // Create a new Feed - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle("Apache Tuscany Feed Aggregator"); - feed.setSubtitle("A sample showing an SCA application to aggregate various types of feeds"); - feed.addAuthor("Apache Tuscany"); - feed.addLink("http://incubator.apache.org/tuscany"); - - // Aggregate entries from feed1 and feed2 - try { - AlertsType alerts = this.alerts.getAllNewAlerts(""); - - for( Object alertObject : alerts.getAlert() ){ - AlertType alert = ((AlertType)alertObject); - Entry entry = factory.newEntry(); - entry.setTitle(alert.getTitle()); - //entry.(alert.getSummary()); - entry.addLink(alert.getAddress()); - entry.setPublished(dateFormatter.parse(alert.getDate())); - - feed.addEntry(entry); - } - } catch(Exception ex) { - System.err.println("Exception " + ex.toString()); - } - - return feed; - } - - public Feed query(String queryString) { - return getFeed(); - } - - public void delete(String id) throws NotFoundException { - } - - public Entry get(String id) throws NotFoundException { - return null; - } - - public Entry post(Entry entry) { - return null; - } - - public void put(String id, Entry entry) throws NotFoundException { - } - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java deleted file mode 100644 index c4bf13ce7a..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.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.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.osoa.sca.annotations.Remotable; - -/** - * Retrieve and manage alerts - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface AlertsService { - - /** - * Return a structure holding all of the new alerts that have been found - * - * @return the structure containing alerts - */ - public AlertsType getAllNewAlerts(String id); - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java deleted file mode 100644 index 28e27a9978..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.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.demos.aggregator; - -import java.text.DateFormat; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * Read all new alerts from the specified sources - * - * @version $Rev$ $Date$ - */ -@Service(AlertsService.class) -public class AlertsServiceImpl implements AlertsService { - - private RSSCheckerService rssChecker; - - private AlertsSourcesService alertsSources; - - @Reference - public void setRssChecker(RSSCheckerService rssChecker) { - this.rssChecker = rssChecker; - } - - @Reference - public void setAlertsSources(AlertsSourcesService alertsSources) { - this.alertsSources = alertsSources; - } - - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - - /** - * Return a structure holding all of the new alerts that have been found - * - * @return the structure containing alerts - */ - public AlertsType getAllNewAlerts(String id) - { - System.err.println("getAllNewAlerts(" + id + ")"); - - //TypesFactory factory = TypesFactory.INSTANCE; - //AlertsType returnAlerts = factory.createAlertsType(); - AlertsType returnAlerts = new AlertsTypeNonSDOImpl(); - List returnAlertList = returnAlerts.getAlert(); - - // get the date/time now so that we can update the - // alert source record so that next time we - // only get the latest alerts - Date now = new Date(); - String nowString = dateFormatter.format(now); - - try { - ConfigType alertSourceConfig = alertsSources.getAlertSources(id); - - for (Object source : alertSourceConfig.getSource()){ - SourceType sourceType = (SourceType)source; - - AlertsType alerts = null; - - if ( sourceType.getFeedType().equals("rss")){ - alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(), - sourceType.getLastChecked()); - } else { - - } - - // extend return list with any alerts we found - for( Object alert : alerts.getAlert() ){ - - // set the id on the alert so we know which source it - // came from - ((AlertType)alert).setSourceId(sourceType.getId()); - - // convert from SDO to POJO so that the - // JSONRPC binding will work. It can't currently - // handle SDOs - AlertType newAlert = new AlertTypeNonSDOImpl(); - - newAlert.setSourceId(((AlertType)alert).getSourceId()); - newAlert.setTitle(((AlertType)alert).getTitle()); - newAlert.setSummary(((AlertType)alert).getSummary()); - newAlert.setAddress(((AlertType)alert).getAddress()); - newAlert.setDate(((AlertType)alert).getDate()); - newAlert.setId(((AlertType)alert).getId()); - newAlert.setUnread(((AlertType)alert).isUnread()); - - returnAlertList.add(newAlert); - } - - // update the time last checked for this source - sourceType.setLastChecked(nowString); - //alertsSources.updateAlertSource(sourceType); - } - } catch(Exception ex) { - System.err.println("Exception " + ex.toString()); - } - - return returnAlerts ; - - } -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java deleted file mode 100644 index 7b943b1b45..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java +++ /dev/null @@ -1,69 +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.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.osoa.sca.annotations.Remotable; - -/** - * Retrieve and manage alert sources - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface AlertsSourcesService { - - /** - * Return all of the configured alert sources. - * - * @return the list of alert sources - */ - public ConfigType getAlertSources (String id); - - /** - * Return a single alert source. - * @param id not currently used - * @return the alert source - */ - public SourceType getAlertSource (String id); - - /** - * Update an alert source. - * - * @param updatedSource the alert source to update - */ - public void updateAlertSource (SourceType updatedSource); - - /** - * Add an alert source. - * - * @param newSource the alert source to add - */ - public String addAlertSource (SourceType newSource); - - /** - * Remove an alert source. - * - * @param oldSource the alert source to remove - */ - public void removeAlertSource (String id); - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java deleted file mode 100644 index ca2fc95b4a..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java +++ /dev/null @@ -1,183 +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.demos.aggregator; - -import java.io.InputStream; -import java.text.DateFormat; -import java.util.Date; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; -import org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import commonj.sdo.helper.HelperContext; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.impl.HelperProvider; - -/** - * Retrieve and manage alert sources - * - * @version $Rev$ $Date$ - */ -@Service(AlertsSourcesService.class) -@Scope("COMPOSITE") -public class AlertsSourcesServiceImpl implements AlertsSourcesService { - - ConfigType alertSources; - - /** - * Constructor reads the configuration to provide - * the initial list of alert sources - */ - public AlertsSourcesServiceImpl(){ - System.err.println("AlertsSourcesServiceImpl()"); - try { - // read the alerts config from an XML file - InputStream is = this.getClass().getClassLoader().getResourceAsStream("sources.xml"); - - if (is == null) { - throw new Exception("Can;t find sources.xml"); - } else { - HelperContext helperContext = HelperProvider.getDefaultContext(); - TypesFactory.INSTANCE.register(helperContext); - XMLDocument xmlDoc = helperContext.getXMLHelper().load(is); - alertSources = (ConfigType)xmlDoc.getRootObject(); - } - } catch (Exception ex) { - System.err.println("Exception " + ex.toString()); - } - } - - /** - * Return all of the configured alert sources. - * - * @return the list of alert sources - */ - public ConfigType getAlertSources (String id) - { - System.err.println("getAlertSources(" + id + ")"); - - // convert alert sources to POJOs so that - // the JSONRPC binding will work - ConfigTypeNonSDOImpl sources = new ConfigTypeNonSDOImpl(); - - for (Object source : alertSources.getSource()) { - SourceTypeNonSDOImpl newSource = new SourceTypeNonSDOImpl(); - newSource.setAddress(((SourceTypeImpl)source).getAddress()); - newSource.setFeedAddress(((SourceTypeImpl)source).getFeedAddress()); - newSource.setId(((SourceTypeImpl)source).getId()); - newSource.setLastChecked(((SourceTypeImpl)source).getLastChecked()); - newSource.setName(((SourceTypeImpl)source).getName()); - newSource.setFeedType(((SourceTypeImpl)source).getFeedType()); - sources.getSource().add(newSource); - } - - return sources; - } - - /** - * Return a single alert source. - * @param id the alert source id number - * @return the alert source - */ - public SourceType getAlertSource (String id) - { - System.err.println("getAlertSource(" + id + ")"); - SourceType alertSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(id)) { - alertSource = (SourceType)source; - } - } - return alertSource; - } - - /** - * Update an alert source. - * - * @param updatedSource the alert source to update - */ - public void updateAlertSource (SourceType updatedSource) - { - System.err.println("updateAlertSource()"); - - Object originalSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(updatedSource.getId())) { - originalSource = source; - break; - } - } - - if (originalSource != null){ - alertSources.getSource().add(updatedSource); - alertSources.getSource().remove(originalSource); - } - } - - /** - * Add an alert source. - * - * @param newSource the alert source to add - */ - public String addAlertSource (SourceType newSource) - { - System.err.println("addAlertSource()"); - // set the date to now less 2 hours so we - // get some alerts straight away - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - Date now = new Date(); - now.setHours(now.getHours()-2); - String nowString = dateFormatter.format(now); - newSource.setLastChecked(nowString); - alertSources.getSource().add(newSource); - return "Done"; - } - - /** - * Remove an alert source. - * - * @param oldSource the alert source to remove - */ - public void removeAlertSource (String id) - { - System.err.println("removeAlertSource()"); - - Object originalSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(id)) { - originalSource = source; - break; - } - } - - if (originalSource != null) { - alertSources.getSource().remove(originalSource); - } - - } - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java deleted file mode 100644 index 2962defb25..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java +++ /dev/null @@ -1,74 +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.demos.aggregator; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; - -/** - * - * An implementation of the model object 'Alerts Type'. - * - *

- * The following features are implemented: - *

- *

- * - * @generated - */ -public class AlertsTypeNonSDOImpl implements AlertsType -{ - private static final long serialVersionUID = -3784576466148158776L; - -/** - * The cached value of the '{@link #getAlert() Alert}' containment reference list. - * - * - * @see #getAlert() - * @generated - * @ordered - */ - - protected List alert = new ArrayList(); - - /** - * - * - * @generated - */ - public AlertsTypeNonSDOImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public List getAlert() - { - return alert; - } - -} //AlertsTypeImpl diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java deleted file mode 100644 index 75544294ce..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java +++ /dev/null @@ -1,55 +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.demos.aggregator; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; - - -public class ConfigTypeNonSDOImpl implements ConfigType -{ - private static final long serialVersionUID = 2522843951360675364L; - - protected List source = new ArrayList(); - - /** - * - * - * @generated - */ - public ConfigTypeNonSDOImpl() - { - super(); - } - - - /** - * - * - * @generated - */ - public List getSource() - { - return source; - } - - -} //ConfigTypeImpl diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java deleted file mode 100644 index 2a5775e9a9..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; - -/** - * The interface for the rss checker service - */ -public interface RSSCheckerService { - - public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp); - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java deleted file mode 100644 index 9b73a27625..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java +++ /dev/null @@ -1,85 +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.demos.aggregator; - -import java.net.URL; -import java.text.DateFormat; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.io.SyndFeedInput; -import com.sun.syndication.io.XmlReader; - -/** - * The interface for the rss checker service - */ -public class RSSCheckerServiceImpl implements RSSCheckerService { - - public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp){ - // Create the list of alerts to return - TypesFactory factory = TypesFactory.INSTANCE; - AlertsType returnAlerts = factory.createAlertsType(); - List returnAlertList = returnAlerts.getAlert(); - - try { - // Turn the date into something we can process. - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - Date timestamp = dateFormatter.parse(lastchecktimestamp); - - // get the feed data from the supplied address - SyndFeedInput input = new SyndFeedInput(); - SyndFeed feed = input.build(new XmlReader(new URL(rssaddress))); - //System.out.println(feed); - - // check all the items to see if we have seen them before - List entries = feed.getEntries(); - for(Object entry: entries){ - SyndEntry syndEntry = (SyndEntry)entry; - - if (syndEntry.getPublishedDate().after(timestamp)){ - AlertType newAlert = factory.createAlertType(); - - newAlert.setTitle(syndEntry.getTitle()); - // newAlert.setSummary(""); - newAlert.setSummary(""); - newAlert.setAddress(syndEntry.getLink()); - newAlert.setDate(dateFormatter.format(syndEntry.getPublishedDate())); - newAlert.setId(rssaddress); - newAlert.setUnread(true); - - returnAlertList.add(newAlert); - } - } - - } catch(Exception ex) { - System.err.println("Exception " + ex.toString()); - } - - return returnAlerts; - } - -} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java deleted file mode 100644 index 10575bf0dc..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java +++ /dev/null @@ -1,536 +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.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; - -import commonj.sdo.Sequence; - - -public class SourceTypeNonSDOImpl implements SourceType -{ - private static final long serialVersionUID = -4986294578888767793L; - - public final static int NAME = 0; - - public final static int ADDRESS = 1; - - public final static int LAST_CHECKED = 2; - - public final static int FEED_ADDRESS = 3; - - public final static int POP_SERVER = 4; - - public final static int POP_USERNAME = 5; - - public final static int POP_PASSWORD = 6; - - public final static int ANY = -1; - - public final static int ID = 7; - - public final static int TYPE = 8; - - public final static int SDO_PROPERTY_COUNT = 9; - - public final static int EXTENDED_PROPERTY_COUNT = -1; - - - /** - * The internal feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_NAME = 0; - - /** - * The internal feature id for the 'Address' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ADDRESS = 1; - - /** - * The internal feature id for the 'Last Checked' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_LAST_CHECKED = 2; - - /** - * The internal feature id for the 'Feed Address' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_FEED_ADDRESS = 3; - - /** - * The internal feature id for the 'Pop Server' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_SERVER = 4; - - /** - * The internal feature id for the 'Pop Username' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_USERNAME = 5; - - /** - * The internal feature id for the 'Pop Password' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_PASSWORD = 6; - - /** - * The internal feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 7; - - /** - * The internal feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ID = 8; - - /** - * The internal feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_TYPE = 9; - - /** - * The number of properties for this type. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 10; - - - - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_DEFAULT_; - - /** - * The default value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected static final String ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected String address = ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getLastChecked() Last Checked}' attribute. - * - * - * @see #getLastChecked() - * @generated - * @ordered - */ - protected static final String LAST_CHECKED_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getLastChecked() Last Checked}' attribute. - * - * - * @see #getLastChecked() - * @generated - * @ordered - */ - protected String lastChecked = LAST_CHECKED_DEFAULT_; - - /** - * The default value of the '{@link #getFeedAddress() Feed Address}' attribute. - * - * - * @see #getFeedAddress() - * @generated - * @ordered - */ - protected static final String FEED_ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getFeedAddress() Feed Address}' attribute. - * - * - * @see #getFeedAddress() - * @generated - * @ordered - */ - protected String feedAddress = FEED_ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getPopServer() Pop Server}' attribute. - * - * - * @see #getPopServer() - * @generated - * @ordered - */ - protected static final String POP_SERVER_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopServer() Pop Server}' attribute. - * - * - * @see #getPopServer() - * @generated - * @ordered - */ - protected String popServer = POP_SERVER_DEFAULT_; - - /** - * The default value of the '{@link #getPopUsername() Pop Username}' attribute. - * - * - * @see #getPopUsername() - * @generated - * @ordered - */ - protected static final String POP_USERNAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopUsername() Pop Username}' attribute. - * - * - * @see #getPopUsername() - * @generated - * @ordered - */ - protected String popUsername = POP_USERNAME_DEFAULT_; - - /** - * The default value of the '{@link #getPopPassword() Pop Password}' attribute. - * - * - * @see #getPopPassword() - * @generated - * @ordered - */ - protected static final String POP_PASSWORD_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopPassword() Pop Password}' attribute. - * - * - * @see #getPopPassword() - * @generated - * @ordered - */ - protected String popPassword = POP_PASSWORD_DEFAULT_; - - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_DEFAULT_; - - /** - * The default value of the '{@link #getFeedType() Feed Type}' attribute. - * - * - * @see #getFeedType() - * @generated - * @ordered - */ - protected static final String FEED_TYPE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getFeedType() Feed Type}' attribute. - * - * - * @see #getFeedType() - * @generated - * @ordered - */ - protected String feedType = FEED_TYPE_DEFAULT_; - - - /** - * - * - * @generated - */ - public SourceTypeNonSDOImpl() - { - super(); - } - - - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - /** - * - * - * @generated - */ - public void setName(String newName) - { - name = newName; - } - - /** - * - * - * @generated - */ - public String getAddress() - { - return address; - } - /** - * - * - * @generated - */ - public void setAddress(String newAddress) - { - address = newAddress; - } - - /** - * - * - * @generated - */ - public String getLastChecked() - { - return lastChecked; - } - /** - * - * - * @generated - */ - public void setLastChecked(String newLastChecked) - { - lastChecked = newLastChecked; - } - - /** - * - * - * @generated - */ - public String getFeedAddress() - { - return feedAddress; - } - /** - * - * - * @generated - */ - public void setFeedAddress(String newFeedAddress) - { - feedAddress = newFeedAddress; - } - - /** - * - * - * @generated - */ - public String getPopServer() - { - return popServer; - } - /** - * - * - * @generated - */ - public void setPopServer(String newPopServer) - { - popServer = newPopServer; - } - - /** - * - * - * @generated - */ - public String getPopUsername() - { - return popUsername; - } - /** - * - * - * @generated - */ - public void setPopUsername(String newPopUsername) - { - popUsername = newPopUsername; - } - - /** - * - * - * @generated - */ - public String getPopPassword() - { - return popPassword; - } - /** - * - * - * @generated - */ - public void setPopPassword(String newPopPassword) - { - popPassword = newPopPassword; - } - - /** - * - * - * @generated - */ - public String getId() - { - return id; - } - /** - * - * - * @generated - */ - public void setId(String newId) - { - id = newId; - } - - /** - * - * - * @generated - */ - public String getFeedType() - { - return feedType; - } - /** - * - * - * @generated - */ - public void setFeedType(String newType) - { - feedType = newType; - } - - public Sequence getAny(){ - return null; - } - -} //SourceTypeImpl diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl deleted file mode 100644 index 79b025bc73..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd deleted file mode 100644 index f0ec561ad8..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl deleted file mode 100644 index 987481bd14..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite deleted file mode 100644 index 49f44f9da8..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite deleted file mode 100644 index c359b275be..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/sources.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/sources.xml deleted file mode 100644 index 2168c10c9c..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/resources/sources.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - BBC News - http://news.bbc.co.uk/ - 10-Jun-2007 16:34:03 - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml - - - Engadget - http://www.engadget.com - 10-Jun-2007 16:34:03 - http://www.engadget.com/rss.xml - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html deleted file mode 100644 index 8b472fd0fa..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html +++ /dev/null @@ -1,330 +0,0 @@ - - - -Apache Tuscany Alert Aggregator Sample - - - - - - - - - - - - - - - -

Apache Tuscany Alert Aggregator Demo

-
-

Alert Sources:

- -
Refreshing...
-

-

-

Refreshing...
-

Back to top

-
-

-

- - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 0bc67c4c98..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 6408439bb7..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - org.apache.tuscany.sca - demo-alert-aggregator-webapp - 1.3.1-SNAPSHOT - war - - - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a81165e1b4..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Alert Aggregator Demo - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - AlertAggregator.html - - - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/pop.png b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/pop.png deleted file mode 100644 index 1cf1df24a7..0000000000 Binary files a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/pop.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/rss.png b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/rss.png deleted file mode 100644 index b3c949d224..0000000000 Binary files a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/rss.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/service.smd b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/service.smd deleted file mode 100644 index bc77e39bf9..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/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/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd deleted file mode 100644 index b5f1824363..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd +++ /dev/null @@ -1 +0,0 @@ -{"SMDVersion":".1","objectName":"AlertsSourcesService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8081/sample-feed-aggregator/services/AlertsSourcesServiceJSONRPC","methods":[{"name":"getAlertSources","parameters":[{"name":"param0","type":"STRING"}]},{"name":"getAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"updateAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"addAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"removeAlertSource","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/style.css b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/style.css deleted file mode 100644 index f5bbf23379..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - -.source_1 -{ -background-color: LightSkyBlue; -} - -.source_2 -{ -background-color: Khaki; -} - -.source_3 -{ -background-color: LightPink; -} - -.source_4 -{ -background-color: Orange; -} - -.source_5 -{ -background-color: LightCoral; -} - -.source_6 -{ -background-color: Orchid; -} - -.source_7 -{ -background-color: Peru; -} - -.source_8 -{ -background-color: SpringGreen; -} - -.source_9 -{ -background-color: LightGrey; -} - diff --git a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java b/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java deleted file mode 100644 index 6e75ea0bdf..0000000000 --- a/branches/sca-java-1.3.1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java +++ /dev/null @@ -1,99 +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.demos.aggregator; - -import java.io.ByteArrayInputStream; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.json.JSONObject; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.meterware.httpunit.PostMethodWebRequest; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebRequest; -import com.meterware.httpunit.WebResponse; - - -/** - */ -public class AlertsIntegrationTest { - //private static SCADomain scaDomain; - - @BeforeClass - public static void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("alerts.composite"); - } - - /** - * Runs after each test method - */ - @AfterClass - public static void tearDown() { - //scaDomain.close(); - } - -/* Use this if you want to test locally without deploying to a web container - public void testWait() throws Exception { - System.out.println("Feed aggregator server started (press enter to shutdown)"); - System.in.read(); - System.out.println("Feed aggregator server stopped"); - } -*/ - - @Test - public void testGetAllNewAlerts() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAllNewAlerts\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8080/demo-alert-aggregator-webapp/AlertsServiceJSONRPC", - jsonRequest); - Assert.assertNotNull(jsonResp); - } - - @Test - public void testAddAlertSources() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[{\"name\":\"news\",\"id\":\"2\",\"address\":\"www.news.com\",\"feedAddress\":\"http://news.com.com/2547-1_3-0-20.xml\",\"feedType\":\"rss\",\"lastChecked\":\"lastChecked\",\"javaClass\":\"org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl\"}],\"method\":\"addAlertSource\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8080/demo-alert-aggregator-webapp/AlertsSourcesServiceJSONRPC", - jsonRequest); - Assert.assertNotNull(jsonResp); - } - - @Test - public void testGetAlertSources() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAlertSources\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8080/demo-alert-aggregator-webapp/AlertsSourcesServiceJSONRPC", - jsonRequest); - Assert.assertEquals("BBC News", jsonResp.getJSONObject("result").getJSONObject("source").optJSONArray("list").getJSONObject(0).getString("name")); - } - - public JSONObject callService(String url, JSONObject jsonRequest) throws Exception { - System.out.println("Request = " + jsonRequest.toString()); - WebConversation wc = new WebConversation(); - WebRequest request = new PostMethodWebRequest( url, - new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")),"application/json"); - WebResponse response = wc.getResource(request); - System.out.println("Response= " + response.getText()); - Assert.assertEquals(200, response.getResponseCode()); - return new JSONObject(response.getText()); - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/LICENSE b/branches/sca-java-1.3.1/demos/bigbank-account/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/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/branches/sca-java-1.3.1/demos/bigbank-account/NOTICE b/branches/sca-java-1.3.1/demos/bigbank-account/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/README b/branches/sca-java-1.3.1/demos/bigbank-account/README deleted file mode 100644 index 5c0d850c5e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/README +++ /dev/null @@ -1,4 +0,0 @@ -bigbank-account is part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-account fits into the overall demo. - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.png b/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.png deleted file mode 100644 index 985cc6bd05..0000000000 Binary files a/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.svg b/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.svg deleted file mode 100644 index 0650075d48..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/bigbank.svg +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - CompositeBigBank WebApp - - Component AccountJava - - - - Component AccountDataJava - binding.jsonrpc - binding.ws - binding.rmi - - - - CompositeStockQuote - - CompositeCalculator - - Component CalculatorJava - - - - Component AddJavascript - binding.rmi - - - Component SubtractRuby - - Component MultiplyPython - - Component DivideGroovy - - - - Component StockQuoteJava - - binding.ws - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/build-dojo.xml b/branches/sca-java-1.3.1/demos/bigbank-account/build-dojo.xml deleted file mode 100644 index 0e029c6335..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/build.xml b/branches/sca-java-1.3.1/demos/bigbank-account/build.xml deleted file mode 100644 index 3c324030e5..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/build.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/pom.xml b/branches/sca-java-1.3.1/demos/bigbank-account/pom.xml deleted file mode 100644 index 158fa06170..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-bigbank-account - jar - Apache Tuscany SCA BigBank Account Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.3.1-SNAPSHOT - - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - - demo-bigbank-account - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java deleted file mode 100644 index 57c1adcba0..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class CheckingAccountDetails { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java deleted file mode 100644 index bf919525c4..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -/** - * @version $$Rev$$ $$Date$$ - */ -@Service -@Remotable -public interface CheckingAccountService { - - public CheckingAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java deleted file mode 100644 index 0ed4b1dd2e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java +++ /dev/null @@ -1,66 +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 bigbank.account.checking; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(CheckingAccountService.class) -public class CheckingAccountServiceImpl implements CheckingAccountService { - private Map custAcctMap = new HashMap(); - private Map checkingAccts = new HashMap(); - - public CheckingAccountServiceImpl() { - custAcctMap.put("Customer_01", "CHA_Customer_01"); - custAcctMap.put("Customer_02", "CHA_Customer_02"); - custAcctMap.put("Customer_03", "CHA_Customer_03"); - - checkingAccts.put("CHA_Customer_01", new Double(1000)); - checkingAccts.put("CHA_Customer_02", new Double(1500)); - checkingAccts.put("CHA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - checkingAccts.put(accountNo, new Double(checkingAccts.get(accountNo).doubleValue() + depositAmt)); - return checkingAccts.get(accountNo).doubleValue(); - } - - public CheckingAccountDetails getAccountDetails(String customerID) { - CheckingAccountDetails checkingAccount = new CheckingAccountDetails(); - checkingAccount.setAccountNumber(custAcctMap.get(customerID)); - checkingAccount.setBalance(checkingAccts.get(checkingAccount.getAccountNumber()).doubleValue()); - - return checkingAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = checkingAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - checkingAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java deleted file mode 100644 index cc9023da60..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import java.io.Serializable; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class SavingsAccountDetails implements Serializable { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java deleted file mode 100644 index 5bf6e6d26b..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.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 bigbank.account.savings; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $$Rev$$ $$Date$$ - */ -@Remotable -public interface SavingsAccountService { - - public SavingsAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java deleted file mode 100644 index 1f4f02ea6d..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java +++ /dev/null @@ -1,66 +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 bigbank.account.savings; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(SavingsAccountService.class) -public class SavingsAccountServiceImpl implements SavingsAccountService { - private Map custAcctMap = new HashMap(); - private Map savingsAccts = new HashMap(); - - public SavingsAccountServiceImpl() { - custAcctMap.put("Customer_01", "SVA_Customer_01"); - custAcctMap.put("Customer_02", "SVA_Customer_02"); - custAcctMap.put("Customer_03", "SVA_Customer_03"); - - savingsAccts.put("SVA_Customer_01", new Double(1000)); - savingsAccts.put("SVA_Customer_02", new Double(1500)); - savingsAccts.put("SVA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - savingsAccts.put(accountNo, new Double(savingsAccts.get(accountNo).doubleValue() + depositAmt)); - return savingsAccts.get(accountNo).doubleValue(); - } - - public SavingsAccountDetails getAccountDetails(String customerID) { - SavingsAccountDetails savingsAccount = new SavingsAccountDetails(); - savingsAccount.setAccountNumber(custAcctMap.get(customerID)); - savingsAccount.setBalance(savingsAccts.get(savingsAccount.getAccountNumber()).doubleValue()); - - return savingsAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = savingsAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - savingsAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java deleted file mode 100644 index 579b4ee64b..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java +++ /dev/null @@ -1,54 +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 bigbank.account.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class AccountsDataPasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println(" Usage is SIGNATURE ... "); - pwcb.setPassword("bbservice"); - } else if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN ) { - System.out.println("*** Calling ACCOUNTS-DATA Passwd Handler for AUTHENTICATING userID = " - + pwcb.getIdentifer() + " and password = " + pwcb.getPassword() ); - if ( pwcb.getIdentifer().equals("bbaservice") && pwcb.getPassword().equals("bbaservice")) { - System.out.println("AUTHENTICATION SUCCESSFUL!"); - } else { - System.out.println("AUTHENTICATION FAILED!"); - throw new UnsupportedCallbackException(pwcb, "UserId - Password Authentication Failed!"); - } - } - } - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java deleted file mode 100644 index 5c64e11d10..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; -import java.util.Hashtable; -import java.util.Map; - -/** - * @version $Rev$ $Date$ - */ -public class BigbankCheckingsAcl { - private static MapcheckingsAcl = new Hashtable(); - - static { - checkingsAcl.put("bbaservice", "Customer_01"); - checkingsAcl.put("bbUser01", "Customer_01"); - } - - - public static void authorize(Principal principal, String resource) { - if ( checkingsAcl.get(principal.getName()) == null || - !checkingsAcl.get(principal.getName()).equals(resource) ) { - throw new RuntimeException("User - " + principal.getName() + " not authorized to access account " + - resource); - } else { - System.out.println("Successfully Authorized '" + principal.getName() + " to access accounts of " + resource); - } - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java deleted file mode 100644 index c98dcacbf3..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java +++ /dev/null @@ -1,90 +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 bigbank.account.security; - -import org.apache.tuscany.sca.assembly.ConfiguredOperation; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.OperationsConfigurator; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Phase; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthImplementationPolicyProvider implements PolicyProvider { - private RuntimeComponent component; - private Implementation implementation; - - public CheckingsDeptAuthImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - super(); - this.component = component; - this.implementation = implementation; - } - - private String getContext() { - return "component.implementation: " + component.getURI() + "(" + implementation.getClass().getName() + ")"; - } - - private PolicySet findPolicySet(Operation operation) { - for (PolicySet ps : component.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - - if ( component instanceof OperationsConfigurator ) { - for ( ConfiguredOperation confOp : ((OperationsConfigurator)component).getConfiguredOperations() ) { - if ( confOp.getName().equals(operation.getName())) { - for (PolicySet ps : confOp.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - } - } - } - - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation) - */ - public Interceptor createInterceptor(Operation operation) { - PolicySet ps = findPolicySet(operation); - return ps == null ? null : new CheckingsDeptAuthPolicyInterceptor(getContext(), operation, ps); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase() - */ - public String getPhase() { - return Phase.IMPLEMENTATION_POLICY; - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java deleted file mode 100644 index 121ee9a3f8..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.policy.Policy; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthPolicy implements Policy { - - public QName getSchemaName() { - // TODO Auto-generated method stub - return null; - } - - public boolean isUnresolved() { - // TODO Auto-generated method stub - return false; - } - - public void setUnresolved(boolean unresolved) { - // TODO Auto-generated method stub - - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java deleted file mode 100644 index c8b73d4ed4..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java +++ /dev/null @@ -1,77 +0,0 @@ -package bigbank.account.security; - -import java.security.Principal; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -/* - * 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. - */ - -/** - * Policy handler to handle PolicySet related to Logging with the QName - * {http://tuscany.apache.org/xmlns/sca/1.0/impl/java}LoggingPolicy - */ -public class CheckingsDeptAuthPolicyInterceptor implements Interceptor { - private Invoker next; - - public CheckingsDeptAuthPolicyInterceptor(String context, Operation operation, PolicySet policySet) { - super(); - init(); - } - - private final void init() { - } - - public Message invoke(Message msg) { - Object msgBody = msg.getBody(); - if (msgBody instanceof Object[]) { - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - - Message responseMsg = null; - try { - responseMsg = getNext().invoke(msg); - return responseMsg; - } catch (RuntimeException e) { - throw e; - } - } - - public Invoker getNext() { - return next; - } - - public void setNext(Invoker next) { - this.next = next; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java deleted file mode 100644 index 5fecef691e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java +++ /dev/null @@ -1,75 +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 bigbank.account.security; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.provider.PolicyProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthPolicyProviderFactory implements PolicyProviderFactory { - private ExtensionPointRegistry registry; - - public CheckingsDeptAuthPolicyProviderFactory(ExtensionPointRegistry registry) { - super(); - this.registry = registry; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation) - */ - public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - return new CheckingsDeptAuthImplementationPolicyProvider(component, implementation); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createServicePolicyProvider(RuntimeComponent component, - RuntimeComponentService service, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType() - */ - public Class getModelType() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java deleted file mode 100644 index 419b5def58..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; - -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.util.PolicyHandler; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthorizationPolicyHandler implements PolicyHandler { - private PolicySet applicablePolicySet = null; - - public void afterInvoke(Object... context) { - } - - public void beforeInvoke(Object... context) { - for ( int count = 0 ; count < context.length ; ++count ) { - if ( context[count] instanceof Message ) { - Message msg = (Message)context[count]; - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - } - } - - public void cleanUp(Object... arg0) { - } - - public PolicySet getApplicablePolicySet() { - return this.applicablePolicySet; - } - - public void setApplicablePolicySet(PolicySet policySet) { - this.applicablePolicySet = policySet; - } - - public void setUp(Object... arg0) { - - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java deleted file mode 100644 index da1b6e1d06..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java +++ /dev/null @@ -1,72 +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 bigbank.account.security; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; - -/** - * Implementation of a Policy Processor - * - */ -public class CheckingsDeptAuthorizationPolicyProcessor implements StAXArtifactProcessor { - private static final QName CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME = new QName("http://bigbank/checkings", "AuthPolicy"); - public QName getArtifactType() { - return CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME; - } - - public CheckingsDeptAuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories) { - } - - - public CheckingsDeptAuthPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - CheckingsDeptAuthPolicy policy = new CheckingsDeptAuthPolicy(); - return policy; - } - - public void write(CheckingsDeptAuthPolicy policy, XMLStreamWriter writer) throws ContributionWriteException, - XMLStreamException { - String prefix = "tuscany"; - writer.writeStartElement(prefix, - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getLocalPart(), - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getNamespaceURI()); - writer.writeNamespace("chk", "http://bigbank/checkings"); - - - writer.writeEndElement(); - } - - public Class getModelType() { - return CheckingsDeptAuthPolicy.class; - } - - public void resolve(CheckingsDeptAuthPolicy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java deleted file mode 100644 index 1473436000..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class StockAccountDetails { - private String accountNumber; - private String symbol; - private int quantity; - - public StockAccountDetails() { - } - - public StockAccountDetails(String acNo, String symbol, int qty) { - this.accountNumber = acNo; - this.symbol = symbol; - this.quantity = qty; - } - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public int getQuantity() { - return quantity; - } - - public void setQuantity(int a) { - this.quantity = a; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String s) { - this.symbol = s; - } - - @Override - public String toString() { - return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java deleted file mode 100644 index fcbf8a4831..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java +++ /dev/null @@ -1,36 +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 bigbank.account.stock; - -import org.osoa.sca.annotations.Remotable; - -/** - * - */ -@Remotable -public interface StockAccountService { - - public StockAccountDetails getAccountDetails(String customerID); - - public StockAccountDetails buy(String accountNo, String symbol, int quantity); - - public StockAccountDetails sell(String accountNo, String symbol, int quantity); - - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java deleted file mode 100644 index 28101a1986..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(StockAccountService.class) -public class StockAccountServiceImpl implements StockAccountService { - private Map custAcctMap = new HashMap(); - private Map stockAccts = new HashMap(); - - public StockAccountServiceImpl() { - custAcctMap.put("Customer_01", "STA_Customer_01"); - custAcctMap.put("Customer_02", "STA_Customer_02"); - custAcctMap.put("Customer_03", "STA_Customer_03"); - - stockAccts.put("STA_Customer_01", new StockAccountDetails("STA_Customer_01", "IBM", 100)); - stockAccts.put("STA_Customer_02", new StockAccountDetails("STA_Customer_02", "IBM", 200)); - stockAccts.put("STA_Customer_03", new StockAccountDetails("STA_Customer_03", "SYM_3", 125)); - } - - - public StockAccountDetails buy(String accountNo, String symbol, int quantity) { - return null; - } - - public StockAccountDetails getAccountDetails(String customerID) { - return stockAccts.get(custAcctMap.get(customerID)); - } - - public StockAccountDetails sell(String accountNo, String symbol, int quantity) { - return null; - } - - - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/CheckingsAccount.composite b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/CheckingsAccount.composite deleted file mode 100644 index cc76e30a75..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/CheckingsAccount.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c5532b879d..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 6491a0d326..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -bigbank.account.security.CheckingsDeptAuthorizationPolicyProcessor;qname=http://bigbank/checkings#AuthPolicy,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index b1bce4339d..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,20 +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. -# -# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures -# handler classname;qname=;model= -bigbank.account.security.CheckingsDeptAuthorizationPolicyHandler;intent=http://bigbankAccount#authorization,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory deleted file mode 100644 index d6bfe2167e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the policy extension -bigbank.account.security.CheckingsDeptAuthPolicyProviderFactory;model=bigbank.account.security.CheckingsDeptAuthPolicy \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/SavingsAccount.composite b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/SavingsAccount.composite deleted file mode 100644 index 696b96d6e6..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/SavingsAccount.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/StockAccount.composite b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/StockAccount.composite deleted file mode 100644 index 62c0b63003..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/StockAccount.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/definitions.xml b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/definitions.xml deleted file mode 100644 index 31a8798f8b..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/definitions.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - Authorization Intent - - - - - - - - - UsernameToken - bigbank.account.security.AccountsDataPasswordCallbackHandler - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/AccountJSON.html b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/AccountJSON.html deleted file mode 100644 index 1609bf4b43..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/AccountJSON.html +++ /dev/null @@ -1,92 +0,0 @@ - - - -Tuscany JSON-RPC BigBank Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tuscany JSON-RPC BigBank Client
-

This example uses the Dojo - Toolkit to create a JavaScript object accountService for - the service at http://localhost:8080/AccountJSONService using Dojo's - RPC classes and providing them with http://localhost:8080/AccountJSONService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getAccountReport - method of the accountService object.

-
RequestResponse

- -
-
-
None Yet.
-
-
Dojo Debug:
-
- - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/style.css b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/web/style.css +++ /dev/null @@ -1,22 +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. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl b/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl deleted file mode 100644 index ac4d987a57..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/LICENSE b/branches/sca-java-1.3.1/demos/bigbank-calculator/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/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/branches/sca-java-1.3.1/demos/bigbank-calculator/NOTICE b/branches/sca-java-1.3.1/demos/bigbank-calculator/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/README b/branches/sca-java-1.3.1/demos/bigbank-calculator/README deleted file mode 100644 index e8ff28fc0f..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/README +++ /dev/null @@ -1,2 +0,0 @@ -bigbank-calculator is part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-calculator fits into the overall demo. diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/build.xml b/branches/sca-java-1.3.1/demos/bigbank-calculator/build.xml deleted file mode 100644 index 0e8ebbce66..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/build.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/pom.xml b/branches/sca-java-1.3.1/demos/bigbank-calculator/pom.xml deleted file mode 100644 index 56cdd0a766..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-bigbank-calculator - Apache Tuscany SCA BigBank Calculator Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.3.1-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index 4eeb30a9c2..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,25 +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 calculator; - -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ed7bee0f4e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,72 +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 calculator; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Calculator service. - */ -@Service(CalculatorService.class) -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - System.err.println("Multiply"); - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 131c5a8014..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,25 +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 calculator; - -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index a917896aeb..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,25 +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 calculator; - -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index e328f024ea..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,25 +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 calculator; - -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java deleted file mode 100644 index b1861daafc..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java +++ /dev/null @@ -1,44 +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 calculator.demo; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class CalculatorServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA Calculator..."); - - SCADomain domain = SCADomain.newInstance("Calculator.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - - System.out.println("Bye"); - System.exit(0); - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/Calculator.composite b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 851813d31f..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js deleted file mode 100644 index 1d4d221364..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -function add(n1, n2) { - return n1 + n2; -} \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy deleted file mode 100644 index c31c1e8fd6..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy +++ /dev/null @@ -1,22 +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. - */ - -def divide(n1, n2) { - return n1 / n2 -} \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py deleted file mode 100644 index dd56af0ad8..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py +++ /dev/null @@ -1,21 +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. -# - -def multiply(n1, n2): - print "Python Calculator component: multiply(", n1, ",", n2, ")" - return n1 * n2 \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb b/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb deleted file mode 100644 index 08fa310f46..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb +++ /dev/null @@ -1,22 +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. -# - -def subtract(n1, n2) - print "Ruby Calculator subtract(", n1, ",", n2, ")\n" - return n1 - n2 -end \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/LICENSE b/branches/sca-java-1.3.1/demos/bigbank-stockquote/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/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/branches/sca-java-1.3.1/demos/bigbank-stockquote/NOTICE b/branches/sca-java-1.3.1/demos/bigbank-stockquote/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/README b/branches/sca-java-1.3.1/demos/bigbank-stockquote/README deleted file mode 100644 index 2ea98d020c..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/README +++ /dev/null @@ -1,4 +0,0 @@ -bigbank-stockquote is a part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-stockquote fits into the overall demo. - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/build.xml b/branches/sca-java-1.3.1/demos/bigbank-stockquote/build.xml deleted file mode 100644 index 145c158ac2..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/pom.xml b/branches/sca-java-1.3.1/demos/bigbank-stockquote/pom.xml deleted file mode 100644 index ca0a7420cb..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-bigbank-stockquote - Apache Tuscany SCA BigBank StockQuote Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.1-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java deleted file mode 100644 index 2d7821171d..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class PasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Server User/Passwd Handler...." ); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("*** Getting password for user ...." + pwcb.getIdentifer() + " & " + pwcb.getKey()); - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println(" Usage is SIGNATURE ... "); - pwcb.setPassword("sqservice"); - } - } - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java deleted file mode 100644 index 2a0801f9b8..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the StockQuote service. - */ -@Service(StockQuoteService.class) -public class StockQuoteImpl implements StockQuoteService { - - public double getQuote(String symbol) { - double price = 104.0 + Math.random(); - price = ((int)(price * 100)) / 100.0; - - System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); - - return price; - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java deleted file mode 100644 index 9d128657eb..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java deleted file mode 100644 index 04ed762602..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.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 stockquote.demo; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA StockQuote Service..."); - - SCADomain domain = SCADomain.newInstance("StockQuote.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite deleted file mode 100644 index aaad92c861..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/definitions.xml b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/definitions.xml deleted file mode 100644 index 7e1f51304e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/definitions.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - Timestamp Signature - security.properties - - - - - Timestamp Signature - sqservice - security.properties - stockquote.PasswordCallbackHandler - DirectReference - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/security.properties b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/security.properties deleted file mode 100644 index 0063207e06..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/security.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=sqkeystore -org.apache.ws.security.crypto.merlin.file=stockQuote.jks \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/stockQuote.jks b/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/stockQuote.jks deleted file mode 100644 index d53d32c4ef..0000000000 Binary files a/branches/sca-java-1.3.1/demos/bigbank-stockquote/src/main/resources/stockQuote.jks and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/bigbank/LICENSE b/branches/sca-java-1.3.1/demos/bigbank/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/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/branches/sca-java-1.3.1/demos/bigbank/NOTICE b/branches/sca-java-1.3.1/demos/bigbank/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/bigbank/README b/branches/sca-java-1.3.1/demos/bigbank/README deleted file mode 100644 index 5ec796db60..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/README +++ /dev/null @@ -1,127 +0,0 @@ -BigBank Demo -============ - -This application is made of 3 modules that represent the different aspects -of a fictitious banking application. Please see bigbank.png in the bigbank-account directory for a diagram of this demo. - -To run the bigbank-account demo you need to first run bigbank-calculator and bigbank-stockquote composites. This will bring up Tuscany runtime and load the two applications and make them available as services. Bigbank-account is dependent on these services. - -This demo uses ant. This is just one way of running this demo. - -Start Bigbank-calculator composite ----------------------------------- - -Bigbank-calculator is a calculator application which handles add, subtract, multiply and divide operations. Each of these operations is implemented in a different language, including JavaScript, groovy, Ruby and Python. - -To run the bigbank-calculator composite and make it available as a service for this demo do the following: - -cd bigbank-calculator -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Bigbank-stockquote ------------------------- - -A very simple web services based stock quote application which returns random -stock quotes on request. Please note that the stockquote service is not live and is implemented instead to allow for this application to always run without dependency on the availability of a webservice. - -cd bigbank-stockquote -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Bigbank -------------- -The BigBank comprises of two subsystems that are built from two distinct contributions coming from ... -1) bigbank - This contains all artifacts that make up the bigbank application. This is the application that the - end user interacts with - -2) bigbank-account - This contains all artifacts that deal with the account management within the bigbank. The services - offered by the bigbank-account module are used by the bigbank. The end user never gets to directly - interact with bigbank account - -Besides the bigbank-account the bigbank composite application calls into bigbank-stockquote and -bigbank-calculator services. - -Start bigbank-account in the following way: - -i ) Compile the bigbank-account as follows : - - cd bigbank-account - ant compile - -ii) Now start the bigbank service as follows : - - cd bigbank - ant compile - ant run - - .. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out ofthe binary distribution. -No need to do 'ant compile' from there on. - -Bigbank and the SCA Policies ----------------------------- -The Bigbank demo uses the Tuscany PolicyFramework to enforce security in the following ways: - -Authentication --------------- - The bigbank-account subsystem enforces authentication as a required security characteristic for - all interactions with its CheckingAccountService. Hence the 'bigbank' application which is a client - to this service authenticates itself for every interaction with the CheckingAccountService. The interaction - between the bigbank and the CheckingAccountService is over the ws binding. - -Integrity ---------- - All interactions of the bigbank application with the StockQuoteService are guarded with message integrity. - These interactions use the ws binding. - -Authorization -------------- - Within the bigbank-account subsystem the CheckingAccountService implementation enforces authorization on - its operations. This is an instance of a custom policy enforcement i.e. the CheckingAccountService - component's implementation has defined its own customized way of authorizing access to its services. - -Demonstrated features ---------------------- -This demo is to illustrate the following : - -- composition of an application using artifacts belonging to multiple contributions (here two) -- usage of sca policies in composite definitions with specific emphasis on enabling security - - -Run the demo -------------- -The front end of this demo application is a web app which users Json/RPC to communicate with the backend for retrieving account information. - -To try the app out point you browser at: - -http://localhost:8080/AccountJSON.html - -This should display an interface with a single button that goes and retrieves -a single set of account details exercising services across the three running -SCA applications. - -If you press on getAccountReport, you'll see a response posted, -but the detail of the data will be displayed in the console where you started bigbank. Among other -things you will note messages that confirm the enforecement of AUTHENTICATION, AUTHORIZATION and -SIGNING of messages exchaged. - -On the console where you have started the StockQuote Service you should again be able to see messages -that confirm the signing of messages exchanged. - -Stop the demo -------------- -Go to each of the corresponding command line screens and hit 'enter'. -This will stop each of the applications. - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/bigbank.png b/branches/sca-java-1.3.1/demos/bigbank/bigbank.png deleted file mode 100644 index 985cc6bd05..0000000000 Binary files a/branches/sca-java-1.3.1/demos/bigbank/bigbank.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/bigbank/bigbank.svg b/branches/sca-java-1.3.1/demos/bigbank/bigbank.svg deleted file mode 100644 index 30aa0eab6d..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/bigbank.svg +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - CompositeBigBank WebApp - - Component AccountJava - - - - Component AccountDataJava - binding.jsonrpc - binding.ws - binding.rmi - - - - CompositeStockQuote - - CompositeCalculator - - Component CalculatorJava - - - - Component AddJavascript - binding.rmi - - - Component SubtractRuby - - Component MultiplyPython - - Component DivideGroovy - - - - Component StockQuoteJava - - binding.ws - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/build-dojo.xml b/branches/sca-java-1.3.1/demos/bigbank/build-dojo.xml deleted file mode 100644 index 9d282c2dd2..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/build.xml b/branches/sca-java-1.3.1/demos/bigbank/build.xml deleted file mode 100644 index 046aadd228..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/build.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/pom.xml b/branches/sca-java-1.3.1/demos/bigbank/pom.xml deleted file mode 100644 index 988428f1bd..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/pom.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-bigbank - jar - Apache Tuscany SCA BigBank Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.3.1-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - demo-bigbank-account - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.1-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - demo-bigbank - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountService.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountService.java deleted file mode 100644 index 2cb8027874..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountService.java +++ /dev/null @@ -1,32 +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 bigbank.account; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Remotable -public interface AccountService { - - public double getAccountReport(String customerID); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java deleted file mode 100644 index 4f0e3879dc..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java +++ /dev/null @@ -1,99 +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 bigbank.account; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import stockquote.StockQuoteService; -import bigbank.account.checking.CheckingAccountDetails; -import bigbank.account.checking.CheckingAccountService; -import bigbank.account.savings.SavingsAccountDetails; -import bigbank.account.savings.SavingsAccountService; -import bigbank.account.stock.StockAccountDetails; -import bigbank.account.stock.StockAccountService; -import calculator.CalculatorService; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Service(AccountService.class) -public class AccountServiceImpl implements AccountService { - - @Reference - protected SavingsAccountService savingsAcService; - - @Reference - protected CheckingAccountService checkingAcService; - - @Reference - protected StockAccountService stockAcService; - - @Reference - protected StockQuoteService stockQuoteService; - - @Reference - protected CalculatorService calculatorService; - - @Property - protected String currency; - - public double getAccountReport(String customerID) { - - // Get the checking, savings and stock accounts from the AccountData - // service component - CheckingAccountDetails checking = null; - try { - checking = checkingAcService.getAccountDetails(customerID); - System.out.println("Checking account: " + checking); - - SavingsAccountDetails savings = savingsAcService.getAccountDetails(customerID); - System.out.println("Savings account: " + savings); - - StockAccountDetails stock = stockAcService.getAccountDetails(customerID); - System.out.println("Stock account: " + stock); - - // Get the stock price in USD - double price = stockQuoteService.getQuote(stock.getSymbol()); - System.out.println("Stock price for " + stock.getSymbol() + ": " + price); - - // Convert to the configured currency - if (currency.equals("EURO")) { - - // Use our fancy calculator service to convert to the target currency - price = calculatorService.multiply(price, 0.70); - - System.out.println("Converted to " + currency + ": " + price); - } - - // Calculate the value of the stock account - double stockValue = price * stock.getQuantity(); - - // Calculate the total balance of all accounts and return it - double balance = checking.getBalance() + savings.getBalance() + stockValue; - - return balance; - } catch ( Throwable e ) { - e.printStackTrace(); - return 0; - } - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java deleted file mode 100644 index 13d79a9c33..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java +++ /dev/null @@ -1,70 +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 bigbank.account.feed; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import bigbank.account.AccountService; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Service(Collection.class) -public class AccountFeedImpl implements Collection { - - @Reference - protected AccountService accountService; - - public Entry[] getAll() { - - // Add the Account report entry - String report = get("1234"); - Entry entry = new Entry("1234", report); - - return new Entry[] { entry } ; - } - - public String get(String id) { - - // Get the account report for the specified customer ID - double balance = accountService.getAccountReport(id); - String report = Double.toString(balance); - - return report; - } - - public void delete(String key) throws NotFoundException { - } - - public String post(String key, String item) { - return null; - } - - public void put(String key, String item) throws NotFoundException { - } - - public Entry[] query(String queryString) { - return null; - } -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java deleted file mode 100644 index a7fa5ecc22..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.client; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import bigbank.account.AccountService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("BigBank.composite"); - - AccountService accountService = domain.getService(AccountService.class, "AccountServiceComponent"); - - String customerID = "1234"; - - System.out.println("Calling account service for customer: " + customerID); - System.out.println(); - double balance = accountService.getAccountReport(customerID); - - System.out.println(); - System.out.println("Balance: " + balance); - - domain.close(); - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java deleted file mode 100644 index 05360e07a5..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java +++ /dev/null @@ -1,130 +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 bigbank.demo; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import bigbank.account.savings.SavingsAccountService; - - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankServer { - - public static void main(String[] args) throws Exception { - long timeout = -1L; - if (args.length > 0) { - timeout = Long.parseLong(args[0]); - } - - System.out.println("Starting the Sample SCA BigBank server..."); - ClassLoader cl = BigBankServer.class.getClassLoader(); - EmbeddedSCADomain domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL javaContribURL = getContributionURL(SavingsAccountService.class); - Contribution bigbankAcContribution = contributionService.contribute("http://bigbank-account", javaContribURL, false); - for (Composite deployable : bigbankAcContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - URL bigbankContribUrl = getContributionURL(BigBankServer.class); - Contribution bigbankContribution = contributionService.contribute("http://bigbank", bigbankContribUrl, false); - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - - //Start Components from composite - for (Composite deployable : bigbankAcContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - if (timeout < 0) { - System.out.println("Press Enter to Exit..."); - System.in.read(); - } else { - Thread.sleep(timeout); - } - - contributionService.remove("http://bigbank-account"); - contributionService.remove("http://bigbank"); - - // Stop Components from composite - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - - - /*SCADomain domain = SCADomain.newInstance("BigBank.composite"); - - if (timeout < 0) { - System.out.println("Press Enter to Exit..."); - System.in.read(); - } else { - Thread.sleep(timeout); - } - - domain.close();*/ - - System.out.println("Bye"); - } - - private static URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java deleted file mode 100644 index 6d3b547939..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class BigbankPasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - //System.out.println("*** Getting password for user ...." + pwcb.getIdentifer() + " & " + pwcb.getKey()); - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println("*** Calling BIG-BANK Passwd Handler for SIGNING...." ); - pwcb.setPassword("bbservice"); - } else if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) { - if ( pwcb.getIdentifer().equals("bbaservice")) { - System.out.println("*** Calling BIG-BANK Passwd Handler for setting AUTHENTICATION password...." ); - pwcb.setPassword("bbaservice"); - } - } - } - } - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/stockquote/StockQuoteService.java b/branches/sca-java-1.3.1/demos/bigbank/src/main/java/stockquote/StockQuoteService.java deleted file mode 100644 index 749b8ee2f4..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/java/stockquote/StockQuoteService.java +++ /dev/null @@ -1,29 +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 stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - public double getQuote(String symbol); -} diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/BigBank.composite b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/BigBank.composite deleted file mode 100644 index e57541b423..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/BigBank.composite +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - EURO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 154992c843..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/bigbank.jks b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/bigbank.jks deleted file mode 100644 index e6294d85f7..0000000000 Binary files a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/bigbank.jks and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/definitions.xml b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/definitions.xml deleted file mode 100644 index 8654151d82..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/definitions.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - Timestamp Signature - security.properties - - - - - Timestamp Signature - bbservice - security.properties - bigbank.security.BigbankPasswordCallbackHandler - DirectReference - - - - - - - - - - UsernameToken - bbaservice - bigbank.security.BigbankPasswordCallbackHandler - PasswordText - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/security.properties b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/security.properties deleted file mode 100644 index 762d0523d9..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/security.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=bbakeystore -org.apache.ws.security.crypto.merlin.file=bigbank.jks \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/AccountJSON.html b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/AccountJSON.html deleted file mode 100644 index 9f4368443f..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/AccountJSON.html +++ /dev/null @@ -1,92 +0,0 @@ - - - -Tuscany JSON-RPC BigBank Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tuscany JSON-RPC BigBank Client
-

This example uses the Dojo - Toolkit to create a JavaScript object accountService for - the service at http://localhost:8080/AccountJSONService using Dojo's - RPC classes and providing them with http://localhost:8080/AccountJSONService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getAccountReport - method of the accountService object.

-
RequestResponse

- -
-
-
None Yet.
-
-
Dojo Debug:
-
- - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/style.css b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/web/style.css +++ /dev/null @@ -1,22 +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. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl b/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl deleted file mode 100644 index ac4d987a57..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/bigbank/src/test/java/test/BigBankTestCase.java b/branches/sca-java-1.3.1/demos/bigbank/src/test/java/test/BigBankTestCase.java deleted file mode 100644 index 3b7c5ef2ad..0000000000 --- a/branches/sca-java-1.3.1/demos/bigbank/src/test/java/test/BigBankTestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test; - -import junit.framework.TestCase; - -import bigbank.demo.BigBankServer; - -/** - * @version $Rev$ $Date$ - */ -public class BigBankTestCase extends TestCase { - - public void testServer() throws Exception { - BigBankServer.main(new String[] {"1000"}); - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/LICENSE b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/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/branches/sca-java-1.3.1/demos/mortgage-creditcheck/NOTICE b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/README b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/README deleted file mode 100644 index b785802920..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/README +++ /dev/null @@ -1,6 +0,0 @@ -Mortgage Loan Approval Demo -=========================== -Please refer to the README under mortgage-loanapproval for information on how to run this demo. - -Mortgage-creditcheck is part of a larger demo that is explained there. - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/build.xml b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/build.xml deleted file mode 100644 index 59f1342276..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/pom.xml b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/pom.xml deleted file mode 100644 index 244aadfaa4..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-mortgage-creditcheck - jar - Apache Tuscany SCA Mortgage Credit Check Demo - A sample Mortgage application made of several SCA components wired together. - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.1-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java deleted file mode 100644 index ec95a60227..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.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 credit; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CreditCheck { - int getCreditScore(String ssn); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java deleted file mode 100644 index f19e8a1250..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package credit; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the CreditReportService service - */ -@Service(CreditCheck.class) -public class CreditCheckImpl implements CreditCheck { - - public int getCreditScore(String ssn) { - int score = (int)(700 + (Math.random() - 0.5) * 100); - System.out.println("Credit score for " + ssn + ": " + score); - return score; - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java deleted file mode 100644 index 870ea1941d..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.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 credit; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class CreditCheckServer { - public static void main(String[] args) throws Exception { - - System.out.println("Starting the CreditCheck Service..."); - - SCADomain domain = SCADomain.newInstance("http://localhost", "/", "CreditCheck.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite deleted file mode 100644 index 5c828f5a39..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl deleted file mode 100644 index 9c2acc96d3..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index aea009292a..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d7b2e32dd1..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - Apache Tuscany Credit Check Demo - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/LICENSE b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/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/branches/sca-java-1.3.1/demos/mortgage-loanapproval/NOTICE b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/README b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/README deleted file mode 100644 index dbf3829a20..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/README +++ /dev/null @@ -1,60 +0,0 @@ -Mortgage Loan Approval Demo -=========================== - -This demo was used as an example in the java developer journal article: http://jdj.sys-con.com/read/325183.htm. - -The demo consists of two modules: - -mortgage-loanapproval: provides the business logic for loan approval. -mortgage-creditcheck: handles credit check requests. This is a java component exposed as a webservice running on the embedded Tomcat. - -Please check mortgage_assembly.png file that is located in this directory for a high level view of the demo. - -Here is what happens when you run the demo. A loan approval request for customer with id 111-222-3333 -gets initiated when mortgage-loanapproval application is run. Depending on what the 'imaginary' credit - status of this person is, the loan gets approved or diapproved. - -You would need two command windows to run mortgage loan approval composite. The order in which the -applications are run is important. Run mortgage-creditcheck first since mortgage-loanapproval is dependent on -it's service. - -In the first command window ---------------------------- -1) go to mortgage-creditcheck directory -2) ant compile -3) ant run -You should see the following displayed: -Buildfile: build.xml - -run: - [java] Starting the CreditCheck Service... - [java] 14-Jan-2008 14:14:20 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/CreditCheckServiceC -omponent - [java] Press Enter to Exit... - -In the second command window ----------------------------- -1) go to mortgage-loanapproval directory -2) ant compile -3) ant run - -If the loan is approved, you will see the following displayed in the command screen where -mortgage-loanapproval is run: - -Buildfile: build.xml -run: - [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% - [java] Approved: John Smith[111-22-3333] - -If the loan is disapproved, you will see the following displayed in the command screen where -mortgage-loanapproval is run: - -Buildfile: build.xml -run: - [java] Credit score for 111-22-3333: 708 - [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% - [java] Debt/Income ratio 0.2528272093971861 is too high. - [java] Rejected: John Smith[111-22-3333] - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/build.xml b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/build.xml deleted file mode 100644 index 9a0a83bf1d..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.jpg deleted file mode 100644 index e28ed63cfb..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.png deleted file mode 100644 index 0bfce0078d..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/credit_composite.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.jpg deleted file mode 100644 index 3f00557c7f..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.png deleted file mode 100644 index 9d5f829fe5..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/loan_approval.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg deleted file mode 100644 index 515b6ecde7..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png deleted file mode 100644 index 4b815a4b82..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg deleted file mode 100644 index 01a7c55a14..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png deleted file mode 100644 index 07422c4f45..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg deleted file mode 100644 index 992c048684..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png deleted file mode 100644 index 4667956ed0..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg deleted file mode 100644 index 5021f6a317..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.png deleted file mode 100644 index 1398c50ded..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_composite.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc deleted file mode 100644 index 00d45e1084..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg deleted file mode 100644 index e91c5f1bbd..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.png deleted file mode 100644 index db304a4c28..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package1.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg deleted file mode 100644 index e8c2865e4a..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.png deleted file mode 100644 index 502e538e94..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_package2.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg deleted file mode 100644 index fccf2e35c3..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.png deleted file mode 100644 index b8f42ad318..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/doc/mortgage_scenario.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/mortgage_assembly.png b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/mortgage_assembly.png deleted file mode 100644 index 4667956ed0..0000000000 Binary files a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/mortgage_assembly.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/pom.xml b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/pom.xml deleted file mode 100644 index d30c0fd36a..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-mortgage-loanapproval - jar - Apache Tuscany SCA Mortgage Loan Approval Demo - A sample Mortgage application made of several SCA components wired together. - - - 1.3.1-SNAPSHOT - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.1-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.3.1-SNAPSHOT - runtime - - - - - - install - ${artifactId} - - - org.apache.maven.plugins - maven-jar-plugin - - - - mortgage.MortgageClient - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java deleted file mode 100644 index c5787b7819..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java +++ /dev/null @@ -1,29 +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 mortgage; - -import org.osoa.sca.annotations.Remotable; - -/** - * CreditCheck interface - */ -@Remotable -public interface CreditCheck { - int getCreditScore(String ssn); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java deleted file mode 100644 index dc803d9688..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * A pojo implementation of the CreditCheck service - */ -@Service(CreditCheck.class) -public class CreditCheckImpl implements CreditCheck { - - public int getCreditScore(String ssn) { - int score = (int)(700 + (Math.random() - 0.5) * 100); - System.out.println("Credit score for " + ssn + ": " + score); - return score; - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java deleted file mode 100644 index 66a486d516..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java +++ /dev/null @@ -1,76 +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 mortgage; - -/** - * A simple Customer object - */ -public class Customer { - private String ssn; - private String firstName; - private String lastName; - private double monthlyIncome; - private String state; - - public double getMonthlyIncome() { - return monthlyIncome; - } - - public void setMonthlyIncome(double monthlyIncome) { - this.monthlyIncome = monthlyIncome; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getSsn() { - return ssn; - } - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - @Override - public String toString() { - return firstName + " " + lastName + "[" + ssn + "]"; - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java deleted file mode 100644 index b5bafeb204..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -public interface InterestRateQuote { - public float getRate(String state, double loanAmount, int termInYears); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java deleted file mode 100644 index 8c642667f1..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.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 mortgage; - -import org.osoa.sca.annotations.Service; - -@Service(InterestRateQuote.class) -public class InterestRateQuoteImpl implements InterestRateQuote { - public float getRate(String state, double loanAmount, int termInYears) { - float rate = 6.0f; - if (termInYears == 5) { - rate = 5.5f; - } else { - rate = 6.5f; - } - System.out.println("Interest rate for a " + termInYears - + "-year loan of $" - + loanAmount - + " in " - + state - + ": " - + rate - + "%"); - return rate; - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java deleted file mode 100644 index dcdad18496..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.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 mortgage; - -/** - * Loan Approval interface - */ -public interface LoanApproval { - public boolean approve(Customer customer, double loanAmount, int years); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java deleted file mode 100644 index 40bfdc4a1d..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java +++ /dev/null @@ -1,84 +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 mortgage; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the LoanApproval service. - */ -@Service(LoanApproval.class) -// Service declaration -public class LoanApprovalImpl implements LoanApproval { - private CreditCheck[] creditCheck; - private MortgageCalculator mortgageCalculator; - private InterestRateQuote interestRateQuote; - - // Reference declaration using a protected or public field - @Reference - public RiskAssessment riskAssessment; - - private int minimumCreditScore = 650; - - // Property declaration using a setter method - @Property(name = "minimumCreditScore") - public void setMinimumCreditScore(int minimumCreditScore) { - this.minimumCreditScore = minimumCreditScore; - } - - // Reference declaration using a setter method - @Reference - public void setCreditCheck(CreditCheck[] creditCheck) { - this.creditCheck = creditCheck; - } - - @Reference - public void setInterestRateQuote(InterestRateQuote interestRateQuote) { - this.interestRateQuote = interestRateQuote; - } - - @Reference - public void setMortgageCalculator(MortgageCalculator mortgageCalculator) { - this.mortgageCalculator = mortgageCalculator; - } - - public boolean approve(Customer customer, double loanAmount, int years) { - int score = 0; - for (int i = 0; i < creditCheck.length; i++) { - score += creditCheck[i].getCreditScore(customer.getSsn()); - } - if (score != 0) { - score = score / creditCheck.length; - } - if (score < minimumCreditScore) { - System.err.println("Credit score " + score + " is below the minimum " + minimumCreditScore + "."); - return false; - } - float rate = interestRateQuote.getRate(customer.getState(), loanAmount, years); - double monthlyPayment = mortgageCalculator.getMonthlyPayment(loanAmount, years, rate); - double ratio = monthlyPayment / customer.getMonthlyIncome(); - boolean approved = riskAssessment.assess(score, ratio); - if (!approved) { - System.err.println("Debt/Income ratio " + ratio + " is too high."); - } - return approved; - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java deleted file mode 100644 index cacd8694de..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java +++ /dev/null @@ -1,29 +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 mortgage; - -import org.osoa.sca.annotations.Remotable; - -/** - * The Mortgage Calculator service interface. - */ -@Remotable -public interface MortgageCalculator { - public double getMonthlyPayment(double principal, int years, float interestRate); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java deleted file mode 100644 index 015f1bae98..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Calculator service. - */ -@Service(MortgageCalculator.class) -public class MortgageCalculatorImpl implements MortgageCalculator { - - public double getMonthlyPayment(double principal, int years, float interestRate) { - double monthlyRate = interestRate / 12.0 / 100.0; - double p = Math.pow(1 + monthlyRate, years * 12); - double q = p / (p - 1); - double monthlyPayment = principal * monthlyRate * q; - System.out.println("Monthly payment for a " + years + "-year loan of $" + principal + ": " + monthlyPayment); - return monthlyPayment; - } - -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java deleted file mode 100644 index d69f0a1163..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java +++ /dev/null @@ -1,44 +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 mortgage; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class MortgageClient { - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("Mortgage1.composite"); - LoanApproval loanApplication = domain.getService(LoanApproval.class, "LoanApprovalComponent"); - - // Create the customer - Customer customer = new Customer(); - customer.setSsn("111-22-3333"); - customer.setFirstName("John"); - customer.setLastName("Smith"); - customer.setMonthlyIncome(5000.0d); - customer.setState("CA"); - - // Invoke the service - boolean result = loanApplication.approve(customer, 200000d, 30); - System.out.println((result ? "Approved: " : "Rejected: ") + customer); - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java deleted file mode 100644 index 23c9589e85..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.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 mortgage; - -/** - * Risk Assessment interface - */ -public interface RiskAssessment { - public boolean assess(int creditScore, double ratio); -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java deleted file mode 100644 index c2116366ec..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * A pojo implementation of RiskAssessment service - */ -@Service(RiskAssessment.class) -public class RiskAssessmentImpl implements RiskAssessment { - public boolean assess(int creditScore, double ratio) { - if (creditScore >= 750) { - return ratio < 0.35; - } else if (creditScore >= 700) { - return ratio < 0.30; - } else { - return ratio < 0.25; - } - } -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite deleted file mode 100644 index d1128b9907..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - 600 - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite deleted file mode 100644 index 4cad6c7223..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 600 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType deleted file mode 100644 index bf7b10e0f7..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js deleted file mode 100644 index b25af1d039..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -function getMonthlyPayment(principal, years, interestRate) { - var monthlyRate = interestRate / 12.0 / 100.0; - var p = Math.pow(1 + monthlyRate, years * 12); - var q = p / (p - 1); - var monthlyPayment = principal * monthlyRate * q; - return monthlyPayment; -} diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl deleted file mode 100644 index 9c2acc96d3..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java b/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java deleted file mode 100644 index 285cc72515..0000000000 --- a/branches/sca-java-1.3.1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java +++ /dev/null @@ -1,56 +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 mortgage; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class MortgageClientTestCase extends TestCase { - private SCADomain domain; - private LoanApproval loanApproval; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("Mortgage.composite"); - loanApproval = domain.getService(LoanApproval.class, "LoanApprovalComponent"); - } - - @Override - protected void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - public void testApprove() throws Exception { - Customer customer = new Customer(); - customer.setSsn("111-22-3333"); - customer.setFirstName("John"); - customer.setLastName("Smith"); - customer.setMonthlyIncome(5000.0d); - customer.setState("CA"); - - boolean approved = loanApproval.approve(customer, 200000d, 30); - System.out.println((approved ? "Approved: " : "Rejected: ") + customer); - } -} diff --git a/branches/sca-java-1.3.1/demos/pom.xml b/branches/sca-java-1.3.1/demos/pom.xml deleted file mode 100644 index ef0aac5e7d..0000000000 --- a/branches/sca-java-1.3.1/demos/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.1-SNAPSHOT - ../pom.xml - - tuscany-demos - pom - Apache Tuscany SCA Demos - - - - default - - true - - - alert-aggregator-webapp - bigbank - bigbank-account - bigbank-calculator - bigbank-stockquote - mortgage-creditcheck - mortgage-loanapproval - xml-bigbank - - - - - - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/LICENSE b/branches/sca-java-1.3.1/demos/xml-bigbank/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/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/branches/sca-java-1.3.1/demos/xml-bigbank/NOTICE b/branches/sca-java-1.3.1/demos/xml-bigbank/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/README b/branches/sca-java-1.3.1/demos/xml-bigbank/README deleted file mode 100644 index 3bdeeca60a..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/README +++ /dev/null @@ -1,46 +0,0 @@ -XML BigBank Demo -================ - -This demo showcases the integration with XML technolgies in the service assembly. - -Note: The live stock quote web service is not always running. Sometimes empty response is returned and the stock value is 0. - -To run the demo, type "ant run" and it will produce the following output. - -Buildfile: build.xml - -init: - [get] Getting: http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL - [get] To: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\src\main\resources\wsdl\StockQuotes.wsdl - [get] local file date : Tue Nov 06 15:50:37 PST 2007 - [get] . - [get] last modified = Wed Dec 31 16:00:00 PST 1969 - using current time instead - [mkdir] Created dir: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - -compile: - [javac] Compiling 11 source files to C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - [copy] Copying 6 files to C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - [jar] Building jar: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\demo-xml-bigbank.jar - -run: - [java] Nov 6, 2007 3:52:28 PM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath - [java] INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart - [java] Retrieving exchange rate... - [java] Nov 6, 2007 3:52:29 PM org.apache.tuscany.sca.binding.feed.provider.RSSBindingInvoker invoke - [java] INFO: >>> RSSBindingInvoker (rss_2.0) http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S - [java] Exchange rate: USD 1.0=EUR 0.68705 - [java] Loading account data... - [java] Getting stock quote... - [java] Nov 6, 2007 3:52:30 PM org.apache.commons.httpclient.HttpMethodBase readResponse - [java] INFO: Discarding unexpected response: HTTP/1.1 100 Continue - [java] Calculating total value... - [java] Checking Balance: xs:double: 1000 - [java] Saving Blance: xs:double: 20000 - [java] Stock Value: xs:integer: 0 - [java] Total Value [1]: xs:double: 21000 - [java] Total Value=USD 21000.0 - [java] EUR: 14428.050000000001 - -BUILD SUCCESSFUL -Total time: 7 seconds - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/build.xml b/branches/sca-java-1.3.1/demos/xml-bigbank/build.xml deleted file mode 100644 index 0ba1b069aa..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/build.xml +++ /dev/null @@ -1,63 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/pom.xml b/branches/sca-java-1.3.1/demos/xml-bigbank/pom.xml deleted file mode 100644 index 5cd130e840..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.3.1-SNAPSHOT - ../pom.xml - - demo-xml-bigbank - jar - Apache Tuscany SCA XML BigBank Demo - Apache Tuscany SCA XML BigBank Demo - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.1-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.3.1-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-databinding-saxon - 1.3.1-SNAPSHOT - runtime - - - - - org.apache.tuscany.sca - tuscany-implementation-xquery - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.1-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.3.1-SNAPSHOT - - - - bigbank.BigBankClient - true - - - generate - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountData.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountData.java deleted file mode 100644 index c3ae8d0912..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountData.java +++ /dev/null @@ -1,36 +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 bigbank; - -import java.io.IOException; - -import javax.xml.stream.XMLStreamReader; - -/** - * @version $Rev$ $Date$ - */ -public interface AccountData { - /** - * Get the StAX stream that represent the accounts data - * @return The StAX stream containign the accounts - * @throws IOException - */ - XMLStreamReader getAccounts() throws IOException; -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java deleted file mode 100644 index 1c0c612987..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import java.io.IOException; -import java.net.URL; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(AccountData.class) -public class AccountDataImpl implements AccountData { - private XMLInputFactory factory = XMLInputFactory.newInstance(); - - public XMLStreamReader getAccounts() throws IOException { - URL doc = getClass().getResource("/accounts.xml"); - XMLStreamReader reader = null; - try { - reader = factory.createXMLStreamReader(doc.openStream()); - } catch (Exception e) { - e.printStackTrace(); - } - return reader; - } - -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountService.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountService.java deleted file mode 100644 index 4c72384e7b..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountService.java +++ /dev/null @@ -1,32 +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 bigbank; - - -/** - * @version $Rev$ $Date$ - */ -public interface AccountService { - /** - * Get the total value of all accounts owned by the customer - * @return The total value - */ - double getTotalValue(); -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java deleted file mode 100644 index 2ce1e86062..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java +++ /dev/null @@ -1,84 +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 bigbank; - -import java.io.StringReader; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.apache.axiom.om.OMElement; -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(AccountService.class) -public class AccountServiceImpl implements AccountService { - private static final String STOCK_QUOTE_REQUEST = - "IBM GOOG MSFT"; - - private XMLInputFactory factory = XMLInputFactory.newInstance(); - - @Reference - protected ExchangeRate exchangeRate; - - @Reference - protected StockQuote stockQuote; - - @Reference - protected AccountData accountData; - - @Reference - protected StockValue stockValue; - - @Property - protected String currency; - - public double getTotalValue() { - try { - double rate = exchangeRate.getExchangeRate(currency); - - System.out.println("Loading account data..."); - XMLStreamReader accounts = accountData.getAccounts(); - - System.out.println("Getting stock quote..."); - XMLStreamReader request = factory.createXMLStreamReader(new StringReader(STOCK_QUOTE_REQUEST)); - - OMElement quotes = stockQuote.GetQuote(request); - - String xml = quotes.getText(); - System.out.println(xml); - XMLStreamReader qts = factory.createXMLStreamReader(new StringReader(xml)); - System.out.println("Calculating total value..."); - double value = stockValue.calculate(qts, accounts); - - System.out.println("Total Value=USD " + value); - - return value * rate; - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java deleted file mode 100644 index a7703787fb..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.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 bigbank; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Account service - */ -public class BigBankClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("BigBank.composite"); - AccountService accountService = domain.getService(AccountService.class, "AccountService"); - - System.out.println("EUR: " + accountService.getTotalValue()); - } -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java deleted file mode 100644 index f5f1ca90b6..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.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 bigbank; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class BigBankServer { - public static void main(String[] args) throws Exception { - - System.out.println("Starting the BigBank Service..."); - - SCADomain domain = SCADomain.newInstance("http://localhost", "/", "BigBank.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java deleted file mode 100644 index bb8ff85f45..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java +++ /dev/null @@ -1,36 +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 bigbank; - -import org.osoa.sca.annotations.Remotable; - -import com.sun.syndication.feed.synd.SyndFeed; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface CurrencyExchange { - /** - * Get the currency exchange rates as a RSS feed - * @return - */ - SyndFeed getRates(); -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java deleted file mode 100644 index 358e5e19a2..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java +++ /dev/null @@ -1,32 +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 bigbank; - -/** - * @version $Rev$ $Date$ - */ -public interface ExchangeRate { - /** - * Look up the exchange rate of a currency against USD - * @param currency The currency - * @return The exchange rate - */ - double getExchangeRate(String currency); -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java deleted file mode 100644 index fcb3707cfe..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java +++ /dev/null @@ -1,84 +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 bigbank; - -import java.io.ByteArrayInputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathFactory; - -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; - -/** - * @version $Rev$ $Date$ - */ -@Service(ExchangeRate.class) -public class ExchangeRateImpl { - @Reference - protected CurrencyExchange exchangeRate; - - private final DocumentBuilder builder; - - public ExchangeRateImpl() { - try { - builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new IllegalArgumentException(e); - } - } - - /** - * Retrieve the live currency exchange rate from a live feed and extract the data for a given - * currecy using XPath - * @param currency The currency - * @return The exchange rate - */ - public double getExchangeRate(String currency) { - try { - System.out.println("Retrieving exchange rate..."); - SyndFeed feed = exchangeRate.getRates(); - SyndEntry entry = (SyndEntry)feed.getEntries().get(0); - String rateTable = entry.getDescription().getValue(); - - Document doc = builder.parse(new ByteArrayInputStream(rateTable.getBytes())); - Node node = doc.getDocumentElement(); - XPath path = XPathFactory.newInstance().newXPath(); - XPathExpression exp = path.compile("/TABLE/TR[TD[1]='" + currency.toUpperCase() + "']/TD[2]"); - Node rateNode = (Node)exp.evaluate(node, XPathConstants.NODE); - double rate = Double.valueOf(rateNode.getTextContent().trim()); - System.out.println("Exchange rate: USD 1.0=" + currency + " " + rate); - return rate; - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java deleted file mode 100644 index 26753a9e9e..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.axiom.om.OMElement; -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface StockQuote { - /** - * Invoke the stock quote web service to get the live quotes - * @param input The StAX stream of the request - * @return The StAX stream of the response - */ - public OMElement GetQuote(XMLStreamReader input); -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockValue.java b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockValue.java deleted file mode 100644 index c300103398..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/java/bigbank/StockValue.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import javax.xml.stream.XMLStreamReader; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface StockValue { - /** - * Join the quotes and accounts document to calculate the value - * @param quotes The quotes XML document - * @param accounts The accounts XML document - * @return The value - */ - double calculate(XMLStreamReader quotes, XMLStreamReader accounts); -} diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/BigBank.composite b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/BigBank.composite deleted file mode 100644 index 8afde4bf80..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/BigBank.composite +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - EUR - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/accounts.xml b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/accounts.xml deleted file mode 100644 index 52ffd41fa7..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/accounts.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - John - Smith - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/customer.xsd b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/customer.xsd deleted file mode 100644 index b22efb74c4..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/customer.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/stock.xq b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/stock.xq deleted file mode 100644 index 03c19e457d..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/stock.xq +++ /dev/null @@ -1,52 +0,0 @@ -(: - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -:) -declare namespace q="http://www.webserviceX.NET/"; -declare namespace c="http://example.com/customer"; -declare namespace stock="scaservice:java/bigbank.StockValue"; -(: declare namespace currency="scaproperty:java/java.lang.String"; :) - -declare function stock:calculate($quoteDoc, $accountDoc) as xs:double { - let $checking := - trace( - sum( - for $a in $accountDoc/c:customer/c:accounts/c:checking - return $a/@balance - ), "Checking Balance") - - let $saving := - trace( - sum( - for $a in $accountDoc/c:customer/c:accounts/c:saving - return $a/@balance - ), "Saving Blance") - - let $value := - trace( - sum( - for $quote in $quoteDoc/StockQuotes/Stock, - $account in $accountDoc/c:customer/c:accounts/c:stock - where string($quote/Symbol) = string($account/@symbol) - return - trace(number($quote/Last),"Stock Price") * trace(number($account/@quantity), "Quantity") - ), "Stock Value") - return trace($checking + $saving + $value, "Total Value") -}; - - - diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl b/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl deleted file mode 100644 index 8411e22ff7..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.png b/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.png deleted file mode 100644 index 0743a413a3..0000000000 Binary files a/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.svg b/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.svg deleted file mode 100644 index c7acc03324..0000000000 --- a/branches/sca-java-1.3.1/demos/xml-bigbank/xml-bigbank.svg +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - BigBank - AccountData(Local file orDatabase) - - StockValue (XQuery) - - - - - - - - - - - - - - WS XML Feed(rss) - - 1 - - - - 2 - - - - 3 - - - - 4 - - - - AccountService (Java) - - - ExchangeRate (Java) - - StockQuote(Live WebService) CurrencyExchangeRate (Live RSS Feed) - - - - -- cgit v1.2.3