public class LivePageClientSideElement extends AbstractPageClientSideElement
ClientSideElement
creates a button that will be enabled if page and its hierarchy is valid.ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
private GroupManager |
_foGroupsManager
The
GroupManager for front-end groups |
private UserManager |
_foUsersManager
The
UserManager for front-end users |
private I18nUtils |
_i18nUtils
The
I18nUtils |
private UserHelper |
_userHelper |
private UserManager |
_userManager
The
UserManager |
_resolver, _synchronizeComponent
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
LivePageClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private String |
_getBody(User sender,
User user,
Page page,
String comment)
Get the email body
|
private Set<User> |
_getDistinctUsers(List<UserIdentity> userIdentities,
List<GroupIdentity> groupIdentities) |
private String |
_getSender(User sender,
Page page)
Get the email sender
|
private String |
_getSubject(User sender,
Page page)
Get the email subject
|
boolean |
sendOnlineNotification(List<String> pageIds,
List<Map<String,String>> users,
List<Map<String,String>> groups,
String comment)
Send a notification for online pages.
|
void |
service(ServiceManager smanager) |
getAllRightPageDescription, getNoModifiablePageDescription, getNoRightPageDescription, getPageDefaultParameters, hasRight
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
private UserManager _userManager
UserManager
private UserManager _foUsersManager
UserManager
for front-end usersprivate GroupManager _foGroupsManager
GroupManager
for front-end groupsprivate I18nUtils _i18nUtils
I18nUtils
private UserHelper _userHelper
public LivePageClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class AbstractPageClientSideElement
ServiceException
public boolean sendOnlineNotification(List<String> pageIds, List<Map<String,String>> users, List<Map<String,String>> groups, String comment)
pageIds
- the ids of the pagesusers
- the users that will be notifiedgroups
- the groups that will be notifiedcomment
- the comment of the notifierprivate String _getSender(User sender, Page page)
sender
- The user responsible for the actionpage
- The published pageprivate String _getSubject(User sender, Page page)
sender
- The user responsible for the notificationpage
- The published pageprivate String _getBody(User sender, User user, Page page, String comment)
sender
- The user responsible for the notificationuser
- The recipient of the notificationpage
- The published pagecomment
- The user's comment. Can be empty or null.private Set<User> _getDistinctUsers(List<UserIdentity> userIdentities, List<GroupIdentity> groupIdentities)