Class WebsiteEvent
- java.lang.Object
-
- nl.gx.webmanager.contentapi.event.WebsiteEvent
-
- All Implemented Interfaces:
EntityEvent
,Event
public class WebsiteEvent extends Object implements EntityEvent
Event indicating a the creation or deletion of a Website. The scope and the source are always WebManagerApplication.class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.event.Event
Event.Type
-
-
Constructor Summary
Constructors Constructor Description WebsiteEvent(Event.Type eventType, Website website, String eventAction)
Creates a Website event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getEntity()
Return the (new) entity on which the action was performed.String
getEventAction()
Returns the action that has been performedEvent.Type
getEventType()
Type of event notification.Class<?>
getScope()
The scope of the object on which the action is performed.Object
getSource()
Returns the object that published the eventString
toString()
-
-
-
Constructor Detail
-
WebsiteEvent
public WebsiteEvent(Event.Type eventType, Website website, String eventAction)
Creates a Website event.- Parameters:
eventType
- The event type which can be either PRE or POST.website
- The website object just created or destroyed. May be null.eventAction
- The action performed. One of EntityEvent.CREATE or EntityEvent.DELETE.
-
-
Method Detail
-
getEventType
public Event.Type getEventType()
Description copied from interface:Event
Type of event notification. This can be either PRE or POST. A PRE event is thrown just before the action is performed, a POST event immediately after.- Specified by:
getEventType
in interfaceEvent
- Returns:
- type of event notification.
-
getEntity
public Object getEntity()
Description copied from interface:EntityEvent
Return the (new) entity on which the action was performed.- Specified by:
getEntity
in interfaceEntityEvent
- Returns:
- get the entity this event refers to.
-
getEventAction
public String getEventAction()
Description copied from interface:Event
Returns the action that has been performed- Specified by:
getEventAction
in interfaceEvent
- Returns:
- the action that has been performed.
-
getScope
public Class<?> getScope()
Description copied from interface:Event
The scope of the object on which the action is performed. The scope indicates the object's type indicated by its Class
-
getSource
public Object getSource()
Description copied from interface:Event
Returns the object that published the event
-
-