public class ScheduledPageClientSideElement extends AbstractPageClientSideElement implements Initializable
ClientSideElement
creates a button representing the schedule publication status of a page.ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
private ElementType<ZonedDateTime> |
_dateElementType |
private ObservationManager |
_observationManager |
private PageDataTypeExtensionPoint |
_pageDataTypeExtensionPoint |
private Scheduler |
_scheduler |
_resolver, _synchronizeComponent
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ScheduledPageClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private void |
_scheduleEndDate(ModifiablePage page,
UserIdentity userIdentity,
ZonedDateTime endDate) |
private void |
_scheduleStartDate(ModifiablePage page,
UserIdentity userIdentity,
ZonedDateTime startDate) |
Map<String,Object> |
getPublicationDates(String pageId)
Get the publication dates of a page
|
void |
initialize() |
void |
service(ServiceManager smanager) |
boolean |
setPublicationDate(List<String> pageIds,
String startDateAsStr,
String endDateAsStr)
Set date of publication of pages
|
getAllRightPageDescription, getNoModifiablePageDescription, getNoRightPageDescription, getPageDefaultParameters, hasRight
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
private ObservationManager _observationManager
private Scheduler _scheduler
private PageDataTypeExtensionPoint _pageDataTypeExtensionPoint
private ElementType<ZonedDateTime> _dateElementType
public ScheduledPageClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class AbstractPageClientSideElement
ServiceException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public Map<String,Object> getPublicationDates(String pageId)
pageId
- the id of the pagepublic boolean setPublicationDate(List<String> pageIds, String startDateAsStr, String endDateAsStr)
pageIds
- The ids of pages to updatestartDateAsStr
- The start date. Can be null.endDateAsStr
- The end date. Can be null.private void _scheduleStartDate(ModifiablePage page, UserIdentity userIdentity, ZonedDateTime startDate) throws SchedulerException
SchedulerException
private void _scheduleEndDate(ModifiablePage page, UserIdentity userIdentity, ZonedDateTime endDate) throws SchedulerException
SchedulerException