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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description SiteEvent(SiteContext siteContext)
Create a new ApplicationEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.SiteContext
getSiteContext()
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
SiteEvent
public SiteEvent(SiteContext siteContext)
Create a new ApplicationEvent.- Parameters:
siteContext
- the site's context
-
-
Method Detail
-
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
public SiteContext getSiteContext()
-
-