public class DefaultRunnable extends Object implements Runnable
Runnable
which can be created by the UI.Runnable.FireProcess, Runnable.MisfirePolicy
Modifier and Type | Field and Description |
---|---|
protected String |
_cron
The CRON expression
|
protected boolean |
_deactivatable
true if it can be deactivated
|
protected I18nizableText |
_description
The description
|
protected Runnable.FireProcess |
_fireProcess
The fire process
|
protected String |
_id
The id
|
protected I18nizableText |
_label
The label
|
protected Runnable.MisfirePolicy |
_misfirePolicy
The misfire policy
|
protected boolean |
_modifiable
true if it can be edited
|
protected Map<String,Object> |
_parameterValues
The parameter values
|
protected boolean |
_removable
true if it can be removed
|
protected String |
_schedulableId
The id of the linked
Schedulable |
protected UserIdentity |
_userIdentity
UserIdentity should be used to launch the Runnable
|
protected boolean |
_volatile
true if volatile
|
Constructor and Description |
---|
DefaultRunnable(String id,
I18nizableText label,
I18nizableText description,
Runnable.FireProcess fireProcess,
String cron,
String schedulableId,
boolean removable,
boolean modifiable,
boolean deactivatable,
Runnable.MisfirePolicy misfirePolicy,
boolean isVolatile,
UserIdentity userIdentity,
Map<String,Object> parameters)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getCronExpression()
Returns the cron expression to base the schedule on.
|
I18nizableText |
getDescription()
Returns the description
|
Runnable.FireProcess |
getFireProcess()
Gets the process of firing, i.e.
|
String |
getId()
Returns the id
|
I18nizableText |
getLabel()
Returns the label
|
Runnable.MisfirePolicy |
getMisfirePolicy()
Gets the misfire policy, i.e.
|
Map<String,Object> |
getParameterValues()
Gets the values of the parameters (from the linked
Schedulable ) |
String |
getSchedulableId()
Gets the identifier of
Schedulable to execute |
UserIdentity |
getUserIdentity()
Gets the user which should be used to launch the runnable task.
|
boolean |
isDeactivatable()
Determines if this runnable can be activate or deactivate
|
boolean |
isModifiable()
Determines if this runnable can be modified
|
boolean |
isRemovable()
Determines if this runnable can be removed
|
boolean |
isVolatile()
Determines if the runnable must not survive to a server restart
|
protected I18nizableText _label
protected I18nizableText _description
protected Runnable.FireProcess _fireProcess
protected String _schedulableId
Schedulable
protected boolean _removable
protected boolean _modifiable
protected boolean _deactivatable
protected Map<String,Object> _parameterValues
protected Runnable.MisfirePolicy _misfirePolicy
protected boolean _volatile
protected UserIdentity _userIdentity
public DefaultRunnable(String id, I18nizableText label, I18nizableText description, Runnable.FireProcess fireProcess, String cron, String schedulableId, boolean removable, boolean modifiable, boolean deactivatable, Runnable.MisfirePolicy misfirePolicy, boolean isVolatile, UserIdentity userIdentity, Map<String,Object> parameters)
id
- the idlabel
- the labeldescription
- the descritpionfireProcess
- the fire processcron
- the cron expressionschedulableId
- the id of the linked Schedulable
removable
- true if it can be removedmodifiable
- true if it can be editeddeactivatable
- true if it can be deactivatedmisfirePolicy
- The misfire policy. Can be null, the default value is Runnable.MisfirePolicy.DO_NOTHING
isVolatile
- true if it is volatile, i.e. if it must not survive to a server restartuserIdentity
- The user used to launch the runnable taskparameters
- the parameter valuespublic I18nizableText getLabel()
Runnable
public I18nizableText getDescription()
Runnable
getDescription
in interface Runnable
public Runnable.FireProcess getFireProcess()
Runnable
getFireProcess
in interface Runnable
public String getCronExpression()
Runnable
Runnable.getFireProcess()
is different from Runnable.FireProcess.CRON
.getCronExpression
in interface Runnable
public String getSchedulableId()
Runnable
Schedulable
to executegetSchedulableId
in interface Runnable
Schedulable
public boolean isRemovable()
Runnable
isRemovable
in interface Runnable
true
if this runnable is removablepublic boolean isModifiable()
Runnable
isModifiable
in interface Runnable
true
if this runnable is modifiablepublic boolean isDeactivatable()
Runnable
isDeactivatable
in interface Runnable
true
if this runnable is deactivatablepublic Runnable.MisfirePolicy getMisfirePolicy()
Runnable
Runnable.getFireProcess()
is different from Runnable.FireProcess.CRON
.getMisfirePolicy
in interface Runnable
public boolean isVolatile()
Runnable
isVolatile
in interface Runnable
public Map<String,Object> getParameterValues()
Runnable
Schedulable
)getParameterValues
in interface Runnable
public UserIdentity getUserIdentity()
Runnable
getUserIdentity
in interface Runnable
UserIdentity
of the user