Package org.ametys.core.schedule
Interface Runnable
-
- All Known Implementing Classes:
AbstractPublishOrUnpublishPageRunnable,CleanJCaptchaRunnable,ConfigBasedDailyRunnable,ConfigBasedEveryNMinutesRunnable,DefaultRunnable,ExecuteExtractionRunnable,ImportArchiveRunnable,InvalidateFOCacheRunnable,PublishPageRunnable,ReloadSolrAclCachesForCoresRunnable,StaticRunnable,UnlockRunnable,UnpublishPageRunnable
public interface Runnable
This interface represents the entity by which aSchedulablecan be scheduled.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRunnable.FireProcessThe possible ways to fire the runnablestatic classRunnable.MisfirePolicyThe possible misfire policies
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetCronExpression()Returns the cron expression to base the schedule on.I18nizableTextgetDescription()Returns the descriptionRunnable.FireProcessgetFireProcess()Gets the process of firing, i.e.StringgetId()Returns the idI18nizableTextgetLabel()Returns the labelRunnable.MisfirePolicygetMisfirePolicy()Gets the misfire policy, i.e.Map<String,Object>getParameterValues()Gets the values of the parameters (from the linkedSchedulable)StringgetSchedulableId()Gets the identifier ofSchedulableto executeUserIdentitygetUserIdentity()Gets the user which should be used to launch the runnable task.booleanisDeactivatable()Determines if this runnable can be activate or deactivatebooleanisModifiable()Determines if this runnable can be modifiedbooleanisRemovable()Determines if this runnable can be removedbooleanisVolatile()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 ofSchedulableto execute- Returns:
- the identifier of
Schedulable
-
isRemovable
boolean isRemovable()
Determines if this runnable can be removed- Returns:
trueif this runnable is removable
-
isModifiable
boolean isModifiable()
Determines if this runnable can be modified- Returns:
trueif this runnable is modifiable
-
isDeactivatable
boolean isDeactivatable()
Determines if this runnable can be activate or deactivate- Returns:
trueif 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
UserIdentityof the user
-
-