Class ResourceNotifierHelper
- java.lang.Object
-
- org.ametys.plugins.workspaces.project.notification.ResourceNotifierHelper
-
- All Implemented Interfaces:
Initializable,Component,Serviceable
public class ResourceNotifierHelper extends Object implements Serviceable, Component, Initializable
Notification helper for the Webdav actions
-
-
Field Summary
Fields Modifier and Type Field Description private static long__HISTORY_EXPIRATION_TIMETime of expiration of a log (5 minutes)private static long__TIME_DURATION_BEFORE_NEXT_CLEANTime duration between 2 cleansing of logs queue (10 seconds)protected CurrentUserProvider_currentUserProviderThe current user providerprivate long_lastCleanTimeprivate LinkedList<Map<String,Object>>_sentHistorystatic StringROLEAvalon role.
-
Constructor Summary
Constructors Constructor Description ResourceNotifierHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_cleanupHistory()voidinitialize()booleanresourceRecentlyModified(String resourceId)Notify the observation manager when a resource is updatedvoidservice(ServiceManager manager)
-
-
-
Field Detail
-
__HISTORY_EXPIRATION_TIME
private static final long __HISTORY_EXPIRATION_TIME
Time of expiration of a log (5 minutes)- See Also:
- Constant Field Values
-
__TIME_DURATION_BEFORE_NEXT_CLEAN
private static final long __TIME_DURATION_BEFORE_NEXT_CLEAN
Time duration between 2 cleansing of logs queue (10 seconds)- See Also:
- Constant Field Values
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_sentHistory
private LinkedList<Map<String,Object>> _sentHistory
-
_lastCleanTime
private long _lastCleanTime
-
-
Constructor Detail
-
ResourceNotifierHelper
public ResourceNotifierHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
resourceRecentlyModified
public boolean resourceRecentlyModified(String resourceId)
Notify the observation manager when a resource is updated- Parameters:
resourceId- The resource updated- Returns:
- True if the resource was recently modified
-
_cleanupHistory
private void _cleanupHistory()
-
-