Package org.cyclos.impl.utils.sms
Interface OutboundSmsHandler
-
public interface OutboundSmsHandlerComponent which can be used to send SMS. Handles phone validation actual sending, logging and more.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intgetCurrentSmsCountForUser(User user)Returns the number of SMS sent messages in the current month for the given userList<OutboundSms>send(List<MobilePhone> phones, String sms, OutboundSmsType smsType)Sends the given message to a list of mobile phones, returning the generated SMS logsList<OutboundSms>send(BasicUser user, String sms, OutboundSmsType smsType)Sends the given message to all mobile phones enabled for SMS of the given user, returning the generated SMS logsOutboundSmssend(MobilePhone phone, String sms, OutboundSmsType smsType)Sends the given message to an specific mobile phone, returning the generated SMS logdefault List<OutboundSms>sendEvenIfDisabled(List<MobilePhone> phones, String sms, OutboundSmsType smsType)Sends the given message to a list of mobile phones, even if it is disabled for SMS, returning the generated SMS logOutboundSmssendEvenIfDisabled(MobilePhone phone, String sms, OutboundSmsType smsType)Sends the given message to an specific mobile phone, even if it is disabled for SMS, returning the generated SMS logOutboundSmssendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType)Sends the given message to a an unregistered mobile phone, using the message limit set in the configurationOutboundSmssendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType, Integer maxMessages)Sends the given message to a an unregistered mobile phone using a custom message limit per numberList<OutboundSms>sendUnrestricted(BasicUser user, String sms, OutboundSmsType smsType)Sends the given message to a specific user, ignoring the SMS per month limit.
-
-
-
Method Detail
-
getCurrentSmsCountForUser
int getCurrentSmsCountForUser(User user)
Returns the number of SMS sent messages in the current month for the given user
-
send
List<OutboundSms> send(BasicUser user, String sms, OutboundSmsType smsType)
Sends the given message to all mobile phones enabled for SMS of the given user, returning the generated SMS logs
-
send
List<OutboundSms> send(List<MobilePhone> phones, String sms, OutboundSmsType smsType)
Sends the given message to a list of mobile phones, returning the generated SMS logs
-
send
OutboundSms send(MobilePhone phone, String sms, OutboundSmsType smsType)
Sends the given message to an specific mobile phone, returning the generated SMS log
-
sendEvenIfDisabled
default List<OutboundSms> sendEvenIfDisabled(List<MobilePhone> phones, String sms, OutboundSmsType smsType)
Sends the given message to a list of mobile phones, even if it is disabled for SMS, returning the generated SMS log
-
sendEvenIfDisabled
OutboundSms sendEvenIfDisabled(MobilePhone phone, String sms, OutboundSmsType smsType)
Sends the given message to an specific mobile phone, even if it is disabled for SMS, returning the generated SMS log
-
sendToUnregistered
OutboundSms sendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType)
Sends the given message to a an unregistered mobile phone, using the message limit set in the configuration
-
sendToUnregistered
OutboundSms sendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType, Integer maxMessages)
Sends the given message to a an unregistered mobile phone using a custom message limit per number
-
sendUnrestricted
List<OutboundSms> sendUnrestricted(BasicUser user, String sms, OutboundSmsType smsType)
Sends the given message to a specific user, ignoring the SMS per month limit. Returns the generated SMS logs
-
-