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_TIME
Time of expiration of a log (5 minutes)private static long
__TIME_DURATION_BEFORE_NEXT_CLEAN
Time duration between 2 cleansing of logs queue (10 seconds)protected CurrentUserProvider
_currentUserProvider
The current user providerprivate long
_lastCleanTime
private LinkedList<Map<String,Object>>
_sentHistory
static String
ROLE
Avalon role.
-
Constructor Summary
Constructors Constructor Description ResourceNotifierHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_cleanupHistory()
void
initialize()
boolean
resourceRecentlyModified(String resourceId)
Notify the observation manager when a resource is updatedvoid
service(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in 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()
-
-