public class ContentAlertsClientSideElement extends StaticClientSideElement
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ContentAlertsClientSideElement.AlertsStatus |
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected LockContentManager |
_lockManager
The lock manager.
|
protected AmetysObjectResolver |
_resolver
Repository content.
|
protected ServiceManager |
_smanager
The service manager
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ContentAlertsClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private void |
_getEnabledDisabledAlertsInformations(Map<String,Object> results,
Long unmodifiedAlertDelay,
Content content,
Map<String,Object> contentParams,
boolean unmodifiedAlertEnabled,
boolean reminderEnabled) |
private ContentAlertsClientSideElement.AlertsStatus |
_getUnmodifiedStatusAlertsInformations(ContentAlertsClientSideElement.AlertsStatus unmodifiedAlertStatus,
boolean unmodifiedAlertEnabled) |
protected void |
_setAlerts(ModifiableMetadataAwareVersionableAmetysObject content,
Map<String,Object> params)
Sets the alerts on the specified content.
|
Map<String,Object> |
getAlertsInformations(List<String> contentsId)
Get information on reminders state.
|
protected Map<String,Object> |
getContentDefaultParameters(Content content)
Get the default content's parameters
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
protected boolean |
isUnlockable(Content content,
Map<String,Object> results)
Test if the content is locked and cannot be unlocked by the current user.
|
void |
service(ServiceManager serviceManager) |
void |
setAlertsOnContent(List<String> contentIds,
Map<String,Object> params)
Set alerts on content
|
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected AmetysObjectResolver _resolver
protected LockContentManager _lockManager
protected ServiceManager _smanager
protected ContentHelper _contentHelper
public ContentAlertsClientSideElement()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public Map<String,Object> getAlertsInformations(List<String> contentsId)
contentsId
- The list of contents' idsprivate ContentAlertsClientSideElement.AlertsStatus _getUnmodifiedStatusAlertsInformations(ContentAlertsClientSideElement.AlertsStatus unmodifiedAlertStatus, boolean unmodifiedAlertEnabled)
private void _getEnabledDisabledAlertsInformations(Map<String,Object> results, Long unmodifiedAlertDelay, Content content, Map<String,Object> contentParams, boolean unmodifiedAlertEnabled, boolean reminderEnabled)
protected boolean isUnlockable(Content content, Map<String,Object> results)
content
- the content to test.results
- the result map.protected Map<String,Object> getContentDefaultParameters(Content content)
content
- The contentpublic void setAlertsOnContent(List<String> contentIds, Map<String,Object> params) throws ServiceException
contentIds
- the content's idparams
- the alerts' parametersServiceException
- if an error occurred while retrieving the alert
scheduler componentprotected void _setAlerts(ModifiableMetadataAwareVersionableAmetysObject content, Map<String,Object> params) throws AmetysRepositoryException
content
- the content to set the alerts on.params
- the alerts' parametersAmetysRepositoryException
- if a repository error occurs.public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
getScripts
in class StaticFileImportsClientSideElement
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.