Package org.cyclos.impl.utils.sms
Class OutboundSmsHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.utils.sms.OutboundSmsHandlerImpl
-
- All Implemented Interfaces:
OutboundSmsHandler
@Component public class OutboundSmsHandlerImpl extends BaseNetworkedHandlerImpl implements OutboundSmsHandler
Implementation forOutboundSmsHandler
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description OutboundSmsHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete 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 message, OutboundSmsType smsType)Sends the given message to a list of mobile phones, returning the generated SMS logsList<OutboundSms>send(BasicUser user, String message, 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 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 message, OutboundSmsType smsType)Sends the given message to a specific user, ignoring the SMS per month limit.-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
getCurrentSmsCountForUser
public int getCurrentSmsCountForUser(User user)
Description copied from interface:OutboundSmsHandlerReturns the number of SMS sent messages in the current month for the given user- Specified by:
getCurrentSmsCountForUserin interfaceOutboundSmsHandler
-
send
public List<OutboundSms> send(BasicUser user, String message, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to all mobile phones enabled for SMS of the given user, returning the generated SMS logs- Specified by:
sendin interfaceOutboundSmsHandler
-
send
public List<OutboundSms> send(List<MobilePhone> phones, String message, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to a list of mobile phones, returning the generated SMS logs- Specified by:
sendin interfaceOutboundSmsHandler
-
send
public OutboundSms send(MobilePhone phone, String sms, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to an specific mobile phone, returning the generated SMS log- Specified by:
sendin interfaceOutboundSmsHandler
-
sendEvenIfDisabled
public OutboundSms sendEvenIfDisabled(MobilePhone phone, String sms, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to an specific mobile phone, even if it is disabled for SMS, returning the generated SMS log- Specified by:
sendEvenIfDisabledin interfaceOutboundSmsHandler
-
sendToUnregistered
public OutboundSms sendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to a an unregistered mobile phone, using the message limit set in the configuration- Specified by:
sendToUnregisteredin interfaceOutboundSmsHandler
-
sendToUnregistered
public OutboundSms sendToUnregistered(ConfigurationAccessor configuration, String phoneNumber, String sms, OutboundSmsType smsType, Integer maxMessages)
Description copied from interface:OutboundSmsHandlerSends the given message to a an unregistered mobile phone using a custom message limit per number- Specified by:
sendToUnregisteredin interfaceOutboundSmsHandler
-
sendUnrestricted
public List<OutboundSms> sendUnrestricted(BasicUser user, String message, OutboundSmsType smsType)
Description copied from interface:OutboundSmsHandlerSends the given message to a specific user, ignoring the SMS per month limit. Returns the generated SMS logs- Specified by:
sendUnrestrictedin interfaceOutboundSmsHandler
-
-