Class UnlockRunnable
- java.lang.Object
-
- org.ametys.plugins.repository.lock.UnlockRunnable
-
- All Implemented Interfaces:
Runnable
public class UnlockRunnable extends Object implements Runnable
ARunnablewhich schedules aUnlockSchedulablefor unlocking an object.
-
-
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 protected ZonedDateTime_dateThe date when to unlock the contentprotected String_objectIdThe id of the object to unlockprotected String_objectNameThe name of the object to unlockprotected UserIdentity_userIdentityTheUserIdentityto launch the runnable task
-
Constructor Summary
Constructors Constructor Description UnlockRunnable(String objectId, String objectName, ZonedDateTime date, UserIdentity userIdentity)Constructor
-
Method Summary
All Methods Instance Methods Concrete 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
-
-
-
Field Detail
-
_objectName
protected String _objectName
The name of the object to unlock
-
_date
protected ZonedDateTime _date
The date when to unlock the content
-
_userIdentity
protected UserIdentity _userIdentity
TheUserIdentityto launch the runnable task
-
-
Constructor Detail
-
UnlockRunnable
public UnlockRunnable(String objectId, String objectName, ZonedDateTime date, UserIdentity userIdentity)
Constructor- Parameters:
objectId- The id of the object to unlockobjectName- The name of the object to unlockdate- The date when to unlock the contentuserIdentity- TheUserIdentityto launch the runnable task
-
-
Method Detail
-
getLabel
public I18nizableText getLabel()
Description copied from interface:RunnableReturns the label
-
getDescription
public I18nizableText getDescription()
Description copied from interface:RunnableReturns the description- Specified by:
getDescriptionin interfaceRunnable- Returns:
- the i18n description
-
getFireProcess
public Runnable.FireProcess getFireProcess()
Description copied from interface:RunnableGets 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:
getFireProcessin interfaceRunnable- Returns:
- the fire process
-
getCronExpression
public String getCronExpression()
Description copied from interface:RunnableReturns the cron expression to base the schedule on. Ignored ifRunnable.getFireProcess()is different fromRunnable.FireProcess.CRON.- Specified by:
getCronExpressionin interfaceRunnable- Returns:
- the cron expression
-
getSchedulableId
public String getSchedulableId()
Description copied from interface:RunnableGets the identifier ofSchedulableto execute- Specified by:
getSchedulableIdin interfaceRunnable- Returns:
- the identifier of
Schedulable
-
isRemovable
public boolean isRemovable()
Description copied from interface:RunnableDetermines if this runnable can be removed- Specified by:
isRemovablein interfaceRunnable- Returns:
trueif this runnable is removable
-
isModifiable
public boolean isModifiable()
Description copied from interface:RunnableDetermines if this runnable can be modified- Specified by:
isModifiablein interfaceRunnable- Returns:
trueif this runnable is modifiable
-
isDeactivatable
public boolean isDeactivatable()
Description copied from interface:RunnableDetermines if this runnable can be activate or deactivate- Specified by:
isDeactivatablein interfaceRunnable- Returns:
trueif this runnable is deactivatable
-
getMisfirePolicy
public Runnable.MisfirePolicy getMisfirePolicy()
Description copied from interface:RunnableGets 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:
getMisfirePolicyin interfaceRunnable- Returns:
- The misfire policy
-
isVolatile
public boolean isVolatile()
Description copied from interface:RunnableDetermines if the runnable must not survive to a server restart- Specified by:
isVolatilein interfaceRunnable- Returns:
- true if the runnable must not survive to a server restart
-
getParameterValues
public Map<String,Object> getParameterValues()
Description copied from interface:RunnableGets the values of the parameters (from the linkedSchedulable)- Specified by:
getParameterValuesin interfaceRunnable- Returns:
- the parameter values
-
getUserIdentity
public UserIdentity getUserIdentity()
Description copied from interface:RunnableGets the user which should be used to launch the runnable task.- Specified by:
getUserIdentityin interfaceRunnable- Returns:
- the
UserIdentityof the user
-
-