Package org.craftercms.engine.event
Class SiteEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.craftercms.engine.event.SiteEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CacheClearedEvent
,GraphQLBuiltEvent
,SiteContextCreatedEvent
,SiteContextDestroyedEvent
,SiteContextInitializedEvent
,SiteContextPurgedEvent
public class SiteEvent
extends org.springframework.context.ApplicationEvent
Application event that is related to a site.
- Author:
- avasquez
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SiteEvent
getLatestRequestEvent
(Class<? extends SiteEvent> eventClass, javax.servlet.http.HttpServletRequest request) Returns the latest event of the specified class that has been fired during the handling of the request.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
SiteEvent
Create a new ApplicationEvent.- Parameters:
siteContext
- the site's context
-
-
Method Details
-
getLatestRequestEvent
public static SiteEvent getLatestRequestEvent(Class<? extends SiteEvent> eventClass, javax.servlet.http.HttpServletRequest request) Returns the latest event of the specified class that has been fired during the handling of the request.- Parameters:
eventClass
- the event classrequest
- the request- Returns:
- the latest request event
-
getSiteContext
-