Package org.cyclos.impl.utils.sms
Class CustomSmsOperation
- java.lang.Object
-
- org.cyclos.impl.utils.sms.BaseSmsOperation
-
- org.cyclos.impl.utils.sms.CustomSmsOperation
-
- All Implemented Interfaces:
SmsOperation
public class CustomSmsOperation extends BaseSmsOperation
SMS operation which delagates to a script
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.impl.utils.sms.BaseSmsOperation
BaseSmsOperation.BaseError
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_CONFIGURATIONScript attribute: the SmsOperationConfigurationstatic StringATTR_PARAMETER_PROCESSORScript attribute: the SMS data for the current inbound SMSstatic StringATTR_PHONEScript attribute: the resolved phone in Cyclos which received the operationstatic StringATTR_SMSScript attribute: the SMS data for the current inbound SMSstatic StringFUNCTION_NAMEThe function name called on scripts-
Fields inherited from class org.cyclos.impl.utils.sms.BaseSmsOperation
accountHandler, agreementLogService, configurationHandler, conversionHandler, dataTranslationHandler, entityManagerHandler, invokerHandler, outboundSmsHandler, passwordHandler, profileFieldHandler, translationHandler, userLocatorHandler
-
-
Constructor Summary
Constructors Constructor Description CustomSmsOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckParametersCount(SmsOperationConfiguration operationConfiguration, List<String> parameters)This method must be implemented to check the minimum and maximum expected parametersprotected voiddoExecute(SmsOperationConfiguration operationConfiguration, MobilePhone phone, InboundSmsData sms, SmsParameterProcessor processor)protected List<String>getHelpComponents(SmsOperationConfiguration operationConfiguration)SmsOperationExecutiongetOperationExecution(SmsOperationConfiguration operationConfiguration)Returns who can execute this operation-
Methods inherited from class org.cyclos.impl.utils.sms.BaseSmsOperation
execute, formatShort, getFormatter, getHelp, getLongestAlias, getSessionData, handleError, message, sendEvenIfDisabled, sendResponse, sendToUnregistered
-
-
-
-
Field Detail
-
FUNCTION_NAME
public static final String FUNCTION_NAME
The function name called on scripts- See Also:
- Constant Field Values
-
ATTR_CONFIGURATION
public static final String ATTR_CONFIGURATION
Script attribute: the SmsOperationConfiguration- See Also:
- Constant Field Values
-
ATTR_PHONE
public static final String ATTR_PHONE
Script attribute: the resolved phone in Cyclos which received the operation- See Also:
- Constant Field Values
-
ATTR_SMS
public static final String ATTR_SMS
Script attribute: the SMS data for the current inbound SMS- See Also:
- Constant Field Values
-
ATTR_PARAMETER_PROCESSOR
public static final String ATTR_PARAMETER_PROCESSOR
Script attribute: the SMS data for the current inbound SMS- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperationExecution
public SmsOperationExecution getOperationExecution(SmsOperationConfiguration operationConfiguration)
Description copied from interface:SmsOperationReturns who can execute this operation- Specified by:
getOperationExecutionin interfaceSmsOperation- Overrides:
getOperationExecutionin classBaseSmsOperation
-
checkParametersCount
protected void checkParametersCount(SmsOperationConfiguration operationConfiguration, List<String> parameters) throws SmsOperationException
Description copied from class:BaseSmsOperationThis method must be implemented to check the minimum and maximum expected parameters- Specified by:
checkParametersCountin classBaseSmsOperation- Throws:
SmsOperationException
-
doExecute
protected void doExecute(SmsOperationConfiguration operationConfiguration, MobilePhone phone, InboundSmsData sms, SmsParameterProcessor processor) throws SmsOperationException
- Specified by:
doExecutein classBaseSmsOperation- Throws:
SmsOperationException
-
getHelpComponents
protected List<String> getHelpComponents(SmsOperationConfiguration operationConfiguration)
- Specified by:
getHelpComponentsin classBaseSmsOperation
-
-