|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.SMSOutboundGateway
public abstract class SMSOutboundGateway
Outbound SMS gateway handler
Field Summary | |
---|---|
static java.lang.String |
GW_aeris
|
static java.lang.String |
GW_clickatell
|
static java.lang.String |
GW_custom
|
static java.lang.String |
GW_emailBody
|
static java.lang.String |
GW_emailSubject
|
static java.lang.String |
GW_httpURL
|
static java.lang.String |
GW_mail2txt
|
static java.lang.String |
GW_mail2txt160
|
static java.lang.String |
GW_mail2txt160id
|
static java.lang.String |
GW_mail2txtid
|
static java.lang.String |
GW_ozekisms
|
static java.lang.String |
GW_twilio
|
java.lang.String |
gwName
|
static java.lang.String |
PROP_aeris_className
|
static java.lang.String |
PROP_aeris_maxMessageLength
|
static java.lang.String |
PROP_clickatell_api_id
|
static java.lang.String |
PROP_clickatell_maxMessageLength
|
static java.lang.String |
PROP_clickatell_password
|
static java.lang.String |
PROP_clickatell_smsEmailAddress
|
static java.lang.String |
PROP_clickatell_user
|
static java.lang.String |
PROP_custom_className
|
static java.lang.String |
PROP_custom_maxMessageLength
|
static java.lang.String |
PROP_defaultMaxMessageLength
|
static java.lang.String |
PROP_defaultName
|
static java.lang.String |
PROP_emailBody_maxMessageLength
|
static java.lang.String |
PROP_emailBody_smsEmailAddress
|
static java.lang.String |
PROP_emailSubject_maxMessageLength
|
static java.lang.String |
PROP_emailSubject_smsEmailAddress
|
static java.lang.String |
PROP_httpURL_maxMessageLength
|
static java.lang.String |
PROP_httpURL_url
|
static java.lang.String |
PROP_ignoredSms_file
|
static java.lang.String |
PROP_mail2txt_maxMessageLength
|
static java.lang.String |
PROP_mail2txt_smsEmailAddress
|
static java.lang.String |
PROP_mail2txt160_maxMessageLength
|
static java.lang.String |
PROP_mail2txt160_smsEmailAddress
|
static java.lang.String |
PROP_mail2txt160id_from
|
static java.lang.String |
PROP_mail2txt160id_maxMessageLength
|
static java.lang.String |
PROP_mail2txt160id_smsEmailAddress
|
static java.lang.String |
PROP_mail2txtid_from
|
static java.lang.String |
PROP_mail2txtid_maxMessageLength
|
static java.lang.String |
PROP_mail2txtid_smsEmailAddress
|
static java.lang.String |
PROP_ozekisms_hostPort
|
static java.lang.String |
PROP_ozekisms_maxMessageLength
|
static java.lang.String |
PROP_ozekisms_originator
|
static java.lang.String |
PROP_ozekisms_password
|
static java.lang.String |
PROP_ozekisms_user
|
static java.lang.String |
PROP_twilio_accountSID
|
static java.lang.String |
PROP_twilio_authToken
|
static java.lang.String |
PROP_twilio_className
|
static java.lang.String |
PROP_twilio_fromPhoneNumber
|
static java.lang.String |
PROP_twilio_maxMessageLength
|
static java.lang.String[] |
REPL_1mobile
|
static java.lang.String[] |
REPL_authID
|
static java.lang.String[] |
REPL_dataKey
|
static java.lang.String[] |
REPL_imei
|
static java.lang.String[] |
REPL_message
|
static java.lang.String[] |
REPL_mobile
|
static java.lang.String[] |
REPL_modemID
|
static java.lang.String[] |
REPL_password
|
static java.lang.String[] |
REPL_sender
|
static java.lang.String[] |
REPL_serial
|
static java.lang.String[] |
REPL_simID
|
static java.lang.String[] |
REPL_uniqueID
|
static java.lang.String[] |
REPL_user
|
static java.lang.String |
SMS_Prefix
|
Constructor Summary | |
---|---|
SMSOutboundGateway()
|
Method Summary | |
---|---|
static void |
_startupInit()
Initialize outbound SMS gateway handlers |
static void |
AddSMSGateway(java.lang.String name,
SMSOutboundGateway smsGW)
Add SMS Gateway support provider |
static java.lang.String |
GetDefaultGatewayName()
Returns the default SMS Gateway name |
static int |
GetDefaultMaximumMessageLength()
Gets the default maximum text message length |
protected java.lang.String |
getFromEmailAddress(Account account)
|
protected java.lang.String |
getFromEmailAddress(Device device)
|
java.lang.String |
getName()
|
protected java.lang.String |
getSmsEmailAddress(Device device)
|
static SMSOutboundGateway |
GetSMSGateway(java.lang.String name)
Gets the SMSoutboubdGateway for the specified name |
protected java.lang.String |
getSmsPhoneNumber(Device device)
|
protected java.lang.String |
getStringProperty(Device device,
java.lang.String key,
java.lang.String dft)
Gets the String value for the specified property key. |
protected boolean |
hasStringProperty(Device device,
java.lang.String key)
Returns true if the specified property key is defined and non-null/blank |
static boolean |
IsDeviceAuthorized(Device device)
Returns true if device is authorized to send SMS messages |
static void |
main(java.lang.String[] argv)
|
static java.lang.String |
RemovePrefixSMS(java.lang.String val)
Removes any prefixing "SMS:" from the specified string. |
static java.lang.String |
REPLACE(java.lang.String s,
RTProperties rtp)
Replace variables in the specified string with the specified property values. |
static java.lang.String |
REPLACE(java.lang.String s,
java.lang.String[] r,
java.lang.String m)
Replace specified variables with replacement text |
protected DCServerFactory.ResultCode |
sendEmail(java.lang.String frEmail,
java.lang.String toEmail,
java.lang.String subj,
java.lang.String body)
|
abstract DCServerFactory.ResultCode |
sendSMSCommand(Device device,
java.lang.String command)
Send an SMS command to the specified device |
abstract DCServerFactory.ResultCode |
sendSMSMessage(Account account,
Device device,
java.lang.String smsMessage,
java.lang.String smsPhone)
Send an SMS message to the specified phone number. |
void |
setName(java.lang.String n)
|
static boolean |
StartsWithSMS(java.lang.String val)
Return true if string starts with "SMS:" |
java.lang.String |
toString()
|
static java.lang.String |
TruncateMessageToLength(java.lang.String message,
int length)
Truncates the specified message to the specified length |
static java.lang.String |
TruncateMessageToMaximumLength(java.lang.String message)
Truncates the specified message to the maximum text message length |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_defaultName
public static final java.lang.String PROP_defaultMaxMessageLength
public static final java.lang.String PROP_ignoredSms_file
public static final java.lang.String GW_httpURL
public static final java.lang.String PROP_httpURL_url
public static final java.lang.String PROP_httpURL_maxMessageLength
public static final java.lang.String GW_twilio
public static final java.lang.String PROP_twilio_className
public static final java.lang.String PROP_twilio_maxMessageLength
public static final java.lang.String PROP_twilio_accountSID
public static final java.lang.String PROP_twilio_authToken
public static final java.lang.String PROP_twilio_fromPhoneNumber
public static final java.lang.String GW_ozekisms
public static final java.lang.String PROP_ozekisms_hostPort
public static final java.lang.String PROP_ozekisms_originator
public static final java.lang.String PROP_ozekisms_user
public static final java.lang.String PROP_ozekisms_password
public static final java.lang.String PROP_ozekisms_maxMessageLength
public static final java.lang.String GW_aeris
public static final java.lang.String PROP_aeris_className
public static final java.lang.String PROP_aeris_maxMessageLength
public static final java.lang.String GW_emailBody
public static final java.lang.String PROP_emailBody_smsEmailAddress
public static final java.lang.String PROP_emailBody_maxMessageLength
public static final java.lang.String GW_emailSubject
public static final java.lang.String PROP_emailSubject_smsEmailAddress
public static final java.lang.String PROP_emailSubject_maxMessageLength
public static final java.lang.String GW_clickatell
public static final java.lang.String PROP_clickatell_smsEmailAddress
public static final java.lang.String PROP_clickatell_user
public static final java.lang.String PROP_clickatell_password
public static final java.lang.String PROP_clickatell_api_id
public static final java.lang.String PROP_clickatell_maxMessageLength
public static final java.lang.String GW_mail2txt
public static final java.lang.String PROP_mail2txt_smsEmailAddress
public static final java.lang.String PROP_mail2txt_maxMessageLength
public static final java.lang.String GW_mail2txt160
public static final java.lang.String PROP_mail2txt160_smsEmailAddress
public static final java.lang.String PROP_mail2txt160_maxMessageLength
public static final java.lang.String GW_mail2txtid
public static final java.lang.String PROP_mail2txtid_smsEmailAddress
public static final java.lang.String PROP_mail2txtid_from
public static final java.lang.String PROP_mail2txtid_maxMessageLength
public static final java.lang.String GW_mail2txt160id
public static final java.lang.String PROP_mail2txt160id_smsEmailAddress
public static final java.lang.String PROP_mail2txt160id_from
public static final java.lang.String PROP_mail2txt160id_maxMessageLength
public static final java.lang.String GW_custom
public static final java.lang.String PROP_custom_className
public static final java.lang.String PROP_custom_maxMessageLength
public static final java.lang.String SMS_Prefix
public static final java.lang.String[] REPL_mobile
public static final java.lang.String[] REPL_1mobile
public static final java.lang.String[] REPL_sender
public static final java.lang.String[] REPL_dataKey
public static final java.lang.String[] REPL_uniqueID
public static final java.lang.String[] REPL_modemID
public static final java.lang.String[] REPL_simID
public static final java.lang.String[] REPL_imei
public static final java.lang.String[] REPL_serial
public static final java.lang.String[] REPL_user
public static final java.lang.String[] REPL_password
public static final java.lang.String[] REPL_authID
public static final java.lang.String[] REPL_message
public java.lang.String gwName
Constructor Detail |
---|
public SMSOutboundGateway()
Method Detail |
---|
public static java.lang.String GetDefaultGatewayName()
public static boolean StartsWithSMS(java.lang.String val)
val
- The string to test
public static java.lang.String RemovePrefixSMS(java.lang.String val)
val
- The string from which the prefixing "SMS:" is removed.
public static int GetDefaultMaximumMessageLength()
public static java.lang.String TruncateMessageToMaximumLength(java.lang.String message)
public static java.lang.String TruncateMessageToLength(java.lang.String message, int length)
public static boolean IsDeviceAuthorized(Device device)
public static java.lang.String REPLACE(java.lang.String s, java.lang.String[] r, java.lang.String m)
s
- Target Stringr
- Replacement variable namesm
- Replacement text
public static java.lang.String REPLACE(java.lang.String s, RTProperties rtp)
s
- Target Stringrtp
- Replacement property/value list
public static void AddSMSGateway(java.lang.String name, SMSOutboundGateway smsGW)
public static SMSOutboundGateway GetSMSGateway(java.lang.String name)
public static void _startupInit()
public void setName(java.lang.String n)
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract DCServerFactory.ResultCode sendSMSCommand(Device device, java.lang.String command)
device
- The Device to which the command is sent (must not be null).command
- The command String to send to the Device.
public abstract DCServerFactory.ResultCode sendSMSMessage(Account account, Device device, java.lang.String smsMessage, java.lang.String smsPhone)
account
- The Account for which this SMS message is being sent (must not be null)device
- The Device for which this SMS message is being sent (may be null)smsMessage
- The SMS message sent to the destination phone numbersmsPhone
- The destination phone number
protected java.lang.String getFromEmailAddress(Device device)
protected java.lang.String getFromEmailAddress(Account account)
protected java.lang.String getSmsEmailAddress(Device device)
protected java.lang.String getSmsPhoneNumber(Device device)
protected boolean hasStringProperty(Device device, java.lang.String key)
protected java.lang.String getStringProperty(Device device, java.lang.String key, java.lang.String dft)
device
- The current Device instancekey
- The specified property keydft
- The default value to return if the property key is not found
protected DCServerFactory.ResultCode sendEmail(java.lang.String frEmail, java.lang.String toEmail, java.lang.String subj, java.lang.String body)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |