Class SendOnlineNotificationAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.repository.page.actions.SendOnlineNotificationAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
This actions send a email to notify the publication of a page.
-
Field Summary
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Get the email bodyprotected String
_getSender
(User sender, Page page) Get the email senderprotected String
_getSubject
(User sender, Page page) Get the email subjectact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
SendOnlineNotificationAction
public SendOnlineNotificationAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
_getSender
Get the email sender- Parameters:
sender
- The user responsible for the actionpage
- The published page- Returns:
- The sender
-
_getSubject
Get the email subject- Parameters:
sender
- The user responsible for the notificationpage
- The published page- Returns:
- The email subject
-
_getBody
Get the email body- Parameters:
sender
- The user responsible for the notificationuser
- The recipient of the notificationpage
- The published page- Returns:
- The email body
- Throws:
IOException
- if failed to build HTML body
-