From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/assembly/dsl/AccountDataService.java | 24 +++++++++ .../sca/assembly/dsl/AccountDataServiceImpl.java | 24 +++++++++ .../tuscany/sca/assembly/dsl/AccountService.java | 24 +++++++++ .../sca/assembly/dsl/AccountServiceImpl.java | 24 +++++++++ .../tuscany/sca/assembly/dsl/BigBankBuilder.java | 59 ++++++++++++++++++++++ .../sca/assembly/dsl/BigBankBuilderTestCase.java | 33 ++++++++++++ .../sca/assembly/dsl/StockQuoteService.java | 24 +++++++++ 7 files changed, 212 insertions(+) create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataService.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataServiceImpl.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountService.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountServiceImpl.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilder.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilderTestCase.java create mode 100644 sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/StockQuoteService.java (limited to 'sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org') diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataService.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataService.java new file mode 100644 index 0000000000..ba91fd2168 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataService.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +public interface AccountDataService { + +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataServiceImpl.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataServiceImpl.java new file mode 100644 index 0000000000..4e239d03d3 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountDataServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +public class AccountDataServiceImpl { + +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountService.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountService.java new file mode 100644 index 0000000000..030c820ed2 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountService.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +public interface AccountService { + +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountServiceImpl.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountServiceImpl.java new file mode 100644 index 0000000000..92f448ec87 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/AccountServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +public class AccountServiceImpl { + +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilder.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilder.java new file mode 100644 index 0000000000..b856201551 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilder.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +import org.apache.tuscany.sca.assembly.dsl.impl.AssemblyBuilderImpl; + +public class BigBankBuilder extends AssemblyBuilderImpl { + + public CompositeBuilder build() { + + CompositeBuilder bigbankAccount = composite("bigbank.account").contains( + + component("AccountServiceComponent"). + implementedBy(AccountServiceImpl.class). + uses( + reference("accountDataService").typedBy(AccountDataService.class).wiredTo("AccountDataServiceComponent/AccountDataService"), + reference("stockQuoteService").promotedAs("StockQuoteService") + ). + provides( + service("AccountDataService").typedBy(AccountService.class).promoted() + ). + declares( + property("currency").ofType("string").configuredTo("USD") + ), + + component("AccountDataServiceComponent"). + implementedBy(AccountDataServiceImpl.class). + provides( + service("AccountDataService").typedBy(AccountDataService.class) + ) + ); + + CompositeBuilder bigbankApp = composite("bigbank.app"). + contains( + component("BigBankAccount").implementedBy(bigbankAccount) + ); + + CompositeBuilder domain = domain("http://bigbank.org").includes(bigbankApp); + + return domain; + } +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilderTestCase.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilderTestCase.java new file mode 100644 index 0000000000..fb950b5c13 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/BigBankBuilderTestCase.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +import junit.framework.TestCase; + +public class BigBankBuilderTestCase extends TestCase { + + public void testBuild() throws Exception { + + BigBankBuilder builder = new BigBankBuilder(); + CompositeBuilder domain = builder.build(); + assertNotNull(domain); + } + +} diff --git a/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/StockQuoteService.java b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/StockQuoteService.java new file mode 100644 index 0000000000..a0580095a0 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/modules/assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/StockQuoteService.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.dsl; + +public interface StockQuoteService { + +} -- cgit v1.2.3