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
public class SendOnlineNotificationAction extends ServiceableAction
This actions send a email to notify the publication of a page.
-
-
Field Summary
Fields Modifier and Type Field Description private GroupManager
_groupManager
private I18nUtils
_i18nUtils
private AmetysObjectResolver
_resolver
private UserHelper
_userHelper
private UserManager
_userManager
private CurrentUserProvider
_userProvider
-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description SendOnlineNotificationAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_getBody(User sender, User user, Page page)
Get the email bodyprivate Set<User>
_getDistinctUsers(List<UserIdentity> userIdentities, List<GroupIdentity> groupIdentities)
protected String
_getSender(User sender, Page page)
Get the email senderprotected String
_getSubject(User sender, Page page)
Get the email subjectMap
act(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
-
-
-
-
Field Detail
-
_userManager
private UserManager _userManager
-
_groupManager
private GroupManager _groupManager
-
_resolver
private AmetysObjectResolver _resolver
-
_i18nUtils
private I18nUtils _i18nUtils
-
_userProvider
private CurrentUserProvider _userProvider
-
_userHelper
private UserHelper _userHelper
-
-
Constructor Detail
-
SendOnlineNotificationAction
public SendOnlineNotificationAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- 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
protected String _getSender(User sender, Page page)
Get the email sender- Parameters:
sender
- The user responsible for the actionpage
- The published page- Returns:
- The sender
-
_getSubject
protected String _getSubject(User sender, Page page)
Get the email subject- Parameters:
sender
- The user responsible for the notificationpage
- The published page- Returns:
- The email subject
-
_getBody
protected String _getBody(User sender, User user, Page page)
Get the email body- Parameters:
sender
- The user responsible for the notificationuser
- The recipient of the notificationpage
- The published page- Returns:
- The email body
-
_getDistinctUsers
private Set<User> _getDistinctUsers(List<UserIdentity> userIdentities, List<GroupIdentity> groupIdentities)
-
-