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 Modifier and Type Field Description private static int__MAX_RESOURCE_LINK-
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 private String_getAbsoluteResourceUrl(Map<String,Resource> resources, Page page)private String_getAbsoluteResourceUrl(Resource resource, Page page)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
-
-
-
-
Field Detail
-
__MAX_RESOURCE_LINK
private static final int __MAX_RESOURCE_LINK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PageSubscriptionExplorerObserver
public PageSubscriptionExplorerObserver()
-
-
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
-
_getAbsoluteResourceUrl
private String _getAbsoluteResourceUrl(Map<String,Resource> resources, Page page)
-
_getAbsoluteResourceUrl
private String _getAbsoluteResourceUrl(Resource resource, Page page)
-
_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
-
-