public class ImportSubscribersAction extends ServiceableAction
| Modifier and Type | Field and Description | 
|---|---|
| private static Pattern | __EMAIL_VALIDATOR | 
| private static String[] | _ALLOWED_EXTENSIONS | 
| protected CategoryProviderExtensionPoint | _categoryProviderEPThe category provider extension point. | 
| protected SubscribersDAO | _subscribersDaoThe subscribers DAO. | 
managerEMPTY_MAP| Constructor and Description | 
|---|
| ImportSubscribersAction() | 
| Modifier and Type | Method and Description | 
|---|---|
| Map | act(Redirector redirector,
   SourceResolver resolver,
   Map objectModel,
   String source,
   Parameters parameters) | 
| protected Collection<String> | getEmails(org.apache.commons.io.input.BOMInputStream bomIS)Extract the emails from the file. | 
| protected void | insertSubscribers(Collection<String> emails,
                 String categoryId,
                 String siteName,
                 Map<String,String> result)Insert subscribers | 
| void | service(ServiceManager smanager) | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate static final String[] _ALLOWED_EXTENSIONS
private static final Pattern __EMAIL_VALIDATOR
protected SubscribersDAO _subscribersDao
protected CategoryProviderExtensionPoint _categoryProviderEP
public ImportSubscribersAction()
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
Exceptionprotected Collection<String> getEmails(org.apache.commons.io.input.BOMInputStream bomIS) throws IOException
bomIS - the input streamIOException - if an error occurs reading the file.protected void insertSubscribers(Collection<String> emails, String categoryId, String siteName, Map<String,String> result)
emails - the emails to insertcategoryId - the id of categorysiteName - the site name of categoryresult - the result map