Class NotifyContentMentionsObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.repository.comment.contributor.AbstractNotifyMentionsObserver<Content>
org.ametys.cms.repository.comment.contributor.NotifyContentMentionsObserver
- All Implemented Interfaces:
AsyncObserver
,Observer
,LogEnabled
,Component
,Serviceable
- Direct Known Subclasses:
NotifyContentMentionsObserver
Observer to send mails to mentioned users in contributor comments of
Content
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.cms.repository.comment.contributor.AbstractNotifyMentionsObserver
AbstractNotifyMentionsObserver.LinkToAmetysObject
-
Field Summary
FieldsFields inherited from class org.ametys.cms.repository.comment.contributor.AbstractNotifyMentionsObserver
_currentUserProvider, _i18nUtils, _resolvedUsers, _resolver, _userManager
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getAmetysObjectTitle
(Content content) Retrieves the string to use to display the ametys object in the emailprotected String
_getContentUrl
(Content content) Get the URL to the given content tool.protected String
_getLanguage
(Content content) Retrieves the language to use in sent mails_getLinkToAmetysObject
(Content content) Retrieves the notification mail's body link to ametys objectvoid
service
(ServiceManager manager) boolean
Checks if the event is supported.Methods inherited from class org.ametys.cms.repository.comment.contributor.AbstractNotifyMentionsObserver
_getCommentContentWithReplacedMentions, _getMailSubject, _getUserFromIdentity, getPriority, observe
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.observation.AsyncObserver
parallelizable
-
Field Details
-
_contentHelper
The content helper
-
-
Constructor Details
-
NotifyContentMentionsObserver
public NotifyContentMentionsObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractNotifyMentionsObserver<Content>
- Throws:
ServiceException
-
supports
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.
-
_getAmetysObjectTitle
Description copied from class:AbstractNotifyMentionsObserver
Retrieves the string to use to display the ametys object in the email- Overrides:
_getAmetysObjectTitle
in classAbstractNotifyMentionsObserver<Content>
- Parameters:
content
- the ametysObject- Returns:
- the ametys object's title
-
_getLinkToAmetysObject
Description copied from class:AbstractNotifyMentionsObserver
Retrieves the notification mail's body link to ametys object- Specified by:
_getLinkToAmetysObject
in classAbstractNotifyMentionsObserver<Content>
- Parameters:
content
- the ametys object- Returns:
- the notification mail's body link
-
_getContentUrl
Get the URL to the given content tool.- Parameters:
content
- the content.- Returns:
- the content URL.
-
_getLanguage
Description copied from class:AbstractNotifyMentionsObserver
Retrieves the language to use in sent mails- Specified by:
_getLanguage
in classAbstractNotifyMentionsObserver<Content>
- Parameters:
content
- the ametys object- Returns:
- the language to use in sent mails
-