Class PageSubscriptionDeletePageObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.pagesubscription.observer.AbstractPageSubscriptionObserver
-
- org.ametys.plugins.pagesubscription.observer.PageSubscriptionDeletePageObserver
-
- All Implemented Interfaces:
Observer,LogEnabled,Serviceable
public class PageSubscriptionDeletePageObserver extends AbstractPageSubscriptionObserver
Listen page deleted and send mail
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.pagesubscription.observer.AbstractPageSubscriptionObserver
_i18nUtils, _resolver, _subscriptionDAO, _userManager
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description PageSubscriptionDeletePageObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String_getMailBody(Event event, Page page)Create the mail body depend on the eventprotected String_getMailSubject(Event event, Page page)Create the mail subject depend on the eventprotected Collection<Page>_getPages(Event event)Get the pages linked to the eventprotected StringgetSiteParameterId()Id of the site parameter to enable/disable the notificationbooleansupports(Event event)Checks if the event is supported.-
Methods inherited from class org.ametys.plugins.pagesubscription.observer.AbstractPageSubscriptionObserver
_getAbsolutePageUrl, getPriority, isNotificationEnabled, observe, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
PageSubscriptionDeletePageObserver
public PageSubscriptionDeletePageObserver()
-
-
Method Detail
-
supports
public boolean supports(Event event)
Description copied from interface:ObserverChecks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event- the event.- Returns:
truefor observing this event,falseotherwise.
-
getSiteParameterId
protected String getSiteParameterId()
Description copied from class:AbstractPageSubscriptionObserverId of the site parameter to enable/disable the notification- Specified by:
getSiteParameterIdin classAbstractPageSubscriptionObserver- Returns:
- The id of site
-
_getMailSubject
protected String _getMailSubject(Event event, Page page)
Description copied from class:AbstractPageSubscriptionObserverCreate the mail subject depend on the event- Specified by:
_getMailSubjectin classAbstractPageSubscriptionObserver- Parameters:
event- the eventpage- the page- Returns:
- the mail subject
-
_getMailBody
protected String _getMailBody(Event event, Page page)
Description copied from class:AbstractPageSubscriptionObserverCreate the mail body depend on the event- Specified by:
_getMailBodyin classAbstractPageSubscriptionObserver- Parameters:
event- the eventpage- the page- Returns:
- the mail body
-
_getPages
protected Collection<Page> _getPages(Event event)
Description copied from class:AbstractPageSubscriptionObserverGet the pages linked to the event- Specified by:
_getPagesin classAbstractPageSubscriptionObserver- Parameters:
event- the event- Returns:
- the pages linked to the event
-
-