Package org.ametys.cms.search.solr
Class AsyncExportLauncher
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.cms.search.solr.AsyncExportLauncher
-
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
public class AsyncExportLauncher extends AbstractLogEnabled implements Component, Serviceable
Export a solr search
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider_currentUserProviderThe provider of current userprotected Scheduler_schedulerSchedulerstatic StringROLEThe Avalon Role
-
Constructor Summary
Constructors Constructor Description AsyncExportLauncher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String_generateUniqueId()Generate an unique ID for a scheduler labelMap<String,Object>add(String type, String recipient, String searchParams, String lang, String exportUrl)Launch a search exportvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The provider of current user
-
_scheduler
protected Scheduler _scheduler
Scheduler
-
-
Constructor Detail
-
AsyncExportLauncher
public AsyncExportLauncher()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
add
public Map<String,Object> add(String type, String recipient, String searchParams, String lang, String exportUrl) throws SchedulerException
Launch a search export- Parameters:
type- csv, xml or wordrecipient- email of the recipient of the exportsearchParams- search parameterslang- language for the mailexportUrl- the internal url for export- Returns:
- A result map
- Throws:
SchedulerException- if an error occured
-
_generateUniqueId
protected String _generateUniqueId() throws SchedulerException
Generate an unique ID for a scheduler label- Returns:
- a unique id for this sceduler
- Throws:
SchedulerException- Something went wrong
-
-