public class ExecuteExtractionSchedulable extends AbstractStaticSchedulable implements Initializable
Schedulable
job which execute an extractionAbstractStaticSchedulable.SchedulableParameterParser
Modifier and Type | Field and Description |
---|---|
private static String |
__JOBDATAMAP_DEFINITION_FILE_PATH_KEY |
private static String |
__JOBDATAMAP_PIPELINE_KEY |
private static String |
__JOBDATAMAP_RECIPIENT_KEY |
private static String |
__JOBDATAMAP_VARIABLES_KEY |
private ExtractionExecutor |
_extractionExecutor |
private I18nUtils |
_i18nUtils |
private JSONUtils |
_jsonUtils |
private String |
_mailFrom |
private PipelineManager |
_pipelineManager |
static String |
DEFINITION_FILE_PATH_KEY
The key for the extraction definition file
|
static String |
PIPELINE_KEY
The key for the pipeline
|
static String |
RECIPIENT_KEY
The key for the recipient
|
private static DateTimeFormatter |
RESULT_FILE_NAME_DATE_TIME_FORMATTER |
static String |
VARIABLES_KEY
The key for the variables values
|
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager
Constructor and Description |
---|
ExecuteExtractionSchedulable() |
Modifier and Type | Method and Description |
---|---|
private Map<String,Object> |
_getExtractionParameters(JobDataMap jobDataMap) |
private String |
_getFailureMailBody(String definitionFileName,
Throwable exception) |
private String |
_getMailSubject() |
private String |
_getResultFileName(String definitionFilePath,
PipelineDescriptor pipeline) |
private String |
_getSuccessMailBody(String definitionFileName) |
private void |
_sendMail(String recipient,
String body) |
void |
execute(JobExecutionContext context)
The action to perform when a trigger is fired.
|
void |
initialize() |
void |
service(ServiceManager manager) |
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfo
getLogger, setLogger
public static final String DEFINITION_FILE_PATH_KEY
public static final String VARIABLES_KEY
public static final String RECIPIENT_KEY
public static final String PIPELINE_KEY
private static final String __JOBDATAMAP_DEFINITION_FILE_PATH_KEY
private static final String __JOBDATAMAP_VARIABLES_KEY
private static final String __JOBDATAMAP_RECIPIENT_KEY
private static final String __JOBDATAMAP_PIPELINE_KEY
private static final DateTimeFormatter RESULT_FILE_NAME_DATE_TIME_FORMATTER
private JSONUtils _jsonUtils
private I18nUtils _i18nUtils
private PipelineManager _pipelineManager
private ExtractionExecutor _extractionExecutor
public ExecuteExtractionSchedulable()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractStaticSchedulable
ServiceException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void execute(JobExecutionContext context) throws Exception
Schedulable
execute
in interface Schedulable
execute
in class AbstractStaticSchedulable
context
- the contextException
- if an error occuredprivate Map<String,Object> _getExtractionParameters(JobDataMap jobDataMap)
private String _getResultFileName(String definitionFilePath, PipelineDescriptor pipeline)
private String _getSuccessMailBody(String definitionFileName)
private String _getFailureMailBody(String definitionFileName, Throwable exception)
private String _getMailSubject()