Class ExecuteExtractionRunnable
- java.lang.Object
-
- org.ametys.plugins.extraction.execution.ExecuteExtractionRunnable
-
- All Implemented Interfaces:
Runnable
public class ExecuteExtractionRunnable extends Object implements Runnable
ARunnable
which schedules aExecuteExtractionSchedulable
task for the given definition file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.schedule.Runnable
Runnable.FireProcess, Runnable.MisfirePolicy
-
-
Field Summary
Fields Modifier and Type Field Description private String
_definitionFilePath
private String
_pipeline
private String
_recipient
private String
_variables
-
Constructor Summary
Constructors Constructor Description ExecuteExtractionRunnable(String definitionFilePath, String variables, String recipient, String pipeline)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCronExpression()
Returns the cron expression to base the schedule on.I18nizableText
getDescription()
Returns the descriptionRunnable.FireProcess
getFireProcess()
Gets the process of firing, i.e.String
getId()
Returns the idI18nizableText
getLabel()
Returns the labelRunnable.MisfirePolicy
getMisfirePolicy()
Gets the misfire policy, i.e.Map<String,Object>
getParameterValues()
Gets the values of the parameters (from the linkedSchedulable
)String
getSchedulableId()
Gets the identifier ofSchedulable
to executeUserIdentity
getUserIdentity()
Gets the user which should be used to launch the runnable task.boolean
isDeactivatable()
Determines if this runnable can be activate or deactivateboolean
isModifiable()
Determines if this runnable can be modifiedboolean
isRemovable()
Determines if this runnable can be removedboolean
isVolatile()
Determines if the runnable must not survive to a server restart
-
-
-
Field Detail
-
_definitionFilePath
private String _definitionFilePath
-
_variables
private String _variables
-
_recipient
private String _recipient
-
-
Constructor Detail
-
ExecuteExtractionRunnable
public ExecuteExtractionRunnable(String definitionFilePath, String variables, String recipient, String pipeline)
Constructor- Parameters:
definitionFilePath
- The extraction definition file pathvariables
- clauses variables and optional columnsrecipient
- An email will be sent at this address when the extraction is completepipeline
- The pipeline id
-
-
Method Detail
-
getLabel
public I18nizableText getLabel()
Description copied from interface:Runnable
Returns the label
-
getDescription
public I18nizableText getDescription()
Description copied from interface:Runnable
Returns the description- Specified by:
getDescription
in interfaceRunnable
- Returns:
- the i18n description
-
getFireProcess
public Runnable.FireProcess getFireProcess()
Description copied from interface:Runnable
Gets the process of firing, i.e. the way the task will be scheduled (fire now, fire at next stratup, schedule it based on a cron expression...).- Specified by:
getFireProcess
in interfaceRunnable
- Returns:
- the fire process
-
getCronExpression
public String getCronExpression()
Description copied from interface:Runnable
Returns the cron expression to base the schedule on. Ignored ifRunnable.getFireProcess()
is different fromRunnable.FireProcess.CRON
.- Specified by:
getCronExpression
in interfaceRunnable
- Returns:
- the cron expression
-
getSchedulableId
public String getSchedulableId()
Description copied from interface:Runnable
Gets the identifier ofSchedulable
to execute- Specified by:
getSchedulableId
in interfaceRunnable
- Returns:
- the identifier of
Schedulable
-
isRemovable
public boolean isRemovable()
Description copied from interface:Runnable
Determines if this runnable can be removed- Specified by:
isRemovable
in interfaceRunnable
- Returns:
true
if this runnable is removable
-
isModifiable
public boolean isModifiable()
Description copied from interface:Runnable
Determines if this runnable can be modified- Specified by:
isModifiable
in interfaceRunnable
- Returns:
true
if this runnable is modifiable
-
isDeactivatable
public boolean isDeactivatable()
Description copied from interface:Runnable
Determines if this runnable can be activate or deactivate- Specified by:
isDeactivatable
in interfaceRunnable
- Returns:
true
if this runnable is deactivatable
-
getMisfirePolicy
public Runnable.MisfirePolicy getMisfirePolicy()
Description copied from interface:Runnable
Gets the misfire policy, i.e. what the runnable must do if it missed a trigger. Ignored ifRunnable.getFireProcess()
is different fromRunnable.FireProcess.CRON
.- Specified by:
getMisfirePolicy
in interfaceRunnable
- Returns:
- The misfire policy
-
isVolatile
public boolean isVolatile()
Description copied from interface:Runnable
Determines if the runnable must not survive to a server restart- Specified by:
isVolatile
in interfaceRunnable
- Returns:
- true if the runnable must not survive to a server restart
-
getUserIdentity
public UserIdentity getUserIdentity()
Description copied from interface:Runnable
Gets the user which should be used to launch the runnable task.- Specified by:
getUserIdentity
in interfaceRunnable
- Returns:
- the
UserIdentity
of the user
-
getParameterValues
public Map<String,Object> getParameterValues()
Description copied from interface:Runnable
Gets the values of the parameters (from the linkedSchedulable
)- Specified by:
getParameterValues
in interfaceRunnable
- Returns:
- the parameter values
-
-