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:
  • Constructor Details

    • SiteEvent

      public SiteEvent(SiteContext siteContext)
      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 class
      request - the request
      Returns:
      the latest request event
    • getSiteContext

      public SiteContext getSiteContext()