diff options
Diffstat (limited to 'branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank')
10 files changed, 380 insertions, 0 deletions
diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java new file mode 100644 index 0000000000..0600e14f8d --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountReport.java @@ -0,0 +1,32 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account; + +import java.util.List; + +/** + * @model + */ + +public interface AccountReport { + + /** + * @model type="services.account.AccountSummary" + */ + + List getAccountSummaries(); +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java new file mode 100644 index 0000000000..b605d19f09 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountService.java @@ -0,0 +1,25 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface AccountService { + + AccountReport getAccountReport(String customerID); +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java new file mode 100644 index 0000000000..cd3fcfe1f5 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java @@ -0,0 +1,53 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account; + + +import org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata.AccountDataService; +import org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote.StockQuoteService; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; + +public class AccountServiceImpl implements AccountService { + + @Property + private String currency = "USD"; + @Reference + private AccountDataService accountDataService; + @Reference + private StockQuoteService stockQuoteService; + + public AccountServiceImpl() { + } + + public AccountReport getAccountReport(String customerID) { + return null; + } + + + //methods to access the fields + protected StockQuoteService getStockQuoteService() { + return stockQuoteService; + } + protected AccountDataService getAccountDataService() { + return accountDataService; + } + protected String getCurrency() { + return currency; + } + +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java new file mode 100644 index 0000000000..9000e4ba19 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/account/AccountSummary.java @@ -0,0 +1,46 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account; + +/** + * @model + */ + +public interface AccountSummary { + + /** + * @model + */ + String getAccountNumber(); + + void setAccountNumber(String accountNumber); + + /** + * @model + */ + String getAccountType(); + + void setAccountType(String accountType); + + /** + * @model + */ + float getBalance(); + + void setBalance(float balance); +} + diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java new file mode 100644 index 0000000000..d2dc72e868 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java @@ -0,0 +1,26 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata; + +public interface AccountDataService { + + CheckingAccount getCheckingAccount(String customerID); + + SavingsAccount getSavingsAccount(String customerID); + + StockAccount getStockAccount(String customerID); +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java new file mode 100644 index 0000000000..d945ee1f34 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java @@ -0,0 +1,48 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata; + +public class AccountDataServiceImpl implements AccountDataService { + + public CheckingAccount getCheckingAccount(String customerID) { + + CheckingAccount checkingAccount = new CheckingAccount(); + checkingAccount.setAccountNumber(customerID + "_" + "CHA12345"); + checkingAccount.setBalance(1500.0f); + + return checkingAccount; + } + + public SavingsAccount getSavingsAccount(String customerID) { + + SavingsAccount savingsAccount = new SavingsAccount(); + savingsAccount.setAccountNumber(customerID + "_" + "SAA12345"); + savingsAccount.setBalance(1500.0f); + + return savingsAccount; + } + + public StockAccount getStockAccount(String customerID) { + + StockAccount stockAccount = new StockAccount(); + stockAccount.setAccountNumber(customerID + "_" + "STA12345"); + stockAccount.setSymbol("IBM"); + stockAccount.setQuantity(100); + + return stockAccount; + } +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java new file mode 100644 index 0000000000..6b75194b98 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java @@ -0,0 +1,39 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata; + +public class CheckingAccount { + + private String accountNumber; + private float balance; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public float getBalance() { + return balance; + } + + public void setBalance(float balance) { + this.balance = balance; + } +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java new file mode 100644 index 0000000000..a37b504829 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java @@ -0,0 +1,39 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata; + +public class SavingsAccount { + + private String accountNumber; + private float balance; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public float getBalance() { + return balance; + } + + public void setBalance(float balance) { + this.balance = balance; + } +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java new file mode 100644 index 0000000000..2a5ac5f4a3 --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java @@ -0,0 +1,48 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata; + +public class StockAccount { + + private String accountNumber; + private String symbol; + private int quantity; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } +} diff --git a/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java new file mode 100644 index 0000000000..021b19d14d --- /dev/null +++ b/branches/java-post-M1/sca/bindings/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java @@ -0,0 +1,24 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote; + +public interface StockQuoteService { + + float getQuote(String symbol); +} + +
\ No newline at end of file |