public class ScheduledPageClientSideElement extends AbstractPageClientSideElement implements Contextualizable
ClientSideElement
creates a button representing the schedule publication status of a page.ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private ObservationManager |
_observationManager |
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 I18nizableText |
_getDateValidDescription(Page page) |
private I18nizableText |
_getForthComingDescription(Page page,
Date startDate,
Date endDate,
Locale locale) |
private I18nizableText |
_getOutOfDateDescription(Page page,
Date endDate,
Locale locale) |
private void |
_scheduleEndDate(ModifiablePage page,
UserIdentity userIdentity,
Date endDate) |
private void |
_scheduleStartDate(ModifiablePage page,
UserIdentity userIdentity,
Date startDate) |
void |
contextualize(Context context) |
Map<String,Object> |
getPublicationDates(String pageId)
Get the publication dates of a page
|
Map<String,Object> |
getStatus(List<String> pageIds)
Get the page status
|
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
public ScheduledPageClientSideElement()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class AbstractPageClientSideElement
ServiceException
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, Date startDate) throws SchedulerException
SchedulerException
private void _scheduleEndDate(ModifiablePage page, UserIdentity userIdentity, Date endDate) throws SchedulerException
SchedulerException
public Map<String,Object> getStatus(List<String> pageIds)
pageIds
- The page idsprivate I18nizableText _getDateValidDescription(Page page)
private I18nizableText _getOutOfDateDescription(Page page, Date endDate, Locale locale)
private I18nizableText _getForthComingDescription(Page page, Date startDate, Date endDate, Locale locale)