nl.gx.webmanager.contentapi.event
Class PageVersionEvent

java.lang.Object
  extended by nl.gx.webmanager.contentapi.event.PageVersionEvent
All Implemented Interfaces:
EntityEvent, Event

public final class PageVersionEvent
extends java.lang.Object
implements EntityEvent

Author:
n.milutinovic

Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.event.Event
Event.Type
 
Field Summary
 
Fields inherited from interface nl.gx.webmanager.services.event.EntityEvent
COPY, CREATE, DELETE, MOVE, RETRIEVE, UPDATE
 
Constructor Summary
PageVersionEvent(Event.Type type, PageVersion version, java.lang.String action, java.lang.Object source)
          Fill constructor for this immutable class.
PageVersionEvent(Event.Type type, PageVersion version, java.lang.String action, PageVersion targetVersion, java.lang.Object source)
          Fill constructor for this immutable class.
 
Method Summary
 java.lang.Object getEntity()
          Return the entity on which the action was performed.
 java.lang.String getEventAction()
          Returns the action that has been performed
 Event.Type getEventType()
          Type of event notification.
 PageVersion getPageVersion()
          Return the page version associated with this event
 java.lang.Class<?> getScope()
          The scope of the object on which the action is performed.
 java.lang.Object getSource()
          Returns the object that published the event
 PageVersion getTargetPageVersion()
          Return the target page version associated with this event.
 java.lang.String toString()
          Returns String representing information on the event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageVersionEvent

public PageVersionEvent(Event.Type type,
                        PageVersion version,
                        java.lang.String action,
                        java.lang.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,
                        java.lang.String action,
                        PageVersion targetVersion,
                        java.lang.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 is EntityEvent.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 page version associated with this event

getTargetPageVersion

public PageVersion getTargetPageVersion()
Return the target page version associated with this event. Holds a reference to the target page version in case of a EntityEvent.COPY.

Returns:
The target page version.

getEntity

public java.lang.Object getEntity()
Description copied from interface: EntityEvent
Return the entity on which the action was performed.

Specified by:
getEntity in interface EntityEvent
Returns:
get the entity this event refers to.

getEventAction

public java.lang.String getEventAction()
Description copied from interface: Event
Returns the action that has been performed

Specified by:
getEventAction in interface Event
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 interface Event
Returns:
type of event notification.

getScope

public java.lang.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

Specified by:
getScope in interface Event
Returns:
the class of the object that the action is performed on.

getSource

public java.lang.Object getSource()
Description copied from interface: Event
Returns the object that published the event

Specified by:
getSource in interface Event
Returns:
the source that fired the event (WCB ID).

toString

public java.lang.String toString()
Returns String representing information on the event

Overrides:
toString in class java.lang.Object
Returns:
String representing information on the event


Copyright © 2007-2011 GX Software BV. All Rights Reserved.