public class ImportSMSListSubscribersAction extends ServiceableAction
| Modifier and Type | Field and Description |
|---|---|
private static String[] |
__ALLOWED_EXTENSIONS |
private AmetysObjectResolver |
_ametysObjectResolver
The Ametys object resolver
|
private SubscriberDAO |
_subscriberDAO
The subscribers DAO.
|
managerEMPTY_MAP| Constructor and Description |
|---|
ImportSMSListSubscribersAction() |
| Modifier and Type | Method and Description |
|---|---|
private Set<String> |
_getPhoneNumbers(BOMInputStream bomIS,
Map<String,String> result)
Extract the phone numbers from the file.
|
private void |
_insertSubscribers(Collection<String> phoneNumbers,
String smsListId,
Map<String,String> result)
Insert subscribers in the broadcasting list
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate static final String[] __ALLOWED_EXTENSIONS
private SubscriberDAO _subscriberDAO
private AmetysObjectResolver _ametysObjectResolver
public ImportSMSListSubscribersAction()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class ServiceableActionServiceExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exceptionprivate Set<String> _getPhoneNumbers(BOMInputStream bomIS, Map<String,String> result) throws IOException
bomIS - the BOM input streamresult - the result mapIOException - if an error occurs reading the file.private void _insertSubscribers(Collection<String> phoneNumbers, String smsListId, Map<String,String> result)
phoneNumbers - the list of phone numbers to insertsmsListId - the id of the sms listresult - the server call result