From 132aa8a77685ec92bc90c03f987650d275a7b639 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 30 Sep 2013 06:59:11 +0000 Subject: 2.0.1 RC1 release tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1527464 13f79535-47bb-0310-9956-ffa450edef68 --- .../2.0.1-RC1/maven/archetypes/binding/pom.xml | 54 +++++ .../META-INF/maven/archetype-metadata.xml | 61 ++++++ .../archetype-resources/META-INF/MANIFEST.MF | 17 ++ .../src/main/resources/archetype-resources/pom.xml | 94 +++++++++ .../src/main/java/__bindingName__Binding.java | 52 +++++ .../main/java/__bindingName__BindingFactory.java | 35 ++++ .../__bindingName__BindingProviderFactory.java | 50 +++++ .../__bindingName__ReferenceBindingProvider.java | 58 ++++++ .../runtime/__bindingName__ReferenceInvoker.java | 56 +++++ .../__bindingName__ServiceBindingProvider.java | 60 ++++++ .../runtime/__bindingName__ServiceInvoker.java | 43 ++++ .../main/java/runtime/__bindingName__Stash.java | 47 +++++ .../__package__.__bindingName__BindingFactory | 20 ++ ...ca.contribution.processor.StAXArtifactProcessor | 20 ++ ...any.sca.contribution.processor.ValidationSchema | 19 ++ ...che.tuscany.sca.provider.BindingProviderFactory | 20 ++ .../src/main/resources/binding-__artifactId__.xsd | 37 ++++ .../src/test/java/helloworld/HelloWorldClient.java | 36 ++++ .../src/test/java/helloworld/HelloWorldImpl.java | 31 +++ .../test/java/helloworld/HelloWorldService.java | 31 +++ .../java/test/__bindingName__BindingTestCase.java | 55 +++++ .../src/test/resources/helloworld.composite | 39 ++++ .../resources/projects/basic/archetype.properties | 23 +++ .../src/test/resources/projects/basic/goal.txt | 0 .../contribution-jar/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/contribution-jar/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 49 +++++ .../main/resources/META-INF/maven/archetype.xml | 22 ++ .../src/main/resources/archetype-resources/pom.xml | 87 ++++++++ .../src/main/java/Helloworld.java | 28 +++ .../src/main/java/HelloworldImpl.java | 36 ++++ .../main/resources/META-INF/sca-contribution.xml | 25 +++ .../src/main/resources/helloworld.composite | 29 +++ .../src/test/java/HelloworldTestCase.java | 48 +++++ .../archetypes/contribution-zip-discriptor/pom.xml | 33 +++ .../assemblies/tuscany-zip-contribution.xml | 40 ++++ .../contribution-zip/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/contribution-zip/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 36 ++++ .../main/resources/META-INF/maven/archetype.xml | 30 +++ .../src/main/resources/archetype-resources/pom.xml | 153 ++++++++++++++ .../archetype-resources/src/main/java/AddImpl.java | 38 ++++ .../src/main/java/AddService.java | 25 +++ .../main/resources/META-INF/sca-contribution.xml | 23 +++ .../src/main/resources/add.composite | 29 +++ .../maven/archetypes/implementation/pom.xml | 54 +++++ .../META-INF/maven/archetype-metadata.xml | 61 ++++++ .../archetype-resources/META-INF/MANIFEST.MF | 17 ++ .../src/main/resources/archetype-resources/pom.xml | 59 ++++++ .../java/__implementationName__Implementation.java | 52 +++++ ..._implementationName__ImplementationFactory.java | 35 ++++ ...implementationName__BindingProviderFactory.java | 50 +++++ ...plementationName__ReferenceBindingProvider.java | 58 ++++++ .../__implementationName__ReferenceInvoker.java | 56 +++++ ...implementationName__ServiceBindingProvider.java | 60 ++++++ .../__implementationName__ServiceInvoker.java | 43 ++++ .../java/runtime/__implementationName__Stash.java | 47 +++++ .../__package__.__bindingName__BindingFactory | 20 ++ ...ca.contribution.processor.StAXArtifactProcessor | 20 ++ ...any.sca.contribution.processor.ValidationSchema | 19 ++ ...che.tuscany.sca.provider.BindingProviderFactory | 20 ++ .../resources/implementation-__artifactId__.xsd | 37 ++++ .../src/test/java/helloworld/HelloWorldClient.java | 36 ++++ .../src/test/java/helloworld/HelloWorldImpl.java | 31 +++ .../test/java/helloworld/HelloWorldService.java | 31 +++ .../java/test/__bindingName__BindingTestCase.java | 55 +++++ .../src/test/resources/helloworld.composite | 39 ++++ .../resources/projects/basic/archetype.properties | 23 +++ .../src/test/resources/projects/basic/goal.txt | 0 .../tags/2.0.1-RC1/maven/archetypes/policy/pom.xml | 67 ++++++ .../META-INF/maven/archetype-metadata.xml | 70 +++++++ .../archetype-resources/META-INF/MANIFEST.MF | 28 +++ .../src/main/resources/archetype-resources/pom.xml | 43 ++++ .../java/__policyName__/__policyName__Policy.java | 66 ++++++ .../__policyName__PolicyBuilder.java | 93 +++++++++ .../__policyName__PolicyFactory.java | 37 ++++ .../__policyName__PolicyProcessor.java | 115 +++++++++++ ...__policyName__ImplementationPolicyProvider.java | 63 ++++++ .../provider/__policyName__PolicyInterceptor.java | 71 +++++++ .../__policyName__PolicyProviderFactory.java | 77 +++++++ .../__policyName__ReferencePolicyProvider.java | 54 +++++ .../__policyName__ServicePolicyProvider.java | 55 +++++ .../src/main/java/util/PolicyHelper.java | 74 +++++++ ...ache.tuscany.sca.assembly.builder.PolicyBuilder | 17 ++ ...ca.contribution.processor.StAXArtifactProcessor | 19 ++ ....apache.tuscany.sca.definitions.xml.Definitions | 17 ++ ...ache.tuscany.sca.provider.PolicyProviderFactory | 19 ++ .../main/resources/__policyName__/definitions.xml | 34 +++ .../src/main/resources/definitions.xml | 41 ++++ .../src/test/java/PolicyReadTestCase.java | 87 ++++++++ .../src/test/resources/mock_policies.xml | 25 +++ .../sca/policy/logging/jdk/mock_policies.xml | 19 ++ .../resources/projects/basic/archetype.properties | 22 ++ .../src/test/resources/projects/basic/goal.txt | 0 .../tags/2.0.1-RC1/maven/archetypes/pom.xml | 53 +++++ .../quickstart-bpel/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-bpel/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 43 ++++ .../main/resources/META-INF/maven/archetype.xml | 33 +++ .../src/main/resources/archetype-resources/pom.xml | 182 ++++++++++++++++ .../src/main/java/HelloworldService.java | 28 +++ .../src/main/resources/helloworld.bpel | 66 ++++++ .../src/main/resources/helloworld.wsdl | 82 ++++++++ .../src/main/webapp/WEB-INF/web.composite | 37 ++++ .../src/main/webapp/WEB-INF/web.xml | 41 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 ++++ .../maven/archetypes/quickstart-jsf/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 44 ++++ .../main/resources/META-INF/maven/archetype.xml | 38 ++++ .../src/main/resources/archetype-resources/pom.xml | 154 ++++++++++++++ .../main/java/myfaces/HelloWorldController.java | 64 ++++++ .../src/main/java/sca/HelloworldService.java | 28 +++ .../src/main/java/sca/HelloworldServiceImpl.java | 30 +++ .../src/main/webapp/WEB-INF/faces-config.xml | 53 +++++ .../src/main/webapp/WEB-INF/web.composite | 35 ++++ .../src/main/webapp/WEB-INF/web.xml | 230 +++++++++++++++++++++ .../src/main/webapp/helloWorld.jsp | 37 ++++ .../archetype-resources/src/main/webapp/index.jsp | 22 ++ .../archetype-resources/src/main/webapp/page2.jsp | 35 ++++ .../quickstart-jsonp/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-jsonp/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 42 ++++ .../main/resources/META-INF/maven/archetype.xml | 31 +++ .../src/main/resources/archetype-resources/pom.xml | 154 ++++++++++++++ .../src/main/java/HelloworldImpl.java | 27 +++ .../src/main/java/HelloworldService.java | 28 +++ .../src/main/webapp/WEB-INF/web.composite | 32 +++ .../src/main/webapp/WEB-INF/web.xml | 43 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 ++++ .../quickstart-stripes/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-stripes/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 44 ++++ .../main/resources/META-INF/maven/archetype.xml | 38 ++++ .../src/main/resources/archetype-resources/pom.xml | 124 +++++++++++ .../src/main/java/sca/HelloworldService.java | 28 +++ .../src/main/java/sca/HelloworldServiceImpl.java | 31 +++ .../main/java/stripes/action/BaseActionBean.java | 36 ++++ .../main/java/stripes/action/HomeActionBean.java | 48 +++++ .../src/main/resources/StripesResources.properties | 77 +++++++ .../src/main/resources/log4j.properties | 51 +++++ .../src/main/webapp/WEB-INF/jsp/home.jsp | 29 +++ .../src/main/webapp/WEB-INF/jsp/layout.jsp | 42 ++++ .../src/main/webapp/WEB-INF/jsp/taglibs.jsp | 32 +++ .../src/main/webapp/WEB-INF/web.composite | 34 +++ .../src/main/webapp/WEB-INF/web.xml | 68 ++++++ .../archetype-resources/src/main/webapp/index.html | 27 +++ .../archetypes/quickstart/META-INF/MANIFEST.MF | 11 + .../2.0.1-RC1/maven/archetypes/quickstart/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 42 ++++ .../main/resources/META-INF/maven/archetype.xml | 31 +++ .../src/main/resources/archetype-resources/pom.xml | 139 +++++++++++++ .../src/main/java/HelloworldImpl.java | 27 +++ .../src/main/java/HelloworldService.java | 25 +++ .../src/main/webapp/WEB-INF/web.composite | 34 +++ .../src/main/webapp/WEB-INF/web.xml | 43 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 ++++ 156 files changed, 7098 insertions(+) create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__Policy.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyBuilder.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyProcessor.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ImplementationPolicyProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyInterceptor.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyProviderFactory.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ReferencePolicyProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ServicePolicyProvider.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/util/PolicyHelper.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/__policyName__/definitions.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/definitions.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/java/PolicyReadTestCase.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/mock_policies.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/org/apache/tuscany/sca/policy/logging/jdk/mock_policies.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/archetype.properties create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/goal.txt create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp (limited to 'sca-java-2.x/tags/2.0.1-RC1/maven/archetypes') diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/pom.xml new file mode 100644 index 0000000000..8a1efdf1fc --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-binding-archetype + maven-archetype + Create a Tuscany binding extension project + Create a Tuscany binding extension project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + + + maven-archetype-plugin + 2.2 + true + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..403803551b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.* + + + + src/test/java + + **/*.java + + + + src/test/resources + + **/*.* + + + + META-INF + + MANIFEST.MF + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..2985b8c822 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +SCA-Version: 1.1 +Bundle-Name: Apache Tuscany SCA ${bindingName} Binding +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ${bindingName} Binding +Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.core;version="2.0.0", + org.apache.tuscany.sca.interfacedef;version="2.0.0", + org.apache.tuscany.sca.invocation;version="2.0.0", + org.apache.tuscany.sca.provider;version="2.0.0", + org.apache.tuscany.sca.runtime;version="2.0.0" +Bundle-SymbolicName: org.apache.tuscany.sca.binding.${artifactId} +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..1aebc38eb0 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,94 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0.1 + ../pom.xml + + + binding-${artifactId} + ${groupId} + ${version} + Apache Tuscany SCA ${bindingName} Binding Extension + + + + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0.1 + provided + + + + org.apache.tuscany.sca + tuscany-host-http + 2.0.1 + provided + + + + javax.servlet + servlet-api + 2.5 + provided + + + + org.apache.tuscany.sca + tuscany-host-jetty + 2.0.1 + test + + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0.1 + test + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0.1 + test + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0.1 + test + + + + junit + junit + 4.8.1 + test + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java new file mode 100644 index 0000000000..d9cbdb954d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java @@ -0,0 +1,52 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.provider.BaseBindingImpl; + +/** + * Represents a binding to a ${bindingName} service. + */ +public class ${bindingName}Binding extends BaseBindingImpl { + + public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.${artifactId}"); + + private String someAttr; + + public ${bindingName}Binding() { + } + + public QName getType() { + return TYPE; + } + + public String getSomeAttr() { + return someAttr; + } + + public void setSomeAttr(String someAttr) { + this.someAttr = someAttr; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java new file mode 100644 index 0000000000..ae1cd88745 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java @@ -0,0 +1,35 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}; + + +/** + * Factory implementation to create ${bindingName} Models + */ +public class ${bindingName}BindingFactory { + + public ${bindingName}Binding create${bindingName}Binding() { + return new ${bindingName}Binding(); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java new file mode 100644 index 0000000000..93c6bf3c04 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java @@ -0,0 +1,50 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +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.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +public class ${bindingName}BindingProviderFactory implements BindingProviderFactory<${bindingName}Binding> { + + public ${bindingName}BindingProviderFactory(ExtensionPointRegistry extensionPoints) { + } + + public Class<${bindingName}Binding> getModelType() { + return ${bindingName}Binding.class; + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) { + return new ${bindingName}ReferenceBindingProvider(endpoint); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { + return new ${bindingName}ServiceBindingProvider(endpoint); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java new file mode 100644 index 0000000000..dc2991014e --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java @@ -0,0 +1,58 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +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.provider.ReferenceBindingProvider; + +public class ${bindingName}ReferenceBindingProvider implements ReferenceBindingProvider { + + private EndpointReference endpoint; + private InterfaceContract contract; + + public ${bindingName}ReferenceBindingProvider(EndpointReference endpoint) { + this.endpoint = endpoint; + } + + public Invoker createInvoker(Operation operation) { + return new ${bindingName}ReferenceInvoker(operation, endpoint); + } + + public void start() { + } + + public void stop() { + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java new file mode 100644 index 0000000000..d3e2bd1812 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java @@ -0,0 +1,56 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; + +public class ${bindingName}ReferenceInvoker implements Invoker { + + protected Operation operation; + protected EndpointReference endpoint; + + public ${bindingName}ReferenceInvoker(Operation operation, EndpointReference endpoint) { + this.operation = operation; + this.endpoint = endpoint; + } + + public Message invoke(Message msg) { + try { + + return doInvoke(msg); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public Message doInvoke(Message msg) { + // Add some code here to make an invocation over the ${bindingName} binding protocol + // For this sample we'll just get it from the static stash + ${bindingName}ServiceInvoker fi = ${bindingName}Stash.getService(endpoint.getBinding().getURI()); + return fi.invokeService(msg); + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java new file mode 100644 index 0000000000..59d41091d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java @@ -0,0 +1,60 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceBindingProvider implements ServiceBindingProvider { + + private RuntimeEndpoint endpoint; + private InterfaceContract contract; + + public ${bindingName}ServiceBindingProvider(RuntimeEndpoint endpoint) { + this.endpoint = endpoint; + } + + public void start() { + // add some code here to start the service + + // For this sample we'll just share it in a static + ${bindingName}Stash.addService(endpoint.getBinding().getURI(), new ${bindingName}ServiceInvoker(endpoint)); + + System.out.println("someAttr=" + ((${bindingName}Binding)endpoint.getBinding()).getSomeAttr()); + } + + public void stop() { + ${bindingName}Stash.removeService(endpoint.getBinding().getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java new file mode 100644 index 0000000000..8ea20d41ed --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java @@ -0,0 +1,43 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceInvoker { + + private RuntimeEndpoint wire; + + public ${bindingName}ServiceInvoker(RuntimeEndpoint wire) { + this.wire = wire; + } + + /** + * Send the request down the wire to invoke the service + */ + public Message invokeService(Message msg) { + return wire.invoke(msg); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java new file mode 100644 index 0000000000..416a10e7b1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java @@ -0,0 +1,47 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import java.util.HashMap; +import java.util.Map; + +/** + * Simplistic static Map to share service endpoints with references + */ +public class ${bindingName}Stash { + + private static Map services = new HashMap(); + + public static void addService(String uri, ${bindingName}ServiceInvoker ${bindingName}ServiceInvoker) { + services.put(uri, ${bindingName}ServiceInvoker); + } + + public static ${bindingName}ServiceInvoker getService(String uri) { + return services.get(uri); + } + + public static void removeService(String uri) { + services.remove(uri); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory new file mode 100644 index 0000000000..3759b19fa0 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT 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 model factory +${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..eb49133022 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT 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://tuscany.apache.org/xmlns/sca/1.1#binding.${artifactId},model=${package}.${bindingName}Binding,factory=${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema new file mode 100644 index 0000000000..c33264f2a4 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +binding-${artifactId}.xsd + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory new file mode 100644 index 0000000000..3c0cfbc6d9 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Implementation class for the binding extension +${package}.runtime.${bindingName}BindingProviderFactory;model=${package}.${bindingName}Binding + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd new file mode 100644 index 0000000000..74f853e424 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd @@ -0,0 +1,37 @@ +#set( $bindingNameLC = ${bindingName} ) + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java new file mode 100644 index 0000000000..de982cefc1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClient implements HelloWorldService { + + @Reference + public HelloWorldService ref; + + public String sayHello(String name) { + return ref.sayHello(name); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..521f6828ce --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 implements HelloWorldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..eca0df1543 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java new file mode 100644 index 0000000000..61847e5eda --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java @@ -0,0 +1,55 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package test; + +import helloworld.HelloWorldService; +import junit.framework.Assert; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ${bindingName}BindingTestCase { + + private static Node node; + + @Test + public void testSayHello() { + HelloWorldService service = node.getService(HelloWorldService.class, "HelloWorldClient/HelloWorldService"); + Assert.assertEquals("Hello boo", service.sayHello("boo")); + } + + @BeforeClass + public static void init() throws Exception { + node = NodeFactory.newInstance().createNode("helloworld.composite").start(); + } + + @AfterClass + public static void destroy() throws Exception { + if (node != null) { + node.stop(); + } + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite new file mode 100644 index 0000000000..f0e6150c10 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000000..c15305edb4 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#Sat Sep 04 08:10:22 BST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +package=archetype.it.basic +artifactId=basic +bindingName=Basic + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..1e2a0fbb4d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Contribution JAR +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.jar +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/pom.xml new file mode 100644 index 0000000000..c5a088d201 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-contribution-jar + maven-archetype + Create an SCA JAR contribution project + Create an SCA JAR contribution project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..1e1c124869 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,49 @@ + + + + + + src/main/java + + **/*.java + + + + src/test/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.composite + + + + src/test/resources + + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..6e0591fbfe --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,22 @@ + + + + tuscany-contribution-jar + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..ffa029e184 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,87 @@ + + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + jar + + ${artifactId} + + + 2.0 + UTF-8 + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + junit + junit + 4.8.1 + test + + + + org.apache.tuscany.sca + tuscany-base-runtime + ${tuscany.version} + test + + + + + + install + ${artifactId} + + + + org.apache.tuscany.sca + tuscany-maven-plugin + ${tuscany.version} + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + true + true + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java new file mode 100644 index 0000000000..68f91f67cd --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface Helloworld { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..f5af4c7366 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.EagerInit; + +@Scope("COMPOSITE") @EagerInit +public class HelloworldImpl implements Helloworld { + + public String sayHello(String name) { + return "Hello " + name; + } + + @Init + public void init() { + System.out.println(sayHello("world")); + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..d2e633d3d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,25 @@ + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..35970f63ca --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java new file mode 100644 index 0000000000..c98112cb93 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.junit.Assert; + +import org.apache.tuscany.sca.Node; +import org.apache.tuscany.sca.TuscanyRuntime; +import org.junit.Test; +import org.oasisopen.sca.NoSuchServiceException; + +public class HelloworldTestCase { + + @Test + public void testSayHello() throws NoSuchServiceException { + + // Run the SCA composite in a Tuscany runtime + Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); + try { + + // Get the Helloworld service proxy + Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); + + // test that it works as expected + Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); + + } finally { + // Stop the Tuscany runtime Node + node.stop(); + } + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/pom.xml new file mode 100644 index 0000000000..695fcd4675 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/pom.xml @@ -0,0 +1,33 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-zip-contribution-descriptor + Tuscany SCA ZIP contribution Shared Assembly Descriptor + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml new file mode 100644 index 0000000000..a672d2920d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml @@ -0,0 +1,40 @@ + + + + zip-contribution + + zip + + false + + + false + runtime + lib + false + + + + + ${project.build.outputDirectory} + / + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b5be2573dd --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Contribution ZIP +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ZIP Contribution Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.zip +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/pom.xml new file mode 100644 index 0000000000..28e0a24cf5 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-contribution-zip + maven-archetype + Create an SCA ZIP contribution project + Create an SCA ZIP contribution project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..46c5cd6dca --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,36 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..c17535e802 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,30 @@ + + + + tuscany-contribution-zip + + src/main/java/AddImpl.java + src/main/java/AddService.java + + + src/main/resources/add.composite + src/main/resources/META-INF/sca-contribution.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..44e3d8448a --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,153 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + jar + ${project.version} + #literal() + quickstart + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + + commons-io + commons-io + 1.4 + + + + commons-math + commons-math + 1.2 + + + + + junit + junit + 4.8.1 + test + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + maven-assembly-plugin + 2.2-beta-3 + + + org.apache.tuscany.sca + tuscany-zip-contribution-descriptor + ${tuscany.version} + + + + + make-assembly + package + + single + + + false + + + tuscany-zip-contribution.xml + + + + + + + + org.apache.tuscany.maven.plugins + maven-tuscany-plugin + + + + + 2.0 + + #end + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java new file mode 100644 index 0000000000..48b62dbb6f --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.apache.commons.math.util.MathUtils; + +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.EagerInit; + +@Scope("COMPOSITE") @EagerInit +public class AddImpl implements AddService { + + public int add(int x, int y) { + return MathUtils.addAndCheck(x, y); + } + + @Init + public void init() { + System.out.println("1 + 2 = " + add(1, 2)); + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java new file mode 100644 index 0000000000..4b25553893 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +public interface AddService { + + int add(int x, int y); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..960d6a90ae --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite new file mode 100644 index 0000000000..3dc8175bd7 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/pom.xml new file mode 100644 index 0000000000..a7d3968baa --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-implementation-archetype + maven-archetype + Create a Tuscany implementation extension project + Create a Tuscany implementation extension project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-5 + + + + + + + maven-archetype-plugin + 2.0-alpha-5 + true + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..8b1b08b4bb --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.* + + + + src/test/java + + **/*.java + + + + src/test/resources + + **/*.* + + + + META-INF + + MANIFEST.MF + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..5880433840 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +SCA-Version: 1.1 +Bundle-Name: Apache Tuscany SCA ${implementationName} Implementation +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ${implementationName} Binding +Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.core;version="2.0.0", + org.apache.tuscany.sca.interfacedef;version="2.0.0", + org.apache.tuscany.sca.invocation;version="2.0.0", + org.apache.tuscany.sca.provider;version="2.0.0", + org.apache.tuscany.sca.runtime;version="2.0.0" +Bundle-SymbolicName: org.apache.tuscany.sca.implementation.${artifactId} +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..d0a1a2aa17 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0.1 + ../pom.xml + + + binding-${artifactId} + ${groupId} + ${version} + Apache Tuscany SCA ${implementationName} Implementation Extension + + + + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0.1 + provided + + + + org.apache.tuscany.sca + tuscany-domain-node + 2.0.1 + test + + + + junit + junit + 4.8.1 + test + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java new file mode 100644 index 0000000000..d9cbdb954d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java @@ -0,0 +1,52 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.provider.BaseBindingImpl; + +/** + * Represents a binding to a ${bindingName} service. + */ +public class ${bindingName}Binding extends BaseBindingImpl { + + public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.${artifactId}"); + + private String someAttr; + + public ${bindingName}Binding() { + } + + public QName getType() { + return TYPE; + } + + public String getSomeAttr() { + return someAttr; + } + + public void setSomeAttr(String someAttr) { + this.someAttr = someAttr; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java new file mode 100644 index 0000000000..ae1cd88745 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java @@ -0,0 +1,35 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}; + + +/** + * Factory implementation to create ${bindingName} Models + */ +public class ${bindingName}BindingFactory { + + public ${bindingName}Binding create${bindingName}Binding() { + return new ${bindingName}Binding(); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java new file mode 100644 index 0000000000..93c6bf3c04 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java @@ -0,0 +1,50 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +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.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +public class ${bindingName}BindingProviderFactory implements BindingProviderFactory<${bindingName}Binding> { + + public ${bindingName}BindingProviderFactory(ExtensionPointRegistry extensionPoints) { + } + + public Class<${bindingName}Binding> getModelType() { + return ${bindingName}Binding.class; + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) { + return new ${bindingName}ReferenceBindingProvider(endpoint); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { + return new ${bindingName}ServiceBindingProvider(endpoint); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java new file mode 100644 index 0000000000..dc2991014e --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java @@ -0,0 +1,58 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +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.provider.ReferenceBindingProvider; + +public class ${bindingName}ReferenceBindingProvider implements ReferenceBindingProvider { + + private EndpointReference endpoint; + private InterfaceContract contract; + + public ${bindingName}ReferenceBindingProvider(EndpointReference endpoint) { + this.endpoint = endpoint; + } + + public Invoker createInvoker(Operation operation) { + return new ${bindingName}ReferenceInvoker(operation, endpoint); + } + + public void start() { + } + + public void stop() { + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java new file mode 100644 index 0000000000..d3e2bd1812 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java @@ -0,0 +1,56 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; + +public class ${bindingName}ReferenceInvoker implements Invoker { + + protected Operation operation; + protected EndpointReference endpoint; + + public ${bindingName}ReferenceInvoker(Operation operation, EndpointReference endpoint) { + this.operation = operation; + this.endpoint = endpoint; + } + + public Message invoke(Message msg) { + try { + + return doInvoke(msg); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public Message doInvoke(Message msg) { + // Add some code here to make an invocation over the ${bindingName} binding protocol + // For this sample we'll just get it from the static stash + ${bindingName}ServiceInvoker fi = ${bindingName}Stash.getService(endpoint.getBinding().getURI()); + return fi.invokeService(msg); + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java new file mode 100644 index 0000000000..59d41091d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java @@ -0,0 +1,60 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceBindingProvider implements ServiceBindingProvider { + + private RuntimeEndpoint endpoint; + private InterfaceContract contract; + + public ${bindingName}ServiceBindingProvider(RuntimeEndpoint endpoint) { + this.endpoint = endpoint; + } + + public void start() { + // add some code here to start the service + + // For this sample we'll just share it in a static + ${bindingName}Stash.addService(endpoint.getBinding().getURI(), new ${bindingName}ServiceInvoker(endpoint)); + + System.out.println("someAttr=" + ((${bindingName}Binding)endpoint.getBinding()).getSomeAttr()); + } + + public void stop() { + ${bindingName}Stash.removeService(endpoint.getBinding().getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java new file mode 100644 index 0000000000..8ea20d41ed --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java @@ -0,0 +1,43 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceInvoker { + + private RuntimeEndpoint wire; + + public ${bindingName}ServiceInvoker(RuntimeEndpoint wire) { + this.wire = wire; + } + + /** + * Send the request down the wire to invoke the service + */ + public Message invokeService(Message msg) { + return wire.invoke(msg); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java new file mode 100644 index 0000000000..416a10e7b1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java @@ -0,0 +1,47 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.runtime; + +import java.util.HashMap; +import java.util.Map; + +/** + * Simplistic static Map to share service endpoints with references + */ +public class ${bindingName}Stash { + + private static Map services = new HashMap(); + + public static void addService(String uri, ${bindingName}ServiceInvoker ${bindingName}ServiceInvoker) { + services.put(uri, ${bindingName}ServiceInvoker); + } + + public static ${bindingName}ServiceInvoker getService(String uri) { + return services.get(uri); + } + + public static void removeService(String uri) { + services.remove(uri); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory new file mode 100644 index 0000000000..3759b19fa0 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT 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 model factory +${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..eb49133022 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT 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://tuscany.apache.org/xmlns/sca/1.1#binding.${artifactId},model=${package}.${bindingName}Binding,factory=${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema new file mode 100644 index 0000000000..c33264f2a4 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +binding-${artifactId}.xsd + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory new file mode 100644 index 0000000000..3c0cfbc6d9 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Implementation class for the binding extension +${package}.runtime.${bindingName}BindingProviderFactory;model=${package}.${bindingName}Binding + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd new file mode 100644 index 0000000000..d0c6f62439 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd @@ -0,0 +1,37 @@ +#set( $implementationNameLC = ${implementationName} ) + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java new file mode 100644 index 0000000000..de982cefc1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClient implements HelloWorldService { + + @Reference + public HelloWorldService ref; + + public String sayHello(String name) { + return ref.sayHello(name); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..521f6828ce --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 implements HelloWorldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..eca0df1543 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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 org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java new file mode 100644 index 0000000000..61847e5eda --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java @@ -0,0 +1,55 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package test; + +import helloworld.HelloWorldService; +import junit.framework.Assert; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ${bindingName}BindingTestCase { + + private static Node node; + + @Test + public void testSayHello() { + HelloWorldService service = node.getService(HelloWorldService.class, "HelloWorldClient/HelloWorldService"); + Assert.assertEquals("Hello boo", service.sayHello("boo")); + } + + @BeforeClass + public static void init() throws Exception { + node = NodeFactory.newInstance().createNode("helloworld.composite").start(); + } + + @AfterClass + public static void destroy() throws Exception { + if (node != null) { + node.stop(); + } + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite new file mode 100644 index 0000000000..f0e6150c10 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000000..a5eb1dd3d1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#Sat Sep 04 08:10:22 BST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +package=archetype.it.basic +artifactId=basic +implementationName=Basic + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/pom.xml new file mode 100644 index 0000000000..f856e72713 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-policy-archetype + maven-archetype + Create a Tuscany policy extension project + Create a Tuscany policy extension project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + + + maven-archetype-plugin + 2.2 + true + + + + + + + + apache.releases.https + Apache Release Distribution Repository + https://repository.apache.org/service/local/staging/deploy/maven2 + + + false + apache.snapshots.https + Apache Development Snapshot Repository + https://repository.apache.org/content/repositories/snapshots + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..1d260f241b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.* + + + **/definitions.xml + + + + src/main/resources + + **/definitions.xml + + + + src/test/java + + **/*.java + + + + src/test/resources + + **/*.* + + + + META-INF + + MANIFEST.MF + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..a41ac55cb6 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Private-Package: org.apache.tuscany.sca.policy.logging;version="2.0.0",o + rg.apache.tuscany.sca.policy.logging.jdk;version="2.0.0" +SCA-Version: 1.1 +Bundle-Name: Apache Tuscany ${policyName} Policy Model +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany ${policyName} Policy Model +Import-Package: javax.xml.namespace, + javax.xml.stream, + org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.assembly.builder;version="2.0.0", + org.apache.tuscany.sca.contribution.processor;version="2.0.0", + org.apache.tuscany.sca.contribution.resolver;version="2.0.0", + org.apache.tuscany.sca.core;version="2.0.0", + org.apache.tuscany.sca.definitions;version="2.0.0", + org.apache.tuscany.sca.interfacedef;version="2.0.0", + org.apache.tuscany.sca.invocation;version="2.0.0", + org.apache.tuscany.sca.monitor;version="2.0.0", + org.apache.tuscany.sca.policy;version="2.0.0", + org.apache.tuscany.sca.provider;version="2.0.0", + org.apache.tuscany.sca.runtime;version="2.0.0", + org.oasisopen.sca.annotation +Bundle-SymbolicName: ${package}.${policyName} +Bundle-DocURL: http://www.apache.org/ + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..65bb4aa7db --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0.1 + ../pom.xml + + ${groupId} + ${artifactId} + Apache Tuscany SCA Extension Policy ${policyName} + ${version} + + + + org.apache.tuscany.sca + tuscany-core-runtime-pom + pom + provided + 2.0.1 + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__Policy.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__Policy.java new file mode 100644 index 0000000000..dec23b38f7 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__Policy.java @@ -0,0 +1,66 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.${policyName}; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.Base; + +/** + * Implementation for policies that could be injected as parameter + * into the axis2config. + * + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}Policy { + static final String SCA11_NS = Base.SCA11_NS; + static final String SCA11_TUSCANY_NS = Base.SCA11_TUSCANY_NS; + + public static final QName POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "${policyName}"); + + private String configProperty; + + public String getConfigProperty() { + return configProperty; + } + + public void setConfigProperty(String configProperty) { + this.configProperty = configProperty; + } + + public QName getSchemaName() { + return POLICY_QNAME; + } + + public boolean isUnresolved() { + return false; + } + + public void setUnresolved(boolean unresolved) { + } + + @Override + public String toString() { + return "${policyName}Policy [configProperty=" + configProperty + + "]"; + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyBuilder.java new file mode 100644 index 0000000000..ef37957a62 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyBuilder.java @@ -0,0 +1,93 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.${policyName}; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.Component; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.assembly.Implementation; +import org.apache.tuscany.sca.assembly.builder.BuilderContext; +import org.apache.tuscany.sca.assembly.builder.PolicyBuilder; +import org.apache.tuscany.sca.policy.PolicyExpression; +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.policy.PolicySubject; + +/** + * + */ +public class ${policyName}PolicyBuilder implements PolicyBuilder<${policyName}Policy> { + + @Override + public boolean build(Endpoint endpoint, BuilderContext context) { + List<${policyName}Policy> polices = getPolicies(endpoint); + System.out.println(endpoint + ": " + polices); + return true; + } + + @Override + public boolean build(EndpointReference endpointReference, BuilderContext context) { + List<${policyName}Policy> polices = getPolicies(endpointReference); + System.out.println(endpointReference + ": " + polices); + return true; + } + + @Override + public boolean build(Component component, Implementation implementation, BuilderContext context) { + List<${policyName}Policy> polices = getPolicies(implementation); + System.out.println(implementation + ": " + polices); + return true; + } + + @Override + public QName getPolicyType() { + return ${policyName}Policy.POLICY_QNAME; + } + + @Override + public List getSupportedBindings() { + return null; + } + + private List<${policyName}Policy> getPolicies(PolicySubject subject) { + List<${policyName}Policy> polices = new ArrayList<${policyName}Policy>(); + for (PolicySet ps : subject.getPolicySets()) { + for (PolicyExpression exp : ps.getPolicies()) { + if (getPolicyType().equals(exp.getName())) { + polices.add((${policyName}Policy)exp.getPolicy()); + } + } + } + return polices; + } + + @Override + public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) { + return true; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyFactory.java new file mode 100644 index 0000000000..d3d760531d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyFactory.java @@ -0,0 +1,37 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.${policyName}; + +/** + * Factory for ${policyName} Policy + * + * @version $Rev$ $Date$ + */ +public interface ${policyName}PolicyFactory { + + + /** + * Creates a new ${policyName} Policy + * @return the new ${policyName} policy + */ + ${policyName}Policy create${policyName}Policy(); +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyProcessor.java new file mode 100644 index 0000000000..2a1313a115 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/__policyName__PolicyProcessor.java @@ -0,0 +1,115 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.${policyName}; + +import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; +import static javax.xml.stream.XMLStreamConstants.START_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.contribution.processor.ContributionReadException; +import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; +import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; +import org.apache.tuscany.sca.contribution.processor.ProcessorContext; +import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; +import org.apache.tuscany.sca.contribution.resolver.ModelResolver; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; + +/** + * + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}PolicyProcessor implements StAXArtifactProcessor<${policyName}Policy> { + + public ${policyName}PolicyProcessor(FactoryExtensionPoint modelFactories) { + } + + @Override + public QName getArtifactType() { + return ${policyName}Policy.POLICY_QNAME; + } + + @Override + public ${policyName}Policy read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException { + ${policyName}Policy policy = new ${policyName}Policy(); + int event = reader.getEventType(); + QName name = null; + + + while (reader.hasNext()) { + event = reader.getEventType(); + switch (event) { + case START_ELEMENT : { + name = reader.getName(); + if ( name.equals(${policyName}Policy.POLICY_QNAME) ) { + String config = reader.getAttributeValue(null, "name"); + policy.setConfigProperty(config); + } + break; + } + } + + if ( event == END_ELEMENT ) { + if ( ${policyName}Policy.POLICY_QNAME.equals(reader.getName()) ) { + break; + } + } + + //Read the next element + if (reader.hasNext()) { + reader.next(); + } + } + + return policy; + } + + @Override + public void write(${policyName}Policy policy, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, + XMLStreamException { + String prefix = "tuscany"; + writer.writeStartElement(prefix, + ${policyName}Policy.POLICY_QNAME.getLocalPart(), + ${policyName}Policy.POLICY_QNAME.getNamespaceURI()); + writer.writeNamespace("tuscany", ${policyName}Policy.SCA11_TUSCANY_NS); + + if (policy.getConfigProperty() != null) { + writer.writeAttribute("name", policy.getConfigProperty()); + } + + writer.writeEndElement(); + } + + @Override + public Class<${policyName}Policy> getModelType() { + return ${policyName}Policy.class; + } + + @Override + public void resolve(${policyName}Policy arg0, ModelResolver arg1, ProcessorContext context) throws ContributionResolveException { + + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ImplementationPolicyProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ImplementationPolicyProvider.java new file mode 100644 index 0000000000..129f0add6c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ImplementationPolicyProvider.java @@ -0,0 +1,63 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.${policyName}.provider; + +import java.util.List; + +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.invocation.PhasedInterceptor; +import org.apache.tuscany.sca.provider.BasePolicyProvider; +import org.apache.tuscany.sca.runtime.RuntimeComponent; + +import ${package}.util.PolicyHelper; +import ${package}.${policyName}.${policyName}Policy; + +/** + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}ImplementationPolicyProvider extends BasePolicyProvider<${policyName}Policy> { + private RuntimeComponent component; + + public ${policyName}ImplementationPolicyProvider(RuntimeComponent component) { + super(${policyName}Policy.class, component.getImplementation()); + this.component = component; + } + + /** + * @see ${groupId}.provider.PolicyProvider${symbol_pound}createInterceptor(${groupId}.interfacedef.Operation) + */ + @Override + public PhasedInterceptor createInterceptor(Operation operation) { + List policySets = PolicyHelper.findPolicySets(component, ${policyName}Policy.POLICY_QNAME); + + + return policySets.isEmpty() ? null : new ${policyName}PolicyInterceptor(getContext(), operation, getPhase()); + } + + public String getPhase() { + return Phase.IMPLEMENTATION_POLICY; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyInterceptor.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyInterceptor.java new file mode 100644 index 0000000000..164d59be90 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyInterceptor.java @@ -0,0 +1,71 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.${policyName}.provider; + +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.invocation.PhasedInterceptor; + +/** + * Policy handler to handle PolicySet related to Logging with the QName + * {http://tuscany.apache.org/xmlns/sca/1.1/impl/java}${policyName}Policy + * + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}PolicyInterceptor implements PhasedInterceptor { + private Invoker next; + private Operation operation; + private String context; + private String phase; + + public ${policyName}PolicyInterceptor(String context, Operation operation, String phase) { + super(); + this.operation = operation; + this.context = context; + this.phase = phase; + } + + @Override + public Message invoke(Message msg) { + // DO SOMETHING HERE + System.out.println("Inside policy interceptor invoke method"); + + return getNext().invoke(msg); + } + + @Override + public Invoker getNext() { + return next; + } + + @Override + public void setNext(Invoker next) { + this.next = next; + } + + @Override + public String getPhase() { + return phase; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyProviderFactory.java new file mode 100644 index 0000000000..44c962bc2c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__PolicyProviderFactory.java @@ -0,0 +1,77 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.${policyName}.provider; + +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.provider.PolicyProvider; +import org.apache.tuscany.sca.provider.PolicyProviderFactory; +import org.apache.tuscany.sca.runtime.RuntimeComponent; + +import ${package}.${policyName}.${policyName}Policy; + +/** + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}PolicyProviderFactory implements PolicyProviderFactory<${policyName}Policy> { + private ExtensionPointRegistry registry; + + public ${policyName}PolicyProviderFactory(ExtensionPointRegistry registry) { + super(); + this.registry = registry; + } + + /** + * @see ${groupId}.provider.PolicyProviderFactory${symbol_pound}createImplementationPolicyProvider(${groupId}.runtime.RuntimeComponent, ${groupId}.assembly.Implementation) + */ + @Override + public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component) { + return new ${policyName}ImplementationPolicyProvider(component); + } + + /** + * @see ${groupId}.provider.PolicyProviderFactory${symbol_pound}createReferencePolicyProvider(${groupId}.runtime.RuntimeComponent, ${groupId}.runtime.RuntimeComponentReference, ${groupId}.assembly.Binding) + */ + @Override + public PolicyProvider createReferencePolicyProvider(EndpointReference endpointReference) { + return new ${policyName}ReferencePolicyProvider(endpointReference); + } + + /** + * @see ${groupId}.provider.PolicyProviderFactory${symbol_pound}createServicePolicyProvider(${groupId}.runtime.RuntimeComponent, ${groupId}.runtime.RuntimeComponentService, ${groupId}.assembly.Binding) + */ + @Override + public PolicyProvider createServicePolicyProvider(Endpoint endpoint) { + return new ${policyName}ServicePolicyProvider(endpoint); + } + + /** + * @see ${groupId}.provider.ProviderFactory${symbol_pound}getModelType() + */ + @Override + public Class<${policyName}Policy> getModelType() { + return ${policyName}Policy.class; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ReferencePolicyProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ReferencePolicyProvider.java new file mode 100644 index 0000000000..70ea13de2f --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ReferencePolicyProvider.java @@ -0,0 +1,54 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.${policyName}.provider; + +import java.util.List; + +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.invocation.PhasedInterceptor; +import org.apache.tuscany.sca.provider.BasePolicyProvider; + +import ${package}.util.PolicyHelper; +import ${package}.${policyName}.${policyName}Policy; +/** + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}ReferencePolicyProvider extends BasePolicyProvider<${policyName}Policy> { + private EndpointReference endpointReference; + + public ${policyName}ReferencePolicyProvider(EndpointReference endpointReference) { + super(${policyName}Policy.class, endpointReference); + this.endpointReference = endpointReference; + } + + @Override + public PhasedInterceptor createInterceptor(Operation operation) { + List policySets = PolicyHelper.findPolicySets(endpointReference, ${policyName}Policy.POLICY_QNAME); + + return (policySets.isEmpty()) ? null : new ${policyName}PolicyInterceptor(getContext(), operation, Phase.REFERENCE_POLICY); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ServicePolicyProvider.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ServicePolicyProvider.java new file mode 100644 index 0000000000..cb23eb6dad --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/__policyName__/provider/__policyName__ServicePolicyProvider.java @@ -0,0 +1,55 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package ${package}.${policyName}.provider; + +import java.util.List; + +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.invocation.PhasedInterceptor; +import org.apache.tuscany.sca.provider.BasePolicyProvider; + +import ${package}.util.PolicyHelper; +import ${package}.${policyName}.${policyName}Policy; + +/** + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class ${policyName}ServicePolicyProvider extends BasePolicyProvider<${policyName}Policy> { + private Endpoint endpoint; + + public ${policyName}ServicePolicyProvider(Endpoint endpoint) { + super(${policyName}Policy.class, endpoint); + this.endpoint = endpoint; + } + + @Override + public PhasedInterceptor createInterceptor(Operation operation) { + List policySets = PolicyHelper.findPolicySets(endpoint, ${policyName}Policy.POLICY_QNAME); + + return policySets.isEmpty() ? null : new ${policyName}PolicyInterceptor(getContext(), operation, Phase.SERVICE_POLICY); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/util/PolicyHelper.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/util/PolicyHelper.java new file mode 100644 index 0000000000..2f21ae2e4b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/java/util/PolicyHelper.java @@ -0,0 +1,74 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.util; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.PolicyExpression; +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.policy.PolicySubject; + +public class PolicyHelper { + + /** + * Find a list of policy sets that provide the given intent + * @param subject + * @param providedIntent + * @return + */ + public static List findPolicySets(PolicySubject subject, QName providedIntent) { + List policies = new ArrayList(); + List policySets = subject.getPolicySets(); + for (PolicySet ps : policySets) { + for (Intent i : ps.getProvidedIntents()) { + if (i.getName().equals(providedIntent)) { + policies.add(ps); + } + } + } + return policies; + } + + /** + * Find a list of policies of the given type + * @param + * @param subject + * @param policyType + * @return + */ + public static List findPolicies(PolicySubject subject, QName providedIntent, Class policyType) { + List policies = new ArrayList(); + List policySets = findPolicySets(subject, providedIntent); + for (PolicySet ps : policySets) { + for (PolicyExpression exp : ps.getPolicies()) { + if (policyType.isInstance(exp.getPolicy())) { + policies.add(policyType.cast(exp.getPolicy())); + } + } + } + return policies; + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder new file mode 100644 index 0000000000..26ca8d5fdf --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +${package}.${policyName}.${policyName}PolicyBuilder;qname=http://tuscany.apache.org/xmlns/sca/1.1#${policyName} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..9b97157f57 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT 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 +${package}.${policyName}.${policyName}PolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#${policyName}Policy,model=${package}.${policyName}.${policyName}Policy \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions new file mode 100644 index 0000000000..a186ac7367 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +${policyName}/definitions.xml diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory new file mode 100644 index 0000000000..4d41d2281c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Implementation class for the policy extension +${package}.${policyName}.provider.${policyName}PolicyProviderFactory;model=${package}.${policyName}.${policyName}Policy diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/__policyName__/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/__policyName__/definitions.xml new file mode 100644 index 0000000000..a956d3417f --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/__policyName__/definitions.xml @@ -0,0 +1,34 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + + All operations should have a valid authenticated user + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/definitions.xml new file mode 100644 index 0000000000..4e24d0e93b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/main/resources/definitions.xml @@ -0,0 +1,41 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + + All messages to and from this implementation must be logged + + + + + + + All messages to and from this implementation must be logged + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/java/PolicyReadTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/java/PolicyReadTestCase.java new file mode 100644 index 0000000000..436c429aad --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/java/PolicyReadTestCase.java @@ -0,0 +1,87 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.InputStream; +import java.io.StringReader; +import java.io.StringWriter; +import java.net.URL; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.contribution.processor.ProcessorContext; + +import ${package}.${policyName}.${policyName}Policy; +import ${package}.${policyName}.${policyName}PolicyProcessor; + +/** + * Test the reading of ws config params policy. + * + * @version ${symbol_dollar}Rev${symbol_dollar} ${symbol_dollar}Date${symbol_dollar} + */ +public class PolicyReadTestCase extends TestCase { + private ProcessorContext context = new ProcessorContext(); + + @Override + public void setUp() throws Exception { + } + + @Override + public void tearDown() throws Exception { + } + + public void testPolicyReading() throws Exception { + ${policyName}PolicyProcessor processor = new ${policyName}PolicyProcessor(null); +// URL url = getClass().getResource("mock_policies.xml"); +// XMLInputFactory inputFactory = XMLInputFactory.newInstance(); +// +// InputStream urlStream = url.openStream(); +// XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream); +// +// +// ${policyName}Policy policy = processor.read(reader, context); + } + + public void testPolicyWriting() throws Exception { + ${policyName}PolicyProcessor processor = new ${policyName}PolicyProcessor(null); + + ${policyName}Policy policy = new ${policyName}Policy(); + + XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); + StringWriter sw = new StringWriter(); + XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw); + processor.write(policy, writer, context); + writer.close(); + + XMLInputFactory inputFactory = XMLInputFactory.newInstance(); + StringReader sr = new StringReader(sw.toString()); + XMLStreamReader reader = inputFactory.createXMLStreamReader(sr); + + policy = processor.read(reader, context); + + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/mock_policies.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/mock_policies.xml new file mode 100644 index 0000000000..a6071984e8 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/mock_policies.xml @@ -0,0 +1,25 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/org/apache/tuscany/sca/policy/logging/jdk/mock_policies.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/org/apache/tuscany/sca/policy/logging/jdk/mock_policies.xml new file mode 100644 index 0000000000..956e2d763d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/main/resources/archetype-resources/src/test/resources/org/apache/tuscany/sca/policy/logging/jdk/mock_policies.xml @@ -0,0 +1,19 @@ + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000000..6e140b54b7 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#Sat Sep 04 08:10:22 BST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +package=archetype.it.basic +artifactId=basic +policyName=Basic diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/policy/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/pom.xml new file mode 100644 index 0000000000..7498c05665 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../pom.xml + + tuscany-archetype + pom + Apache Tuscany SCA Maven Archetypes + + + + default + + true + + + + binding + contribution-jar + contribution-zip + contribution-zip-discriptor + policy + quickstart + quickstart-jsf + quickstart-stripes + quickstart-bpel + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/pom.xml new file mode 100644 index 0000000000..ded038eab3 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-quickstart-bpel + maven-archetype + Create an SCA Webapp project using BPEL + Create an SCA Webapp project using BPEL + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..47c2f5dc10 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,43 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/* + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..c466a1b3f5 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,33 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/resources/helloworld.bpel + src/main/resources/helloworld.wsdl + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..9584cf7c6e --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,182 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-runtime + ${tuscany.version} + runtime + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + compile + + unpack + + + + + org.apache.ode + ode-dao-jpa-ojpa-derby + 1.1.1 + zip + false + ${project.build.directory}/classes + **/* + + + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + + + openjpa.QueryCompilationCache + false + + + + ${basedir}/src/main + ${basedir}/src/main/webapp/WEB-INF/web.xml + + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0 + 6.1.18 + + #end + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..a99cc7b032 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloworldService { + + String hello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel new file mode 100644 index 0000000000..53e77c5be0 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + concat($tmpVar,' World') + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..46cf381577 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..4d3d532184 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..922d275b17 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + ${artifactId} + + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..7aeaf81b33 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

+ + Calling HelloworldService sayHello("world") returns: + +

+ + <%= service.hello("world") %> + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/pom.xml new file mode 100644 index 0000000000..87a94f2756 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-quickstart-jsf + maven-archetype + Create a Tuscany SCA and JSF project + Create a Tuscany SCA and JSF project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..f15a12fb88 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,44 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.html + **/*.composite + + + + src/main/resources + + **/*.properties + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..b5295d8a73 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,38 @@ + + + + quickstart-stripes + + src/main/java/sample/stripes/action/BaseActionBean.java + src/main/java/sample/stripes/action/HomeActionBean.java + src/main/java/sample/sca/HelloworldService.java + src/main/java/sample/sca/HelloworldServiceImpl.java + + + src/main/resources/log4j.properties + src/main/resources/StripesResources.properties + src/main/webapp/index.html + src/main/webapp/WEB-INF/jsp/home.jsp + src/main/webapp/WEB-INF/jsp/layout.jsp + src/main/webapp/WEB-INF/jsp/taglibs.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..71503067b1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart-jsf + + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + org.apache.tuscany.sca + tuscany-myfaces + ${tuscany.version} + + + + + org.apache.myfaces.core + myfaces-api + 1.2.2 + compile + + + + org.apache.myfaces.core + myfaces-impl + 1.2.2 + compile + + + + org.apache.myfaces.tomahawk + tomahawk + 1.1.6 + runtime + + + javax.servlet + jstl + + + + + + jstl + jstl + 1.2 + runtime + + + + junit + junit + 4.0 + test + + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0 + 1.5 + 6.1.4 + + #end + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java new file mode 100644 index 0000000000..e38c84feda --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java @@ -0,0 +1,64 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +package ${package}.myfaces; + +import org.oasisopen.sca.annotation.Reference; + +import ${package}.sca.HelloworldService; + +/** + * A typical simple backing bean, that is backed to helloworld.jsp + * + */ +public class HelloWorldController { + + //properties + private String name; + + @Reference + private HelloworldService service; + + /** + * default empty constructor + */ + public HelloWorldController(){ + } + + //-------------------getter & setter + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + /** + * Method that is backed to a submit button of a form. + */ + public String send(){ + + // invoke the SCA reference + name = service.sayHello(name); + + return "success"; + } +} \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java new file mode 100644 index 0000000000..d6cb7bbcf2 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java @@ -0,0 +1,28 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.sca; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java new file mode 100644 index 0000000000..ec9bfd7221 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java @@ -0,0 +1,30 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.sca; + +public class HelloworldServiceImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000000..3b732de8af --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,53 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + helloWorld + ${package}.myfaces.HelloWorldController + request + + + + + /helloWorld.jsp + + success + /page2.jsp + + + + + + /page2.jsp + + back + /helloWorld.jsp + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..7e18dc9308 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..48b73fe68a --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,230 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + ${artifactId} + + + + org.apache.tuscany.sca.host.webapp.TuscanyContextListener + + + org.apache.myfaces.config.annotation.LifecycleProvider + org.apache.tuscany.sca.myfaces.TuscanyAnnotationLifecycleProvider + + + + + State saving method: "client" or "server" (= default) + See JSF Specification 2.5.3 + javax.faces.STATE_SAVING_METHOD + client + + + Only applicable if state saving method is "server" (= default). + Defines the amount (default = 20) of the latest views are stored in session. + org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION + 20 + + + Only applicable if state saving method is "server" (= default). + If true (default) the state will be serialized to a byte stream before it + is written to the session. + If false the state will not be serialized to a byte stream. + org.apache.myfaces.SERIALIZE_STATE_IN_SESSION + true + + + Only applicable if state saving method is "server" (= default) and if + org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default) + If true (default) the serialized state will be compressed before it + is written to the session. If false the state will not be compressed. + org.apache.myfaces.COMPRESS_STATE_IN_SESSION + true + + + This parameter tells MyFaces if javascript code should be allowed in the + rendered HTML output. + If javascript is allowed, command_link anchors will have javascript code + that submits the corresponding form. + If javascript is not allowed, the state saving info and nested parameters + will be added as url parameters. + Default: "true" + org.apache.myfaces.ALLOW_JAVASCRIPT + true + + + org.apache.myfaces.DETECT_JAVASCRIPT + false + + + If true, rendered HTML code will be formatted, so that it is "human readable". + i.e. additional line separators and whitespace will be written, that do not + influence the HTML code. + Default: "true" + org.apache.myfaces.PRETTY_HTML + true + + + If true, a javascript function will be rendered that is able to restore the + former vertical scroll on every request. Convenient feature if you have pages + with long lists and you do not want the browser page to always jump to the top + if you trigger a link or button action that stays on the same page. + Default: "false" + org.apache.myfaces.AUTO_SCROLL + true + + + + Used for encrypting view state. Only relevant for client side + state saving. See MyFaces wiki/web site documentation for instructions + on how to configure an application for diffenent encryption strengths. + + org.apache.myfaces.SECRET + NzY1NDMyMTA= + + + + + Validate managed beans, navigation rules and ensure that forms are not nested. + + org.apache.myfaces.VALIDATE + true + + + + + Treat readonly same as if disabled attribute was set for select elements. + + org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS + true + + + + + Use the defined class as the class which will be called when a resource is added to the + ExtensionFilter handling. Using StreamingAddResource here helps with performance. If you want to add + custom components and want to use the ExtensionFilter, you need to provide your custom implementation here. + + org.apache.myfaces.ADD_RESOURCE_CLASS + org.apache.myfaces.renderkit.html.util.DefaultAddResource + + + + + Virtual path in the URL which triggers loading of resources for the MyFaces extended components + in the ExtensionFilter. + + org.apache.myfaces.RESOURCE_VIRTUAL_PATH + /faces/myFacesExtensionResource + + + + + Check if the extensions-filter has been properly configured. + + org.apache.myfaces.CHECK_EXTENSIONS_FILTER + true + + + + + Define partial state saving as true/false. + + javax.faces.PARTIAL_STATE_SAVING_METHOD + false + + + + + extensionsFilter + org.apache.myfaces.webapp.filter.ExtensionsFilter + + Set the size limit for uploaded files. + Format: 10 - 10 bytes + 10k - 10 KB + 10m - 10 MB + 1g - 1 GB + uploadMaxFileSize + 100m + + + Set the threshold size - files + below this limit are stored in memory, files above + this limit are stored on disk. + + Format: 10 - 10 bytes + 10k - 10 KB + 10m - 10 MB + 1g - 1 GB + uploadThresholdSize + 100k + + + + + extensionsFilter + *.jsf + + + extensionsFilter + /faces/* + + + + + org.apache.myfaces.webapp.StartupServletContextListener + + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + + Faces Servlet + *.jsf + + + + + index.jsp + index.html + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp new file mode 100644 index 0000000000..4a3197ec4f --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp @@ -0,0 +1,37 @@ + +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> + + + Hello World + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp new file mode 100644 index 0000000000..768aa2408b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp @@ -0,0 +1,22 @@ + +<%@ page session="false"%> +<% +response.sendRedirect("helloWorld.jsf"); +%> \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp new file mode 100644 index 0000000000..1c096f66c6 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp @@ -0,0 +1,35 @@ + +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> + + + Hello World + + + + +

+ + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/pom.xml new file mode 100644 index 0000000000..60b6496e59 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../pom.xml + + + tuscany-quickstart-jsonp + maven-archetype + Create a Tuscany SCA webapp project using the JSONP binding + Create a Tuscany SCA webapp project using the JSONP binding + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-4 + + + + + maven-archetype-plugin + 2.0-alpha-4 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..450e33afd5 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,42 @@ + + + + + + Y + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..1bf4353502 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,31 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..b9b56b7799 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + quickstart-jsonp + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} +#if(${includeTuscanyRuntime} == "Y") + compile +#else + provided +#end + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + org.apache.tuscany.sca + tuscany-binding-jsonp-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0 + 6.1.18 + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..2491816adc --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +public class HelloworldImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..3527edcd6f --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..fa37fec88c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..25d8d8184d --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,43 @@ + + + + + ${artifactId} + +#if($includeTuscanyRuntime == "Y") + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + +#end + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..9729ca6823 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

+ + Calling HelloworldService sayHello("world") returns: + +

+ + <%= service.sayHello("world") %> + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ae84237c4a --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Stripes Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Stripes Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart.stripes +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/pom.xml new file mode 100644 index 0000000000..fa1f29bf70 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-quickstart-stripes + maven-archetype + Create a simple Apache Tuscany SCA webapp project using the Stripes Web Framework + Create a simple Apache Tuscany SCA webapp project using the Stripes Web Framework + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..f15a12fb88 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,44 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.html + **/*.composite + + + + src/main/resources + + **/*.properties + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..b5295d8a73 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,38 @@ + + + + quickstart-stripes + + src/main/java/sample/stripes/action/BaseActionBean.java + src/main/java/sample/stripes/action/HomeActionBean.java + src/main/java/sample/sca/HelloworldService.java + src/main/java/sample/sca/HelloworldServiceImpl.java + + + src/main/resources/log4j.properties + src/main/resources/StripesResources.properties + src/main/webapp/index.html + src/main/webapp/WEB-INF/jsp/home.jsp + src/main/webapp/WEB-INF/jsp/layout.jsp + src/main/webapp/WEB-INF/jsp/taglibs.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..b7aa9d678c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,124 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart-stripes + + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + org.apache.tuscany.sca + tuscany-stripes + ${tuscany.version} + + + + + net.sourceforge.stripes + stripes + ${stripes.version} + + + taglibs + standard + 1.1.2 + + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0 + 1.5.2 + 6.1.4 + + #end + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java new file mode 100644 index 0000000000..d6cb7bbcf2 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java @@ -0,0 +1,28 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.sca; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java new file mode 100644 index 0000000000..390b424d24 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.sca; + + +public class HelloworldServiceImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java new file mode 100644 index 0000000000..5bfa1c5d32 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.stripes.action; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; + +public class BaseActionBean implements ActionBean { + private ActionBeanContext context; + + public ActionBeanContext getContext() { + return context; + } + public void setContext(ActionBeanContext context) { + this.context = context; + } +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java new file mode 100644 index 0000000000..05fd743841 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java @@ -0,0 +1,48 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}.stripes.action; + +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; +import net.sourceforge.stripes.action.UrlBinding; + +import org.oasisopen.sca.annotation.Reference; + +import ${package}.sca.HelloworldService; + +@UrlBinding("/Home.htm") +public class HomeActionBean extends BaseActionBean { + + @Reference + HelloworldService service; + + @DefaultHandler + public Resolution view() { + return new ForwardResolution("/WEB-INF/jsp/home.jsp"); + } + + public String getHello() { + return service.sayHello("world"); + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties new file mode 100644 index 0000000000..6567f21ce1 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties @@ -0,0 +1,77 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +${symbol_pound} Resource strings used by the tag when there are no nested tags +stripes.errors.header=

Please fix the following errors:
    +stripes.errors.beforeError=
  1. +stripes.errors.afterError=
  2. +stripes.errors.footer=
+ +${symbol_pound} Resource strings used by the tag when displaying errors for a +${symbol_pound} specific field (e.g. ). If not supplied the +${symbol_pound} values above will be used instead. +stripes.fieldErrors.header= +stripes.fieldErrors.beforeError= +stripes.fieldErrors.afterError=
+stripes.fieldErrors.footer= + +${symbol_pound} Resource strings used by the stripes:messages tag +stripes.messages.header=
    +stripes.messages.beforeMessage=
  • +stripes.messages.afterMessage=
  • +stripes.messages.footer=
+ +${symbol_pound} Validation error messages produced by Stripes' built-in converter classes. These +${symbol_pound} are default error messages and can be overridden on per-field and per-form levels. +${symbol_pound} Using the 'invalidNumber' error for a field 'age' of a form posting to +${symbol_pound} '/user/Profile.action', the keys looked for (in order) would be: +${symbol_pound} 1: /user/Profile.action.age.invalidNumber +${symbol_pound} 2: /user/Profile.action.age.errorMessage +${symbol_pound} 3: age.errorMessage +${symbol_pound} 4: /user/Profile.action.invalidNumber +${symbol_pound} 5: converter.number.invalidNumber +converter.number.invalidNumber=The value ({1}) entered in field {0} must be a valid number +converter.byte.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.short.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.integer.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.float.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.enum.notAnEnumeratedValue=The value "{1}" is not a valid value for field {0} +converter.date.invalidDate=The value ({1}) entered in field {0} must be a valid date +converter.email.invalidEmail=The value ({1}) entered is not a valid email address +converter.creditCard.invalidCreditCard=The value ({1}) entered is not a valid credit card number + +${symbol_pound} Validation error messages produced by Stripes' annotation based validations. These +${symbol_pound} are default error messages and can be overridden on per-field and per-form levels. +${symbol_pound} Using the 'valueNotPresent' required field error for a field 'username' of a form +${symbol_pound} posting to '/user/Register.action', the keys looked for (in order) would be: +${symbol_pound} 1: /user/Register.action.username.valueNotPresent +${symbol_pound} 2: /user/Register.action.username.errorMessage +${symbol_pound} 3: username.errorMessage +${symbol_pound} 4: /user/Register.action.valueNotPresent +${symbol_pound} 5: validation.required.valueNotPresent +validation.required.valueNotPresent={0} is a required field +validation.minlength.valueTooShort={0} must be at least {2} characters long +validation.maxlength.valueTooLong={0} must be no more than {2} characters long +validation.minvalue.valueBelowMinimum=The minimum allowed value for {0} is {2} +validation.maxvalue.valueAboveMaximum=The maximum allowed value for {0} is {2} +validation.mask.valueDoesNotMatch={1} is not a valid {0} +validation.expression.valueFailedExpression=The value supplied ({1}) for field {0} is invalid +validation.file.postBodyTooBig=Total upload size of {3} KB exceeds the maximum size of {2} KB diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties new file mode 100644 index 0000000000..e2fd1997c8 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties @@ -0,0 +1,51 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +${symbol_pound} log4j.properties + +${symbol_pound} Set up a logger to the console +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n + +${symbol_pound} Use this to only see log messages beyond a certain threshold in the console +${symbol_pound}log4j.appender.stdout.Threshold=WARN + +${symbol_pound} Set up a logger to a log file +log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n +log4j.appender.logfile.File=${symbol_dollar}{user.home}/stripesquick.log +log4j.appender.logfile.DatePattern='.'yyyy-MM-dd + +${symbol_pound} Use this to only see log messages beyond a certain threshold in the log file +${symbol_pound}log4j.appender.logfile.Threshold=WARN + +${symbol_pound} Logger settings +log4j.rootLogger=INFO, stdout, logfile + +${symbol_pound} Valid levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL +${symbol_pound} Change to TRACE or DEBUG to see more log messages +log4j.logger.net.sourceforge.stripes=WARN +log4j.logger.org.stripesbook.quickstart=INFO +log4j.logger.org.mortbay.log=INFO +log4j.logger.org=WARN +log4j.logger.com=WARN +log4j.logger.net=WARN diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp new file mode 100644 index 0000000000..59cdacfe23 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp @@ -0,0 +1,29 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> + + + +

sayHello returns: ${symbol_dollar}{actionBean.hello}

+

Congratulations, you've set up a Stripes SCA project!

+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp new file mode 100644 index 0000000000..0964d2fb7b --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp @@ -0,0 +1,42 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> + + + + + + + ${symbol_dollar}{title} + + + + + +
+ + +
+ + + +
\ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp new file mode 100644 index 0000000000..6452b1bd9c --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp @@ -0,0 +1,32 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%-- Stripes TLD --%> +<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %> +<%@ taglib prefix="sdyn" uri="http://stripes.sourceforge.net/stripes-dynattr.tld" %> + +<%-- JSTL TLDs --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + +<%-- This is so that you can conveniently refer to the context path with ${symbol_dollar}{contextPath} --%> + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..f98b7f2721 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..d73e7311d6 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,68 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + ${artifactId} + + + org.apache.tuscany.sca.host.webapp.TuscanyContextListener + + + + StripesFilter + net.sourceforge.stripes.controller.StripesFilter + + ActionResolver.Packages + ${package}.stripes.action + + + Extension.Packages + org.apache.tuscany.sca.stripes + + + + + DispatcherServlet + net.sourceforge.stripes.controller.DispatcherServlet + 1 + + + + StripesFilter + DispatcherServlet + REQUEST + FORWARD + + + + DispatcherServlet + *.htm + + + + index.html + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html new file mode 100644 index 0000000000..a350f1e68a --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/pom.xml new file mode 100644 index 0000000000..ee6d7e465e --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0.1 + ../../../pom.xml + + + tuscany-quickstart + maven-archetype + Create a simple Apache Tuscany SCA webapp project + Create a simple Apache Tuscany SCA webapp project + + + + + org.apache.maven.archetype + archetype-packaging + 2.2 + + + + + maven-archetype-plugin + 2.2 + true + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..c132fa0364 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,42 @@ + + + + + + Y + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..7794570626 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,31 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..bfd10e8dd3 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,139 @@ + + + + + 4.0.0 + ${groupId} + ${artifactId} + war + ${version} + quickstart + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + org.apache.tuscany.sca + tuscany-base-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0 + 6.1.18 + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..df80303778 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +public class HelloworldImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..47501efb9a --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package ${package}; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..8d840b7867 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..a7c7d2251e --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,43 @@ + + + + + ${artifactId} + +#if($includeTuscanyRuntime == "Y") + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + +#end + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..9729ca6823 --- /dev/null +++ b/sca-java-2.x/tags/2.0.1-RC1/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

+ + Calling HelloworldService sayHello("world") returns: + +

+ + <%= service.sayHello("world") %> + + + -- cgit v1.2.3