From 89149b2899af6f56e825795965da9d31d4b19e2f Mon Sep 17 00:00:00 2001 From: mcombellack Date: Sat, 25 Jul 2009 21:13:51 +0000 Subject: Updated the code to use more real looking phone numbers for the SMS message sender and recipient. They use 'Fake' phone numbers that have been reserved by Ofcom. (This is the UK equivalent of the US 555-xxxxxxxx style phone numbers) See http://www.ofcom.org.uk/telecoms/ioi/numbers/num_drama?a=87101 for more information about these 'Fake' numbers git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@797839 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/scatours/notification/NotificationImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sandbox/travelsample/contributions') diff --git a/sandbox/travelsample/contributions/notification-contribution/src/main/java/scatours/notification/NotificationImpl.java b/sandbox/travelsample/contributions/notification-contribution/src/main/java/scatours/notification/NotificationImpl.java index 59cd631bc8..1c29cdea88 100644 --- a/sandbox/travelsample/contributions/notification-contribution/src/main/java/scatours/notification/NotificationImpl.java +++ b/sandbox/travelsample/contributions/notification-contribution/src/main/java/scatours/notification/NotificationImpl.java @@ -27,7 +27,11 @@ import scatours.smsgateway.SMSGateway; @Service(Notification.class) public class NotificationImpl implements Notification { - private static final String SCA_TOURS_SMS ="12345"; + /** + * Use "Fake" phone number that has been reserved by Ofcom. + * See: http://www.ofcom.org.uk/telecoms/ioi/numbers/num_drama?a=87101 + */ + private static final String SCA_TOURS_SMS ="+44(0)2079460723"; @Reference protected SMSGateway smsGateway; @@ -39,7 +43,7 @@ public class NotificationImpl implements Notification { String sms = getSMSAddress(accountID); if (sms != null) { - System.out.println("Sending SMS to " + sms); + System.out.println("Sending SMS to " + sms + " for accountID " + accountID); result &= smsGateway.sendSMS(SCA_TOURS_SMS, sms, subject + ". " + message); } @@ -47,6 +51,8 @@ public class NotificationImpl implements Notification { } private String getSMSAddress(String accountID) { - return "23874"; + // Use "Fake" phone number that has been reserved by Ofcom. + // See: http://www.ofcom.org.uk/telecoms/ioi/numbers/num_drama?a=87101 + return "+44(0)7700900812"; } } -- cgit v1.2.3