Class SendPageNotificationSummarySchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.plugins.pagesubscription.schedulable.page.SendPageNotificationSummarySchedulable
- All Implemented Interfaces:
Schedulable,LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
Schedulable to send not forced page notification summary by mail
The frequency is configurable. (DAILY, WEEKLY, MONTHLY)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FrequencyHelper.FrequencyThe frequencyprotected I18nUtilsThe i18n utilsprotected I18nizableTextThe mail messageprotected I18nizableTextThe mail subjectprotected I18nizableTextThe mail titleprotected PageDAOThe page DAOprotected PageNotificationsHelperThe page notification helperprotected PageSubscriptionTypeThe page subscription typeprotected RenderingContextHandlerThe rendering context handlerprotected AmetysObjectResolverThe ametys object resolverprotected SiteManagerThe site managerprotected SubscriptionTypeExtensionPointThe subscription type EPstatic final StringTag for page that contains followed page configuration serviceFields inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager, _startTime, _userManager, PROGRESSION_TRACKER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected I18nizableText_getI18nSubject(Site site) Get the subject of the mailprotected String_getMailBody(Site site, Set<Activity> pages, String lang) Get the mail body of the mailvoidconfigure(Configuration configuration) voidexecute(JobExecutionContext context, ContainerProgressionTracker progressionTracker) The action to perform when a trigger is fired.voidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, getProgressionTracker, isPrivate, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
FOLLOWED_PAGES_CONFIG_PAGE_TAG
Tag for page that contains followed page configuration service- See Also:
-
_frequency
The frequency -
_mailSubject
The mail subject -
_mailTitle
The mail title -
_mailMessage
The mail message -
_subscriptionTypeEP
The subscription type EP -
_pageSubscriptionType
The page subscription type -
_siteManager
The site manager -
_i18nUtils
The i18n utils -
_pageNotificationHelper
The page notification helper -
_resolver
The ametys object resolver -
_pageDAO
The page DAO -
_renderingContextHandler
The rendering context handler
-
-
Constructor Details
-
SendPageNotificationSummarySchedulable
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractStaticSchedulable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractStaticSchedulable- Throws:
ConfigurationException
-
execute
public void execute(JobExecutionContext context, ContainerProgressionTracker progressionTracker) throws Exception Description copied from interface:SchedulableThe action to perform when a trigger is fired. Do not manually call this method.- Parameters:
context- the contextprogressionTracker- The progression tracker- Throws:
Exception- if an error occurred
-
_getI18nSubject
Get the subject of the mail- Parameters:
site-- Returns:
- the subject of the mail
-
_getMailBody
Get the mail body of the mail- Parameters:
site- the sitepages- the set of pages with it last activitylang- the language- Returns:
- the mail body of the mail
- Throws:
IOException- if an error occurred
-