Class PageSubscriptionExplorerObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.pagesubscription.observer.AbstractPageSubscriptionObserver
-
- org.ametys.plugins.pagesubscription.observer.PageSubscriptionExplorerObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
public class PageSubscriptionExplorerObserver extends AbstractPageSubscriptionObserver
Listen attachment page 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 PageSubscriptionExplorerObserver()
-
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 String
getSiteParameterId()
Id of the site parameter to enable/disable the notificationboolean
supports(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
-
PageSubscriptionExplorerObserver
public PageSubscriptionExplorerObserver()
-
-
Method Detail
-
supports
public boolean supports(Event event)
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event
- the event.- Returns:
true
for observing this event,false
otherwise.
-
getSiteParameterId
protected String getSiteParameterId()
Description copied from class:AbstractPageSubscriptionObserver
Id of the site parameter to enable/disable the notification- Specified by:
getSiteParameterId
in classAbstractPageSubscriptionObserver
- Returns:
- The id of site
-
_getMailSubject
protected String _getMailSubject(Event event, Page page)
Description copied from class:AbstractPageSubscriptionObserver
Create the mail subject depend on the event- Specified by:
_getMailSubject
in classAbstractPageSubscriptionObserver
- Parameters:
event
- the eventpage
- the page- Returns:
- the mail subject
-
_getMailBody
protected String _getMailBody(Event event, Page page)
Description copied from class:AbstractPageSubscriptionObserver
Create the mail body depend on the event- Specified by:
_getMailBody
in classAbstractPageSubscriptionObserver
- Parameters:
event
- the eventpage
- the page- Returns:
- the mail body
-
_getPages
protected Collection<Page> _getPages(Event event)
Description copied from class:AbstractPageSubscriptionObserver
Get the pages linked to the event- Specified by:
_getPages
in classAbstractPageSubscriptionObserver
- Parameters:
event
- the event- Returns:
- the pages linked to the event
-
-