summaryrefslogtreecommitdiffstats
path: root/branches/sca-android/samples
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:05:59 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:05:59 +0000
commit5e520b1b65c79cd828057cb628b9367acb266880 (patch)
tree645361ececb1a50c2fe0260beca5c1169d0e197b /branches/sca-android/samples
parent00c625535fe93a57d605c8988147b77207d43fad (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835117 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-android/samples')
-rw-r--r--branches/sca-android/samples/README306
-rw-r--r--branches/sca-android/samples/binding-echo-extension/README74
-rw-r--r--branches/sca-android/samples/binding-echo-extension/build.xml51
-rw-r--r--branches/sca-android/samples/binding-echo-extension/pom.xml78
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java29
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java33
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java34
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java104
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java128
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java48
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java71
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java58
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java71
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java78
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java41
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java37
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java43
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java78
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java48
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java26
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java29
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java33
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java43
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java54
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java78
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java52
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory19
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor21
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema19
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory19
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd36
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/java/echo/Echo.java29
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java44
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java50
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java50
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/resources/EchoBinding.composite43
-rw-r--r--branches/sca-android/samples/binding-echo-extension/src/test/resources/definitions.xml39
-rw-r--r--branches/sca-android/samples/binding-echo/README104
-rw-r--r--branches/sca-android/samples/binding-echo/binding-echo.pngbin7846 -> 0 bytes
-rw-r--r--branches/sca-android/samples/binding-echo/binding-echo.svg174
-rw-r--r--branches/sca-android/samples/binding-echo/build.xml75
-rw-r--r--branches/sca-android/samples/binding-echo/pom.xml71
-rw-r--r--branches/sca-android/samples/binding-echo/src/main/java/echo/Echo.java29
-rw-r--r--branches/sca-android/samples/binding-echo/src/main/java/echo/EchoBindingClient.java51
-rw-r--r--branches/sca-android/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java44
-rw-r--r--branches/sca-android/samples/binding-echo/src/main/resources/EchoBinding.composite40
-rw-r--r--branches/sca-android/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java57
-rw-r--r--branches/sca-android/samples/calculator-lean/README87
-rw-r--r--branches/sca-android/samples/calculator-lean/calculator.pngbin20552 -> 0 bytes
-rw-r--r--branches/sca-android/samples/calculator-lean/calculator.svg329
-rw-r--r--branches/sca-android/samples/calculator-lean/pom.xml71
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddService.java28
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java51
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorService.java35
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.java70
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideService.java28
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyService.java28
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractService.java28
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/resources/Calculator.composite54
-rw-r--r--branches/sca-android/samples/calculator-lean/src/main/resources/CalculatorTest.composite32
-rw-r--r--branches/sca-android/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java62
-rw-r--r--branches/sca-android/samples/calculator/README97
-rw-r--r--branches/sca-android/samples/calculator/build.xml72
-rw-r--r--branches/sca-android/samples/calculator/calculator.pngbin20552 -> 0 bytes
-rw-r--r--branches/sca-android/samples/calculator/calculator.svg329
-rw-r--r--branches/sca-android/samples/calculator/pom.xml71
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/AddService.java28
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/AddServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorClient.java48
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorService.java35
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java70
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/DivideService.java28
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/DivideServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyService.java28
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/SubtractService.java28
-rw-r--r--branches/sca-android/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java35
-rw-r--r--branches/sca-android/samples/calculator/src/main/resources/Calculator.composite49
-rw-r--r--branches/sca-android/samples/calculator/src/test/java/calculator/CalculatorTestCase.java56
-rw-r--r--branches/sca-android/samples/databinding-echo/README143
-rw-r--r--branches/sca-android/samples/databinding-echo/build.xml75
-rw-r--r--branches/sca-android/samples/databinding-echo/databinding-echo.pngbin23907 -> 0 bytes
-rw-r--r--branches/sca-android/samples/databinding-echo/databinding-echo.svg408
-rw-r--r--branches/sca-android/samples/databinding-echo/pom.xml82
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java74
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java59
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Echo.java32
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java45
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface1.java32
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface2.java36
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/resources/EchoDataBinding.composite58
-rw-r--r--branches/sca-android/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl63
-rw-r--r--branches/sca-android/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java49
-rw-r--r--branches/sca-android/samples/implementation-composite/README116
-rw-r--r--branches/sca-android/samples/implementation-composite/build.xml72
-rw-r--r--branches/sca-android/samples/implementation-composite/implementation-composite.pngbin47415 -> 0 bytes
-rw-r--r--branches/sca-android/samples/implementation-composite/implementation-composite.svg658
-rw-r--r--branches/sca-android/samples/implementation-composite/pom.xml72
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/CompositeClient.java41
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/Source.java24
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceCallback.java24
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceImpl.java55
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/Target.java30
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/java/composite/TargetImpl.java41
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite.composite41
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite2.composite33
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--branches/sca-android/samples/implementation-composite/src/main/resources/OuterComposite.composite39
-rw-r--r--branches/sca-android/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java51
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/README83
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/build.xml51
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/pom.xml77
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUD.java54
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java50
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java37
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java90
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java47
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java117
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java79
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java75
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java51
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory19
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor19
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema19
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory19
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd38
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java60
-rw-r--r--branches/sca-android/samples/implementation-crud-extension/src/test/resources/crud.composite30
-rw-r--r--branches/sca-android/samples/implementation-crud/README113
-rw-r--r--branches/sca-android/samples/implementation-crud/build.xml75
-rw-r--r--branches/sca-android/samples/implementation-crud/implementation-crud.pngbin4227 -> 0 bytes
-rw-r--r--branches/sca-android/samples/implementation-crud/implementation-crud.svg135
-rw-r--r--branches/sca-android/samples/implementation-crud/pom.xml64
-rw-r--r--branches/sca-android/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java59
-rw-r--r--branches/sca-android/samples/implementation-crud/src/main/resources/crud.composite30
-rw-r--r--branches/sca-android/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java61
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/README70
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/build.xml51
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/pom.xml77
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java65
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java36
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java36
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java155
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java174
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java68
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java106
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java45
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor19
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema19
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory19
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory19
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd38
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java26
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java37
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java37
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java51
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType26
-rw-r--r--branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite33
-rw-r--r--branches/sca-android/samples/pom.xml62
-rw-r--r--branches/sca-android/samples/simple-bigbank/README101
-rw-r--r--branches/sca-android/samples/simple-bigbank/build.xml72
-rw-r--r--branches/sca-android/samples/simple-bigbank/pom.xml65
-rw-r--r--branches/sca-android/samples/simple-bigbank/simple-bigbank.pngbin10202 -> 0 bytes
-rw-r--r--branches/sca-android/samples/simple-bigbank/simple-bigbank.svg200
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java43
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java26
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java68
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java26
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java28
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java54
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java35
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java35
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java43
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java43
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java36
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java32
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/resources/Account.composite38
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/resources/BigBank.composite35
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/main/resources/StockQuote.composite31
-rw-r--r--branches/sca-android/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java50
-rw-r--r--branches/sca-android/samples/simple-callback/README97
-rw-r--r--branches/sca-android/samples/simple-callback/build.xml72
-rw-r--r--branches/sca-android/samples/simple-callback/pom.xml65
-rw-r--r--branches/sca-android/samples/simple-callback/simple-callback.pngbin137 -> 0 bytes
-rw-r--r--branches/sca-android/samples/simple-callback/simple-callback.svg150
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClient.java27
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java49
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyService.java32
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java27
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java51
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java38
-rw-r--r--branches/sca-android/samples/simple-callback/src/main/resources/simplecallback.composite34
-rw-r--r--branches/sca-android/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java51
-rw-r--r--branches/sca-android/samples/supplychain/README101
-rw-r--r--branches/sca-android/samples/supplychain/build.xml72
-rw-r--r--branches/sca-android/samples/supplychain/pom.xml65
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/Customer.java33
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java44
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/Retailer.java28
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java39
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/Shipper.java28
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java39
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java40
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/Warehouse.java28
-rw-r--r--branches/sca-android/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java39
-rw-r--r--branches/sca-android/samples/supplychain/src/main/resources/supplychain.composite45
-rw-r--r--branches/sca-android/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java52
-rw-r--r--branches/sca-android/samples/supplychain/supplychain.pngbin3898 -> 0 bytes
-rw-r--r--branches/sca-android/samples/supplychain/supplychain.svg228
213 files changed, 0 insertions, 12795 deletions
diff --git a/branches/sca-android/samples/README b/branches/sca-android/samples/README
deleted file mode 100644
index 2646fbb73a..0000000000
--- a/branches/sca-android/samples/README
+++ /dev/null
@@ -1,306 +0,0 @@
-The Apache Tuscany SCA Samples
-==============================
-The Apache Tuscany SCA samples are built as part of the main Maven build and
-run, using the provided JUnit test cases, as tests in the Maven build.
-
-In the binary distribution of Apache Tuscany most samples can also
-be run using the provided Ant build.xml files. These show the samples running
-from a simple main() method without the need for a JUnit test case.
-
-In these notes text that appears in angled brackets like this <example> means
-that you need to make a choice and provide your own text at that point.
-
-These simple samples have been created with the intention of illustrating the
-usage of the SCA API and annotations and certainly not to levels of SCA component
-abstraction. In real life situations you should use SCA to assemble real and
-usually bigger components, and when you do that you'll get all the benefits of
-SCA, bindings, policies, integration in an SOA environment etc..
-
-Sample Overview
----------------
-The samples generally show off different features of the SCA runtime
-and the extensions that come packaged with it.
-
-binding-notification-broker - A broker for notificatione
-binding-notification-consumer - A consumer of notifications
-binding-notification-producer - A producer of notifications
-
-calculator - Calculator built with java components and
- local wires.
-calculator-distributed - A calculator built using SCA nodes running
- on multiple JVMs
-calculator-implementation-policies - Shows logging policites associated with
- SCA implementations
-calculator-rmi-reference - The calculator configured to talk RMI to
- the calculator-rmi-service sample
-calculator-rmi-service - The calculator configured to accept RMI
- requests from calculator-rmi-reference
-calculator-script - Calculator built using various script languages
-calculator-webapp - Calculator running inside a web app
-calculator-ws-webapp - Calculator running inside a web app also
- showing webservices binding
-
-callbck-ws-client - The client for showing callbacks across web services
-callback-ws-service - The server for showing callbacks across web serviced
-
-chat-webapp - A simple chat style web app demonstrating
- use of AJAX binding
-
-databinding-echo - An SCA application that shows how databindings
- transform data
-
-feed-aggregator - Demonstrates using the ATOM binding
-feed-aggregator-webapp - feed-aggregator running in webapp
-
-helloworld-bpel - Demonstrates an SCA component invoking a BPEL
- process in a composition
-
-helloworld-dojo-webapp - An SCA application that exposes a service using
- JSONRPC and a client using the Dojo toolkit
-helloworld-jsonrpc-webapp - helloworld using jsonrpc binding
-helloworld-ws-reference - The client side of a hello world sample that uses a
- web service binding (requires helloworld-ws-service)
-helloworld-ws-service - The server side of a hello world sample that uses a
- web service binding
-helloworld-ws-reference-jms - The client side of a hello world sample that uses a
- web service binding with SOAP/JMS (requires
- helloworld-ws-service)
-helloworld-ws-service-jms - The server side of a hello world sample that
- uses a web service binding with SOAP/JMS
-helloworld-ws-reference-secure - The client side of a hello world sample that
- shows how policy intent can be used.
-helloworld-ws-service-secure - The client side of a hello world sample that
- shows how policy intent can be used.
-helloworld-ws-sdo - helloworld using ws binding and SDO
-helloworld-ws-sdo-webapp - helloworld using ws binding and SDO within a webapp
-
-implementation-composite - Shows how SCA composites are used
-
-osgi-supplychain - SCA asynchronous API with OSGi and Java
- implementation types
-
-simple-bigbank - A banking application built with java components
- and local wire
-simple-bigbank-spring - A banking application showing how SCA works with Spring
-
-simple-callback - demonstrates the callback interface
-simple-callback-ws - demonstrates use of callback interface across WS binding
-
-store - Step by step guide for creating an online store
-
-supplychain - shows how asynchronous callbacks can be used
-
-web-resource - Demonstrates using an SCA Web resource component
-
-quote-xquery - Demonstrate SCA components using XQuery
-
-Samples for building extensions
--------------------------------
-There are samples that demonstrate how to build extensions for the
-Tuscany SCA runtime. These samples are slightly different from the samples
-above in that the provided code is concerned with building the extension
-and not with building an application that uses it. The application
-that shows how the new extension can be used is provided in an associated
-sample.
-
-implementation-crud-extension - Shows how to build new implementation type
- extensions
-implementation-crud - A sample application that exercises the new
- implementation extensions
-binding-echo-extension - Shows how to build new binding extensions
-binding-echo - A sample application that exercises the new
- binding extension
-implementation-notifiaction- Illustrates the use of <implementation.notification/>
-implementation-pojo-extension - shows how new implementation types are constructed
-
-Sample Layout
--------------
-All sample directories are organized in the same way based on the default
-project template provided by Maven. For example, take a look at the calculator
-sample;
-
-calculator/
- src/ - Holds all of the source files for the sample
- main/ - Groups together the files that implement the sample
- java/ - Java source files
- resources/ - Non java resource files such as composte files
- test/ - Groups together files that provide sample tests
- java - Java test sources files. Usually JUnit test cases
- target/ - Holds the files generated when the sample is built
- classes/ - For example, Java class files
- test-classes/ - classes from src/test and other test files
-
-Getting Ready To Build
-----------------------
-You will need to install the following software before you start.
-
-J2SE Development Kit (JDK) 5.0
-Apache Ant 1.7.0 - if you are going to use Ant
-Apache Maven 2.0.6 - if you are going to use Maven
-
-Java and Ant and/or Maven binary directories must be present in your PATH so
-that their executable programs are available in your environment. You may
-find it useful to use a script to set up your environment, for example;
-
-For UNIX:
- JAVA_HOME=/<installation_directory>
- ANT_HOME=/<installation_directory>/apache-ant-1.7.0
- MAVEN_HOME=/<installation_directory>/maven-2.0.6
- export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$PATH
-
-For Windows:
- set JAVA_HOME=C:\<installation_directory>
- set ANT_HOME=C:\<installation_directory>\apache-ant-1.7.0
- set MAVEN_HOME=C:\<installation_directory>\maven-2.0.6
- set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%MAVEN_HOME%\bin;%PATH%
-
-
-Building And Running The SCA Samples Using Ant
-----------------------------------------------
-The build.xml files provided with the Apache Tuscany SCA samples are designed
-to work with the binary distribution. They rely on the tuscany-sca-manifest.jar
-to describe the class path and this jar is only provided as part of the
-binary distribution.
-
-The binary distribution of SCA also includes precompiled versions of each sample.
-If you look in the target directory of each sample you will see this jar file. To
-run a sample based on all of the precompiled artifacts all you have to do is:
-
-cd <sampledir>
-ant run
-
-Check each <sampledir>/README file as some samples require that two progams are
-run to get the desired result, for example, the two samples that show how
-to build extensions are run from their associated application samples.
-
-If you want to rebuild a sample, for example, if you have changed it, do the
-following:
-
-cd <sampledir>
-ant compile
-
-Once the sample is built you have the option of running the sample in whatever
-way best suits you. Two alternatives are provided in the ant build files.
-
-The compile target builds the class files and then builds the jar so you can use
-the same command as before:
-
-ant run
-
-This will use the generated jar to run the samples. The command line version of
-this is:
-
-on Windows
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\<sample jar file> <sample runnable class>
-
-for example : java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient
-
-on *nix
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/<sample jar file> <sample runnable class>
-
-for example : java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient
-
-
-You can use the compiled classes directly using
-
-ant run-classes
-
-The command line version of this is:
-
-on Windows
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes <sample runnable class>
-
-for example : java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes calculator.CalculatorClient
-
-on *nix
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/classes <sample runnable class>
-
-for example : java -cp ../../lib/tuscany-sca-manifest.jar:target/classes calculator.CalculatorClient
-
-The class specified on the command of course depends on which sample you want to
-run. In the examples we have used we are running the CalculatorClient from the calculator sample.
-
-
-Building And Running The SCA Samples Using Maven
-------------------------------------------------
-
-The Maven build process will work from both source and binary distributions.
-To build and test all of the Apache Tuscany SCA sources, including the samples,
-do the following.
-
-cd sca
-mvn
-
-This will take a little while to complete. Experience with Maven tells us that
-sometimes there are problems downloading the dependencies that Apache Tuscany
-SCA requires. If Maven reports that it cannot download required dependencies
-try running the Maven build again.
-
-Once you have all of the source built you can build and run each sample
-independently if required.
-
-cd <sampledir>
-mvn
-
-When using Maven the samples are run within JUnit test cases and so you will
-sometimes not see any test output. You will always see an indication of test
-success or failure.
-
-Using The Samples In An IDE
----------------------------------------------
-The easiest way to use the samples in an IDE is to use Maven to generate all
-of the IDE project files for you automatically. This works best if you
-generate IDE projects for all of the Apache Tuscany modules. You can then
-include the ones you are interested in working with in you IDE.
-
-To build IDE project files for all of the modules in Apache Tuscany SCA;
-
-cd sca
-
-If you are an Eclipse user do the following
-
-mvn -Peclipse eclipse:eclipse
-
-If you are an IDEA user do the following
-
-mvn idea:idea
-
-These commands generate project files for each module in Apache Tuscany SCA.
-The modules you are interested in can now be included in your IDE, for example,
-in Eclipse, if you create a new Java project and use the option to "create a
-new project from existing source" you can specify an SCA module directory,
-which includes the generated project files, and Eclipse will treat it like any
-other Java project.
-
-Using The Samples In An IDE Without Maven
------------------------------------------
-We don't provide any IDE project files with our distributions so you will have to
-import the sample files into your IDE manually. Here's an example of how it can be
-done using Eclipse.
-
-In a new or existing workspace
- Create a new java project to represent the sample you want to work on, e.g.
- calculator
- Import all of the sample code and resources into this project, e.g.
- File, Import and then select tuscany-sca-1.0-incubating\samples\calculator from the filesystem
- Configure the source path to include
- src/main/java
- src/main/resources
- Configure the output folder to be
- calculator/target
- Configure the build path to include all of the jars provided in
- lib
- If you select calculator.CalculatorClient.java and run as "Java Application" you should see
- 3 + 2=5.0
- 3 - 2=1.0
- 3 * 2=6.0
- 3 / 2=1.5
-
-The details of how to do this for other development environments will
-vary but the process will be similar.
-
-
diff --git a/branches/sca-android/samples/binding-echo-extension/README b/branches/sca-android/samples/binding-echo-extension/README
deleted file mode 100644
index 94716b151f..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/README
+++ /dev/null
@@ -1,74 +0,0 @@
-Binding Echo Sample
-===================
-This sample demonstrates how new bindings are constructed for Apache Tuscany
-SCA.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you want to try out the echo binding that this sample provides
-please see the binding-echo sample that provides the necessary client and
-application code to bring up an application that uses this binding
-
-Sample Overview
----------------
-This sample contains a implementation of an SCA binding that simply echoes back
-any messages that are sent to it.
-
-binding-echo-extension/
- src/
- main/
- java/
- echo/ - The binding interfaces
- impl/ - The bindings model classes
- provider/ - The bindings runtime classes
- server/ - A dummy server that the binding is plugged into
- resources/
- META-INF/
- services/ - The extension declaration
- test/
- java/
- echo/ - test code
- resources/
- EchoBinding.composite - the SCA assembly used by the unit test
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building The Sample Using Ant
------------------------------
-With the binary distribution the sample can be built using Ant as
-follows
-
-cd binding-echo-extension
-ant compile
-
-See the binding-echo sample to run a sample that uses this binding.
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd binding-echo-extension
-mvn
-
-Maven will also test that the sample extension built properly. You should see
-the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running echo.EchoServiceTestCase
-Returned message: oof
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.011 sec
-Running echo.EchoReferenceTestCase
-Returned message: oof
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec
-
-Results :
-
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
-
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/binding-echo-extension/build.xml b/branches/sca-android/samples/binding-echo-extension/build.xml
deleted file mode 100644
index 5df5981bea..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/build.xml
+++ /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.
--->
-<project name="binding-echo-extension" default="compile">
- <property name="test.jar" value="sample-binding-echo-extension.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/binding-echo-extension/pom.xml b/branches/sca-android/samples/binding-echo-extension/pom.xml
deleted file mode 100644
index 2d516f2101..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-binding-echo-extension</artifactId>
- <name>Apache Tuscany SCA Echo Binding Extension Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java
deleted file mode 100644
index 3fe1598e0d..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBinding.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 echo;
-
-import org.apache.tuscany.sca.assembly.Binding;
-
-/**
- * A model for the sample Echo binding.
- */
-public interface EchoBinding extends Binding {
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java
deleted file mode 100644
index 0f6fee82be..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.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 echo;
-
-/**
- * A factory for the sample Echo binding model.
- */
-public interface EchoBindingFactory {
-
- /**
- * Creates a new Echo binding.
- *
- * @return a new Echo binding
- */
- EchoBinding createEchoBinding();
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java
deleted file mode 100644
index af759dbf93..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.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 echo.impl;
-
-import echo.EchoBinding;
-import echo.EchoBindingFactory;
-
-/**
- * A factory for the sample Echo binding model.
- */
-public class EchoBindingFactoryImpl implements EchoBindingFactory {
-
- public EchoBinding createEchoBinding() {
- return new EchoBindingImpl();
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java
deleted file mode 100644
index 19c9271bb8..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java
+++ /dev/null
@@ -1,104 +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 echo.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-
-import echo.EchoBinding;
-
-/**
- * Implementation of the Echo binding model.
- */
-public class EchoBindingImpl implements EchoBinding, PolicySetAttachPoint {
-
- private String name;
- private String uri;
- private List<Intent> requiredIntents = new ArrayList<Intent>();
- private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
- private IntentAttachPointType bindingType = null;
-
- public IntentAttachPointType getType() {
- return bindingType;
- }
-
- public void setType(IntentAttachPointType type) {
- this.bindingType = type;
- }
-
- public String getName() {
- return name;
- }
-
- public String getURI() {
- return uri;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setURI(String uri) {
- this.uri = uri;
- }
-
- public List<PolicySet> getPolicySets() {
- return policySets;
- }
-
- public List<Intent> getRequiredIntents() {
- return requiredIntents;
- }
-
- public boolean isUnresolved() {
- // The sample binding is always resolved
- return false;
- }
-
- public void setUnresolved(boolean unresolved) {
- // The sample binding is always resolved
- }
-
- public void setPolicySets(List<PolicySet> policySets) {
- this.policySets = policySets;
-
- }
-
- public void setRequiredIntents(List<Intent> intents) {
- this.requiredIntents = intents;
-
- }
-
- @Override
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
- public List<PolicySet> getApplicablePolicySets() {
- return this.applicablePolicySets;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java
deleted file mode 100644
index 45fdb73f67..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java
+++ /dev/null
@@ -1,128 +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 echo.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.impl.IntentAttachPointTypeFactoryImpl;
-
-import echo.EchoBinding;
-import echo.EchoBindingFactory;
-
-/**
- * A processor for <binding.echo> elements.
- */
-public class EchoBindingProcessor implements StAXArtifactProcessor<EchoBinding> {
-
- private QName BINDING_ECHO = new QName("http://echo", "binding.echo");
-
- private final EchoBindingFactory factory;
- private PolicyAttachPointProcessor policyProcessor;
-
- public EchoBindingProcessor(EchoBindingFactory factory, PolicyFactory policyFactory) {
- this.factory = factory;
- this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
- }
-
- public QName getArtifactType() {
- return BINDING_ECHO;
- }
-
- public Class<EchoBinding> getModelType() {
- return EchoBinding.class;
- }
-
- public EchoBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- EchoBinding echoBinding = factory.createEchoBinding();
- IntentAttachPointType bindingType = new IntentAttachPointTypeFactoryImpl().createBindingType();
- bindingType.setName(getArtifactType());
- bindingType.setUnresolved(true);
- ((PolicySetAttachPoint)echoBinding).setType(bindingType);
-
- String name = reader.getAttributeValue(null, "name");
- if (name != null) {
- echoBinding.setName(name);
- }
-
- String uri = reader.getAttributeValue(null, "uri");
- if (uri != null) {
- echoBinding.setURI(uri);
- }
-
- policyProcessor.readPolicies(echoBinding, reader);
-
- return echoBinding;
- }
-
- public void write(EchoBinding echoBinding, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
-
- policyProcessor.writePolicyPrefixes(echoBinding, writer);
- writer.writeStartElement(BINDING_ECHO.getNamespaceURI(), BINDING_ECHO.getLocalPart());
- policyProcessor.writePolicyAttributes(echoBinding, writer);
-
- if (echoBinding.getName() != null) {
- writer.writeAttribute("name", echoBinding.getName());
- }
-
- if (echoBinding.getURI() != null) {
- writer.writeAttribute("uri", echoBinding.getURI());
- }
-
- writer.writeEndElement();
- }
-
- public void resolve(EchoBinding echoBinding, ModelResolver resolver) throws ContributionResolveException {
- PolicySetAttachPoint policySetAttachPoint = (PolicySetAttachPoint)echoBinding;
- List<Intent> requiredIntents = new ArrayList<Intent>();
- Intent resolvedIntent = null;
- for ( Intent intent : policySetAttachPoint.getRequiredIntents() ) {
- resolvedIntent = resolver.resolveModel(Intent.class, intent);
- requiredIntents.add(resolvedIntent);
- }
- policySetAttachPoint.getRequiredIntents().clear();
- policySetAttachPoint.getRequiredIntents().addAll(requiredIntents);
-
- List<PolicySet> resolvedPolicySets = new ArrayList<PolicySet>();
- PolicySet resolvedPolicySet = null;
- for ( PolicySet policySet : policySetAttachPoint.getPolicySets() ) {
- resolvedPolicySet = resolver.resolveModel(PolicySet.class, policySet);
- resolvedPolicySets.add(resolvedPolicySet);
- }
- policySetAttachPoint.getPolicySets().clear();
- policySetAttachPoint.getPolicySets().addAll(resolvedPolicySets);
- }
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java
deleted file mode 100644
index 91697fcd9a..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.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 echo.provider;
-
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-
-/**
- * Invoker for the sample echo binding.
- */
-class EchoBindingInvoker implements Invoker {
-
- EchoBindingInvoker() {
- }
-
- public Message invoke(Message msg) {
- try {
- System.out.println("Passing thro invoker...");
- Object[] args = msg.getBody();
-
- // echo back the first parameter, a real binding would invoke some API for flowing the request
- Object result = args[0];
-
- msg.setBody(result);
-
- } catch (Exception e) {
- msg.setFaultBody(e);
- }
- return msg;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java
deleted file mode 100644
index 4877bade7f..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package echo.provider;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-
-import echo.provider.policy.PolicyHandler;
-import echo.provider.policy.EncryptionPolicyHandler;
-
-/**
- * Invoker that applies policies before invocation for the sample echo binding.
- */
-public class EchoBindingPoliciedInvoker implements Invoker {
- List<PolicySet> policies = null;
- Map<QName, PolicyHandler> policyHandlers = new HashMap<QName, PolicyHandler>();
-
- public EchoBindingPoliciedInvoker(List<PolicySet> policies) {
- this.policies = policies;
- policyHandlers.put(new QName("http://test","EncryptionPolicy"),
- new EncryptionPolicyHandler());
- }
-
- public Message invoke(Message msg) {
- try {
- Object[] args = msg.getBody();
-
- applyPolicies(args);
-
- // echo back the first parameter, a real binding would invoke some API for flowing the request
- Object result = args[0];
-
- msg.setBody(result);
-
- } catch (Exception e) {
- msg.setFaultBody(e);
- }
- return msg;
- }
-
- private void applyPolicies(Object[] args) throws Exception {
- for ( PolicySet policySet : policies ) {
- PolicyHandler policyHandler = policyHandlers.get(policySet.getName());
- policyHandler.applyPolicy(args, policySet);
- }
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java
deleted file mode 100644
index ba74d8f99a..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java
+++ /dev/null
@@ -1,58 +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 echo.provider;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.provider.BindingProviderFactory;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-import echo.EchoBinding;
-
-
-/**
- * Implementation of the Echo binding model.
- */
-public class EchoBindingProviderFactory implements BindingProviderFactory<EchoBinding> {
-
- private MessageFactory messageFactory;
-
- public EchoBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
- ModelFactoryExtensionPoint factories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
- this.messageFactory = factories.getFactory(MessageFactory.class);
- }
-
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
- return new EchoReferenceBindingProvider(component, reference, binding);
- }
-
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
- return new EchoServiceBindingProvider(component, service, binding, messageFactory);
- }
-
- public Class<EchoBinding> getModelType() {
- return EchoBinding.class;
- }
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java
deleted file mode 100644
index 0efc319af9..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package echo.provider;
-
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-
-import echo.EchoBinding;
-
-/**
- * Implementation of the Echo binding provider.
- */
-class EchoReferenceBindingProvider implements ReferenceBindingProvider {
-
- private RuntimeComponentReference reference;
- private EchoBinding binding;
-
- EchoReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- EchoBinding binding) {
- this.reference = reference;
- this.binding = binding;
- }
-
- public Invoker createInvoker(Operation operation) {
- if (binding instanceof PolicySetAttachPoint) {
- PolicySetAttachPoint policySetAttachPoint = (PolicySetAttachPoint)binding;
- if ( !policySetAttachPoint.getPolicySets().isEmpty() ){
- return new EchoBindingPoliciedInvoker(policySetAttachPoint.getPolicySets());
- }
- }
- return new EchoBindingInvoker();
- }
-
- public boolean supportsOneWayInvocation() {
- return false;
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return reference.getInterfaceContract();
- }
-
- public void start() {
- }
-
- public void stop() {
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java
deleted file mode 100644
index 1cd1e5af4e..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java
+++ /dev/null
@@ -1,78 +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 echo.provider;
-
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.invocation.InvocationChain;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.runtime.RuntimeWire;
-
-import echo.EchoBinding;
-import echo.server.EchoServer;
-import echo.server.EchoServiceListener;
-
-/**
- * Implementation of the Echo binding provider.
- */
-class EchoServiceBindingProvider implements ServiceBindingProvider {
-
- private RuntimeComponent component;
- private RuntimeComponentService service;
- private EchoBinding binding;
- private MessageFactory messageFactory;
-
- EchoServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service, EchoBinding binding, MessageFactory messageFactory) {
- this.component = component;
- this.service = service;
- this.binding = binding;
- this.messageFactory = messageFactory;
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return service.getInterfaceContract();
- }
-
- public boolean supportsOneWayInvocation() {
- return false;
- }
-
- public void start() {
-
- RuntimeComponentService componentService = (RuntimeComponentService) service;
- RuntimeWire wire = componentService.getRuntimeWire(binding);
- InvocationChain chain = wire.getInvocationChains().get(0);
-
- // Register with the hosting server
- String uri = binding.getURI();
- EchoServer.getServer().register(uri, new EchoServiceListener(chain.getHeadInvoker(), messageFactory));
- }
-
- public void stop() {
-
- // Unregister from the hosting server
- String uri = component.getURI() + "/" + binding.getName();
- EchoServer.getServer().unregister(uri);
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java
deleted file mode 100644
index 33dc761aa4..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package echo.provider.policy;
-
-/**
- */
-public class EchoBindingEncryptionPolicy extends EchoBindingPolicy {
-
- private String encryptionStrategyClassName;
- private Class<? extends EncryptionStrategy> strategyClass;
-
- public String getEncryptionStrategyClassName() {
- return encryptionStrategyClassName;
- }
- public void setEncryptionStrategyClassName(String encryptionStrategyClassName) {
- this.encryptionStrategyClassName = encryptionStrategyClassName;
- }
- public Class<? extends EncryptionStrategy> getStrategyClass() {
- return strategyClass;
- }
- public void setStrategyClass(Class<? extends EncryptionStrategy> strategy) {
- this.strategyClass = strategy;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java
deleted file mode 100644
index c847d088a6..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.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 echo.provider.policy;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.monitor.Monitor;
-
-
-/**
- *
- */
-public class EchoBindingEncryptionPolicyProcessor extends EchoBindingPolicyProcessor<EchoBindingEncryptionPolicy> {
-
- public EchoBindingEncryptionPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
- }
-
- public Class<EchoBindingEncryptionPolicy> getModelType() {
- return EchoBindingEncryptionPolicy.class;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java
deleted file mode 100644
index 7d38e3b7a8..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package echo.provider.policy;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.policy.Policy;
-
-/**
-
- */
-public class EchoBindingPolicy implements Policy {
- private boolean unresolved = true;
-
- public QName getSchemaName() {
- return new QName("http://sample/policy","echoBindingPolicy");
- }
-
- public boolean isUnresolved() {
- return unresolved;
- }
-
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java
deleted file mode 100644
index 72b8002238..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java
+++ /dev/null
@@ -1,78 +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 echo.provider.policy;
-
-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.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ClassReference;
-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;
-
-/**
- *
- */
-public abstract class EchoBindingPolicyProcessor<T extends EchoBindingPolicy> implements StAXArtifactProcessor<T> {
- public static final String ENCRYPTION = "Encryption";
-
- public QName getArtifactType() {
- return new QName("http://sample/policy", "echoBindingPolicy");
- }
-
- public T read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- String name = reader.getAttributeValue(null, "name");
- if (name != null && name.equals(ENCRYPTION)) {
- EchoBindingEncryptionPolicy policy = new EchoBindingEncryptionPolicy();
- policy.setEncryptionStrategyClassName(reader.getAttributeValue(null, "strategy"));
- return (T)policy;
- }
- return null;
- }
-
- public void write(T arg0, XMLStreamWriter arg1) throws ContributionWriteException, XMLStreamException {
- }
-
- public void resolve(T policy, ModelResolver resolver) throws ContributionResolveException {
- if (policy instanceof EchoBindingEncryptionPolicy) {
- EchoBindingEncryptionPolicy ePolicy = (EchoBindingEncryptionPolicy)policy;
-
- ClassReference classReference = new ClassReference(ePolicy.getEncryptionStrategyClassName());
- classReference = resolver.resolveModel(ClassReference.class, classReference);
- Class javaClass = classReference != null ? classReference.getJavaClass() : null;
- if (javaClass == null) {
- //throw new ContributionResolveException(new ClassNotFoundException(ePolicy.getEncryptionStrategyClass()));
- }
- //ePolicy.setStrategyClass(javaClass);
- //FIXME: need to resolve this thro resolver
- try {
- ePolicy.setStrategyClass((Class<? extends EncryptionStrategy>)Class.forName(ePolicy
- .getEncryptionStrategyClassName()));
- } catch (Exception e) {
- throw new ContributionResolveException(e);
- }
- ePolicy.setStrategyClass(ePolicy.getStrategyClass());
- ePolicy.setUnresolved(false);
- }
- }
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java
deleted file mode 100644
index deda8d9744..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.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 echo.provider.policy;
-
-import org.apache.tuscany.sca.policy.Policy;
-import org.apache.tuscany.sca.policy.PolicySet;
-
-/**
- * Sample policy handler
- */
-public class EncryptionPolicyHandler implements PolicyHandler {
-
- public void applyPolicy(Object msg, PolicySet policySet) throws Exception {
- for ( Object aPolicy : policySet.getPolicies() ) {
- if ( aPolicy instanceof EchoBindingEncryptionPolicy ) {
- encrypt(msg, (EchoBindingEncryptionPolicy)aPolicy);
- }
- }
- }
-
- private void encrypt(Object msg, EchoBindingEncryptionPolicy policy) throws Exception {
- if ( !policy.isUnresolved() && msg instanceof Object[] ) {
- EncryptionStrategy strategy = policy.getStrategyClass().newInstance();
- Object[] msgArgs = (Object[])msg;
- for ( int count = 0 ; count < msgArgs.length ; ++count ) {
- msgArgs[count] = strategy.encryptMessage(msgArgs[count]);
- }
- }
-
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java
deleted file mode 100644
index ffadfc7fff..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.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 echo.provider.policy;
-
-/**
-
- */
-public interface EncryptionStrategy {
- Object encryptMessage(Object msg);
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java
deleted file mode 100644
index 6fa5f26977..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.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 echo.provider.policy;
-
-import org.apache.tuscany.sca.policy.PolicySet;
-
-/**
- * Sample Policy Handler Interface
- *
- */
-public interface PolicyHandler {
- void applyPolicy(Object msg, PolicySet policySet) throws Exception;
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java
deleted file mode 100644
index cf55b36fc2..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.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 echo.provider.policy;
-
-/**
- */
-public class ReverseEncryptionStrategy implements EncryptionStrategy {
-
- public Object encryptMessage(Object msg) {
- if ( msg instanceof String ) {
- StringBuffer sb = new StringBuffer((String)msg);
- msg = sb.reverse().toString();
- }
- return msg;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java
deleted file mode 100644
index ac610cfb51..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package echo.provider.policy;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.policy.Policy;
-
-/**
-
- */
-public class WSPolicy implements Policy {
- private boolean unresolved = true;
-
- public QName getSchemaName() {
- return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment");
- }
-
- public boolean isUnresolved() {
- return unresolved;
- }
-
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java
deleted file mode 100644
index fcb250b444..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.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 echo.provider.policy;
-
-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.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;
-
-public class WSPolicyProcessor implements StAXArtifactProcessor<WSPolicy> {
-
- public QName getArtifactType() {
- return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment");
- }
-
- public WSPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- //FIXME Implement this method
- return new WSPolicy();
- }
-
- public void write(WSPolicy wsPolicy, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
- //FIXME Implement this method
- }
-
- public Class<WSPolicy> getModelType() {
- return WSPolicy.class;
- }
-
- public void resolve(WSPolicy wsPolicy, ModelResolver modelResolver) throws ContributionResolveException {
-
- }
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java
deleted file mode 100644
index 8ea2395d04..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java
+++ /dev/null
@@ -1,78 +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 echo.server;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A sample Echo server, showing how to integrate service bindings.
- */
-public class EchoServer {
-
- public static EchoServer server;
-
- private Map<String, EchoServiceListener> services = new HashMap<String, EchoServiceListener>();
-
- public static void start() {
- }
-
- public static void stop() {
- }
-
- public static EchoServer getServer() {
- if (server == null)
- server = new EchoServer();
- return server;
- }
-
- /**
- * Register a service under the given name.
- *
- * @param service
- * @param name
- */
- public void register(String uri, EchoServiceListener service) {
- if (services.isEmpty()) {
- start();
- }
- services.put(uri, service);
- }
-
- public void unregister(String uri) {
- services.remove(uri);
- if (services.isEmpty()) {
- stop();
- }
- }
-
- /**
- * Dispatch an incoming interaction to the corresponding service.
- *
- * @param uri
- * @param input
- * @return
- */
- public String sendReceive(String uri, String input) throws InvocationTargetException {
- return services.get(uri).sendReceive(input);
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java b/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java
deleted file mode 100644
index 32336dd94f..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.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 echo.server;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.invocation.MessageFactory;
-
-public class EchoServiceListener {
- private Invoker invoker;
- private MessageFactory messageFactory;
-
- public EchoServiceListener(Invoker invoker, MessageFactory messageFactory) {
- super();
- this.invoker = invoker;
- this.messageFactory = messageFactory;
- }
-
- public String sendReceive(String input) throws InvocationTargetException {
-
- // Create a request message
- Message request = messageFactory.createMessage();
- request.setBody(new Object[] {input});
-
- // Dispatch and get the response
- Message response = invoker.invoke(request);
- Object body = response.getBody();
- if (response.isFault()) {
- throw new InvocationTargetException((Throwable)body);
- }
- return (String)body;
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory b/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory
deleted file mode 100644
index 55be293862..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory
+++ /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 binding model factory
-echo.impl.EchoBindingFactoryImpl
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
deleted file mode 100644
index 06d53250c1..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ /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.
-
-# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://echo#binding.echo,model=echo.EchoBinding,factory=echo.EchoBindingFactory
-echo.provider.policy.EchoBindingEncryptionPolicyProcessor;qname=http://sample/policy#echoBindingPolicy,model=echo.provider.policy.EchoBindingEncryptionPolicy
-org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://schemas.xmlsoap.org/ws/2004/09/policy#PolicyAttachment,model=echo.provider.policy.WSPolicy
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
deleted file mode 100644
index 4ad61f573d..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
+++ /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.
-
-# URI of the XML schema to be used for validation
-sample-binding-echo.xsd
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
deleted file mode 100644
index efa475ef92..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
+++ /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 binding provider extension
-echo.provider.EchoBindingProviderFactory;model=echo.EchoBinding
diff --git a/branches/sca-android/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd b/branches/sca-android/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd
deleted file mode 100644
index 9b64df4871..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://echo"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:e="http://echo"
- elementFormDefault="qualified">
-
- <import namespace="http://www.osoa.org/xmlns/sca/1.0"/>
-
- <element name="binding.echo" type="e:EchoBinding"/>
-
- <complexType name="EchoBinding">
- <complexContent>
- <extension base="sca:Binding">
- </extension>
- </complexContent>
- </complexType>
-</schema>
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/Echo.java b/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/Echo.java
deleted file mode 100644
index 1d5e973f33..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/Echo.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 echo;
-
-/**
- * Interface of our sample Echo service.
- *
- * @version $Rev$ $Date$
- */
-public interface Echo {
-
- String echo(String msg);
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java b/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java
deleted file mode 100644
index ba68dfe908..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.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 echo;
-
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Reference;
-
-
-/**
- * A simple client component that uses a reference with an Echo binding.
- *
- * @version $Rev$ $Date$
- */
-public class EchoComponentImpl implements Echo {
-
- private Echo echoReference;
-
- @Constructor
- public EchoComponentImpl(@Reference(name = "echoReference", required = true) Echo echoReference) {
- this.echoReference = echoReference;
- }
-
- public String echo(String msg) {
- String result = echoReference.echo(msg);
- System.out.println("Returned message: "+ result);
- return result;
- }
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java b/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java
deleted file mode 100644
index 7383077f18..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.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 echo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * @version $Rev$ $Date$
- */
-public class EchoReferenceTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private Echo service;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("EchoBinding.composite");
- service = scaDomain.getService(Echo.class, "EchoComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testEchoBinding() {
- String result = service.echo("foo");
- assertEquals(result, "oof");
- }
-
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java b/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java
deleted file mode 100644
index ab05516622..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.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 echo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import echo.server.EchoServer;
-
-/**
- * @version $Rev$ $Date$
- */
-public class EchoServiceTestCase extends TestCase {
-
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("EchoBinding.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testEchoBinding() throws Exception {
- String result = EchoServer.getServer().sendReceive("http://tempuri.org", "foo");
- assertEquals(result, "oof");
- }
-
-
-}
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/resources/EchoBinding.composite b/branches/sca-android/samples/binding-echo-extension/src/test/resources/EchoBinding.composite
deleted file mode 100644
index 176d67cc4b..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/resources/EchoBinding.composite
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample/echo"
- xmlns:se="http://sample/echo"
- xmlns:e="http://echo"
- xmlns:p="http://sample/policy"
- xmlns:t="http://test"
- name="EchoBinding">
-
- <service name="EchoService" promote="EchoComponent">
- <interface.java interface="echo.Echo"/>
- <e:binding.echo uri="http://tempuri.org" />
- </service>
-
- <component name="EchoComponent">
- <implementation.java class="echo.EchoComponentImpl"/>
- </component>
-
- <reference name="EchoReference" promote="EchoComponent/echoReference">
- <interface.java interface="echo.Echo"/>
- <e:binding.echo uri="http://tempuri.org" policySets="t:EncryptionPolicy" />
- </reference>
-
-</composite>
diff --git a/branches/sca-android/samples/binding-echo-extension/src/test/resources/definitions.xml b/branches/sca-android/samples/binding-echo-extension/src/test/resources/definitions.xml
deleted file mode 100644
index 1cb1d1c9ba..0000000000
--- a/branches/sca-android/samples/binding-echo-extension/src/test/resources/definitions.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<sca:definitions xmlns="http://test"
- targetNamespace="http://test"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:e="http://echo"
- xmlns:p="http://sample/policy">
- <!-- POLICY SETS -->
- <sca:policySet name="EncryptionPolicy"
- provides="confidentiality"
- appliesTo="e:binding.echo">
- <p:echoBindingPolicy name="Encryption" strategy="echo.provider.policy.ReverseEncryptionStrategy" />
- </sca:policySet>
-
- <sca:intent name="confidentiality"
- constrains="sca:binding">
- <description>
- Communitcation thro this binding must prevent
- unauthorized users from reading the messages.
- </description>
- </sca:intent>
-</sca:definitions> \ No newline at end of file
diff --git a/branches/sca-android/samples/binding-echo/README b/branches/sca-android/samples/binding-echo/README
deleted file mode 100644
index 2772460cc6..0000000000
--- a/branches/sca-android/samples/binding-echo/README
+++ /dev/null
@@ -1,104 +0,0 @@
-Binding Echo Sample Application
-===============================
-This sample demonstrates how to use the new binding extension
-binding-echo-extension.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens, open a command prompt,
-navigate to this sample directory, and do
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;..\binding-echo-extension\target\sample-binding-echo-extension.jar;target\sample-binding-echo.jar echo.EchoBindingClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:../binding-echo-extension/target/sample-binding-echo-extension.jar:target/sample-binding-echo.jar echo.EchoBindingClient
-
-This looks like a long command. The three things we add to the classpath are
-
-tuscany-sca-manifest.jar - all of the standard Tuscany SCA runtime and
- extension classes
-sample-binding-echo-extension.jar - the new echo binding extension implementation
-sample-binding-echo - the application that uses the echo binding
-
-Note: this sample currently is not working on Linux
-
-Sample Overview
----------------
-This sample contains an application (client and server code) that uses
-an SCA binding that simply echoes back any messages that are sent to it.
-
-binding-echo/
- src/
- main/
- java/
- echo/
- Echo.java - interface definition for the sample
- reference and service
- EchoComponentImpl.java - sample component implementation with
- echo binding reference
- EchoBindingClient.java - sample client
- resources/
- EchoBinding.composite - the SCA assembly for this sample
- test/
- java/
- echo
- EchoBindingTestCase.java - sample JUnit test case for the sample
- client
- binding-echo.png - pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows.
-
-cd binding-echo
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] Passing thro invoker...
- [java] Returned message: foo
- [java] Echo reference = foo
- [java] Passing thro invoker...
- [java] Returned message: bar
- [java] Echo service = bar
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and
-run using Maven as follows.
-
-cd binding-echo
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running echo.EchoBindingTestCase
-Passing thro invoker...
-Returned message: foo
-Passing thro invoker...
-Returned message: bar
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.811 sec
-
-Results :
-
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/binding-echo/binding-echo.png b/branches/sca-android/samples/binding-echo/binding-echo.png
deleted file mode 100644
index a38d985363..0000000000
--- a/branches/sca-android/samples/binding-echo/binding-echo.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/binding-echo/binding-echo.svg b/branches/sca-android/samples/binding-echo/binding-echo.svg
deleted file mode 100644
index 5b5051bef5..0000000000
--- a/branches/sca-android/samples/binding-echo/binding-echo.svg
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\binding-echo"
- sodipodi:docname="binding-echo.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\binding-echo\binding-echo.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="528.85714"
- inkscape:cy="406.01174"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1142"
- inkscape:window-height="722"
- inkscape:window-x="58"
- inkscape:window-y="135" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1.038749,0,0,1.009461,-29.25616,-1.807024)">
- <rect
- rx="8.7034655"
- ry="12.692303"
- y="192.00233"
- x="375.89822"
- height="299.99988"
- width="281.85843"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.95312572;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"
- transform="translate(104.5213,-10.61387)"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">EchoBinding</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 397.85714,346.95163 L 440,346.95163"
- id="path1896"
- transform="matrix(0.962696,0,0,0.990628,28.1648,1.790088)" />
- </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="450.63062"
- y="302.8819"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(183.0398,96.94336)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">EchoComponent</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 433.4801,334.72889 L 466.81514,334.72889 L 472.87605,347.86087 L 465.80499,359.98271 L 433.4801,359.98271 L 441.05625,347.86087 L 433.4801,334.72889 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 546.73254,332.89061 L 580.06758,332.89061 L 586.12849,346.02259 L 579.05743,358.14443 L 546.73254,358.14443 L 554.30869,346.02259 L 546.73254,332.89061 z "
- id="path3019" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 328.15933,319.32471 L 387.4834,319.32471 L 398.26959,346.57097 L 385.68571,371.72138 L 328.15933,371.72138 L 341.64208,346.57097 L 328.15933,319.32471 z "
- id="path1883" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 610.30199,319.1819 L 674.46121,319.1819 L 686.12651,346.05674 L 672.517,370.8643 L 610.30199,370.8643 L 624.88364,346.05674 L 610.30199,319.1819 z "
- id="path1885" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1887"
- transform="translate(62.97619,122.4038)"><flowRegion
- id="flowRegion1889"><rect
- id="rect1891"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1893"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:12;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%">Echo</flowPara><flowPara
- id="flowPara1895"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:12;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%">Serivce</flowPara></flowRoot> <text
- xml:space="preserve"
- style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
- x="625.14288"
- y="343.23737"
- id="text1897"
- sodipodi:linespacing="100%"><tspan
- sodipodi:role="line"
- id="tspan1899"
- x="625.14288"
- y="343.23737"
- style="font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:12;text-anchor:start;text-align:start;writing-mode:lr;line-height:100%">Echo</tspan><tspan
- sodipodi:role="line"
- x="625.14288"
- y="355.23737"
- id="tspan1901"
- style="font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:12;text-anchor:start;text-align:start;writing-mode:lr;line-height:100%">Reference</tspan></text>
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 585.71429,345.52305 C 624.28571,345.52305 624.28571,345.52305 624.28571,345.52305"
- id="path1898" />
- </g>
-</svg>
diff --git a/branches/sca-android/samples/binding-echo/build.xml b/branches/sca-android/samples/binding-echo/build.xml
deleted file mode 100644
index 7689ef3a54..0000000000
--- a/branches/sca-android/samples/binding-echo/build.xml
+++ /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.
--->
-<project name="binding-echo" default="compile">
- <property name="test.class" value="echo.EchoBindingClient" />
- <property name="test.jar" value="sample-binding-echo.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement location="target/${test.jar}"/>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/binding-echo/pom.xml b/branches/sca-android/samples/binding-echo/pom.xml
deleted file mode 100644
index 9c14b5d4c3..0000000000
--- a/branches/sca-android/samples/binding-echo/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-binding-echo</artifactId>
- <name>Apache Tuscany SCA Echo Binding Sample Application</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-binding-echo-extension</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/binding-echo/src/main/java/echo/Echo.java b/branches/sca-android/samples/binding-echo/src/main/java/echo/Echo.java
deleted file mode 100644
index 1d5e973f33..0000000000
--- a/branches/sca-android/samples/binding-echo/src/main/java/echo/Echo.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 echo;
-
-/**
- * Interface of our sample Echo service.
- *
- * @version $Rev$ $Date$
- */
-public interface Echo {
-
- String echo(String msg);
-}
diff --git a/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoBindingClient.java b/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoBindingClient.java
deleted file mode 100644
index 21bdff4011..0000000000
--- a/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoBindingClient.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 echo;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import echo.server.EchoServer;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- * @version $Rev$ $Date$
- */
-public class EchoBindingClient {
-
- public static void main(String[] args) throws Exception {
-
- SCADomain scaDomain = SCADomain.newInstance("EchoBinding.composite");
-
- // Call the echo service component which will, in turn, call a reference
- // with an echo binding. The echo binding will echo the given string.
- Echo service = scaDomain.getService(Echo.class, "EchoComponent");
- String echoString = service.echo("foo");
- System.out.println("Echo reference = " + echoString );
-
- // Call the echo server. This will dispatch the call to a service with an
- // echo binding. The echo binding will pass the call to the echo component.
- echoString = EchoServer.getServer().sendReceive("http://tempuri.org", "bar");
- System.out.println("Echo service = " + echoString );
-
- scaDomain.close();
-
- }
-
-}
diff --git a/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java b/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java
deleted file mode 100644
index ba68dfe908..0000000000
--- a/branches/sca-android/samples/binding-echo/src/main/java/echo/EchoComponentImpl.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 echo;
-
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Reference;
-
-
-/**
- * A simple client component that uses a reference with an Echo binding.
- *
- * @version $Rev$ $Date$
- */
-public class EchoComponentImpl implements Echo {
-
- private Echo echoReference;
-
- @Constructor
- public EchoComponentImpl(@Reference(name = "echoReference", required = true) Echo echoReference) {
- this.echoReference = echoReference;
- }
-
- public String echo(String msg) {
- String result = echoReference.echo(msg);
- System.out.println("Returned message: "+ result);
- return result;
- }
-}
diff --git a/branches/sca-android/samples/binding-echo/src/main/resources/EchoBinding.composite b/branches/sca-android/samples/binding-echo/src/main/resources/EchoBinding.composite
deleted file mode 100644
index 94612fb325..0000000000
--- a/branches/sca-android/samples/binding-echo/src/main/resources/EchoBinding.composite
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample/echo"
- xmlns:se="http://sample/echo"
- xmlns:e="http://echo"
- name="EchoBinding">
-
- <service name="EchoService" promote="EchoComponent">
- <interface.java interface="echo.Echo"/>
- <e:binding.echo uri="http://tempuri.org" />
- </service>
-
- <component name="EchoComponent">
- <implementation.java class="echo.EchoComponentImpl"/>
- </component>
-
- <reference name="EchoReference" promote="EchoComponent/echoReference">
- <interface.java interface="echo.Echo"/>
- <e:binding.echo uri="http://tempuri.org" />
- </reference>
-
-</composite>
diff --git a/branches/sca-android/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java b/branches/sca-android/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java
deleted file mode 100644
index 1a597fc80f..0000000000
--- a/branches/sca-android/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package echo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import echo.Echo;
-import echo.server.EchoServer;
-
-public class EchoBindingTestCase extends TestCase {
-
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("EchoBinding.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testReference() throws Exception {
- // Call the echo service component which will, in turn, call a reference
- // with an echo binding. The echo binding will echo the given string.
- Echo service = scaDomain.getService(Echo.class, "EchoComponent");
- String echoString = service.echo("foo");
- assertEquals(echoString, "foo");
- }
-
- public void testService() throws Exception {
- // Call the echo server. This will dispatch the call to a service with an
- // echo binding. The echo binding will pass the call to the echo component.
- String echoString = EchoServer.getServer().sendReceive("http://tempuri.org", "bar");
- assertEquals(echoString, "bar");
- }
-}
diff --git a/branches/sca-android/samples/calculator-lean/README b/branches/sca-android/samples/calculator-lean/README
deleted file mode 100644
index a8aff232c6..0000000000
--- a/branches/sca-android/samples/calculator-lean/README
+++ /dev/null
@@ -1,87 +0,0 @@
-Calculator Sample
-=================
-This sample implements a simple calculator using SCA components.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-java -jar <tuscany-install>/modules/tuscany-node-launcher.jar Calculator.composite target/sample-calculator-lean.jar
-
-Sample Overview
----------------
-The sample provides a single calculator service with a default SCA (java)
-binding. The CalculatorClient exercises this interface by calling add,
-subtract, multiply and divide operations. This results in messages passing to
-the appropriate components in the composite across the local wires.
-
-calculator/
- src/
- main/
- java/
- calculator/
- CalculatorService.java - the first component, calls +-/* as
- appropriate
- CalculatorServiceImpl.java
- AddService.java - adds two numbers
- AddServiceImpl.java
- SubtractService.java - subtracts one number from another
- SubtractServiceImpl.java
- MultiplyService.java - multiplies two numbers
- MultiplyServiceImpl.java
- DivideService.java - divides one number by another
- DivideServiceImpl.java
- CalculatorClient.java - a client component that calls the
- Calculator services
- resources/
- Calculator.composite - the SCA assembly for this sample
- test/
- java/
- calculator/
- CalculatorTestCase.java - JUnit test case
- calculator.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd calculator
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] 3 + 2=5.0
- [java] 3 - 2=1.0
- [java] 3 * 2=6.0
- [java] 3 / 2=1.5
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd calculator
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running calculator.CalculatorTestCase
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/calculator-lean/calculator.png b/branches/sca-android/samples/calculator-lean/calculator.png
deleted file mode 100644
index 995a57b1fd..0000000000
--- a/branches/sca-android/samples/calculator-lean/calculator.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/calculator-lean/calculator.svg b/branches/sca-android/samples/calculator-lean/calculator.svg
deleted file mode 100644
index 0615925c50..0000000000
--- a/branches/sca-android/samples/calculator-lean/calculator.svg
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator"
- sodipodi:docname="calculator.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator\calculator.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="471.80491"
- inkscape:cy="378.84265"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="59"
- inkscape:window-y="79" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1,0,0,1.144214,0,-27.53557)">
- <rect
- rx="15.307091"
- ry="12.692303"
- y="192.00233"
- x="258.31146"
- height="299.99988"
- width="495.71429"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">Calculator</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="191.57716"
- x="339.91632"
- y="262.1673"
- rx="6.9961648"
- ry="15.892869" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(79.61125,62.65764)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">Calculator</flowPara><flowPara
- id="flowPara1895">Service</flowPara><flowPara
- id="flowPara1897">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z "
- id="path3019" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z "
- id="path1883" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1885"
- transform="translate(-46.16225,128.7269)"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion
- id="flowRegion1887"><rect
- id="rect1889"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara
- id="flowPara1891">Calculator</flowPara><flowPara
- id="flowPara1893">Service</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1899"
- width="115.66247"
- height="70.148659"
- x="594.75488"
- y="209.73451"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1901"
- transform="translate(334.4498,10.22481)"><flowRegion
- id="flowRegion1903"><rect
- id="rect1905"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1907">Add</flowPara><flowPara
- id="flowPara1909">Service</flowPara><flowPara
- id="flowPara1911">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z "
- id="path1913" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1917"
- width="115.66247"
- height="70.148659"
- x="594.06543"
- y="292.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1919"
- transform="translate(333.7604,93.08188)"><flowRegion
- id="flowRegion1921"><rect
- id="rect1923"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1925">Subtract</flowPara><flowPara
- id="flowPara1927">Service</flowPara><flowPara
- id="flowPara1929">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z "
- id="path1931" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1933"
- width="115.66247"
- height="70.148659"
- x="594.77979"
- y="371.87729"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1935"
- transform="translate(334.4747,172.3676)"><flowRegion
- id="flowRegion1937"><rect
- id="rect1939"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1941">Multiply</flowPara><flowPara
- id="flowPara1943">Service</flowPara><flowPara
- id="flowPara1945">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z "
- id="path1947" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1949"
- width="115.66247"
- height="70.148659"
- x="596.20831"
- y="452.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1951"
- transform="translate(335.9032,253.0819)"><flowRegion
- id="flowRegion1953"><rect
- id="rect1955"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1957">Divide</flowPara><flowPara
- id="flowPara1959">Service</flowPara><flowPara
- id="flowPara1961">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z "
- id="path1963" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1965"
- transform="translate(161.0221,114.967)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1967"><rect
- id="rect1969"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1973">add</flowPara><flowPara
- id="flowPara1977">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z "
- id="path1979" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1981"
- transform="translate(160.6632,150.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1983"><rect
- id="rect1985"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1987">subtract</flowPara><flowPara
- id="flowPara1989">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z "
- id="path1991" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1993"
- transform="translate(161.3775,184.2583)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1995"><rect
- id="rect1997"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1999">multiply</flowPara><flowPara
- id="flowPara2001">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z "
- id="path2003" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2005"
- transform="translate(159.9489,215.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2007"><rect
- id="rect2009"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara2011">divide</flowPara><flowPara
- id="flowPara2013">Service</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305"
- id="path2015" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877"
- id="path2017" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591"
- id="path2019" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734"
- id="path2021" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 292.85714,355.52305 L 330,354.80877"
- id="path2023" />
- </g>
-</svg>
diff --git a/branches/sca-android/samples/calculator-lean/pom.xml b/branches/sca-android/samples/calculator-lean/pom.xml
deleted file mode 100644
index 10f4ae110f..0000000000
--- a/branches/sca-android/samples/calculator-lean/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-calculator-lean</artifactId>
- <name>Apache Tuscany SCA Calculator Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddService.java
deleted file mode 100644
index 188451ebac..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The Add service interface
- */
-public interface AddService {
-
- double add(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.java
deleted file mode 100644
index 7ca8fb04b5..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/AddServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Add service
- */
-public class AddServiceImpl implements AddService {
-
- public double add(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
- return n1 + n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorClient.java
deleted file mode 100644
index 2bb8f96dcf..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorClient.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 calculator;
-
-import org.osoa.sca.annotations.EagerInit;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- */
-@Scope("COMPOSITE") @EagerInit
-public class CalculatorClient {
-
- private CalculatorService calculatorService;
-
- @Reference
- public void setCalculatorService(CalculatorService calculatorService) {
- this.calculatorService = calculatorService;
- }
-
- @Init
- public void calculate() {
-
- // Calculate
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorService.java
deleted file mode 100644
index 031fa8b912..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorService.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 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-android/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.java
deleted file mode 100644
index 3d861f2018..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/CalculatorServiceImpl.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 calculator;
-
-import org.osoa.sca.annotations.Reference;
-
-
-/**
- * An implementation of the Calculator service.
- */
-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) {
- return multiplyService.multiply(n1, n2);
- }
-
- public double divide(double n1, double n2) {
- return divideService.divide(n1, n2);
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideService.java
deleted file mode 100644
index 30d248208b..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The divide service interface
- */
-public interface DivideService {
-
- double divide(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.java
deleted file mode 100644
index 1323edf55a..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/DivideServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Divide service.
- */
-public class DivideServiceImpl implements DivideService {
-
- public double divide(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2);
- return n1 / n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyService.java
deleted file mode 100644
index 5290605938..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface MultiplyService {
-
- double multiply(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.java
deleted file mode 100644
index 91b803bc9e..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/MultiplyServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Multiply service.
- */
-public class MultiplyServiceImpl implements MultiplyService {
-
- public double multiply(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2);
- return n1 * n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractService.java
deleted file mode 100644
index bf0d1882b6..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface SubtractService {
-
- double subtract(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.java
deleted file mode 100644
index 58cc4a3547..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/java/calculator/SubtractServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the subtract service.
- */
-public class SubtractServiceImpl implements SubtractService {
-
- public double subtract(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2);
- return n1 - n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator-lean/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-lean/src/main/resources/Calculator.composite
deleted file mode 100644
index 913081b9be..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/resources/Calculator.composite
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="Calculator">
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent" />
- <reference name="subtractService" target="SubtractServiceComponent" />
- <reference name="multiplyService" target="MultiplyServiceComponent" />
- <reference name="divideService" target="DivideServiceComponent" />
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
- <component name="CalculatorClient">
- <implementation.java class="calculator.CalculatorClient"/>
- <reference name="calculatorService" target="CalculatorServiceComponent" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/calculator-lean/src/main/resources/CalculatorTest.composite b/branches/sca-android/samples/calculator-lean/src/main/resources/CalculatorTest.composite
deleted file mode 100644
index 906e2a3918..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/main/resources/CalculatorTest.composite
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="CalculatorTest">
-
- <include name="sample:Calculator"/>
-
- <component name="CalculatorTestCase">
- <implementation.java class="calculator.CalculatorTestCase"/>
- <reference name="calculatorService" target="CalculatorServiceComponent" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java
deleted file mode 100644
index a007a28f21..0000000000
--- a/branches/sca-android/samples/calculator-lean/src/test/java/calculator/CalculatorTestCase.java
+++ /dev/null
@@ -1,62 +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 junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.osoa.sca.annotations.EagerInit;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-
-/**
- * This shows how to test the Calculator composition.
- */
-@Scope("COMPOSITE") @EagerInit
-public class CalculatorTestCase extends TestCase {
-
- private static CalculatorService calculatorService;
- private SCANode node;
-
- @Reference
- public void setCalculatorService(CalculatorService calculatorService) {
- CalculatorTestCase.calculatorService = calculatorService;
- }
-
- @Override
- protected void setUp() throws Exception {
- SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANodeFromClassLoader("CalculatorTest.composite", getClass().getClassLoader());
- node.start();
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- }
-
- public void testCalculator() throws Exception {
- // Calculate
- assertEquals(calculatorService.add(3, 2), 5.0);
- assertEquals(calculatorService.subtract(3, 2), 1.0);
- assertEquals(calculatorService.multiply(3, 2), 6.0);
- assertEquals(calculatorService.divide(3, 2), 1.5);
- }
-}
diff --git a/branches/sca-android/samples/calculator/README b/branches/sca-android/samples/calculator/README
deleted file mode 100644
index ceb532faed..0000000000
--- a/branches/sca-android/samples/calculator/README
+++ /dev/null
@@ -1,97 +0,0 @@
-Calculator Sample
-=================
-This sample implements a simple calculator using SCA components.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient
-
-Sample Overview
----------------
-The sample provides a single calculator service with a default SCA (java)
-binding. The CalculatorClient exercises this interface by calling add,
-subtract, multiply and divide operations. This results in messages passing to
-the appropriate components in the composite across the local wires.
-
-calculator/
- src/
- main/
- java/
- calculator/
- CalculatorService.java - the first component, calls +-/* as
- appropriate
- CalculatorServiceImpl.java
- AddService.java - adds two numbers
- AddServiceImpl.java
- SubtractService.java - subtracts one number from another
- SubtractServiceImpl.java
- MultiplyService.java - multiplies two numbers
- MultiplyServiceImpl.java
- DivideService.java - divides one number by another
- DivideServiceImpl.java
- CalculatorClient.java - starts the SCA Runtime and
- deploys the Calculator.composite.
- It then calls the deployed Calculator
- Components services
- resources/
- Calculator.composite - the SCA assembly for this sample
- test/
- java/
- calculator/
- CalculatorTestCase.java - JUnit test case
- calculator.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd calculator
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] 3 + 2=5.0
- [java] 3 - 2=1.0
- [java] 3 * 2=6.0
- [java] 3 / 2=1.5
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd calculator
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running calculator.CalculatorTestCase
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/calculator/build.xml b/branches/sca-android/samples/calculator/build.xml
deleted file mode 100644
index c4b755ef94..0000000000
--- a/branches/sca-android/samples/calculator/build.xml
+++ /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.
--->
-<project name="calculator" default="compile">
- <property name="test.class" value="calculator.CalculatorClient" />
- <property name="test.jar" value="sample-calculator.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/calculator/calculator.png b/branches/sca-android/samples/calculator/calculator.png
deleted file mode 100644
index 995a57b1fd..0000000000
--- a/branches/sca-android/samples/calculator/calculator.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/calculator/calculator.svg b/branches/sca-android/samples/calculator/calculator.svg
deleted file mode 100644
index 0615925c50..0000000000
--- a/branches/sca-android/samples/calculator/calculator.svg
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator"
- sodipodi:docname="calculator.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\calculator\calculator.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="471.80491"
- inkscape:cy="378.84265"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="59"
- inkscape:window-y="79" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1,0,0,1.144214,0,-27.53557)">
- <rect
- rx="15.307091"
- ry="12.692303"
- y="192.00233"
- x="258.31146"
- height="299.99988"
- width="495.71429"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.86971939;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">Calculator</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.9999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="191.57716"
- x="339.91632"
- y="262.1673"
- rx="6.9961648"
- ry="15.892869" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(79.61125,62.65764)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">Calculator</flowPara><flowPara
- id="flowPara1895">Service</flowPara><flowPara
- id="flowPara1897">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.01809,321.46204 L 471.00147,321.46204 L 478.27117,334.59402 L 469.78986,346.71586 L 431.01809,346.71586 L 440.10523,334.59402 L 431.01809,321.46204 z "
- id="path3019" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 223.15923,328.61046 L 282.4833,328.61046 L 293.26948,355.48529 L 280.68561,380.29286 L 223.15923,380.29286 L 236.64198,355.48529 L 223.15923,328.61046 z "
- id="path1883" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1885"
- transform="translate(-46.16225,128.7269)"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%"><flowRegion
- id="flowRegion1887"><rect
- id="rect1889"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-family:Bitstream Vera Sans;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:11;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" /></flowRegion><flowPara
- id="flowPara1891">Calculator</flowPara><flowPara
- id="flowPara1893">Service</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1899"
- width="115.66247"
- height="70.148659"
- x="594.75488"
- y="209.73451"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1901"
- transform="translate(334.4498,10.22481)"><flowRegion
- id="flowRegion1903"><rect
- id="rect1905"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1907">Add</flowPara><flowPara
- id="flowPara1909">Service</flowPara><flowPara
- id="flowPara1911">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.31867,232.29606 L 606.65371,232.29606 L 612.71462,245.42804 L 605.64356,257.54988 L 573.31867,257.54988 L 580.89482,245.42804 L 573.31867,232.29606 z "
- id="path1913" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1917"
- width="115.66247"
- height="70.148659"
- x="594.06543"
- y="292.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1919"
- transform="translate(333.7604,93.08188)"><flowRegion
- id="flowRegion1921"><rect
- id="rect1923"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1925">Subtract</flowPara><flowPara
- id="flowPara1927">Service</flowPara><flowPara
- id="flowPara1929">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 572.62924,315.15313 L 605.96428,315.15313 L 612.02519,328.28511 L 604.95413,340.40695 L 572.62924,340.40695 L 580.20539,328.28511 L 572.62924,315.15313 z "
- id="path1931" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1933"
- width="115.66247"
- height="70.148659"
- x="594.77979"
- y="371.87729"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1935"
- transform="translate(334.4747,172.3676)"><flowRegion
- id="flowRegion1937"><rect
- id="rect1939"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1941">Multiply</flowPara><flowPara
- id="flowPara1943">Service</flowPara><flowPara
- id="flowPara1945">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 573.34352,394.43884 L 606.67856,394.43884 L 612.73947,407.57082 L 605.66841,419.69266 L 573.34352,419.69266 L 580.91967,407.57082 L 573.34352,394.43884 z "
- id="path1947" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1949"
- width="115.66247"
- height="70.148659"
- x="596.20831"
- y="452.59158"
- rx="6.9961648"
- ry="5.8193965" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1951"
- transform="translate(335.9032,253.0819)"><flowRegion
- id="flowRegion1953"><rect
- id="rect1955"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1957">Divide</flowPara><flowPara
- id="flowPara1959">Service</flowPara><flowPara
- id="flowPara1961">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 574.77209,475.15313 L 608.10713,475.15313 L 614.16804,488.28511 L 607.09698,500.40695 L 574.77209,500.40695 L 582.34824,488.28511 L 574.77209,475.15313 z "
- id="path1963" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1965"
- transform="translate(161.0221,114.967)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1967"><rect
- id="rect1969"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1973">add</flowPara><flowPara
- id="flowPara1977">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 430.65917,357.18186 L 470.64255,357.18186 L 477.91225,370.31384 L 469.43094,382.43568 L 430.65917,382.43568 L 439.74631,370.31384 L 430.65917,357.18186 z "
- id="path1979" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1981"
- transform="translate(160.6632,150.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1983"><rect
- id="rect1985"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1987">subtract</flowPara><flowPara
- id="flowPara1989">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 431.37346,390.75329 L 471.35684,390.75329 L 478.62654,403.88527 L 470.14523,416.00711 L 431.37346,416.00711 L 440.4606,403.88527 L 431.37346,390.75329 z "
- id="path1991" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1993"
- transform="translate(161.3775,184.2583)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1995"><rect
- id="rect1997"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1999">multiply</flowPara><flowPara
- id="flowPara2001">Service</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 429.94489,422.18186 L 469.92827,422.18186 L 477.19797,435.31384 L 468.71666,447.43568 L 429.94489,447.43568 L 439.03203,435.31384 L 429.94489,422.18186 z "
- id="path2003" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2005"
- transform="translate(159.9489,215.6868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2007"><rect
- id="rect2009"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara2011">divide</flowPara><flowPara
- id="flowPara2013">Service</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,335.52305 L 511.42857,335.52305 L 510.71429,245.52305 L 579.28571,245.52305"
- id="path2015" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.85714,369.80877 L 528.57143,369.80877 L 528.57143,329.80877 L 580,329.80877"
- id="path2017" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 478.57143,402.66591 L 528.57143,401.95163 L 528.57143,408.3802 L 580,407.66591"
- id="path2019" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 475.71429,435.52305 L 509.28571,435.52305 L 510,486.95163 L 582.14286,486.23734"
- id="path2021" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 292.85714,355.52305 L 330,354.80877"
- id="path2023" />
- </g>
-</svg>
diff --git a/branches/sca-android/samples/calculator/pom.xml b/branches/sca-android/samples/calculator/pom.xml
deleted file mode 100644
index 4a2216c2e9..0000000000
--- a/branches/sca-android/samples/calculator/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-calculator</artifactId>
- <name>Apache Tuscany SCA Calculator Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-</project>
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator/src/main/java/calculator/AddService.java
deleted file mode 100644
index 188451ebac..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/AddService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The Add service interface
- */
-public interface AddService {
-
- double add(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator/src/main/java/calculator/AddServiceImpl.java
deleted file mode 100644
index 7ca8fb04b5..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/AddServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Add service
- */
-public class AddServiceImpl implements AddService {
-
- public double add(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
- return n1 + n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorClient.java
deleted file mode 100644
index 3b2966e96d..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorClient.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 calculator;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- */
-public class CalculatorClient {
- public static void main(String[] args) throws Exception {
-
- SCANodeFactory factory = SCANodeFactory.newInstance();
- SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
- node.start();
-
- CalculatorService calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
-
- // Calculate
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- node.stop();
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorService.java
deleted file mode 100644
index 031fa8b912..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorService.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 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-android/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java
deleted file mode 100644
index 3d861f2018..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.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 calculator;
-
-import org.osoa.sca.annotations.Reference;
-
-
-/**
- * An implementation of the Calculator service.
- */
-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) {
- return multiplyService.multiply(n1, n2);
- }
-
- public double divide(double n1, double n2) {
- return divideService.divide(n1, n2);
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator/src/main/java/calculator/DivideService.java
deleted file mode 100644
index 30d248208b..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/DivideService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The divide service interface
- */
-public interface DivideService {
-
- double divide(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator/src/main/java/calculator/DivideServiceImpl.java
deleted file mode 100644
index 1323edf55a..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/DivideServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Divide service.
- */
-public class DivideServiceImpl implements DivideService {
-
- public double divide(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2);
- return n1 / n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyService.java
deleted file mode 100644
index 5290605938..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface MultiplyService {
-
- double multiply(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java
deleted file mode 100644
index 91b803bc9e..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Multiply service.
- */
-public class MultiplyServiceImpl implements MultiplyService {
-
- public double multiply(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2);
- return n1 * n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractService.java
deleted file mode 100644
index bf0d1882b6..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface SubtractService {
-
- double subtract(double n1, double n2);
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java
deleted file mode 100644
index 58cc4a3547..0000000000
--- a/branches/sca-android/samples/calculator/src/main/java/calculator/SubtractServiceImpl.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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the subtract service.
- */
-public class SubtractServiceImpl implements SubtractService {
-
- public double subtract(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2);
- return n1 - n2;
- }
-
-}
diff --git a/branches/sca-android/samples/calculator/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator/src/main/resources/Calculator.composite
deleted file mode 100644
index 90872041b0..0000000000
--- a/branches/sca-android/samples/calculator/src/main/resources/Calculator.composite
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="Calculator">
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"/>
- <reference name="addService" target="AddServiceComponent" />
- <reference name="subtractService" target="SubtractServiceComponent" />
- <reference name="multiplyService" target="MultiplyServiceComponent" />
- <reference name="divideService" target="DivideServiceComponent" />
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl"/>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl"/>
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl"/>
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
deleted file mode 100644
index 1b7476534a..0000000000
--- a/branches/sca-android/samples/calculator/src/test/java/calculator/CalculatorTestCase.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 calculator;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CalculatorTestCase extends TestCase {
-
- private CalculatorService calculatorService;
- private SCANode node;
-
- @Override
- protected void setUp() throws Exception {
- SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANodeFromClassLoader("Calculator.composite", getClass().getClassLoader());
- node.start();
-
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- }
-
- public void testCalculator() throws Exception {
- // Calculate
- assertEquals(calculatorService.add(3, 2), 5.0);
- assertEquals(calculatorService.subtract(3, 2), 1.0);
- assertEquals(calculatorService.multiply(3, 2), 6.0);
- assertEquals(calculatorService.divide(3, 2), 1.5);
- }
-}
diff --git a/branches/sca-android/samples/databinding-echo/README b/branches/sca-android/samples/databinding-echo/README
deleted file mode 100644
index 67c1aa32d5..0000000000
--- a/branches/sca-android/samples/databinding-echo/README
+++ /dev/null
@@ -1,143 +0,0 @@
-DataBinding Echo Sample
-=======================
-
-This sample demonstrates how databindings are used to convert data formats as
-the data flows between components.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens, open a command prompt, navigate
-to this sample directory, and do
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;..\binding-echo-extension\target\sample-binding-echo-extension.jar;target\sample-databinding-echo.jar dbecho.EchoDataBindingClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:../binding-echo-extension/target/sample-binding-echo-extension.jar:target/sample-databinding-echo.jar dbecho.EchoDataBindingClient
-
-
-Sample Overview
----------------
-If reference and service interfaces are the same in all but the formats of
-data being passed to and returned from the operations of the interfaces,
-then SCA will try to apply appropriate transformations to the data formats
-to allow messages to pass.
-
-This sample shows this happening. ComponentA implements Interface1 which
-defines;
-
- String call(String msg)
- String call1(String msg)
-
-ComponentA defines a reference to ComponentB with Interface1. ComponentB
-however implements Interface2 which defines;
-
- Node call(Node msg);
- XMLStreamReader call1(XMLStreamReader msg);
-
-You can see from the test output below that SCA converts the call() msg from a
-String to a DOM object (org.apache.xerces.dom.DeferredDocumentImpl). It
-converts the call1() msg from a String to a XML stream reader
-(com.ctc.wstx.sr.ValidatingStreamReader).
-
-databinding-echo/
- src/
- main/
- java/
- dbecho/
- ComponentAImpl.java - component implementation
- ComponentBImpl.java - component implementation
- Echo.java - service interface with data binding
- EchoDataBindingClient.java - sample client code
- Interface1.java - service interface with data binding
- Interface2.java - service interface with data bindings
- resources/
- META-INF/
- services/
- org.apache.tuscany.sca.core.ModuleActivator - specifies the module activation class to call
- EchoDataBinding.composite - composite definition
- wsdl/
- echo.wsdl - WSDL deinitions
- test/
- java/
- dbecho/
- EchoDataBindingTestCase.java - junit test case
- databinding-echo.png - pictorial representation of the sample .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-TODO - Needs more description of what else is going on in this test
- properties, wsdl?
-
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows.
-
-cd databinding-echo
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] [Property] prefix: ABC
- [java] [Property] prefix1: ABC
- [java] [Property] bar: BAR
- [java] ComponentA --> Received message: <message><foo>123</foo></message> [java.lang.String]
- [java] ComponentB --> Received message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl]
- [java] ComponentB --> Returned message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl]
- [java] ComponentA --> Returned message: <?xml version="1.0" encoding="UTF-8"?><message><foo>123</foo></message> [java.lang.String]
- [java] [Property] prefix: ABC
- [java] [Property] prefix1: ABC
- [java] [Property] bar: BAR
- [java] ComponentA --> Received message: <message><foo>123</foo></message> [java.lang.String]
- [java] ComponentB --> Received message: com.ctc.wstx.sr.ValidatingStreamReader@4c444c44 [com.ctc.wstx.sr.ValidatingStreamReader]
- [java] ComponentB --> Returned message: com.ctc.wstx.sr.ValidatingStreamReader@4c444c44 [com.ctc.wstx.sr.ValidatingStreamReader]
- [java] ComponentA --> Returned message: <?xml version='1.0' encoding='UTF-8'?><message><foo>123</foo></message> [java.lang.String]
- [java] call response = <?xml version="1.0" encoding="UTF-8"?><message><foo>123</foo></message>
- [java] call1 response = <?xml version='1.0' encoding='UTF-8'?><message><foo>123</foo></message>
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd databinding-echo
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running dbecho.EchoDataBindingTestCase
-[Property] prefix: ABC
-[Property] prefix1: ABC
-[Property] bar: BAR
-ComponentA --> Received message: <message><foo>123</foo></message> [java.lang.String]
-ComponentB --> Received message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl]
-ComponentB --> Returned message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl]
-ComponentA --> Returned message: <?xml version="1.0" encoding="UTF-8"?><message><foo>123</foo></message> [java.lang.String]
-[Property] prefix: ABC
-[Property] prefix1: ABC
-[Property] bar: BAR
-ComponentA --> Received message: <message><foo>123</foo></message> [java.lang.String]
-ComponentB --> Received message: com.ctc.wstx.sr.ValidatingStreamReader@74e274e2 [com.ctc.wstx.sr.ValidatingStreamReader]
-ComponentB --> Returned message: com.ctc.wstx.sr.ValidatingStreamReader@74e274e2 [com.ctc.wstx.sr.ValidatingStreamReader]
-ComponentA --> Returned message: <?xml version='1.0' encoding='UTF-8'?><message><foo>123</foo></message> [java.lang.String]
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.653 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/databinding-echo/build.xml b/branches/sca-android/samples/databinding-echo/build.xml
deleted file mode 100644
index 7f2483f6fb..0000000000
--- a/branches/sca-android/samples/databinding-echo/build.xml
+++ /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.
--->
-<project name="databinding-echo" default="compile">
- <property name="test.class" value="dbecho.EchoDataBindingClient" />
- <property name="test.jar" value="sample-databinding-echo.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- <pathelement location="../binding-echo-extension/target/sample-binding-echo-extension.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/databinding-echo/databinding-echo.png b/branches/sca-android/samples/databinding-echo/databinding-echo.png
deleted file mode 100644
index afbbfff285..0000000000
--- a/branches/sca-android/samples/databinding-echo/databinding-echo.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/databinding-echo/databinding-echo.svg b/branches/sca-android/samples/databinding-echo/databinding-echo.svg
deleted file mode 100644
index 87964abf86..0000000000
--- a/branches/sca-android/samples/databinding-echo/databinding-echo.svg
+++ /dev/null
@@ -1,408 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\databinding-echo"
- sodipodi:docname="databinding-echo.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\databinding-echo\databinding-echo.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="651.92601"
- inkscape:cy="392.43347"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="129"
- inkscape:window-y="144" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="translate(-1.428571,-2.857143)">
- <rect
- rx="12.858844"
- ry="14.71703"
- y="192.00235"
- x="258.31155"
- height="347.85706"
- width="416.42877"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">EchoDataBinding</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1883"
- width="115.66247"
- height="85.862968"
- x="383.82632"
- y="385.59885"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1885"
- transform="translate(116.2356,179.6603)"><flowRegion
- id="flowRegion1887"><rect
- id="rect1889"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1891">ComponentB</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 362.67592,417.44582 L 408.70328,417.44582 L 417.07188,430.5778 L 407.30852,442.69964 L 362.67592,442.69964 L 373.13669,430.5778 L 362.67592,417.44582 z "
- id="path1895" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 479.92825,415.60754 L 513.26329,415.60754 L 519.3242,428.73952 L 512.25314,440.86136 L 479.92825,440.86136 L 487.5044,428.73952 L 479.92825,415.60754 z "
- id="path1897" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 530.71429,300.52305 C 542.23557,306.08282 554.6675,310.12484 560.71429,324.80877 C 566.71449,361.72815 311.41635,367.01996 323.57143,396.95162 C 328.25255,419.41336 352.58793,422.22083 371.42857,430.52305"
- id="path1985"
- sodipodi:nodetypes="cccc" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 636.0161,399.32486 L 697.75773,399.32486 L 708.98347,428.79969 L 695.88678,456.00726 L 636.0161,456.00726 L 650.0483,428.79969 L 636.0161,399.32486 z "
- id="path1987" />
- </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="385.63062"
- y="257.1676"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(120.1827,59.8005)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">ComponentA</flowPara></flowRoot> <rect
- style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3006"
- width="58.861061"
- height="43.565228"
- x="413.73505"
- y="225.79604"
- rx="29.430531"
- ry="0" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 368.48016,289.0146 L 412.69432,289.0146 L 420.73325,302.14658 L 411.3545,314.26842 L 368.48016,314.26842 L 378.52884,302.14658 L 368.48016,289.0146 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 477.44718,289.31918 L 522.26576,289.31918 L 530.41458,302.45116 L 520.90763,314.573 L 477.44718,314.573 L 487.63323,302.45116 L 477.44718,289.31918 z "
- id="path3019" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1929"
- transform="translate(137.8698,15.88564)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1931"><rect
- id="rect1933"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1939">prefix</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1946">prefix1</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1948">bar</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1950" /></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot1952"
- transform="translate(206.8091,83.74868)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1954"><rect
- id="rect1956"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1964">Interface1</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot1975"
- transform="translate(90.30101,207.3812)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1977"><rect
- id="rect1979"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1981">Interface2</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot1989"
- transform="translate(366.1555,195.5999)"><flowRegion
- id="flowRegion1991"><rect
- id="rect1993"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1995"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">Echo</flowPara><flowPara
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1997">Reference</flowPara><flowPara
- style="font-size:8;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1999">binding.echo</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 517.28571,425.66591 C 645.85714,424.23734 645.85714,424.23734 645.85714,424.23734"
- id="path2003" />
- <rect
- style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:0.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2005"
- width="73.166656"
- height="30.708084"
- x="563.42657"
- y="202.31184"
- rx="36.583328"
- ry="0" />
- <rect
- style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:0.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2007"
- width="73.166656"
- height="30.708084"
- x="563.40656"
- y="246.5976"
- rx="36.583328"
- ry="0" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2009"
- transform="translate(285.8806,-8.394223)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2011"><rect
- id="rect2013"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2021">messagePrefix</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot2023"
- transform="translate(285.1663,39.46291)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2025"><rect
- id="rect2027"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2035">complexProperty</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 447.85714,241.95163 C 563.57143,215.52305 563.57143,215.52305 563.57143,215.52305"
- id="path2055" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2061"
- transform="translate(33.15817,261.6669)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2063"><rect
- id="rect2065"
- width="217.85715"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2067">@DataBinding(&quot;org.w3c.dom.Node&quot;)</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2069">&amp;</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2071">@DataBinding(&quot;javax.xml.stream.XMLStreamReader&quot;)</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot2073"
- transform="translate(258.3449,71.60582)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2075"><rect
- id="rect2077"
- width="217.85715"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2079">@DataBinding(&quot;java.lang.String&quot;)</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2083" /></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0"
- d="M 523.57143,293.3802 C 541.42857,289.09448 540.71429,289.09448 540.71429,289.09448"
- id="path2087" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0"
- d="M 322.14286,471.95163 C 375,436.95163 375,436.95163 375,436.95163"
- id="path2976" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2978"
- transform="translate(275.4877,156.6059)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2980"><rect
- id="rect2982"
- width="286.42859"
- height="42.85714"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2988">&lt;db:databinding name=&quot;org.apache.axiom.om.OMElement&quot; /&gt;</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0"
- d="M 677.85714,397.66591 C 684.28571,376.95163 684.28571,376.95163 684.28571,376.95163"
- id="path2997" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3886"
- transform="translate(96.76088,84.52404)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- inkscape:transform-center-y="72.857143"
- inkscape:transform-center-x="90.714286"><flowRegion
- id="flowRegion3888"><rect
- id="rect3890"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara3892">Interface1</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 445.71429,250.52305 C 563.57143,262.66591 563.57143,262.66591 563.57143,262.66591"
- id="path1956" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1958"
- transform="translate(205.618,209.9526)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1960"><rect
- id="rect1962"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1965">Echo</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot1967"
- transform="translate(259.7734,259.463)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1969"><rect
- id="rect1971"
- width="286.42859"
- height="42.85714"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara1973">@DataBinding(&quot;org.w3c.dom.Node&quot;)</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0"
- d="M 540.71429,471.23734 C 510,433.3802 511.42857,434.80877 511.42857,434.80877"
- id="path1975" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2867"
- transform="translate(-47.64121,63.74863)"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion2869"><rect
- id="rect2871"
- width="217.85715"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2873">@DataBinding(&quot;java.lang.String&quot;)</flowPara><flowPara
- style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"
- id="flowPara2875" /></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0"
- d="M 337.14286,286.23734 C 372.85714,294.80877 372.85714,294.80877 372.85714,294.80877"
- id="path2877" />
- </g>
-</svg>
diff --git a/branches/sca-android/samples/databinding-echo/pom.xml b/branches/sca-android/samples/databinding-echo/pom.xml
deleted file mode 100644
index 3ef0bcfbf5..0000000000
--- a/branches/sca-android/samples/databinding-echo/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>sample-databinding-echo</artifactId>
- <name>Apache Tuscany SCA Echo Data Binding Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-databinding</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-binding-echo</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-wsdl-xml</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java
deleted file mode 100644
index 5679614164..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.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 dbecho;
-
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-
-/**
- * @version $Rev$ $Date$
- */
-public class ComponentAImpl implements Interface1 {
-
- private Interface1 componentBReference;
-
- @Constructor
- public ComponentAImpl(@Reference(name = "componentBReference", required = true)
- Interface1 componentBReference) {
- this.componentBReference = componentBReference;
- }
-
- public String call(String msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentA --> Received message: " + request);
- Object ret = componentBReference.call(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentA --> Returned message: " + response);
- return (String) ret;
- }
-
- public String call1(String msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentA --> Received message: " + request);
- Object ret = componentBReference.call1(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentA --> Returned message: " + response);
- return (String) ret;
- }
-
- @Property(name="prefix")
- public void setPrefix(String prefix) {
- System.out.println("[Property] prefix: " + prefix);
- }
-
- @Property(name="prefix1")
- public void setPrefix1(String prefix1) {
- System.out.println("[Property] prefix1: " + prefix1);
- }
-
- /**
- * @param bar the bar to set
- */
- @Property(name="bar")
- public void setBar(String bar) {
- System.out.println("[Property] bar: " + bar);
- }
-
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java
deleted file mode 100644
index ff8968837d..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package dbecho;
-
-import javax.xml.stream.XMLStreamReader;
-
-import org.osoa.sca.annotations.AllowsPassByReference;
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Reference;
-import org.w3c.dom.Node;
-
-/**
- * @version $Rev$ $Date$
- */
-@AllowsPassByReference
-public class ComponentBImpl implements Interface2 {
-
- private Echo echoReference;
-
- @Constructor
- public ComponentBImpl(@Reference(name = "echoReference", required = true)
- Echo echoReference) {
- this.echoReference = echoReference;
- }
-
- public Node call(Node msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentB --> Received message: " + request);
- Node ret = (Node) echoReference.echo(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentB --> Returned message: " + response);
- return ret;
- }
-
- public XMLStreamReader call1(XMLStreamReader msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentB --> Received message: " + request);
-// XMLStreamReader ret = (XMLStreamReader) echoReference.echo(msg);
- String response = request;
- System.out.println("ComponentB --> Returned message: " + response);
- return msg;
- }
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Echo.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Echo.java
deleted file mode 100644
index 25ecc90454..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Echo.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 dbecho;
-
-import org.apache.tuscany.sca.databinding.annotation.DataBinding;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * @version $Rev$ $Date$
- */
-
-@DataBinding("org.w3c.dom.Node")
-@Remotable
-public interface Echo {
- Object echo(Object msg);
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java
deleted file mode 100644
index 9ec3819899..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java
+++ /dev/null
@@ -1,45 +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 dbecho;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- * @version $Rev$ $Date$
- */
-public class EchoDataBindingClient {
- public static void main(String[] args) throws Exception {
-
- SCADomain scaDomain = SCADomain.newInstance("EchoDataBinding.composite");
-
- Interface1 componentA = scaDomain.getService(Interface1.class, "ComponentA");
- String response = componentA.call("<message><foo>123</foo></message>");
- String response1= componentA.call1("<message><foo>123</foo></message>");
-
-
- System.out.println("call response = " + response );
- System.out.println("call1 response = " + response1 );
-
- scaDomain.close();
-
- }
-
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface1.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface1.java
deleted file mode 100644
index 70b450e358..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface1.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 dbecho;
-
-import org.apache.tuscany.sca.databinding.annotation.DataBinding;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * @version $Rev$ $Date$
- */
-@DataBinding("java.lang.String")
-@Remotable
-public interface Interface1 {
- String call(String msg);
- String call1(String msg);
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface2.java b/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface2.java
deleted file mode 100644
index b62f1f425d..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/java/dbecho/Interface2.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 dbecho;
-
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.tuscany.sca.databinding.annotation.DataBinding;
-import org.osoa.sca.annotations.Remotable;
-import org.w3c.dom.Node;
-
-/**
- * @version $Rev$ $Date$
- */
-@DataBinding("org.w3c.dom.Node")
-@Remotable
-public interface Interface2 {
- Node call(Node msg);
- @DataBinding("javax.xml.stream.XMLStreamReader")
- XMLStreamReader call1(XMLStreamReader msg);
-}
diff --git a/branches/sca-android/samples/databinding-echo/src/main/resources/EchoDataBinding.composite b/branches/sca-android/samples/databinding-echo/src/main/resources/EchoDataBinding.composite
deleted file mode 100644
index 30b77a6152..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/resources/EchoDataBinding.composite
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:local="http://tuscany.apache.org/xmlns/sca/binding/1.0"
- xmlns:f="http://foo"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:e="http://echo"
- name="EchoDataBinding">
-
- <component name="ComponentA">
- <implementation.java class="dbecho.ComponentAImpl" />
- <reference name="componentBReference" target="ComponentB" />
- <property name="prefix">ABC</property>
- <property name="prefix1" source="$messagePrefix"></property>
- <property name="bar" source="$complexProperty/*[local-name()='foo']/*[local-name()='bar']"></property>
- </component>
-
- <component name="ComponentB">
- <implementation.java class="dbecho.ComponentBImpl" />
- </component>
-
- <reference name="EchoReference" promote="ComponentB/echoReference">
- <interface.java interface="dbecho.Echo"/>
- <!-- Replaced interface.wsdl by interface.java because TUSCANY-2324 fix uses the interface specified here
- <interface.wsdl interface="http://example.com/echo.wsdl#wsdl.interface(EchoPortType)"
- wsdli:wsdlLocation="http://example.com/echo.wsdl wsdl/echo.wsdl">
- <db:databinding xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0" name="org.apache.axiom.om.OMElement" />
- </interface.wsdl>
- -->
- <e:binding.echo/>
- </reference>
-
- <property name="messagePrefix" type="xsd:string">ABC</property>
- <property name="complexProperty" type="f:FooType">
- <foo>
- <bar attr="barAttr">BAR</bar>
- </foo>
- </property>
-
-</composite> \ No newline at end of file
diff --git a/branches/sca-android/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl b/branches/sca-android/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl
deleted file mode 100644
index ef2308aa73..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.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.
--->
-<definitions name="StockQuote" targetNamespace="http://example.com/echo.wsdl" xmlns:tns="http://example.com/echo.wsdl"
- xmlns:xsd1="http://example.com/echo.xsd" xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://example.com/echo.xsd" xmlns:tns="http://example.com/echo.xsd"
- xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="messageType">
- <sequence>
- <element name="foo" type="string"></element>
- </sequence>
- </complexType>
- <element name="echo">
- <complexType>
- <sequence>
- <element name="message" type="tns:messageType" />
- </sequence>
- </complexType>
- </element>
- <element name="echoResponse">
- <complexType>
- <sequence>
- <element name="message" type="tns:messageType" />
- </sequence>
- </complexType>
- </element>
- </schema>
- </types>
-
- <message name="EchoInput">
- <part name="body" element="xsd1:echo" />
- </message>
-
- <message name="EchoOutput">
- <part name="body" element="xsd1:echoResponse" />
- </message>
-
- <portType name="EchoPortType">
- <operation name="echo">
- <input message="tns:EchoInput" />
- <output message="tns:EchoOutput" />
- </operation>
- </portType>
-
-</definitions> \ No newline at end of file
diff --git a/branches/sca-android/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java b/branches/sca-android/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java
deleted file mode 100644
index 43434d8cee..0000000000
--- a/branches/sca-android/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java
+++ /dev/null
@@ -1,49 +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 dbecho;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * @version $Rev$ $Date$
- */
-public class EchoDataBindingTestCase extends TestCase {
-
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("EchoDataBinding.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- protected Interface1 componentA;
-
- public void testTransform() {
- componentA = scaDomain.getService(Interface1.class, "ComponentA");
- componentA.call("<message><foo>123</foo></message>");
- componentA.call1("<message><foo>123</foo></message>");
- }
-}
diff --git a/branches/sca-android/samples/implementation-composite/README b/branches/sca-android/samples/implementation-composite/README
deleted file mode 100644
index 27de00e8ef..0000000000
--- a/branches/sca-android/samples/implementation-composite/README
+++ /dev/null
@@ -1,116 +0,0 @@
-Composite Implementation Sample
-===============================
-
-This sample shows how composites can be used to implement components.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-implementation-composite.jar composite.CompositeClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-implementation-composite.jar composite.CompositeClient
-
-
-Sample Overview
----------------
-
-The sample is comprised of three composites. Take a look at the composite file
-or the .svg/.png file which shows the composite file in pictorial form. The
-OuterComposite defines three components two of which are implemented using
-composites. The SourceComponent calls each TargetComponent in turn. There is a
-callback which returns from each TargetComponent to the SourceComponent.
-
-implementation-composite/
- src/
- main/
- java/
- composite/
- Source.java - interface for the source component
- SourceImpl.java - implementation for the source component
- SourceCallback.java - source component callback interface
- Target.java - interface for the target component
- TargetImpl.java - implementation for the target component
- CompositeClient.java - starts the SCA Runtime and
- deploys the OuterComposite.composite.
- This in turn pulls in the two inner
- composites
- resources/
- META-INF/
- sca-contribution.xml - specifies the composite to be deployed
- OuterComposite.composite - the top level SCA assembly for this sample
- InnerComposite.composite - included by OuterComposite.composite
- InnerComposite2.composite - included by OuterComposite.composite
- test/
- java/
- composite/
- CompositeTestCase.java - JUnit test case
- implementation-composite.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd implementation-composite
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] Main thread Thread[main,5,main]
- [java] Source: Client.main -> Source.clientMethod
- [java] Source: Client.main => Source.clientMethod2
- [java] Sleeping ...
- [java] Target: Client.main -> Source.clientMethod
- [java] Work thread Thread[pool-1-thread-1,5,main]
- [java] Result: Client.main -> Source.clientMethod -> Target.someMethod
- [java] Target: Client.main => Source.clientMethod2
- [java] Work thread Thread[pool-1-thread-2,5,main]
- [java] Result: Client.main => Source.clientMethod2 -> Target.someMethod
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd implementation-composite
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running composite.CompositeTestCase
-Main thread Thread[main,5,main]
-Source: Client.main -> Source.clientMethod
-Source: Client.main => Source.clientMethod2
-Sleeping ...
-Target: Client.main => Source.clientMethod2
-Work thread Thread[pool-1-thread-2,5,main]
-Result: Client.main => Source.clientMethod2 -> Target.someMethod
-Target: Client.main -> Source.clientMethod
-Work thread Thread[pool-1-thread-1,5,main]
-Result: Client.main -> Source.clientMethod -> Target.someMethod
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.973 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/implementation-composite/build.xml b/branches/sca-android/samples/implementation-composite/build.xml
deleted file mode 100644
index 7aa31aab8b..0000000000
--- a/branches/sca-android/samples/implementation-composite/build.xml
+++ /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.
--->
-<project name="implementation-composite" default="compile">
- <property name="test.class" value="composite.CompositeClient" />
- <property name="test.jar" value="sample-implementation-composite.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/implementation-composite/implementation-composite.png b/branches/sca-android/samples/implementation-composite/implementation-composite.png
deleted file mode 100644
index 4c6d71bc03..0000000000
--- a/branches/sca-android/samples/implementation-composite/implementation-composite.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/implementation-composite/implementation-composite.svg b/branches/sca-android/samples/implementation-composite/implementation-composite.svg
deleted file mode 100644
index 0e60354aab..0000000000
--- a/branches/sca-android/samples/implementation-composite/implementation-composite.svg
+++ /dev/null
@@ -1,658 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\composite-impl"
- sodipodi:docname="composite-impl.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\composite-impl\composite-impl.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4">
- <marker
- inkscape:stockid="TriangleOutL"
- orient="auto"
- refY="0.0"
- refX="0.0"
- id="TriangleOutL"
- style="overflow:visible">
- <path
- id="path3199"
- d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
- transform="scale(0.8)" />
- </marker>
- <marker
- inkscape:stockid="TriangleInL"
- orient="auto"
- refY="0.0"
- refX="0.0"
- id="TriangleInL"
- style="overflow:visible">
- <path
- id="path3208"
- d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
- transform="scale(-0.8)" />
- </marker>
- <marker
- inkscape:stockid="Arrow2Lstart"
- orient="auto"
- refY="0.0"
- refX="0.0"
- id="Arrow2Lstart"
- style="overflow:visible">
- <path
- id="path3279"
- style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
- d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
- transform="scale(1.1) translate(1,0)" />
- </marker>
- <marker
- inkscape:stockid="Arrow2Lend"
- orient="auto"
- refY="0.0"
- refX="0.0"
- id="Arrow2Lend"
- style="overflow:visible;">
- <path
- id="path3276"
- style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
- d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
- transform="scale(1.1) rotate(180) translate(1,0)" />
- </marker>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.98994949"
- inkscape:cx="422.9821"
- inkscape:cy="472.08096"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1163"
- inkscape:window-height="727"
- inkscape:window-x="49"
- inkscape:window-y="142" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <rect
- style="fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00000072;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2067"
- width="437.12573"
- height="235.3502"
- x="322.71631"
- y="54.621651"
- ry="9.9571238"
- rx="13.497943" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2954"
- transform="translate(52.97608,-147.3808)"><flowRegion
- id="flowRegion2956"><rect
- id="rect2958"
- width="195.71428"
- height="21.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2960">OuterComposite </flowPara></flowRoot> <rect
- style="fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3038"
- width="387.65787"
- height="235.3502"
- x="90.543831"
- y="383.98276"
- ry="9.9571238"
- rx="11.970432" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3040"
- transform="translate(-176.3391,188.4089)"><flowRegion
- id="flowRegion3042"><rect
- id="rect3044"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3046">InnerComposite</flowPara></flowRoot> <rect
- style="fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00000048;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3048"
- width="324.99875"
- height="235.3502"
- x="555.21411"
- y="379.94214"
- ry="9.9571238"
- rx="10.03559" />
- <rect
- style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6,1;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3050"
- width="501.42856"
- height="300"
- x="281.42856"
- y="25.523054"
- rx="2.4997854"
- ry="0" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3052"
- transform="translate(14.49567,-180.4534)"><flowRegion
- id="flowRegion3054"><rect
- id="rect3056"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3058">OuterComposite.composite</flowPara></flowRoot> <rect
- style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6.00000127, 1.0000002;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3060"
- width="469.99997"
- height="277.14301"
- x="34.999977"
- y="355.52322"
- rx="2.3431036"
- ry="0" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3062"
- transform="translate(-231.9329,149.5466)"><flowRegion
- id="flowRegion3064"><rect
- id="rect3066"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3068">InnerComposite.composite</flowPara></flowRoot> <rect
- style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6.00000217, 1.00000036;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3070"
- width="370.06677"
- height="277.14301"
- x="526.42865"
- y="355.52322"
- rx="1.8449039"
- ry="0" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3072"
- transform="translate(259.4957,149.5466)"><flowRegion
- id="flowRegion3074"><rect
- id="rect3076"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3078">InnerComposite2.composite</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3080"
- width="115.66247"
- height="107.29153"
- x="339.39774"
- y="120.88454"
- rx="6.9961648"
- ry="8.9006968" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3082"
- transform="translate(61.09274,-82.91111)"><flowRegion
- id="flowRegion3084"><rect
- id="rect3086"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3088">SourceComponent</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 419.07104,149.4647 L 471.74673,149.4647 L 481.32412,162.59667 L 470.1505,174.71851 L 419.07104,174.71851 L 431.04279,162.59667 L 419.07104,149.4647 z "
- id="path3094" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 417.44485,192.18187 L 470.12055,192.18187 L 479.69794,205.31384 L 468.52432,217.43568 L 417.44485,217.43568 L 429.41661,205.31384 L 417.44485,192.18187 z "
- id="path3096" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3098"
- transform="matrix(0.588577,0,0,0.522806,267.0549,40.55827)"><flowRegion
- id="flowRegion3100"><rect
- id="rect3102"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3104">Target</flowPara><flowPara
- id="flowPara3106">Component</flowPara><flowPara
- id="flowPara3108">Ref</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot3110"
- transform="matrix(0.588577,0,0,0.522806,266.7932,82.35649)"><flowRegion
- id="flowRegion3112"><rect
- id="rect3114"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3116">Target</flowPara><flowPara
- id="flowPara3118">Component</flowPara><flowPara
- id="flowPara3120">Ref2</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:6,1;stroke-dashoffset:0"
- d="M 386.42857,191.23734 L 272.85714,354.80877"
- id="path3304" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999964;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3306"
- width="122.73349"
- height="85.862968"
- x="521.41876"
- y="82.620422"
- rx="7.4238753"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3308"
- transform="translate(243.9718,-121.6444)"><flowRegion
- id="flowRegion3310"><rect
- id="rect3312"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3314">TargetComponent</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 508.55406,120.18171 L 546.16282,120.18171 L 553.00077,133.31368 L 545.02316,145.43552 L 508.55406,145.43552 L 517.10151,133.31368 L 508.55406,120.18171 z "
- id="path3318" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000048;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3322"
- width="124.75388"
- height="85.862968"
- x="625.0321"
- y="185.9852"
- rx="7.5460844"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3324"
- transform="translate(347.5847,-18.27962)"><flowRegion
- id="flowRegion3326"><rect
- id="rect3328"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3330">TargetComponent2</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:6,1;stroke-dashoffset:0"
- d="M 675.79205,235.98775 L 764.68548,355.18575"
- id="path3336" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 481.33769,161.74154 L 496.99505,161.74154 L 496.99505,134.46742 L 515.1778,134.46742"
- id="path3362" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 67.175117,493.80686 L 112.47656,493.80686 L 120.71318,512.19162 L 111.1038,529.1622 L 67.175117,529.1622 L 77.470908,512.19162 L 67.175117,493.80686 z "
- id="path3364" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3366"
- transform="matrix(0.764739,0,0,0.753419,-137.1237,335.169)"><flowRegion
- id="flowRegion3368"><rect
- id="rect3370"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3372">Inner</flowPara><flowPara
- id="flowPara3374">Source</flowPara><flowPara
- id="flowPara3376">Service</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3378"
- width="115.66247"
- height="123.2386"
- x="222.2549"
- y="461.59875"
- rx="6.9961648"
- ry="10.223635" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3380"
- transform="translate(-41.0501,252.8032)"><flowRegion
- id="flowRegion3382"><rect
- id="rect3384"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3386">InnerSource</flowPara><flowPara
- id="flowPara3398">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 207.36974,499.16011 L 246.68799,499.16011 L 253.83675,512.29208 L 245.49653,524.41392 L 207.36974,524.41392 L 216.30571,512.29208 L 207.36974,499.16011 z "
- id="path3390" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 458.45503,498.7504 L 491.79007,498.7504 L 497.85098,511.88237 L 490.77992,524.00421 L 458.45503,524.00421 L 466.03118,511.88237 L 458.45503,498.7504 z "
- id="path3394" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 457.8633,539.5488 L 491.19834,539.5488 L 497.25925,552.68077 L 490.18819,564.80261 L 457.8633,564.80261 L 465.43945,552.68077 L 457.8633,539.5488 z "
- id="path3396" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 121.21831,512.76955 L 214.15234,512.76955"
- id="path3402" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 313.13842,496.9668 L 365.81411,496.9668 L 375.3915,510.09877 L 364.21788,522.22061 L 313.13842,522.22061 L 325.11017,510.09877 L 313.13842,496.9668 z "
- id="path3428" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 311.51223,539.68397 L 364.18793,539.68397 L 373.76532,552.81594 L 362.5917,564.93778 L 311.51223,564.93778 L 323.48399,552.81594 L 311.51223,539.68397 z "
- id="path3430" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3432"
- transform="matrix(0.588577,0,0,0.522806,161.1223,388.0604)"><flowRegion
- id="flowRegion3434"><rect
- id="rect3436"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3438">Target</flowPara><flowPara
- id="flowPara3440">Component</flowPara><flowPara
- id="flowPara3442">Ref</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot3444"
- transform="matrix(0.588577,0,0,0.522806,160.8606,429.8586)"><flowRegion
- id="flowRegion3446"><rect
- id="rect3448"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3450">Target</flowPara><flowPara
- id="flowPara3452">Component</flowPara><flowPara
- id="flowPara3454">Ref2</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 375,509.80877 L 465,510.52305"
- id="path3456" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 374.28571,553.3802 L 465,553.3802"
- id="path3458" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3460"
- transform="matrix(0.768159,0,0,0.869201,176.2162,311.7866)"><flowRegion
- id="flowRegion3462"><rect
- id="rect3464"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3466">promote</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot3468"
- transform="matrix(0.768159,0,0,0.869201,176.8981,355.7265)"><flowRegion
- id="flowRegion3470"><rect
- id="rect3472"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3474">promote</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 538.20382,492.4365 L 583.50526,492.4365 L 591.74188,510.82126 L 582.1325,527.79184 L 538.20382,527.79184 L 548.49961,510.82126 L 538.20382,492.4365 z "
- id="path3476" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3478"
- transform="matrix(0.764739,0,0,0.753419,333.905,333.7986)"><flowRegion
- id="flowRegion3480"><rect
- id="rect3482"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3484">Inner</flowPara><flowPara
- id="flowPara3486">Target</flowPara><flowPara
- id="flowPara3488">Service</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000048;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3490"
- width="124.75388"
- height="85.862968"
- x="698.64941"
- y="459.73654"
- rx="7.5460844"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3492"
- transform="translate(445.4456,256.4819)"><flowRegion
- id="flowRegion3494"><rect
- id="rect3496"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3498">InnerTarget</flowPara><flowPara
- id="flowPara3502">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 677.53028,495.80598 L 714.4917,495.80598 L 721.21196,510.79509 L 713.37166,524.63121 L 677.53028,524.63121 L 685.93061,510.79509 L 677.53028,495.80598 z "
- id="path3500" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 916.90199,189.64981 L 1002.9382,189.64981 C 1002.9382,189.64981 1002.9382,235.81944 1002.9382,235.81944 C 989.62313,237.57221 976.30803,237.62595 962.99289,245.41312 C 953.65801,255.66964 935.10151,255.12922 917.92625,256.20602 L 916.90199,189.64981 z "
- id="path3504"
- sodipodi:nodetypes="cccccc" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3506"
- transform="translate(646.5141,-15.23667)"><flowRegion
- id="flowRegion3508"><rect
- id="rect3510"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3514">TargetImpl</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot3522"
- transform="matrix(0.764739,0,0,0.753419,471.6381,345.0856)"><flowRegion
- id="flowRegion3524"><rect
- id="rect3526"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3532">Target</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 590.71429,511.23734 L 685,511.23734"
- id="path3538" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 918.41044,67.959238 L 1004.4467,67.959238 C 1004.4467,67.959238 1004.4467,114.12887 1004.4467,114.12887 C 991.13163,115.88164 977.81652,115.93538 964.50132,123.72255 C 955.16646,133.97907 936.60996,133.43865 919.4347,134.51545 L 918.41044,67.959238 z "
- id="path3576"
- sodipodi:nodetypes="cccccc" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3578"
- transform="translate(648.0226,-136.9272)"><flowRegion
- id="flowRegion3580"><rect
- id="rect3582"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3584">Target</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:url(#TriangleInL);stroke-opacity:1"
- d="M 961.42857,126.95163 L 961.42857,162.66591 L 961.42857,191.23734"
- id="path3594" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 76.22763,193.09023 L 162.2639,193.09023 C 162.2639,193.09023 162.2639,239.25986 162.2639,239.25986 C 148.9488,241.01263 135.6337,241.06637 122.3185,248.85354 C 112.98365,259.11006 94.42715,258.56964 77.25189,259.64644 L 76.22763,193.09023 z "
- id="path3600"
- sodipodi:nodetypes="cccccc" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3602"
- transform="translate(-194.1602,-11.79626)"><flowRegion
- id="flowRegion3604"><rect
- id="rect3606"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3608">SourceImpl</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 14.878937,64.256802 L 100.91526,64.256802 C 100.91526,64.256802 100.91526,110.42643 100.91526,110.42643 C 87.600157,112.1792 74.285057,112.23294 60.969857,120.02011 C 51.634957,130.27663 33.078457,129.73621 15.903197,130.81301 L 14.878937,64.256802 z "
- id="path3610"
- sodipodi:nodetypes="cccccc" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3612"
- transform="translate(-255.5088,-140.6297)"><flowRegion
- id="flowRegion3614"><rect
- id="rect3616"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3618">Source</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 140.55329,63.673523 L 239.44669,63.673523 C 239.44669,63.673523 239.44669,109.84315 239.44669,109.84315 C 224.14179,111.59592 208.83699,111.64966 193.53189,119.43683 C 182.80209,129.69335 161.47249,129.15293 141.73059,130.22973 L 140.55329,63.673523 z "
- id="path3622"
- sodipodi:nodetypes="cccccc" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3624"
- transform="translate(-135.5491,-141.213)"><flowRegion
- id="flowRegion3626"><rect
- id="rect3628"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3630">SourceCallback</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-mid:url(#TriangleOutL)"
- d="M 108.08632,192.55119 L 77.781746,156.1857 L 51.51778,123.86082"
- id="path3634" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-mid:url(#TriangleOutL)"
- d="M 130.30968,192.55119 L 161.62441,159.21616 L 201.02036,117.7999"
- id="path3636" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:6,1;stroke-dashoffset:0;marker-end:url(#Arrow2Lend)"
- d="M 800,511.23734 L 917.14286,238.3802"
- id="path3640" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3,1;stroke-dashoffset:0;marker-end:url(#Arrow2Lend)"
- d="M 610,125.52305 L 915.71429,216.95163"
- id="path3646" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:6,1;stroke-dashoffset:0;marker-end:url(#Arrow2Lend)"
- d="M 280,512.66591 L 132.85714,241.23734"
- id="path3648" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3650"
- transform="matrix(0.764739,0,0,0.753419,301.1926,-32.06018)"><flowRegion
- id="flowRegion3652"><rect
- id="rect3654"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3656">Target</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot3658"
- transform="matrix(0.764739,0,0,0.753419,1.177328,346.747)"><flowRegion
- id="flowRegion3660"><rect
- id="rect3662"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3664">Source</flowPara></flowRoot> <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
- d="M 480.83261,205.68318 L 517.1981,205.68318 L 518.20826,511.7594 L 546.49253,511.7594"
- id="path3670" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3672"
- transform="translate(281.8571,183.8295)"><flowRegion
- id="flowRegion3674"><rect
- id="rect3676"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara3678">InnerComposite2</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot2048"
- transform="matrix(0.768159,0,0,0.869201,-73.32453,313.1674)"><flowRegion
- id="flowRegion2050"><rect
- id="rect2052"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2054">promote</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot2056"
- transform="matrix(0.768159,0,0,0.869201,397.4066,306.0963)"><flowRegion
- id="flowRegion2058"><rect
- id="rect2060"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2062">promote</flowPara></flowRoot> </g>
-</svg>
diff --git a/branches/sca-android/samples/implementation-composite/pom.xml b/branches/sca-android/samples/implementation-composite/pom.xml
deleted file mode 100644
index 229061acb1..0000000000
--- a/branches/sca-android/samples/implementation-composite/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-implementation-composite</artifactId>
- <name>Apache Tuscany SCA Composite Sample</name>
- <description>A sample showing local wiring of a component implemented by a nested composite</description>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/CompositeClient.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/CompositeClient.java
deleted file mode 100644
index bf743e1797..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/CompositeClient.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package composite;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Simple client program that invokes the components that we wired together.
- */
-public class CompositeClient {
-
- public static void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance();
-
- Source source = scaDomain.getService(Source.class, "SourceComponent");
-
- System.out.println("Main thread " + Thread.currentThread());
- source.clientMethod("Client.main");
- System.out.println("Sleeping ...");
- Thread.sleep(1000);
-
- scaDomain.close();
- }
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/Source.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/Source.java
deleted file mode 100644
index d0efcc1df1..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/Source.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package composite;
-
-public interface Source {
-
- void clientMethod(String arg);
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceCallback.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceCallback.java
deleted file mode 100644
index baa95a8e39..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceCallback.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package composite;
-
-public interface SourceCallback {
-
- void receiveResult(String result);
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceImpl.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceImpl.java
deleted file mode 100644
index b9a0c7ff74..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/SourceImpl.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 composite;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-
-@Service(Source.class)
-@Scope("COMPOSITE")
-public class SourceImpl implements Source, SourceCallback {
-
- private Target targetReference;
- private Target targetReference2;
-
- @Reference
- public void setTargetReference(Target target) {
- this.targetReference = target;
- }
-
- @Reference
- public void setTargetReference2(Target target) {
- this.targetReference2 = target;
- }
-
- public void clientMethod(String arg) {
- System.out.println("Source: " + arg + " -> Source.clientMethod");
- targetReference.someMethod(arg + " -> Source.clientMethod");
-
- System.out.println("Source: " + arg + " => Source.clientMethod2");
- targetReference2.someMethod(arg + " => Source.clientMethod2");
- }
-
- public void receiveResult(String result) {
- System.out.println("Work thread " + Thread.currentThread());
- System.out.println("Result: " + result);
- }
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/Target.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/Target.java
deleted file mode 100644
index 9a8f68a7fa..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/Target.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 composite;
-
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.OneWay;
-
-
-@Callback(SourceCallback.class)
-public interface Target {
-
- @OneWay
- void someMethod(String arg);
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/java/composite/TargetImpl.java b/branches/sca-android/samples/implementation-composite/src/main/java/composite/TargetImpl.java
deleted file mode 100644
index 86686e9233..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/java/composite/TargetImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package composite;
-
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-
-@Service(Target.class)
-@Scope("COMPOSITE")
-public class TargetImpl implements Target {
-
- private SourceCallback sourceCallback;
-
- @Callback
- public void setSourceCallback(SourceCallback sourceCallback) {
- this.sourceCallback = sourceCallback;
- }
-
- public void someMethod(String arg) {
- System.out.println("Target: " + arg);
- sourceCallback.receiveResult(arg + " -> Target.someMethod");
- }
-}
diff --git a/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite.composite b/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite.composite
deleted file mode 100644
index 3376ac8ff5..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite.composite
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="InnerComposite">
-
- <service name="InnerSourceService" promote="InnerSourceComponent">
- <interface.java interface="composite.Source"/>
- </service>
-
- <component name="InnerSourceComponent">
- <implementation.java class="composite.SourceImpl"/>
- </component>
-
- <reference name="targetComponentRef" promote="InnerSourceComponent/targetReference">
- <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/>
- </reference>
-
- <reference name="targetComponentRef2" promote="InnerSourceComponent/targetReference2">
- <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/>
- </reference>
-
-</composite>
diff --git a/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite2.composite b/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite2.composite
deleted file mode 100644
index c9eff4fa9d..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/resources/InnerComposite2.composite
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="InnerComposite2">
-
- <service name="InnerTargetService" promote="InnerTargetComponent">
- <interface.java interface="composite.Target" callbackInterface="composite.SourceCallback"/>
- </service>
-
- <component name="InnerTargetComponent">
- <implementation.java class="composite.TargetImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml
deleted file mode 100644
index e675fd3624..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample">
- <deployable composite="sample:OuterComposite"/>
-</contribution> \ No newline at end of file
diff --git a/branches/sca-android/samples/implementation-composite/src/main/resources/OuterComposite.composite b/branches/sca-android/samples/implementation-composite/src/main/resources/OuterComposite.composite
deleted file mode 100644
index cb1c1e13d4..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/main/resources/OuterComposite.composite
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="OuterComposite">
-
- <component name="SourceComponent">
- <implementation.composite name="sample:InnerComposite"/>
- <reference name="targetComponentRef" target="TargetComponent"/>
- <reference name="targetComponentRef2" target="TargetComponent2/InnerTargetService"/>
- </component>
-
- <component name="TargetComponent">
- <implementation.java class="composite.TargetImpl"/>
- </component>
-
- <component name="TargetComponent2">
- <implementation.composite name="sample:InnerComposite2"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java b/branches/sca-android/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java
deleted file mode 100644
index 9e9a4b44a4..0000000000
--- a/branches/sca-android/samples/implementation-composite/src/test/java/composite/CompositeTestCase.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 composite;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-public class CompositeTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private Source source;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance();
- source = scaDomain.getService(Source.class, "SourceComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void test() throws Exception {
- try {
- System.out.println("Main thread " + Thread.currentThread());
- source.clientMethod("Client.main");
- System.out.println("Sleeping ...");
- Thread.sleep(1000);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/README b/branches/sca-android/samples/implementation-crud-extension/README
deleted file mode 100644
index 5e8190648f..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/README
+++ /dev/null
@@ -1,83 +0,0 @@
-Implementation CRUD Sample
-==========================
-This sample demonstrates how new implementation types are constructed for
-Apache Tuscany SCA.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you want to try out the CRUD implementation type that this sample provides
-please see the implementation-crud sample that provides the necessary client
-code to bring up an application that uses this implementation extension.
-
-Sample Overview
----------------
-This sample contains a CRUD implementation type as an example of how to create
-new implementation types. Components using this implementation type always
-expose the same Create, Retrieve, Update and Delete interface. This sample
-uses a singleton ResourceManager to perform the CRUD operations but of course
-a real component would provide a real implementation.
-
-implementation-crud-extension/
- src/
- main/
- java/
- crud/ - implementation model interfaces
- backend/ - fake component implementation
- impl/ - implementations of the model interfaces
- provider/ - runtime implementation
- resources/
- META-INF/
- services/ - declares the extension
- test/
- java/
- crud/
- CRUDTestCase.java - JUnit test case
- resources/
- crud.composite - the SCA assembly used during unit testing
-
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building The Sample Extension Using Ant
------------------------------------------
-With the binary distribution the sample extension can be built using Ant as
-follows
-
-cd implementation-crud-extension
-ant compile
-
-See the implementation-crud sample to run a sample that uses this
-implementation extension.
-
-Building The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built
-using Maven as follows.
-
-cd implementation-crud-extension
-mvn
-
-Maven will also test that the sample extension built properly. You should see
-the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running crud.CRUDTestCase
-Starting CRUDServiceComponent
-create(ABC) in tmp
-retrieve(0)
-update(0)
-retrieve(0)
-delete(0)
-retrieve(0)
-Stopping CRUDServiceComponent
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.212 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/implementation-crud-extension/build.xml b/branches/sca-android/samples/implementation-crud-extension/build.xml
deleted file mode 100644
index 88d308e6fc..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/build.xml
+++ /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.
--->
-<project name="implementation-crud-extension" default="compile">
- <property name="test.jar" value="sample-implementation-crud-extension.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/implementation-crud-extension/pom.xml b/branches/sca-android/samples/implementation-crud-extension/pom.xml
deleted file mode 100644
index c11953f0ac..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-implementation-crud-extension</artifactId>
- <name>Apache Tuscany SCA CRUD Implementation Extension Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java-xml</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUD.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUD.java
deleted file mode 100644
index b23d85887b..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUD.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 crud;
-
-/**
- * The service interface of the single CRUD service provided by CRUD components.
- */
-public interface CRUD {
-
- /**
- * Create a new resource.
- * @param resource
- * @return
- */
- String create(Object resource);
-
- /**
- * Retrieve a resource.
- * @param id
- * @return
- */
- Object retrieve(String id);
-
- /**
- * Update a resource.
- * @param id
- * @param resource
- * @return
- */
- Object update(String id, Object resource);
-
- /**
- * Delete a resource.
- * @param id
- */
- void delete(String id);
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java
deleted file mode 100644
index 49be844f93..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.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 crud;
-
-import org.apache.tuscany.sca.assembly.Implementation;
-
-/**
- * The model representing a sample CRUD implementation in an SCA assembly model.
- *
- * The sample CRUD implementation is not a full blown implementation, it only
- * supports a subset of what a component implementation can support:
- * - a single fixed service (as opposed to a list of services typed by different interfaces
- * - a directory attribute used to specify where a CRUD component is going to persist
- * resources
- * - no references or properties
- * - no policy intents or policy sets
- */
-public interface CRUDImplementation extends Implementation {
-
- /**
- * Returns the directory used by CRUD implementations to persist resources.
- *
- * @return the directory used to persist resources
- */
- public String getDirectory();
-
- /**
- * Sets the directory used by CRUD implementations to persist resources.
- *
- * @param directory the directory used to persist resources
- */
- public void setDirectory(String directory);
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java
deleted file mode 100644
index fa83c63c1b..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.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 crud;
-
-import crud.CRUDImplementation;
-
-
-/**
- * A factory for the sample CRUD implementation model.
- */
-public interface CRUDImplementationFactory {
-
- /**
- * Creates a new CRUD implementation.
- *
- * @return
- */
- CRUDImplementation createCRUDImplementation();
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java
deleted file mode 100644
index cc0795a735..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.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 crud.backend;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A fake resource manager implementation used as a backend by the sample
- * CRUD component implementation.
- */
-public class ResourceManager {
- private static int counter;
- private static final Map<String, Object> store = new HashMap<String, Object>();
- private String directory;
-
- /**
- * Constructs a new resource manager.
- *
- * @param directory the directory where to persist resources
- */
- public ResourceManager(String directory) {
- super();
- this.directory = directory;
- }
-
- /**
- * Creates a new resource.
- *
- * @param resource
- * @return
- */
- public String createResource(Object resource) {
- System.out.println("create(" + resource + ") in " + directory);
- String key = String.valueOf(counter++);
- store.put(key, resource);
- return key;
- }
-
- /**
- * Deletes a resource.
- *
- * @param id
- */
- public void deleteResource(String id) {
- System.out.println("delete(" + id + ")");
- store.remove(id);
- }
-
- /**
- * Retrieves a resource.
- *
- * @param id
- * @return
- */
- public Object retrieveResource(String id) {
- System.out.println("retrieve(" + id + ")");
- return store.get(id);
- }
-
- /**
- * Updates a resource.
- *
- * @param id
- * @param resource
- * @return
- */
- public Object updateResource(String id, Object resource) {
- System.out.println("update(" + id + ")");
- return store.put(id, resource);
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java
deleted file mode 100644
index 2f1e5fcba8..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.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 crud.impl;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-
-import crud.CRUDImplementation;
-import crud.CRUDImplementationFactory;
-
-
-/**
- * A factory for the CRUD implementation model.
- */
-public class CRUDImplementationFactoryImpl implements CRUDImplementationFactory {
-
- private AssemblyFactory assemblyFactory;
- private JavaInterfaceFactory javaFactory;
-
- public CRUDImplementationFactoryImpl(ModelFactoryExtensionPoint modelFactories) {
- this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- this.javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
- }
-
- public CRUDImplementation createCRUDImplementation() {
- return new CRUDImplementationImpl(assemblyFactory, javaFactory);
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java
deleted file mode 100644
index 383a035e69..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java
+++ /dev/null
@@ -1,117 +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 crud.impl;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-
-import crud.CRUD;
-import crud.CRUDImplementation;
-
-
-/**
- * The model representing a sample CRUD implementation in an SCA assembly model.
- */
-class CRUDImplementationImpl implements CRUDImplementation {
-
- private Service crudService;
- private String directory;
-
- /**
- * Constructs a new CRUD implementation.
- */
- CRUDImplementationImpl(AssemblyFactory assemblyFactory,
- JavaInterfaceFactory javaFactory) {
-
- // CRUD implementation always provide a single service exposing
- // the CRUD interface, and have no references and properties
- crudService = assemblyFactory.createService();
- crudService.setName("CRUD");
- JavaInterface javaInterface;
- try {
- javaInterface = javaFactory.createJavaInterface(CRUD.class);
- } catch (InvalidInterfaceException e) {
- throw new IllegalArgumentException(e);
- }
- JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
- interfaceContract.setInterface(javaInterface);
- crudService.setInterfaceContract(interfaceContract);
- }
-
- public String getDirectory() {
- return directory;
- }
-
- public void setDirectory(String directory) {
- this.directory = directory;
- }
-
- public ConstrainingType getConstrainingType() {
- // The sample CRUD implementation does not support constrainingTypes
- return null;
- }
-
- public List<Property> getProperties() {
- // The sample CRUD implementation does not support properties
- return Collections.emptyList();
- }
-
- public List<Service> getServices() {
- // The sample CRUD implementation provides a single fixed CRUD service
- return Collections.singletonList(crudService);
- }
-
- public List<Reference> getReferences() {
- // The sample CRUD implementation does not support properties
- return Collections.emptyList();
- }
-
- public String getURI() {
- // The sample CRUD implementation does not have a URI
- return null;
- }
-
- public void setConstrainingType(ConstrainingType constrainingType) {
- // The sample CRUD implementation does not support constrainingTypes
- }
-
- public void setURI(String uri) {
- // The sample CRUD implementation does not have a URI
- }
-
- public boolean isUnresolved() {
- // The sample CRUD implementation is always resolved
- return false;
- }
-
- public void setUnresolved(boolean unresolved) {
- // The sample CRUD implementation is always resolved
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java
deleted file mode 100644
index b212ee3c9b..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java
+++ /dev/null
@@ -1,79 +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 crud.provider;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-
-import crud.backend.ResourceManager;
-
-
-/**
- * Implements an invoker for CRUD component implementations.
- *
- * The invoker is responsible for handling invocations of a business operation.
- * Input business data is passed to the invoke method in a Message object.
- * The invoke method is responsible for handling the invocation and returning a Message with
- * the output business data.
- *
- * In this example we are simply delegating the CRUD operation invocations to the
- * corresponding methods on our fake resource manager class.
- *
- * More sophisticated invokers can delegate the invocation to an implementation artifact directly
- * (for example a Java class using reflection as in the implementation-pojo sample) or call a runtime
- * engine like a BPEL engine or an XQuery engine for example (this is what the Tuscany
- * implementation-bpel and implementation-xquery extensions do).
- */
-class CRUDImplementationInvoker implements Invoker {
- private Operation operation;
- private ResourceManager resourceManager;
-
- CRUDImplementationInvoker(Operation operation, ResourceManager resourceManager) {
- this.operation = operation;
- this.resourceManager = resourceManager;
- }
-
- public Message invoke(Message msg) {
- try {
- Object[] args = msg.getBody();
- Object resp = null;
-
- if (operation.getName().equals("create")) {
- resp = resourceManager.createResource(args[0]);
-
- } else if (operation.getName().equals("retrieve")) {
- resp = resourceManager.retrieveResource((String)args[0]);
-
- } else if (operation.getName().equals("update")) {
- resp = resourceManager.updateResource((String)args[0], args[1]);
-
- } else if (operation.getName().equals("delete")) {
- resourceManager.deleteResource((String)args[0]);
- }
-
- msg.setBody(resp);
- } catch (Exception e) {
- msg.setFaultBody(e.getCause());
- }
- return msg;
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java
deleted file mode 100644
index 8f11f9d910..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.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 crud.provider;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-import crud.CRUDImplementation;
-import crud.backend.ResourceManager;
-
-
-/**
- * An implementation provider for sample CRUD implementations.
- *
- * The implementation provider is responsible for handling the lifecycle of a component
- * implementation and creating operation invokers for the service operations provided
- * by the implementation.
- *
- * The start() and stop() methods are called when a component is started
- * and stopped.
- *
- * The createInvoker method is called for each operation provided by the component
- * implementation. The implementation provider can create an invoker and initialize it
- * at that time to minimize the amount of work to be performed on each invocation.
- */
-class CRUDImplementationProvider implements ImplementationProvider {
-
- private RuntimeComponent component;
- private CRUDImplementation implementation;
-
- /**
- * Constructs a new CRUD implementation.
- */
- CRUDImplementationProvider(RuntimeComponent component, CRUDImplementation implementation) {
- this.component = component;
- this.implementation = implementation;
- }
-
- public Invoker createInvoker(RuntimeComponentService service, Operation operation) {
- CRUDImplementationInvoker invoker = new CRUDImplementationInvoker(operation, new ResourceManager(implementation.getDirectory()));
- return invoker;
- }
-
- public boolean supportsOneWayInvocation() {
- return false;
- }
-
- public void start() {
- System.out.println("Starting " + component.getName());
- }
-
- public void stop() {
- System.out.println("Stopping " + component.getName());
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java b/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java
deleted file mode 100644
index 4566cb7155..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.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 crud.provider;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
-import crud.CRUDImplementation;
-import crud.provider.CRUDImplementationProvider;
-
-
-/**
- * A factory for CRUD implementation providers.
- *
- * The factory is called to create an implementation provider for each component using
- * the CRUD implementation.
- */
-public class CRUDImplementationProviderFactory implements ImplementationProviderFactory<CRUDImplementation> {
-
- /**
- * Constructs a new CRUD implementation.
- */
- public CRUDImplementationProviderFactory(ExtensionPointRegistry extensionPoints) {
- }
-
- public ImplementationProvider createImplementationProvider(RuntimeComponent component, CRUDImplementation implementation) {
- return new CRUDImplementationProvider(component, implementation);
- }
-
- public Class<CRUDImplementation> getModelType() {
- return CRUDImplementation.class;
- }
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory b/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory
deleted file mode 100644
index 3cf5de5fa1..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory
+++ /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 implementation model factory
-crud.impl.CRUDImplementationFactoryImpl
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
deleted file mode 100644
index 17c98cf706..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/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
-org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://crud#implementation.crud,model=crud.CRUDImplementation,factory=crud.CRUDImplementationFactory
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
deleted file mode 100644
index 527c626418..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
+++ /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.
-
-# URI of the XML schema to be used for validation
-sample-implementation-crud.xsd
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
deleted file mode 100644
index 6ce605197a..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
+++ /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 implementation extension
-crud.provider.CRUDImplementationProviderFactory;model=crud.CRUDImplementation
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd b/branches/sca-android/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd
deleted file mode 100644
index 447e31bf93..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://crud"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:c="http://crud"
- elementFormDefault="qualified">
-
- <import namespace="http://www.osoa.org/xmlns/sca/1.0"/>
-
- <element name="implementation.crud" type="c:CRUDImplementation"/>
-
- <complexType name="CRUDImplementation">
- <complexContent>
- <extension base="sca:Implementation">
- <attribute name="directory" type="anyURI" use="required"/>
- </extension>
- </complexContent>
- </complexType>
-
-</schema>
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java b/branches/sca-android/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java
deleted file mode 100644
index 0bb5cfc361..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.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 crud;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import crud.CRUD;
-
-/**
- * Tests the CRUD implementation extension.
- */
-public class CRUDTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private CRUD crudService;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("crud.composite");
- crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testCRUD() throws Exception {
- String id = crudService.create("ABC");
- Object result = crudService.retrieve(id);
- assertEquals("ABC", result);
-
- crudService.update(id, "EFG");
- result = crudService.retrieve(id);
- assertEquals("EFG", result);
-
- crudService.delete(id);
- result = crudService.retrieve(id);
- assertNull(result);
- }
-}
diff --git a/branches/sca-android/samples/implementation-crud-extension/src/test/resources/crud.composite b/branches/sca-android/samples/implementation-crud-extension/src/test/resources/crud.composite
deleted file mode 100644
index 18745033bb..0000000000
--- a/branches/sca-android/samples/implementation-crud-extension/src/test/resources/crud.composite
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample/crud"
- xmlns:sc="http://sample/crud"
- xmlns:c="http://crud"
- name="crud">
-
- <component name="CRUDServiceComponent">
- <c:implementation.crud directory="tmp" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/implementation-crud/README b/branches/sca-android/samples/implementation-crud/README
deleted file mode 100644
index 50da631c04..0000000000
--- a/branches/sca-android/samples/implementation-crud/README
+++ /dev/null
@@ -1,113 +0,0 @@
-Implementation CRUD Sample Client
-=================================
-This sample demonstrates how to use the new implementation extension,
-implementation-crud-extension.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens, open a command prompt,
-navigate to this sample directory, and do
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;..\implementation-crud-extension\target\sample-implementation-crud-extension.jar;target\sample-implementation-crud.jar crud.client.CRUDClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:../implementation-crud-extension/target/sample-implementation-crud-extension.jar:target/sample-implementation-crud.jar crud.client.CRUDClient
-
-This looks like a long command. The three things we add to the classpath are
-
-tuscany-sca-manifest.jar - all of the standard Tuscany SCA
- runtime and extension classes
-sample-implementation-crud-extension.jar - the new crud implementation
- extension
-sample-implementation-crud.jar - the application that uses the crud
- implementation
-
-Sample Overview
----------------
-This sample contains a client application for a CRUD implementation type that
-shows how to create new implementation types. See the README for the
-mplementation-crud-extension sample for details of this implementation type.
-
-implementation-crud/
- src/
- main/
- java/
- crud/
- client/
- CRUDClient.java - sample client
- resources/
- crud.composite - the SCA assembly used by this sample
-
- test/
- java/
- crud/
- client/
- CRUDTestCase.java - sample JUnit test case for the sample client
-
- implementation-crud.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd implementation-crud
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] Starting CRUDServiceComponent
- [java] create(ABC) in tmp
- [java] retrieve(0)
- [java] Result from create: ABC
- [java] update(0)
- [java] retrieve(0)
- [java] Result from update: EFG
- [java] delete(0)
- [java] retrieve(0)
- [java] Result from delete: null
- [java] Stopping CRUDServiceComponent
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and
-run using Maven as follows.
-
-cd implementation-crud
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running crud.client.CRUDTestCase
-Starting CRUDServiceComponent
-create(ABC) in tmp
-retrieve(0)
-update(0)
-retrieve(0)
-delete(0)
-retrieve(0)
-Stopping CRUDServiceComponent
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.641 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/implementation-crud/build.xml b/branches/sca-android/samples/implementation-crud/build.xml
deleted file mode 100644
index 10b26b5a94..0000000000
--- a/branches/sca-android/samples/implementation-crud/build.xml
+++ /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.
--->
-<project name="implementation-crud" default="compile">
- <property name="test.class" value="crud.client.CRUDClient" />
- <property name="test.jar" value="sample-implementation-crud.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../implementation-crud-extension/target/sample-implementation-crud-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../implementation-crud-extension/target/sample-implementation-crud-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement location="target/${test.jar}"/>
- <pathelement location="../implementation-crud-extension/target/sample-implementation-crud-extension.jar"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/implementation-crud/implementation-crud.png b/branches/sca-android/samples/implementation-crud/implementation-crud.png
deleted file mode 100644
index a292037e7a..0000000000
--- a/branches/sca-android/samples/implementation-crud/implementation-crud.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/implementation-crud/implementation-crud.svg b/branches/sca-android/samples/implementation-crud/implementation-crud.svg
deleted file mode 100644
index dbb37be208..0000000000
--- a/branches/sca-android/samples/implementation-crud/implementation-crud.svg
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\implementation-crud"
- sodipodi:docname="implementation-crud.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\implementation-crud\implementation-crud.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="528.85714"
- inkscape:cy="406.01174"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1142"
- inkscape:window-height="722"
- inkscape:window-x="107"
- inkscape:window-y="128" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1.038749,0,0,1.009461,-29.25616,-1.807024)">
- <rect
- rx="8.7034655"
- ry="12.692303"
- y="192.00233"
- x="375.89822"
- height="299.99988"
- width="281.85843"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.95312572;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"
- transform="translate(104.5213,-10.61387)"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">crud</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="450.63062"
- y="302.8819"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(183.0398,96.94336)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">CRUDService</flowPara><flowPara
- id="flowPara1894">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 433.4801,334.72889 L 466.81514,334.72889 L 472.87605,347.86087 L 465.80499,359.98271 L 433.4801,359.98271 L 441.05625,347.86087 L 433.4801,334.72889 z "
- id="path3017" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1904"
- transform="translate(158.2681,129.761)"><flowRegion
- id="flowRegion1906"><rect
- id="rect1908"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1912"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">CRUD</flowPara></flowRoot> </g>
-</svg>
diff --git a/branches/sca-android/samples/implementation-crud/pom.xml b/branches/sca-android/samples/implementation-crud/pom.xml
deleted file mode 100644
index 3cc75a6f7d..0000000000
--- a/branches/sca-android/samples/implementation-crud/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-implementation-crud</artifactId>
- <name>Apache Tuscany SCA CRUD Implementation Extension Sample Client</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-implementation-crud-extension</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java b/branches/sca-android/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java
deleted file mode 100644
index ea87cb3001..0000000000
--- a/branches/sca-android/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package crud.client;
-
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import crud.CRUD;
-
-/**
- * A sample client that shows how to create an SCA domain, get a service, and
- * invoke service methods of a CRUD component.
- *
- * The CRUD component uses an <implementation.crud> implementation extension
- * from module implementation-crud-extension.
- *
- * @version $Rev$ $Date$
- */
-public class CRUDClient {
-
- public static void main(String[] args) throws Exception {
-
- SCADomain scaDomain = SCADomain.newInstance("crud.composite");
- CRUD crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent");
-
- String id = crudService.create("ABC");
-
- Object result = crudService.retrieve(id);
- System.out.println("Result from create: " + result);
-
- crudService.update(id, "EFG");
- result = crudService.retrieve(id);
- System.out.println("Result from update: " + result);
-
- crudService.delete(id);
- result = crudService.retrieve(id);
- System.out.println("Result from delete: " + result);
-
- scaDomain.close();
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-crud/src/main/resources/crud.composite b/branches/sca-android/samples/implementation-crud/src/main/resources/crud.composite
deleted file mode 100644
index 18745033bb..0000000000
--- a/branches/sca-android/samples/implementation-crud/src/main/resources/crud.composite
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample/crud"
- xmlns:sc="http://sample/crud"
- xmlns:c="http://crud"
- name="crud">
-
- <component name="CRUDServiceComponent">
- <c:implementation.crud directory="tmp" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java b/branches/sca-android/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java
deleted file mode 100644
index 7e0476a8b1..0000000000
--- a/branches/sca-android/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java
+++ /dev/null
@@ -1,61 +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 crud.client;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import crud.CRUD;
-
-
-/**
- * Tests the sample crud composite.
- */
-public class CRUDTestCase extends TestCase {
-
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("crud.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void test() throws Exception {
- CRUD crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent");
-
- String id = crudService.create("ABC");
- Object result = crudService.retrieve(id);
- assertEquals(result, "ABC");
-
- crudService.update(id, "EFG");
- result = crudService.retrieve(id);
- assertEquals(result, "EFG");
-
- crudService.delete(id);
- result = crudService.retrieve(id);
- assertNull(result);
- }
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/README b/branches/sca-android/samples/implementation-pojo-extension/README
deleted file mode 100644
index 3b201779e1..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/README
+++ /dev/null
@@ -1,70 +0,0 @@
-Implementation POJO Sample
-==========================
-This sample demonstrates how new implementation types are constructed for
-Apache Tuscany SCA.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-Sample Overview
----------------
-This sample contains a POJO implementation type as an example of how to create
-new implementation types.
-
-implementation-pojo-extension/
- src/
- main/
- java/
- pojo/ - implementation model interfaces
- impl/ - implementations of the model interfaces
- provider/ - runtime implementation
- resources/
- META-INF/
- services/ - declares the extension
- test/
- java/
- helloworld/
- HelloWorldTestCase.java - JUnit test case
- resources/
- helloworld.composite - the SCA assembly used during unit testing
-
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building The Sample Extension Using Ant
------------------------------------------
-With the binary distribution the sample extension can be built using Ant as
-follows
-
-cd implementation-pojo-extension
-ant compile
-
-Building The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built
-using Maven as follows.
-
-cd implementation-pojo-extension
-mvn
-
-Maven will also test that the sample extension built properly. You should see
-the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running helloworld.HelloWorldTestCase
-Initializing POJO
-Initializing POJO
-Executing POJO sayHello
-Initializing POJO
-Initializing POJO
-Executing POJO sayHello
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.616 sec
-
-Results :
-
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/implementation-pojo-extension/build.xml b/branches/sca-android/samples/implementation-pojo-extension/build.xml
deleted file mode 100644
index 78bae79859..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/build.xml
+++ /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.
--->
-<project name="implementation-pojo-extension" default="compile">
- <property name="test.jar" value="sample-implementation-pojo-extension.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/implementation-pojo-extension/pom.xml b/branches/sca-android/samples/implementation-pojo-extension/pom.xml
deleted file mode 100644
index d7bb120e93..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-implementation-pojo-extension</artifactId>
- <name>Apache Tuscany SCA POJO Implementation Extension Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-assembly-xml</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java-xml</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-core-spi</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java
deleted file mode 100644
index 7c2f5d236f..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.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 pojo;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import org.apache.tuscany.sca.assembly.Implementation;
-
-
-/**
- * Represents a POJO implementation in an SCA assembly.
- *
- * @version $Rev$ $Date$
- */
-public interface POJOImplementation extends Implementation {
-
- /**
- * Returns the POJO class name
- * @return
- */
- public String getPOJOName();
-
- /**
- * Sets the POJO class name
- * @param pojoName
- */
- public void setPOJOName(String pojoName);
-
- /**
- * Returns the POJO class.
- * @return
- */
- public Class<?> getPOJOClass();
-
- /**
- * Sets the POJO class.
- * @param pojoClass
- */
- public void setPOJOClass(Class<?> pojoClass);
-
- /**
- * Returns the POJO's methods.
- * @return
- */
- public Map<String, Method> getMethods();
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java
deleted file mode 100644
index bbcfb3d0dc..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.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 pojo;
-
-
-/**
- * Factory for the POJO implementation model.
- *
- * @version $Rev$ $Date$
- */
-public interface POJOImplementationFactory {
-
- /**
- * Creates a new POJO implementation model object.
- * @return a new POJO implementation model object
- */
- POJOImplementation createPOJOImplementation();
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java
deleted file mode 100644
index 0dad270a6c..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.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 pojo.impl;
-
-import pojo.POJOImplementation;
-import pojo.POJOImplementationFactory;
-
-/**
- * A factory for the POJO implementation model.
- *
- * @version $Rev$ $Date$
- */
-public class POJOImplementationFactoryImpl implements POJOImplementationFactory {
-
- public POJOImplementation createPOJOImplementation() {
- return new POJOImplementationImpl();
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java
deleted file mode 100644
index f2d6871039..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java
+++ /dev/null
@@ -1,155 +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 pojo.impl;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-
-import pojo.POJOImplementation;
-
-
-/**
- * Represents a POJO implementation in an SCA assembly.
- *
- * @version $Rev$ $Date$
- */
-class POJOImplementationImpl implements POJOImplementation {
-
- private String pojoName;
- private Class<?> pojoClass;
- private String uri;
- private Map<String, Method> methods;
- private List<Service> services = new ArrayList<Service>();
- private List<Reference> references = new ArrayList<Reference>();
- private List<Property> properties = new ArrayList<Property>();
- private boolean unresolved;
-
- POJOImplementationImpl() {
- }
-
- /**
- * Returns the POJO class name
- * @return
- */
- public String getPOJOName() {
- return pojoName;
- }
-
- /**
- * Sets the POJO class name
- * @param pojoName
- */
- public void setPOJOName(String pojoName) {
- this.pojoName = pojoName;
- setURI(pojoName.replace('.', '/'));
- }
-
- /**
- * Returns the POJO class.
- * @return
- */
- public Class<?> getPOJOClass() {
- return pojoClass;
- }
-
- /**
- * Sets the POJO class.
- * @param pojoClass
- */
- public void setPOJOClass(Class<?> pojoClass) {
- this.pojoClass = pojoClass;
- setPOJOName(pojoClass.getName());
-
- // Index the POJO's methods
- methods = new HashMap<String, Method>();
- Method[] m = pojoClass.getMethods();
- for (int i = 0; i < m.length; i++) {
- methods.put(m[i].getName(), m[i]);
- }
- }
-
- /**
- * Returns the POJO's methods.
- * @return
- */
- public Map<String, Method> getMethods() {
- return methods;
- }
-
- public ConstrainingType getConstrainingType() {
- // The sample POJO implementation does not support constrainingTypes
- return null;
- }
-
- public List<Property> getProperties() {
- return properties;
- }
-
- public List<Service> getServices() {
- return services;
- }
-
- public List<Reference> getReferences() {
- return references;
- }
-
- public String getURI() {
- return uri;
- }
-
- public void setConstrainingType(ConstrainingType constrainingType) {
- // The sample POJO implementation does not support constrainingTypes
- }
-
- public void setURI(String uri) {
- this.uri = uri;
- }
-
- public boolean isUnresolved() {
- return unresolved;
- }
-
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
- @Override
- public int hashCode() {
- return uri.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof POJOImplementationImpl) {
- return ((POJOImplementationImpl)obj).getURI().equals(uri);
- } else {
- return false;
- }
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java
deleted file mode 100644
index 44a2cc0aa8..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java
+++ /dev/null
@@ -1,174 +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 pojo.impl;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-
-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.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ComponentType;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ClassReference;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-
-import pojo.POJOImplementation;
-import pojo.POJOImplementationFactory;
-
-/**
- * Implements a STAX based artifact processor for POJO implementations.
- *
- * The artifact processor is responsible for processing <implementation.pojo>
- * elements in SCA assembly XML composite files and populating the POJO
- * implementation model, resolving its references to other artifacts in the SCA
- * contribution, and optionally write the model back to SCA assembly XML.
- */
-public class POJOImplementationProcessor implements StAXArtifactProcessor<POJOImplementation> {
- private static final QName IMPLEMENTATION_POJO = new QName("http://pojo", "implementation.pojo");
-
- private AssemblyFactory assemblyFactory;
- private JavaInterfaceFactory javaFactory;
- private POJOImplementationFactory pojoImplementationFactory;
- private PolicyFactory policyFactory;
- private PolicyAttachPointProcessor policyProcessor;
-
- public POJOImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
-
- // Get the assembly and Java interface factories as we'll need them to
- // create model objects
- assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
- policyFactory = modelFactories.getFactory(PolicyFactory.class);
- pojoImplementationFactory = modelFactories.getFactory(POJOImplementationFactory.class);
- policyProcessor = new PolicyAttachPointProcessor(policyFactory);
- }
-
- public QName getArtifactType() {
- // Returns the qname of the XML element processed by this processor
- return IMPLEMENTATION_POJO;
- }
-
- public Class<POJOImplementation> getModelType() {
- // Returns the type of model processed by this processor
- return POJOImplementation.class;
- }
-
- public POJOImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
-
- // Read an <implementation.pojo> element
- POJOImplementation implementation = pojoImplementationFactory.createPOJOImplementation();
-
- // Read policies
- policyProcessor.readPolicies(implementation, reader);
-
- // Read the POJO class attribute.
- String className = reader.getAttributeValue(null, "class");
- implementation.setPOJOName(className);
-
- // Mark the POJO model unresolved to track the fact that it's not
- // completely initialized, its class is not loaded yet and services
- // and references not initialized either
- implementation.setUnresolved(true);
-
- // Skip to end element
- while (reader.hasNext()) {
- if (reader.next() == END_ELEMENT && IMPLEMENTATION_POJO.equals(reader.getName())) {
- break;
- }
- }
-
- return implementation;
- }
-
- public void resolve(POJOImplementation implementation, ModelResolver resolver) throws ContributionResolveException {
-
- // Resolve the POJO implementation
-
- // First resolve its class
- ClassReference classReference = new ClassReference(implementation.getPOJOName());
- classReference = resolver.resolveModel(ClassReference.class, classReference);
- Class<?> pojoClass = classReference.getJavaClass();
- if (pojoClass == null) {
- throw new ContributionResolveException("Class could not be resolved: " + implementation.getPOJOName());
- }
- implementation.setPOJOClass(pojoClass);
-
- // Check to see if we have a .componentType file describing the POJO class
- ComponentType componentType = assemblyFactory.createComponentType();
- componentType.setUnresolved(true);
- componentType.setURI(implementation.getURI() + ".componentType");
- componentType = resolver.resolveModel(ComponentType.class, componentType);
- if (!componentType.isUnresolved()) {
-
- // We have a component type description, merge it into the POJO model
- implementation.getServices().addAll(componentType.getServices());
- implementation.getReferences().addAll(componentType.getReferences());
- implementation.getProperties().addAll(componentType.getProperties());
-
- } else {
-
- // We have no component type description, simply introspect the POJO and
- // create a single Service for it
- Service service = assemblyFactory.createService();
- service.setName(pojoClass.getSimpleName());
- JavaInterface javaInterface;
- try {
- javaInterface = javaFactory.createJavaInterface(pojoClass);
- } catch (InvalidInterfaceException e) {
- throw new ContributionResolveException(e);
- }
- JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
- interfaceContract.setInterface(javaInterface);
- service.setInterfaceContract(interfaceContract);
- implementation.getServices().add(service);
- }
-
- // Mark the implementation resolved now
- implementation.setUnresolved(false);
- }
-
- public void write(POJOImplementation implementation, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
-
- // Write <implementation.pojo> element
- policyProcessor.writePolicyPrefixes(implementation, writer);
- writer.writeStartElement(IMPLEMENTATION_POJO.getNamespaceURI(), IMPLEMENTATION_POJO.getLocalPart());
- policyProcessor.writePolicyAttributes(implementation, writer);
-
- if (implementation.getPOJOName() != null) {
- writer.writeAttribute("class", implementation.getPOJOName());
- }
-
- writer.writeEndElement();
- }
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java
deleted file mode 100644
index 87333c61f6..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.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 pojo.provider;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.osoa.sca.ServiceRuntimeException;
-
-/**
- * Implements an invoker for POJO component implementations.
- *
- * The invoker is responsible for handling invocations of a business operation.
- * Input business data is passed to the invoke method in a Message object.
- * The invoke method is responsible for handling the invocation and returning a Message with
- * the output business data.
- *
- * In this example we are simply delegating the operation invocations to the
- * corresponding methods on the POJO implementation class using Java reflection.
- *
- * Depending on the type of implementation being handled, more sophisticated invokers can
- * use other techniques to delegate the invocation to the implementation artifact directly, call a
- * runtime engine like a BPEL engine or an XQuery engine (this is what the Tuscany
- * implementation-bpel and implementation-xquery extensions do) or just completely handle the
- * invocation in the invoker itself if the implementation has a fixed behavior for example.
- */
-class POJOImplementationInvoker implements Invoker {
-
- private Object pojoInstance;
- private Method method;
-
- POJOImplementationInvoker(Object pojoInstance, Operation operation, Method method) {
- this.pojoInstance = pojoInstance;
- this.method = method;
- }
-
- public Message invoke(Message msg) {
- try {
- msg.setBody(method.invoke(pojoInstance, (Object[])msg.getBody()));
- } catch (InvocationTargetException e) {
- msg.setFaultBody(e);
- } catch (Exception e) {
- throw new ServiceRuntimeException(e);
- }
- return msg;
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java
deleted file mode 100644
index 73a0d22493..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.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 pojo.provider;
-
-import java.lang.reflect.Method;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.osoa.sca.ServiceRuntimeException;
-
-import pojo.POJOImplementation;
-
-/**
- * An implementation provider for sample CRUD implementations.
- *
- * The implementation provider is responsible for handling the lifecycle of a component
- * implementation and creating operation invokers for the service operations provided
- * by the implementation.
- *
- * The start() and stop() methods are called when a component is started
- * and stopped. In this example we are using that opportunity to call init and destroy methods
- * on the POJO instance if these methods exist.
- *
- * The createInvoker method is called for each operation provided by the component
- * implementation. The implementation provider can create an invoker and initialize it
- * at that time to minimize the amount of work to be performed on each invocation.
- *
- * For example here we are looking up the Java method corresponding to the service operation
- * at passing it to the invoker constructor. This way the invoker won't have to lookup the Java
- * method on each invocation.
- */
-class POJOImplementationProvider implements ImplementationProvider {
-
- private POJOImplementation implementation;
- private Object pojoInstance;
-
- /**
- * Constructs a new CRUD implementation.
- */
- POJOImplementationProvider(RuntimeComponent component, POJOImplementation implementation) {
- this.implementation = implementation;
-
- // Create a new instance of the POJO
- try {
- pojoInstance = implementation.getPOJOClass().newInstance();
- } catch (Exception e) {
- throw new ServiceRuntimeException(e);
- }
- }
-
- public void start() {
- try {
- // Invoke the POJO's init method
- Method initMethod = implementation.getMethods().get("init");
- if (initMethod != null) {
- initMethod.invoke(pojoInstance);
- }
- } catch (Exception e) {
- throw new ServiceRuntimeException(e);
- }
- }
-
- public void stop() {
- try {
- // Invoke the POJO's destroy method
- Method destroyMethod = implementation.getMethods().get("destroy");
- if (destroyMethod != null) {
- destroyMethod.invoke(pojoInstance);
- }
- } catch (Exception e) {
- throw new ServiceRuntimeException(e);
- } finally {
- pojoInstance = null;
- }
- }
-
- public Invoker createInvoker(RuntimeComponentService service, Operation operation) {
- Method method = implementation.getMethods().get(operation.getName());
- POJOImplementationInvoker invoker = new POJOImplementationInvoker(pojoInstance, operation, method);
- return invoker;
- }
-
- public boolean supportsOneWayInvocation() {
- return false;
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java b/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java
deleted file mode 100644
index 22f2be09e9..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java
+++ /dev/null
@@ -1,45 +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 pojo.provider;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
-import pojo.POJOImplementation;
-
-/**
- * A factory for POJO implementation providers.
- */
-public class POJOImplementationProviderFactory implements ImplementationProviderFactory<POJOImplementation> {
-
- public POJOImplementationProviderFactory(ExtensionPointRegistry registry) {
- }
-
- public Class<POJOImplementation> getModelType() {
- // Returns the type of model processed by this processor
- return POJOImplementation.class;
- }
-
- public ImplementationProvider createImplementationProvider(RuntimeComponent component, POJOImplementation implementation) {
- return new POJOImplementationProvider(component, implementation);
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
deleted file mode 100644
index 8337e81c5f..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/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
-pojo.impl.POJOImplementationProcessor;qname=http://pojo#implementation.pojo,model=pojo.POJOImplementation,factory=pojo.POJOImplementationFactory
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
deleted file mode 100644
index 64dd230a15..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
+++ /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.
-
-# URI of the XML schema to be used for validation
-sample-implementation-pojo.xsd
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
deleted file mode 100644
index b30ea3b9cf..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
+++ /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 implementation extension
-pojo.provider.POJOImplementationProviderFactory;model=pojo.POJOImplementation
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory b/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory
deleted file mode 100644
index 075af98240..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory
+++ /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 implementation model factory
-pojo.impl.POJOImplementationFactoryImpl
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd b/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd
deleted file mode 100644
index c9d170770b..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://pojo"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:p="http://pojo"
- elementFormDefault="qualified">
-
- <import namespace="http://www.osoa.org/xmlns/sca/1.0"/>
-
- <element name="implementation.pojo" type="p:POJOImplementation"/>
-
- <complexType name="POJOImplementation">
- <complexContent>
- <extension base="sca:Implementation">
- <attribute name="class" type="NCName" use="required"/>
- </extension>
- </complexContent>
- </complexType>
-
-</schema>
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java b/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java
deleted file mode 100644
index cc32929f09..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.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 helloworld;
-
-public interface HelloWorld {
-
- String sayHello(String name);
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java
deleted file mode 100644
index 0580e30aba..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.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 helloworld;
-
-public class HelloWorldImpl {
-
- public void init() {
- System.out.println("Initializing POJO");
- }
-
- public void destroy() {
- System.out.println("Destroying POJO");
- }
-
- public String sayHello(String name) {
- System.out.println("Executing POJO sayHello");
- return "Hello " + name;
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java b/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java
deleted file mode 100644
index 69ab1f567e..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.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 helloworld;
-
-public class HelloWorldImpl2 {
-
- public void init() {
- System.out.println("Initializing POJO");
- }
-
- public void destroy() {
- System.out.println("Destroying POJO");
- }
-
- public String sayHello(String name) {
- System.out.println("Executing POJO sayHello");
- return "Hello " + name;
- }
-
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java
deleted file mode 100644
index d8b5f41adc..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.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 helloworld;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Tests the POJO implementation extension.
- */
-public class HelloWorldTestCase extends TestCase {
-
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("helloworld/helloworld.composite");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testHello() throws Exception {
- HelloWorld helloworld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent");
- assertEquals("Hello petra", helloworld.sayHello("petra"));
- }
-
- public void testHello2() throws Exception {
- HelloWorld helloworld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent2/HelloWorld2");
- assertEquals("Hello petra", helloworld.sayHello("petra"));
- }
-}
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType b/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType
deleted file mode 100644
index a92c5ab8db..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
-
- <service name="HelloWorld2">
- <interface.java interface="helloworld.HelloWorld"/>
- </service>
-
-</componentType> \ No newline at end of file
diff --git a/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite b/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite
deleted file mode 100644
index c38094dfc9..0000000000
--- a/branches/sca-android/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://test/helloworld"
- xmlns:p="http://pojo"
- name="helloworld">
-
- <component name="HelloWorldComponent">
- <p:implementation.pojo class="helloworld.HelloWorldImpl" />
- </component>
-
- <component name="HelloWorldComponent2">
- <p:implementation.pojo class="helloworld.HelloWorldImpl2" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/pom.xml b/branches/sca-android/samples/pom.xml
deleted file mode 100644
index e7af01dbac..0000000000
--- a/branches/sca-android/samples/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tuscany-samples</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Samples</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>binding-echo</module>
- <module>binding-echo-extension</module>
- <module>calculator</module>
- <module>calculator-lean</module>
- <module>databinding-echo</module>
- <module>implementation-composite</module>
- <module>implementation-crud</module>
- <module>implementation-crud-extension</module>
- <module>implementation-pojo-extension</module>
- <module>simple-bigbank</module>
- <module>simple-callback</module>
- <module>supplychain</module>
- </modules>
- </profile>
- </profiles>
-
-</project>
diff --git a/branches/sca-android/samples/simple-bigbank/README b/branches/sca-android/samples/simple-bigbank/README
deleted file mode 100644
index acbe93a4d3..0000000000
--- a/branches/sca-android/samples/simple-bigbank/README
+++ /dev/null
@@ -1,101 +0,0 @@
-Calculator Sample
-=================
-This sample implements a simple a version of the BigBank scenrio used in
-various places in the SCA specification documents.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-simple-bigbank.jar bigbank.client.BigBankClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-bigbank.jar bigbank.client.BigBankClient
-
-
-Sample Overview
----------------
-This sample demonstrates a simple bank summary transaction while using Java components wired together.
-SCA default binding is used.
-
-A request to the AccountComponent results in a request to the AccountDataComponent to get account data
-which is based on a random stock quote price. Therefore result for this sample will vary on each run.
-
-calculator/
- src/
- main/
- java/
- bigbank/
- account/ - AccountComponent implementation
- accountdata/ - AccountDataComponent implementation
- stockquote/ - generates random stock prices
- client/ - starts the SCA Runtime and
- deploys the BigBank.composite.
- It then calls the deployed AccountService
- resources/
- Account.composite - SCA assembly for this sample
- BigBank.composite - SCA assembly for this sample
- StockQuote.composite - SCA assembly for this sample
- test/
- java/
- bigbank/
- BigBankTestCase.java - JUnit test case
- simple-bigbank.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd simple-bigbank
-ant compile
-ant run
-
-You should see the following output from the run target.
-** Please note that the balance amount is dependent on the random sotck quote price and the
-numbers may vary on each run.
-
-run:
- [java] Getting stock quote for: IBM, value: 104.06
- [java] Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID
-:Foo_SAA12345, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balanc
-e:10406.0]
-
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd simple-bigbank
-mvn
-
-You should see the following output from the test phase.
-** Please note that the balance amount is dependent on the random sotck quote price and the numbers may vary on each run.
-
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running bigbank.BigBankTestCase
-Getting stock quote for: IBM, value: 104.02
-Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID:Foo_SAA1234
-5, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balance:10402.0]
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.502 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/simple-bigbank/build.xml b/branches/sca-android/samples/simple-bigbank/build.xml
deleted file mode 100644
index a814014eae..0000000000
--- a/branches/sca-android/samples/simple-bigbank/build.xml
+++ /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.
--->
-<project name="simple-bigbank" default="compile">
- <property name="test.class" value="bigbank.client.BigBankClient" />
- <property name="test.jar" value="sample-simple-bigbank.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/simple-bigbank/pom.xml b/branches/sca-android/samples/simple-bigbank/pom.xml
deleted file mode 100644
index bb99d5cd6c..0000000000
--- a/branches/sca-android/samples/simple-bigbank/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-simple-bigbank</artifactId>
- <name>Apache Tuscany SCA Simplified BigBank Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/simple-bigbank/simple-bigbank.png b/branches/sca-android/samples/simple-bigbank/simple-bigbank.png
deleted file mode 100644
index 593c047f6a..0000000000
--- a/branches/sca-android/samples/simple-bigbank/simple-bigbank.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/simple-bigbank/simple-bigbank.svg b/branches/sca-android/samples/simple-bigbank/simple-bigbank.svg
deleted file mode 100644
index c64f6de6b9..0000000000
--- a/branches/sca-android/samples/simple-bigbank/simple-bigbank.svg
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-bigbank"
- sodipodi:docname="simple-bigbank.svg"
- version="1.0"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-bigbank\simple-bigbank.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="468.4064"
- inkscape:cy="414.63224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="120"
- inkscape:window-y="172" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997">
- <rect
- rx="15.307091"
- ry="12.692303"
- y="192.00233"
- x="258.31146"
- height="299.99988"
- width="495.71429"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999964;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">BigBank</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="339.91632"
- y="310.73904"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(84.32554,112.8005)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">Account</flowPara><flowPara
- id="flowPara1883">Service</flowPara><flowPara
- id="flowPara1885">Component</flowPara></flowRoot> <rect
- style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect3006"
- width="43.861084"
- height="29.993773"
- x="376.59262"
- y="285.79593"
- rx="21.930542"
- ry="0" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 322.76581,342.58603 L 356.10085,342.58603 L 362.16176,355.71801 L 355.0907,367.83985 L 322.76581,367.83985 L 330.34196,355.71801 L 322.76581,342.58603 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 436.01825,340.74775 L 469.35329,340.74775 L 475.4142,353.87973 L 468.34314,366.00157 L 436.01825,366.00157 L 443.5944,353.87973 L 436.01825,340.74775 z "
- id="path3019" />
- <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 226.73063,330.75341 L 280.61512,330.75341 L 290.41229,356.14253 L 278.98226,379.57867 L 226.73063,379.57867 L 238.97711,356.14253 L 226.73063,330.75341 z "
- id="path1887" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1889"
- width="115.66247"
- height="85.862968"
- x="557.25488"
- y="308.38455"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1891"
- transform="translate(301.6641,110.446)"><flowRegion
- id="flowRegion1893"><rect
- id="rect1895"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1897">Account</flowPara><flowPara
- id="flowPara1909">Data</flowPara><flowPara
- id="flowPara1899">Service</flowPara><flowPara
- id="flowPara1901">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 540.10438,340.23154 L 573.43942,340.23154 L 579.50033,353.36352 L 572.42927,365.48536 L 540.10438,365.48536 L 547.68053,353.36352 L 540.10438,340.23154 z "
- id="path1905" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 290,355.52305 C 329.28571,355.52305 329.28571,355.52305 329.28571,355.52305"
- id="path1913" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 475,353.3802 C 547.14286,352.66591 547.14286,352.66591 547.14286,352.66591"
- id="path1919" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1921"
- transform="translate(95.23912,80.79069)"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1923"><rect
- id="rect1925"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1931">currency</flowPara></flowRoot> <flowRoot
- xml:space="preserve"
- id="flowRoot1933"
- transform="translate(-42.61803,130.0764)"
- style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion
- id="flowRegion1935"><rect
- id="rect1937"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591"
- style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
- id="flowPara1939">Account</flowPara><flowPara
- id="flowPara1941">Service</flowPara><flowPara
- id="flowPara1943" /></flowRoot> </g>
-</svg>
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java
deleted file mode 100644
index 1625ff5b65..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package bigbank.account;
-
-import java.util.List;
-
-/**
- */
-public class AccountReport {
- private List<String> summaries;
- private String currency;
-
- public AccountReport(String currency, List<String> summaries) {
- this.currency = currency;
- this.summaries = summaries;
- }
-
- public List getAccountSummaries() { return summaries; }
-
- public String getCurrency() { return currency; }
-
- @Override
- public String toString() {
- return "currency: "+ currency + ", " + summaries;
- }
-
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java
deleted file mode 100644
index 7c9082b944..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.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 bigbank.account;
-
-/**
- * Interface for a account service
- */
-public interface AccountService {
- public AccountReport getAccountReport(String customerID);
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java
deleted file mode 100644
index fa85f309c0..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.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;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-
-import bigbank.accountdata.AccountDataService;
-import bigbank.accountdata.CheckingAccount;
-import bigbank.accountdata.SavingsAccount;
-import bigbank.accountdata.StockAccount;
-import bigbank.stockquote.StockQuoteService;
-
-/**
- * Account service implementation
- */
-public class AccountServiceImpl implements AccountService {
-
- @Reference
- public AccountDataService accountDataService;
-
- @Reference
- public StockQuoteService stockQuoteService;
-
- @Property
- public String currency;
-
- public AccountReport getAccountReport(String s) {
- List<String> summaries = new ArrayList<String>();
-
- CheckingAccount ca = accountDataService.getCheckingAccount(s);
- summaries.add(ca.getSummary());
-
- SavingsAccount sa = accountDataService.getSavingsAccount(s);
- summaries.add(sa.getSummary());
-
- StockAccount sk = accountDataService.getStockAccount(s);
-
- double price = stockQuoteService.getQuote(sk.getSymbol());
- sk.setBalance(sk.getQuantity() * price);
-
- summaries.add(sk.getSummary());
-
- AccountReport report = new AccountReport(currency, summaries);
-
- return report;
- }
-
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java
deleted file mode 100644
index a5ae7b3955..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.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 bigbank.accountdata;
-
-/**
- * Interface for a account service
- */
-public interface Account {
- String getSummary();
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java
deleted file mode 100644
index c354de387b..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package bigbank.accountdata;
-
-/**
- * Interface for a account data service
- */
-public interface AccountDataService {
- public CheckingAccount getCheckingAccount(String customerID);
- public SavingsAccount getSavingsAccount(String customerID);
- public StockAccount getStockAccount(String customerID);
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
deleted file mode 100644
index 000acb935c..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.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.accountdata;
-
-
-/**
- * Account data service implementation
- */
-public class AccountDataServiceImpl implements AccountDataService {
-
- public CheckingAccount getCheckingAccount(String customerID) {
-
- CheckingAccount checkingAccount = new CheckingAccount();
- checkingAccount.setAccountNumber(customerID+"_"+"CHA12345");
- checkingAccount.setBalance(1500.0f);
-
- return checkingAccount;
- }
-
- public SavingsAccount getSavingsAccount(String customerID) {
-
- SavingsAccount savingsAccount = new SavingsAccount();
- savingsAccount.setAccountNumber(customerID+"_"+"SAA12345");
- savingsAccount.setBalance(1500.0f);
-
- return savingsAccount;
- }
-
- public StockAccount getStockAccount(String customerID) {
-
- StockAccount stockAccount = new StockAccount();
- stockAccount.setAccountNumber(customerID+"_"+"STA12345");
- stockAccount.setSymbol("IBM");
- stockAccount.setQuantity(100);
-
- return stockAccount;
- }
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java
deleted file mode 100644
index 11bdff757e..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.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.accountdata;
-
-/**
- * An account service implementation for a checking account
- */
-public class CheckingAccount implements Account {
- 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; }
-
- public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; }
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java
deleted file mode 100644
index b791024076..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.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.accountdata;
-
-/**
- * An account service implementation for a savings account
- */
-public class SavingsAccount implements Account {
- 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; }
-
- public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; }
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java
deleted file mode 100644
index 86246a3f84..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package bigbank.accountdata;
-
-/**
- * An account service implementation for a stock account
- */
-public class StockAccount implements Account {
- private String accountNumber;
- private String symbol;
- private int quantity;
- private double balance;
-
- public String getAccountNumber() { return accountNumber; }
- public void setAccountNumber(String n) { this.accountNumber = n; }
-
- public double getQuantity() { return quantity; }
- public void setQuantity(int a) { this.quantity = a; }
-
- public String getSymbol() { return symbol; }
- public void setSymbol(String s) { this.symbol = s; }
-
- public double getBalance() { return balance; }
- public void setBalance(double balance) { this.balance = balance; }
-
- public String getSummary() { return "ID:" + accountNumber + ", symbol:" + symbol + ", quantity:" + quantity + ", balance:" + balance; }
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java
deleted file mode 100644
index edbf910d37..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package 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 scaDomain = SCADomain.newInstance("BigBank.composite");
-
- AccountService accountService = scaDomain.getService(AccountService.class,
- "AccountServiceComponent");
-
- System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
-
- scaDomain.close();
- }
-
-}
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java
deleted file mode 100644
index 0512d40b0b..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.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.stockquote;
-
-
-/**
- * This class implements the StockQuote service.
- */
-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-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java
deleted file mode 100644
index 7961279352..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.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.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-android/samples/simple-bigbank/src/main/resources/Account.composite b/branches/sca-android/samples/simple-bigbank/src/main/resources/Account.composite
deleted file mode 100644
index e71615e27e..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/resources/Account.composite
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://account"
- name="Account">
-
- <service name="AccountService" promote="AccountServiceComponent"/>
-
- <component name="AccountServiceComponent">
- <implementation.java class="bigbank.account.AccountServiceImpl"/>
- <reference name="accountDataService" target="AccountDataServiceComponent"/>
- <property name="currency">USD</property>
- </component>
-
- <component name="AccountDataServiceComponent">
- <implementation.java class="bigbank.accountdata.AccountDataServiceImpl"/>
- </component>
-
- <reference name="stockQuoteService" promote="AccountServiceComponent/stockQuoteService"/>
-
-</composite>
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/resources/BigBank.composite b/branches/sca-android/samples/simple-bigbank/src/main/resources/BigBank.composite
deleted file mode 100644
index c870f39cab..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/resources/BigBank.composite
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://bigbank"
- xmlns:a="http://account"
- xmlns:s="http://stockquote"
- name="BigBank">
-
- <component name="AccountServiceComponent">
- <implementation.composite name="a:Account"/>
- <reference name="stockQuoteService" target="StockQuoteServiceComponent"/>
- </component>
-
- <component name="StockQuoteServiceComponent">
- <implementation.composite name="s:StockQuote"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/simple-bigbank/src/main/resources/StockQuote.composite b/branches/sca-android/samples/simple-bigbank/src/main/resources/StockQuote.composite
deleted file mode 100644
index 4f29c14851..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/main/resources/StockQuote.composite
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://stockquote"
- name="StockQuote">
-
- <service name="StockQuoteService" promote="StockQuoteServiceComponent"/>
-
- <component name="StockQuoteServiceComponent">
- <implementation.java class="bigbank.stockquote.StockQuoteImpl" />
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java b/branches/sca-android/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java
deleted file mode 100644
index ba6c1dd797..0000000000
--- a/branches/sca-android/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.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;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-import bigbank.account.AccountService;
-
-/**
- * Tests out the big bank service
- *
- */
-public class BigBankTestCase extends TestCase {
-
- private SCADomain scaDomain;
- AccountService accountService;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("BigBank.composite");
- accountService = scaDomain.getService(AccountService.class, "AccountServiceComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void test() throws Exception {
- System.out.println("Account summary: " + accountService.getAccountReport("Foo") );
- }
-}
diff --git a/branches/sca-android/samples/simple-callback/README b/branches/sca-android/samples/simple-callback/README
deleted file mode 100644
index 719376f254..0000000000
--- a/branches/sca-android/samples/simple-callback/README
+++ /dev/null
@@ -1,97 +0,0 @@
-Simple Callback Sample
-======================
-This sample demonstrates asynchronous messaging using a callback.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-simple-callback.jar simplecallback.SimpleCallbackClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-callback.jar simplecallback.SimpleCallbackClient
-
-
-Sample Overview
----------------
-The sample provides a single composite with two components. MyClientComponent is
-wired to MyServiceComponent. The interface of MyServiceComponent describes one
-method as ONEWAY and with a callback semantic. When a message passes from
-client to service the response is returned via the callback asynchronously.
-
-simple-callback/
- src/
- main/
- java/
- simplecallback/
- MyClient.java - client interface
- MyClientImpl.java - implements the client and service callback
- interfaces
- MyService.java - service interface
- MyServiceCallback.java - service callback interface, implemented by the
- client
- MyServiceImpl.java - implements the service interface
- SimpleCallbackClient.java - starts the SCA Runtime and
- deploys the simplecallback.composite.
- It then calls MyClientComponent which in turn
- calls MyServiceComponent
- resources/
- simplecallback.composite - the SCA assembly for this sample
- test/
- java/
- simplecallback/
- SimpleCallbackTestCase.java - JUnit test case
- simple-callback.png - a pictorial representation of the sample
- .composite file
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd simple-callback
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] Main thread Thread[main,5,main]
- [java] Work thread Thread[pool-1-thread-1,5,main]
- [java] Result: -> someMethod -> receiveResult
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd simple-callback
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running simplecallback.SimpleCallbackTestCase
-Main thread Thread[main,5,main]
-Sleeping ...
-Work thread Thread[pool-1-thread-1,5,main]
-Result: -> someMethod -> receiveResult
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.692 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/branches/sca-android/samples/simple-callback/build.xml b/branches/sca-android/samples/simple-callback/build.xml
deleted file mode 100644
index 47d1ea4bc1..0000000000
--- a/branches/sca-android/samples/simple-callback/build.xml
+++ /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.
--->
-<project name="simple-callback" default="compile">
- <property name="test.class" value="simplecallback.SimpleCallbackClient" />
- <property name="test.jar" value="sample-simple-callback.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/simple-callback/pom.xml b/branches/sca-android/samples/simple-callback/pom.xml
deleted file mode 100644
index 3a449dade9..0000000000
--- a/branches/sca-android/samples/simple-callback/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-simple-callback</artifactId>
- <name>Apache Tuscany SCA Simple Callback Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/simple-callback/simple-callback.png b/branches/sca-android/samples/simple-callback/simple-callback.png
deleted file mode 100644
index 1b6353f5cf..0000000000
--- a/branches/sca-android/samples/simple-callback/simple-callback.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/simple-callback/simple-callback.svg b/branches/sca-android/samples/simple-callback/simple-callback.svg
deleted file mode 100644
index 484b65df9d..0000000000
--- a/branches/sca-android/samples/simple-callback/simple-callback.svg
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-callback"
- sodipodi:docname="simple-callback.svg"
- version="1.0">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="375"
- inkscape:cy="414.63224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1054"
- inkscape:window-height="721"
- inkscape:window-x="74"
- inkscape:window-y="306" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997">
- <rect
- rx="15.307091"
- ry="12.692303"
- y="192.00233"
- x="258.31146"
- height="299.99988"
- width="495.71429"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999964;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">simplecallback</flowPara></flowRoot> <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1883"
- width="115.66247"
- height="85.862968"
- x="549.39777"
- y="308.7417"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1885"
- transform="translate(281.807,102.8031)"><flowRegion
- id="flowRegion1887"><rect
- id="rect1889"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1891">MyService</flowPara><flowPara
- id="flowPara1915">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 532.24723,340.58867 L 565.58227,340.58867 L 571.64318,353.72065 L 564.57212,365.84249 L 532.24723,365.84249 L 539.82338,353.72065 L 532.24723,340.58867 z "
- id="path1895" />
- </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="339.91632"
- y="310.73904"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(72.32554,104.8005)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">MyClient</flowPara><flowPara
- id="flowPara1913">Component</flowPara></flowRoot> <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 436.01825,340.74775 L 469.35329,340.74775 L 475.4142,353.87973 L 468.34314,366.00157 L 436.01825,366.00157 L 443.5944,353.87973 L 436.01825,340.74775 z "
- id="path3019" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 474.28571,353.3802 L 539.28571,354.09448"
- id="path1917"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-callback\simple-callback.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84" />
- </g>
-</svg>
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClient.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClient.java
deleted file mode 100644
index 4cc00d6d0f..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClient.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 simplecallback;
-
-/**
- * The client interface
- */
-public interface MyClient {
-
- void aClientMethod();
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java
deleted file mode 100644
index 3e2a1df5a5..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java
+++ /dev/null
@@ -1,49 +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 simplecallback;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-/**
- * Demonstrates a component-to-component callback invocation
- */
-@Service(MyClient.class)
-@Scope("COMPOSITE")
-public class MyClientImpl implements MyClient, MyServiceCallback {
-
- private MyService myService;
- static String result;
-
- @Reference
- public void setMyService(MyService myService) {
- this.myService = myService;
- }
-
- public void aClientMethod() {
- myService.someMethod("-> someMethod");
- }
-
- public void receiveResult(String result) {
- System.out.println("Work thread " + Thread.currentThread());
- System.out.println("Result: " + result);
- MyClientImpl.result = result;
- }
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyService.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyService.java
deleted file mode 100644
index e78ad6f68f..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyService.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 simplecallback;
-
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.OneWay;
-
-/**
- * This service that will be invoked in a non-blocking fashion
- */
-@Callback(MyServiceCallback.class)
-public interface MyService {
-
- @OneWay
- void someMethod(String arg);
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java
deleted file mode 100644
index b27eea44f5..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.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 simplecallback;
-
-/**
- * The callback interface for {@link MyService}.
- */
-public interface MyServiceCallback {
-
- void receiveResult(String result);
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java
deleted file mode 100644
index fc5e31d14e..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.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 simplecallback;
-
-import org.osoa.sca.annotations.Callback;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements MyService and uses a callback.
- */
-@Service(MyService.class)
-@Scope("COMPOSITE")
-public class MyServiceImpl implements MyService {
-
- private MyServiceCallback myServiceCallback;
-
- /**
- * The setter used by the runtime to set the callback reference
- * @param myServiceCallback
- */
- @Callback
- public void setMyServiceCallback(MyServiceCallback myServiceCallback) {
- this.myServiceCallback = myServiceCallback;
- }
-
- public void someMethod(String arg) {
- // invoke the callback
- try {
- myServiceCallback.receiveResult(arg + " -> receiveResult");
- } catch(RuntimeException e) {
- System.out.println("RuntimeException invoking receiveResult: " + e.toString());
- }
- }
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java b/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java
deleted file mode 100644
index b8987fcd07..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.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 simplecallback;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Demonstrates resolving the client service and initiating the callback sequence
- */
-public class SimpleCallbackClient {
-
- public static void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance("simplecallback.composite");
- MyClient myClient = scaDomain.getService(MyClient.class, "MyClientComponent");
-
- System.out.println("Main thread " + Thread.currentThread());
- myClient.aClientMethod();
- Thread.sleep(500);
-
- scaDomain.close();
- }
-}
diff --git a/branches/sca-android/samples/simple-callback/src/main/resources/simplecallback.composite b/branches/sca-android/samples/simple-callback/src/main/resources/simplecallback.composite
deleted file mode 100644
index 33e6f60601..0000000000
--- a/branches/sca-android/samples/simple-callback/src/main/resources/simplecallback.composite
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://simplecallback"
- xmlns:cb="http://simplecallback"
- name="simplecallback">
-
- <component name="MyClientComponent">
- <implementation.java class="simplecallback.MyClientImpl"/>
- <reference name="myService" target="MyServiceComponent"/>
- </component>
-
- <component name="MyServiceComponent">
- <implementation.java class="simplecallback.MyServiceImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java b/branches/sca-android/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java
deleted file mode 100644
index cbaab8af83..0000000000
--- a/branches/sca-android/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.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 simplecallback;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * A testcase that demonstrates resolving the client service and initiating the callback sequence
- */
-public class SimpleCallbackTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private MyClient myClient;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("simplecallback.composite");
- myClient = scaDomain.getService(MyClient.class, "MyClientComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void test() throws Exception {
- System.out.println("Main thread " + Thread.currentThread());
- myClient.aClientMethod();
- System.out.println("Sleeping ...");
- Thread.sleep(300);
- assertEquals("-> someMethod -> receiveResult", MyClientImpl.result);
- }
-}
diff --git a/branches/sca-android/samples/supplychain/README b/branches/sca-android/samples/supplychain/README
deleted file mode 100644
index ea4493fdd4..0000000000
--- a/branches/sca-android/samples/supplychain/README
+++ /dev/null
@@ -1,101 +0,0 @@
-SupplyChain Sample
-==================
-
-This sample demonstrates SCA components using the asynchronous API.
-
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-supplychain.jar supplychain.SupplyChainClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-supplychain.jar supplychain.SupplyChainClient
-
-
-Sample Overview
----------------
-
-The sample provides a Customer service with a purchaseGoods operation
-and a notifyShipment operation annotated with the SCA @OneWay annotation.
-The SupplyChainClient exercises this interface by calling the
-purchaseGoods operation. This results in messages passing to
-the Retailer, Warehouse, and Shipper components and the result returned
-to the Customer service on a separate callback thread.
-
-supplychain/
- src/
- main/
- java/
- supplychain/
- Customer.java - Defines the Java interface implemented
- by the Customer component
- CustomerComponentImpl.java - Implements the SCA Customer component
- Retailer.java - Defines the Java interface implemented
- by the Retailer component
- RetailerComponentImpl.java - Implements the SCA RetailerComponent component
- Shipper.java - Defines the Java interface implemented
- by the Shipper component
- ShipperComponentImpl.java - Implements the SCA ShipperComponent component
- SupplyChainClient.java - SupplyChainClient.java loads SCA runtime
- Warehouse.java - Defines the Java interface implemented
- by the Warehouse component
- WarehouseComponentImpl.java - Implements the SCA WarehouseComponent component
-
- resources/
- supplychain.composite - the SCA assembly for this sample
- test/
- java/
- supplychain/
- SupplyChainClientTestCase.java - JUnit test case
- build.xml - the Ant build file
- pom.xml - the Maven build file
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant as
-follows
-
-cd supplychain
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
- [java] Main thread Thread[main,5,main]
- [java] Main thread sleeping ...
- [java] Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd supplychain
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running supplychain.SupplyChainClientTestCase
-Main thread Thread[main,5,main]
-Sleeping ...
-Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.625 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully. \ No newline at end of file
diff --git a/branches/sca-android/samples/supplychain/build.xml b/branches/sca-android/samples/supplychain/build.xml
deleted file mode 100644
index 506180b8b1..0000000000
--- a/branches/sca-android/samples/supplychain/build.xml
+++ /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.
--->
-<project name="sample-supplychain" default="compile">
- <property name="test.class" value="supplychain.SupplyChainClient" />
- <property name="test.jar" value="sample-supplychain.jar" />
-
- <target name="init">
- <mkdir dir="target/classes"/>
- </target>
-
- <target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
- debug="on"
- source="1.5"
- target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </javac>
- <copy todir="target/classes">
- <fileset dir="src/main/resources"/>
- </copy>
- <jar destfile="target/${test.jar}" basedir="target/classes">
- <manifest>
- <attribute name="Main-Class" value="${test.class}" />
- </manifest>
- </jar>
- </target>
-
- <target name="run-classes">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/classes"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="run">
- <java classname="${test.class}"
- fork="true">
- <classpath>
- <pathelement path="target/${test.jar}"/>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="target"/>
- </delete>
- </target>
-</project>
diff --git a/branches/sca-android/samples/supplychain/pom.xml b/branches/sca-android/samples/supplychain/pom.xml
deleted file mode 100644
index 0b5a76be4c..0000000000
--- a/branches/sca-android/samples/supplychain/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>1.4-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <artifactId>sample-supplychain</artifactId>
- <name>Apache Tuscany SCA Supply Chain Sample</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.4-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.4-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
-</project>
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Customer.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/Customer.java
deleted file mode 100644
index 8088001898..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Customer.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 supplychain;
-
-import org.osoa.sca.annotations.OneWay;
-
-/**
- * This is the business interface of the Customer service component.
- */
-public interface Customer {
-
- public void purchaseGoods();
-
- @OneWay
- public void notifyShipment(String order);
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java
deleted file mode 100644
index 7a1e8553ec..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.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 supplychain;
-
-import org.osoa.sca.annotations.Reference;
-
-/**
- * This class implements the Customer service component.
- */
-public class CustomerComponentImpl implements Customer {
-
- private Retailer retailer;
-
- @Reference
- public void setRetailer(Retailer retailer) {
- this.retailer = retailer;
- }
-
- public void purchaseGoods() {
- retailer.submitOrder("Order");
- }
-
- public void notifyShipment(String order) {
- System.out.print("Work thread " + Thread.currentThread() + " - ");
- System.out.println(order);
- }
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Retailer.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/Retailer.java
deleted file mode 100644
index 1add63fb4e..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Retailer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-/**
- * This is the business interface of the Retailer service component.
- */
-public interface Retailer {
-
- public void submitOrder(String order);
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java
deleted file mode 100644
index f622052cf8..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-import org.osoa.sca.annotations.Reference;
-
-/**
- * This class implements the Customer service component.
- */
-public class RetailerComponentImpl implements Retailer {
-
- private Warehouse warehouse;
-
- @Reference
- public void setWarehouse(Warehouse warehouse) {
- this.warehouse = warehouse;
- }
-
- public void submitOrder(String order) {
- warehouse.fulfillOrder(order + ", submitted");
- }
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Shipper.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/Shipper.java
deleted file mode 100644
index d4d49a922b..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Shipper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-/**
- * This is the business interface of the Shipper service component.
- */
-public interface Shipper {
-
- public void processShipment(String order);
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java
deleted file mode 100644
index 4ae52a12a2..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-import org.osoa.sca.annotations.Reference;
-
-/**
- * This class implements the Warehouse service component.
- */
-public class ShipperComponentImpl implements Shipper {
-
- private Customer customer;
-
- @Reference
- public void setCustomer(Customer customer) {
- this.customer = customer;
- }
-
- public void processShipment(String order) {
- customer.notifyShipment(order + ", shipped");
- }
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java
deleted file mode 100644
index 7072f582d1..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/SupplyChainClient.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 supplychain;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * locate a Customer service component and invoke it.
- */
-public class SupplyChainClient {
-
- public static final void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance("supplychain.composite");
- Customer customer = scaDomain.getService(Customer.class, "CustomerComponent");
-
- System.out.println("Main thread " + Thread.currentThread());
- customer.purchaseGoods();
- System.out.println("Main thread sleeping ...");
- Thread.sleep(1000);
-
- scaDomain.close();
- }
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Warehouse.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/Warehouse.java
deleted file mode 100644
index 0be499f569..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/Warehouse.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-/**
- * This is the business interface of the Warehouse service component.
- */
-public interface Warehouse {
-
- public void fulfillOrder(String order);
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java b/branches/sca-android/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java
deleted file mode 100644
index b5e256a1e0..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package supplychain;
-
-import org.osoa.sca.annotations.Reference;
-
-/**
- * This class implements the Warehouse service component.
- */
-public class WarehouseComponentImpl implements Warehouse {
-
- private Shipper shipper;
-
- @Reference
- public void setShipper(Shipper shipper) {
- this.shipper = shipper;
- }
-
- public void fulfillOrder(String order) {
- shipper.processShipment(order + ", fulfilled");
- }
-
-}
diff --git a/branches/sca-android/samples/supplychain/src/main/resources/supplychain.composite b/branches/sca-android/samples/supplychain/src/main/resources/supplychain.composite
deleted file mode 100644
index 301efcaf1f..0000000000
--- a/branches/sca-android/samples/supplychain/src/main/resources/supplychain.composite
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://supplychain"
- xmlns:sp="http://supplychain"
- name="supplychain">
-
- <component name="CustomerComponent">
- <implementation.java class="supplychain.CustomerComponentImpl" />
- <reference name="retailer" target="RetailerComponent"/>
- </component>
-
- <component name="RetailerComponent">
- <implementation.java class="supplychain.RetailerComponentImpl" />
- <reference name="warehouse" target="WarehouseComponent"/>
- </component>
-
- <component name="WarehouseComponent">
- <implementation.java class="supplychain.WarehouseComponentImpl" />
- <reference name="shipper" target="ShipperComponent"/>
- </component>
-
- <component name="ShipperComponent">
- <implementation.java class="supplychain.ShipperComponentImpl" />
- <reference name="customer" target="CustomerComponent"/>
- </component>
-
-</composite>
diff --git a/branches/sca-android/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java b/branches/sca-android/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java
deleted file mode 100644
index 88e0eb7ab8..0000000000
--- a/branches/sca-android/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.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 supplychain;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * locate a the Customer service component and invoke it.
- */
-public class SupplyChainClientTestCase extends TestCase {
-
- private SCADomain scaDomain;
- private Customer customer;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("supplychain.composite");
- customer = scaDomain.getService(Customer.class, "CustomerComponent");
- }
-
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void test() throws Exception {
-
- System.out.println("Main thread " + Thread.currentThread());
- customer.purchaseGoods();
- System.out.println("Sleeping ...");
- Thread.sleep(1000);
- }
-}
diff --git a/branches/sca-android/samples/supplychain/supplychain.png b/branches/sca-android/samples/supplychain/supplychain.png
deleted file mode 100644
index 51a384e827..0000000000
--- a/branches/sca-android/samples/supplychain/supplychain.png
+++ /dev/null
Binary files differ
diff --git a/branches/sca-android/samples/supplychain/supplychain.svg b/branches/sca-android/samples/supplychain/supplychain.svg
deleted file mode 100644
index f72e77acab..0000000000
--- a/branches/sca-android/samples/supplychain/supplychain.svg
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1052.3622"
- height="744.09448"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44"
- sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\supplychain"
- sodipodi:docname="supplychain.svg"
- version="1.0">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="521.44872"
- inkscape:cy="414.63224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- inkscape:window-width="1128"
- inkscape:window-height="721"
- inkscape:window-x="89"
- inkscape:window-y="126" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2997"
- transform="matrix(1.047575,0,0,1,-9.726882,0)">
- <rect
- rx="19.999123"
- ry="12.692303"
- y="192.00233"
- x="205.45438"
- height="299.99988"
- width="647.66394"
- id="rect2067"
- style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.95405793;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <flowRoot
- id="flowRoot2954"
- xml:space="preserve"
- transform="translate(-38.86527,-2.857143)"><flowRegion
- id="flowRegion2956"><rect
- y="212.66591"
- x="281.42856"
- height="61.42857"
- width="170"
- id="rect2958" /></flowRegion><flowPara
- id="flowPara2960">supplychain</flowPara></flowRoot> </g>
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect2988"
- width="115.66247"
- height="85.862968"
- x="241.34489"
- y="300.02475"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot2966"
- transform="translate(-26.24589,94.08621)"><flowRegion
- id="flowRegion2968"><rect
- id="rect2970"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara2972">Customer</flowPara><flowPara
- id="flowPara1939">Component</flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 224.19438,331.87174 L 257.52942,331.87174 L 263.59033,345.00372 L 256.51927,357.12556 L 224.19438,357.12556 L 231.77053,345.00372 L 224.19438,331.87174 z "
- id="path3017" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 337.44682,330.03346 L 370.78186,330.03346 L 376.84277,343.16544 L 369.77171,355.28728 L 337.44682,355.28728 L 345.02297,343.16544 L 337.44682,330.03346 z "
- id="path3019" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1897"
- width="115.66247"
- height="85.862968"
- x="405.82632"
- y="298.30585"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1899"
- transform="translate(138.2355,92.36731)"><flowRegion
- id="flowRegion1901"><rect
- id="rect1903"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1905">Retailer</flowPara><flowPara
- id="flowPara1941">Component </flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 388.67581,330.15284 L 422.01085,330.15284 L 428.07176,343.28482 L 421.0007,355.40666 L 388.67581,355.40666 L 396.25196,343.28482 L 388.67581,330.15284 z "
- id="path1907" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 501.92825,328.31456 L 535.26329,328.31456 L 541.3242,341.44654 L 534.25314,353.56838 L 501.92825,353.56838 L 509.5044,341.44654 L 501.92825,328.31456 z "
- id="path1909" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1911"
- width="115.66247"
- height="85.862968"
- x="567.96918"
- y="296.87729"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1913"
- transform="translate(300.3784,90.93874)"><flowRegion
- id="flowRegion1915"><rect
- id="rect1917"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1919">Wharehouse</flowPara><flowPara
- id="flowPara1943">Component </flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 550.81867,328.72427 L 584.15371,328.72427 L 590.21462,341.85625 L 583.14356,353.97809 L 550.81867,353.97809 L 558.39482,341.85625 L 550.81867,328.72427 z "
- id="path1921" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 664.07111,326.88599 L 697.40615,326.88599 L 703.46706,340.01797 L 696.396,352.13981 L 664.07111,352.13981 L 671.64726,340.01797 L 664.07111,326.88599 z "
- id="path1923" />
- <rect
- style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect1925"
- width="115.66247"
- height="85.862968"
- x="727.96918"
- y="294.73444"
- rx="6.9961648"
- ry="7.1230249" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot1927"
- transform="translate(460.3784,88.79589)"><flowRegion
- id="flowRegion1929"><rect
- id="rect1931"
- width="170"
- height="61.42857"
- x="281.42856"
- y="212.66591" /></flowRegion><flowPara
- id="flowPara1933">Shipper</flowPara><flowPara
- id="flowPara1945">Component </flowPara></flowRoot> <path
- style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 710.81866,326.58142 L 744.1537,326.58142 L 750.21461,339.7134 L 743.14355,351.83524 L 710.81866,351.83524 L 718.39481,339.7134 L 710.81866,326.58142 z "
- id="path1935" />
- <path
- style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 824.0711,324.74314 L 857.40614,324.74314 L 863.46705,337.87512 L 856.39599,349.99696 L 824.0711,349.99696 L 831.64725,337.87512 L 824.0711,324.74314 z "
- id="path1937" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 376.42857,343.3802 C 395.71429,343.3802 395.71429,343.3802 395.71429,343.3802"
- id="path1947" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 540.71429,341.23734 C 557.85714,341.23734 557.85714,341.23734 557.85714,341.23734"
- id="path1949" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 702.14286,340.52305 C 717.85714,340.52305 717.85714,340.52305 717.85714,340.52305"
- id="path1951" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 863.57143,337.66591 C 875.71429,337.66591 875.71429,337.66591 875.71429,337.66591 L 875,427.66591 L 212.14286,429.09448 L 210.71429,344.09448 L 231.42857,344.09448"
- id="path1953"
- inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\supplychain\supplychain.png"
- inkscape:export-xdpi="52.84"
- inkscape:export-ydpi="52.84" />
- </g>
-</svg>