Package org.ametys.web.publication
Class AbstractPublishOrUnpublishPageRunnable
java.lang.Object
org.ametys.web.publication.AbstractPublishOrUnpublishPageRunnable
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PublishPageRunnable
,UnpublishPageRunnable
A
Runnable
which schedules a PublishOrUnpublishPageSchedulable
task for (un)publishing a page.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.schedule.Runnable
Runnable.FireProcess, Runnable.MisfirePolicy
-
Field Summary
Modifier and TypeFieldDescriptionprotected ZonedDateTime
The date when to (un)publish the pageprotected String
The id of the page to (un)publishprotected String
The name of the page to (un)publishprotected UserIdentity
TheUserIdentity
to launch the runnable task -
Constructor Summary
ConstructorDescriptionAbstractPublishOrUnpublishPageRunnable
(String pageId, String pageName, UserIdentity userIdentity, ZonedDateTime date) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the cron expression to base the schedule on.Gets the process of firing, i.e.getId()
Returns the idGets the misfire policy, i.e.Gets the values of the parameters (from the linkedSchedulable
)Gets the identifier ofSchedulable
to executeGets the user which should be used to launch the runnable task.boolean
Determines if this runnable can be activate or deactivateboolean
Determines if this runnable can be modifiedboolean
Determines if this runnable can be removedboolean
Determines if the runnable must not survive to a server restartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.schedule.Runnable
getDescription, getLabel
-
Field Details
-
_pageId
The id of the page to (un)publish -
_pageName
The name of the page to (un)publish -
_userIdentity
TheUserIdentity
to launch the runnable task -
_date
The date when to (un)publish the page
-
-
Constructor Details
-
AbstractPublishOrUnpublishPageRunnable
public AbstractPublishOrUnpublishPageRunnable(String pageId, String pageName, UserIdentity userIdentity, ZonedDateTime date) Constructor- Parameters:
pageId
- The id of the page to (un)publishpageName
- The name of the page to (un)publishuserIdentity
- TheUserIdentity
to launch the runnable taskdate
- The date when to (un)publish the page
-
-
Method Details
-
getId
Description copied from interface:Runnable
Returns the id -
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
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
Description copied from interface:Runnable
Gets the identifier ofSchedulable
to execute- Specified by:
getSchedulableId
in interfaceRunnable
- Returns:
- the identifier of
Schedulable
-
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
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
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
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
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
-
getParameterValues
Description copied from interface:Runnable
Gets the values of the parameters (from the linkedSchedulable
)- Specified by:
getParameterValues
in interfaceRunnable
- Returns:
- the parameter values
-
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
-