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.Frequency
The frequencyprotected I18nUtils
The i18n utilsprotected I18nizableText
The mail messageprotected I18nizableText
The mail subjectprotected I18nizableText
The mail titleprotected PageDAO
The page DAOprotected PageNotificationsHelper
The page notification helperprotected PageSubscriptionType
The page subscription typeprotected RenderingContextHandler
The rendering context handlerprotected AmetysObjectResolver
The ametys object resolverprotected SiteManager
The site managerprotected SubscriptionTypeExtensionPoint
The subscription type EPstatic final String
Tag 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 mailvoid
configure
(Configuration configuration) void
execute
(org.quartz.JobExecutionContext context, ContainerProgressionTracker progressionTracker) The action to perform when a trigger is fired.void
service
(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, setPluginInfo
Methods 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:
service
in interfaceServiceable
- Overrides:
service
in classAbstractStaticSchedulable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractStaticSchedulable
- Throws:
ConfigurationException
-
execute
public void execute(org.quartz.JobExecutionContext context, ContainerProgressionTracker progressionTracker) throws Exception Description copied from interface:Schedulable
The 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
-