Class PageVersionEvent
- java.lang.Object
-
- nl.gx.webmanager.contentapi.event.PageVersionEvent
-
- All Implemented Interfaces:
EntityEvent
,Event
public final class PageVersionEvent extends Object implements EntityEvent
- Author:
- n.milutinovic
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.event.Event
Event.Type
-
-
Constructor Summary
Constructors Constructor Description PageVersionEvent(Event.Type type, PageVersion version, String action, Object source)
Fill constructor for this immutable class.PageVersionEvent(Event.Type type, PageVersion version, String action, PageVersion targetVersion, Object source)
Fill constructor for this immutable class.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated 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.PageVersion
getOriginalPageVersion()
Returns the original page version associated with this event.PageVersion
getPageVersion()
Return the page version associated with this eventClass<?>
getScope()
The scope of the object on which the action is performed.Object
getSource()
Returns the object that published the eventPageVersion
getTargetPageVersion()
Deprecated.String
toString()
Returns String representing information on the event
-
-
-
Constructor Detail
-
PageVersionEvent
public PageVersionEvent(Event.Type type, PageVersion version, String action, Object source)
Fill constructor for this immutable class.- Parameters:
type
- The event type which can be either PRE or POST.version
- The page version on which the action is performed.action
- Action performed on the version. Typically one defined by the EntityEvent interface.source
- The source object on which the event was published.
-
PageVersionEvent
public PageVersionEvent(Event.Type type, PageVersion version, String action, PageVersion targetVersion, Object source)
Fill constructor for this immutable class.- Parameters:
type
- The event type which can be either PRE or POST.version
- The page version on which the action is performed.action
- Action performed on the version. Typically one defined by the EntityEvent interface.targetVersion
- When action isEntityEvent.COPY
holds a reference to the copy of the page version.source
- The source object on which the event was published.
-
-
Method Detail
-
getPageVersion
public PageVersion getPageVersion()
Return the page version associated with this event- Returns:
- The (new) page version associated with this event
-
getOriginalPageVersion
public PageVersion getOriginalPageVersion()
Returns the original page version associated with this event.- Returns:
- Page version associated with this event.
-
getTargetPageVersion
@Deprecated public PageVersion getTargetPageVersion()
Deprecated.Return the target page version associated with this event. Holds a reference to the target page version in case of aEntityEvent.COPY
.- Returns:
- The target page version.
-
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.
-
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.
-
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
-
-