public interface TextService
shortcodes.PhoneListService,
PhoneNumberService,
MessagePricingStrategy| Modifier and Type | Method and Description |
|---|---|
void |
discard(MobileMessageContextModel message,
MobileMessageError error,
java.lang.String errorMessage,
java.lang.Throwable cause)
While processing a incoming message this methods allows to mark the message as discarded.
|
void |
done(MobileMessageContextModel message)
While processing a incoming message this methods allows to mark the message as done.
|
java.util.List<MobileShortcodeModel> |
getAvailableShortcodesForSending(CountryModel country)
Locates all shortcodes for the specified country which support sending of outgoing
messages.
|
MobileShortcodeModel |
getExclusiveShortCode(java.lang.String shortCode)
Looks up a exclusive shortcode using its unique code.
|
MobileShortcodeModel |
getSharedShortCode(java.lang.String shortCode,
java.lang.String keywordPrefix)
Looks up a shared short code by a specified code and keywords
|
MobileMessageContextModel |
replyWithLink(MobileMessageContextModel receivedMessage,
java.lang.String subject,
java.lang.String url)
While processing a incoming message this methods allows to send a reply link message using the incoming
message information.
|
MobileMessageContextModel |
replyWithLink(MobileShortcodeModel shortcode,
MobileMessageContextModel receivedMessage,
java.lang.String subject,
java.lang.String url)
While processing a incoming message this methods allows to send a reply link message using the incoming
message information.
|
MobileMessageContextModel |
replyWithMessage(MobileMessageContextModel receivedMessage,
java.lang.String text)
While processing a incoming message this methods allows to send a reply text message using the incoming
message information.
|
MobileMessageContextModel |
replyWithMessage(MobileShortcodeModel shortcode,
MobileMessageContextModel receivedMessage,
java.lang.String text)
While processing a incoming message this methods allows to send a reply text message using the incoming
message information.
|
MobileMessageContextModel |
sendLink(CountryModel country,
PhoneNumberModel phone,
java.lang.String subject,
java.lang.String url)
Convenience method delegating to
sendLink(String, String, String, String). |
MobileMessageContextModel |
sendLink(MobileShortcodeModel shortcode,
java.lang.String countryIsoCode,
java.lang.String phone,
java.lang.String subject,
java.lang.String url)
Sends a link SMS message to the specified number.
|
MobileMessageContextModel |
sendLink(PhoneNumberModel phone,
java.lang.String subject,
java.lang.String url)
Convenience method delegating to
sendLink(String, String, String, String). |
MobileMessageContextModel |
sendLink(java.lang.String countryIsoCode,
java.lang.String phone,
java.lang.String subject,
java.lang.String url)
Sends a link SMS message to the specified number.
|
MobileMessageContextModel |
sendMessage(CountryModel country,
PhoneNumberModel phone,
java.lang.String text)
Convenience method delegating to
sendMessage(String, String, String). |
MobileMessageContextModel |
sendMessage(MobileShortcodeModel shortcode,
java.lang.String countryIsoCode,
java.lang.String phone,
java.lang.String text)
Sends a text SMS message to the specified number.
|
MobileMessageContextModel |
sendMessage(PhoneNumberModel phone,
java.lang.String text)
Convenience method delegating to
sendMessage(String, String, String). |
MobileMessageContextModel |
sendMessage(java.lang.String countryIsoCode,
java.lang.String phone,
java.lang.String text)
Sends a text SMS message to the specified number.
|
MobileShortcodeModel getExclusiveShortCode(java.lang.String shortCode)
shortCode - the code to look forMobileShortcodeModel getSharedShortCode(java.lang.String shortCode, java.lang.String keywordPrefix)
shortCode - the shared codekeywordPrefix - the keywordjava.util.List<MobileShortcodeModel> getAvailableShortcodesForSending(CountryModel country)
Please note that the final routing decision is being done by the OutgoingMessageRoutingStrategy which is currently
set up in the mobile spring configuration. This method will simply list all potential ones.
country - MobileMessageContextModel sendMessage(MobileShortcodeModel shortcode, java.lang.String countryIsoCode, java.lang.String phone, java.lang.String text)
MobileShortcodeModel will be
used to send the message on behalf.
Messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states. Use
MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
shortcode - the shortcode to be used for sending (defines aggregator and thus engine)countryIsoCode - the country for the given phone numberphone - the phone numbertext - the message contentMobileMessageContextModel sendMessage(java.lang.String countryIsoCode, java.lang.String phone, java.lang.String text)
MobileShortcodeModel will be found and the message is being sent
using its aggregator.
Messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states. Use
MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
countryIsoCode - the country for the given phone numberphone - the phone numbertext - the message contentMobileMessageContextModel sendMessage(CountryModel country, PhoneNumberModel phone, java.lang.String text)
sendMessage(String, String, String).country - is providing the country iso code for the given phone numberphone - the phone numbertext - the message contentMobileMessageContextModel sendMessage(PhoneNumberModel phone, java.lang.String text)
sendMessage(String, String, String).phone - the phone number model which contains both country and number datatext - the message contentMobileMessageContextModel sendLink(MobileShortcodeModel shortcode, java.lang.String countryIsoCode, java.lang.String phone, java.lang.String subject, java.lang.String url)
MobileShortcodeModel will be
used to send the message on behalf.
Messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
shortcode - the shortcode to be used for sending (defines aggregator and thus engine)countryIsoCode - phone - subject - url - MobileMessageContextModel sendLink(java.lang.String countryIsoCode, java.lang.String phone, java.lang.String subject, java.lang.String url)
MobileShortcodeModel will be found and the message is being sent
using its aggregator.
Messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
countryIsoCode - phone - subject - url - MobileMessageContextModel sendLink(CountryModel country, PhoneNumberModel phone, java.lang.String subject, java.lang.String url)
sendLink(String, String, String, String).country - is providing the country iso code for the given phone numberphone - the phone numbersubject - the link subjecturl - the link urlMobileMessageContextModel sendLink(PhoneNumberModel phone, java.lang.String subject, java.lang.String url)
sendLink(String, String, String, String).phone - the phone number model which contains both country and number datasubject - the link subjecturl - the link urlMobileMessageContextModel replyWithMessage(MobileShortcodeModel shortcode, MobileMessageContextModel receivedMessage, java.lang.String text)
The specified MobileShortcodeModel will be used to send the message on behalf.
Reply messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
Use MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
shortcode - the shortcode to be used for sending (defines aggregator and thus engine)receivedMessage - the previously received messagetext - the reply textMobileMessageContextModel replyWithMessage(MobileMessageContextModel receivedMessage, java.lang.String text)
Internally the receiving MobileShortcodeModel may be used for sending or, if more appropriate a suitable short code
will be chosen.
Reply messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
Use MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
receivedMessage - the previously received messagetext - the reply textMobileMessageContextModel replyWithLink(MobileShortcodeModel shortcode, MobileMessageContextModel receivedMessage, java.lang.String subject, java.lang.String url)
The specified MobileShortcodeModel will be used to send the message on behalf.
Reply messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
Use MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
shortcode - the shortcode to be used for sending (defines aggregator and thus engine)receivedMessage - the previously received messagesubject - the reply link subjecturl - the reply link urlMobileMessageContextModel replyWithLink(MobileMessageContextModel receivedMessage, java.lang.String subject, java.lang.String url)
Internally the receiving MobileShortcodeModel may be used for sending or, if more appropriate a suitable short code
will be chosen.
Reply messages are not sent immediately but are enqueue. Therefore the returned model will show intermediate states.
Use MessageHelper.blockUntilProcessed(de.hybris.platform.core.PK, long) if you must wait until sending is done.
receivedMessage - the previously received messagesubject - the reply link subjecturl - the reply link urlvoid done(MobileMessageContextModel message)
Since message processing is done by custom actions it is recommended that implementors signal
the end of processing by calling either done(MobileMessageContextModel) or
discard(MobileMessageContextModel, MobileMessageError, String, Throwable) in case no reply is being
triggered.
message - the message to be marked as done.void discard(MobileMessageContextModel message, MobileMessageError error, java.lang.String errorMessage, java.lang.Throwable cause)
Since message processing is done by custom actions it is recommended that implementors signal
the end of processing by calling either done(MobileMessageContextModel) or
discard(MobileMessageContextModel, MobileMessageError, String, Throwable) in case no reply is being
triggered.
message - the message to be marked as done.Copyright © 2018 SAP SE. All Rights Reserved.