summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/shared-contributions/payment-java-contribution/src/main
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-03 22:34:36 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-03 22:34:36 +0000
commit10ede45693e24dc7450560fa575ece3a346c51b8 (patch)
tree2fb86c3731907f286152aaff8606582a7fe39dc7 /sandbox/travelsample/shared-contributions/payment-java-contribution/src/main
parentc7557e4aae2a5ebba4ac255d5a5b57d38c430138 (diff)
Move CreditCardPaymentImpl into src/main/java
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@749806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/shared-contributions/payment-java-contribution/src/main')
-rw-r--r--sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/payment/creditcard/CreditCardPaymentImpl.java40
-rw-r--r--sandbox/travelsample/shared-contributions/payment-java-contribution/src/main/java/scatours/emailgateway/EmailGateway.java1
2 files changed, 40 insertions, 1 deletions
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);
-
}