Package org.ametys.core.schedule
Interface Runnable
-
- All Known Implementing Classes:
AbstractPublishOrUnpublishPageRunnable
,CleanJCaptchaRunnable
,ConfigBasedDailyRunnable
,ConfigBasedEveryNMinutesRunnable
,DefaultRunnable
,ExecuteExtractionRunnable
,ImportArchiveRunnable
,InvalidateFOCacheRunnable
,PublishPageRunnable
,ReloadSolrAclCachesForCoresRunnable
,SendNotificationSummaryRunnable
,StaticRunnable
,UnlockRunnable
,UnpublishPageRunnable
public interface Runnable
This interface represents the entity by which aSchedulable
can be scheduled.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Runnable.FireProcess
The possible ways to fire the runnablestatic class
Runnable.MisfirePolicy
The possible misfire policies
-
Method Summary
All Methods Instance Methods Abstract 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
-
-
-
Method Detail
-
getLabel
I18nizableText getLabel()
Returns the label- Returns:
- the i18n label
-
getDescription
I18nizableText getDescription()
Returns the description- Returns:
- the i18n description
-
getFireProcess
Runnable.FireProcess getFireProcess()
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...).- Returns:
- the fire process
-
getCronExpression
String getCronExpression()
Returns the cron expression to base the schedule on. Ignored ifgetFireProcess()
is different fromRunnable.FireProcess.CRON
.- Returns:
- the cron expression
-
getSchedulableId
String getSchedulableId()
Gets the identifier ofSchedulable
to execute- Returns:
- the identifier of
Schedulable
-
isRemovable
boolean isRemovable()
Determines if this runnable can be removed- Returns:
true
if this runnable is removable
-
isModifiable
boolean isModifiable()
Determines if this runnable can be modified- Returns:
true
if this runnable is modifiable
-
isDeactivatable
boolean isDeactivatable()
Determines if this runnable can be activate or deactivate- Returns:
true
if this runnable is deactivatable
-
getMisfirePolicy
Runnable.MisfirePolicy getMisfirePolicy()
Gets the misfire policy, i.e. what the runnable must do if it missed a trigger. Ignored ifgetFireProcess()
is different fromRunnable.FireProcess.CRON
.- Returns:
- The misfire policy
-
isVolatile
boolean isVolatile()
Determines if the runnable must not survive to a server restart- Returns:
- true if the runnable must not survive to a server restart
-
getParameterValues
Map<String,Object> getParameterValues()
Gets the values of the parameters (from the linkedSchedulable
)- Returns:
- the parameter values
-
getUserIdentity
UserIdentity getUserIdentity()
Gets the user which should be used to launch the runnable task.- Returns:
- the
UserIdentity
of the user
-
-