From 10ede45693e24dc7450560fa575ece3a346c51b8 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 3 Mar 2009 22:34:36 +0000 Subject: Move CreditCardPaymentImpl into src/main/java git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@749806 13f79535-47bb-0310-9956-ffa450edef68 --- .../payment/creditcard/CreditCardPaymentImpl.java | 40 +++++++++++++++++++++ .../java/scatours/emailgateway/EmailGateway.java | 1 - .../payment/creditcard/CreditCardPaymentImpl.java | 41 ---------------------- 3 files changed, 40 insertions(+), 42 deletions(-) create mode 100644 sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java delete mode 100644 sandbox/travelsample/shared-contributions/payment-java-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java (limited to 'sandbox/travelsample/shared-contributions') diff --git a/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java b/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java new file mode 100644 index 0000000000..ed86c4d482 --- /dev/null +++ b/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package payment.creditcard; + +import org.osoa.sca.annotations.Service; + +@Service(CreditCardPayment.class) +public class CreditCardPaymentImpl implements CreditCardPayment { + + public String authorize(CreditCardDetailsType creditCard, float amount) { + if (creditCard != null) { + System.out.println("Checking card: name = " + creditCard.getCardOwner().getName() + + " number = " + + creditCard.getCreditCardNumber() + + " for amount " + + amount); + } else { + System.out.println("Checking card is null"); + } + + return "OK"; + } +} diff --git a/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java b/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java index 13c34878cf..6c3662b265 100644 --- a/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java +++ b/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java @@ -27,5 +27,4 @@ import org.osoa.sca.annotations.Remotable; @Remotable public interface EmailGateway { public boolean sendEmail(String sender, String recipient, String subject, String body); - } diff --git a/sandbox/travelsample/shared-contributions/payment-java-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java b/sandbox/travelsample/shared-contributions/payment-java-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java deleted file mode 100644 index ac05bf7359..0000000000 --- a/sandbox/travelsample/shared-contributions/payment-java-contribution/src/test/java/payment/creditcard/CreditCardPaymentImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package payment.creditcard; - -import org.osoa.sca.annotations.Service; - -@Service(CreditCardPayment.class) -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCardDetailsType creditCard, float amount) { - if (creditCard != null){ - System.out.println("Checking card: name = " + - creditCard.getCardOwner().getName() + - " number = " + - creditCard.getCreditCardNumber() + - " for amount " + - amount); - } else { - System.out.println("Checking card is null"); - } - - return "OK"; - } -} -- cgit v1.2.3