Class MediaItemVersionEvent
- java.lang.Object
-
- nl.gx.webmanager.contentapi.event.MediaItemVersionEvent
-
- All Implemented Interfaces:
EntityEvent
,Event
public class MediaItemVersionEvent extends Object implements EntityEvent
This class represents a media item version event posted by the media repository service to allow all subscribers to this event to do something with that information. This may be updating timestamps, updating a search index, etc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.event.Event
Event.Type
-
-
Constructor Summary
Constructors Constructor Description MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, String eventAction, Object source, Website[] websites)
Constructor of the media item event.MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, String eventAction, Object source, Website[] websites, Class<? extends MediaItemVersion> scope)
Constructor of the media item event.MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, MediaItemVersion originalMediaItemVersion, String eventAction, Object source, Website[] websites)
Constructor of the media item event.MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, MediaItemVersion originalMediaItemVersion, String eventAction, Object source, Website[] websites, Class<? extends MediaItemVersion> scope)
Constructor of the media item 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()
Returns the type of the event.MediaItemVersion
getMediaItemVersion()
Returns the media item version associated with the event.MediaItemVersion
getOriginalMediaItemVersion()
Returns the original media item version associated with the event.Class<?>
getScope()
The scope of the object on which the action is performed.Object
getSource()
Returns the object that published the eventWebsite[]
getWebsites()
Returns the owner webid of this media itemString
toString()
Returns String representing information on the event.
-
-
-
Constructor Detail
-
MediaItemVersionEvent
public MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, String eventAction, Object source, Website[] websites)
Constructor of the media item event.- Parameters:
eventType
- The event type which can be either PRE or POST.mediaItemVersion
- The media item version which is the result of the performed action.eventAction
- Action performed on the media item. Typically one defined by theEntityEvent
interface.source
- The source object on which the event was published.websites
- Web sites to be updated.
-
MediaItemVersionEvent
public MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, String eventAction, Object source, Website[] websites, Class<? extends MediaItemVersion> scope)
Constructor of the media item event.- Parameters:
eventType
- The event type which can be either PRE or POST.mediaItemVersion
- The media item version which is the result of the performed action.eventAction
- Action performed on the media item version . Typically one defined by theEntityEvent
interface.source
- The source object on which the event was published.websites
- Web sites to be updated.scope
- Scope of the event.
-
MediaItemVersionEvent
public MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, MediaItemVersion originalMediaItemVersion, String eventAction, Object source, Website[] websites)
Constructor of the media item event.- Parameters:
eventType
- The event type which can be either PRE or POST.mediaItemVersion
- The media item version which is the result of the performed action.originalMediaItemVersion
- The media item version on which the action is performed. Useful in combination withEntityEvent.COPY
where media item is not the same as original media item version.eventAction
- Action performed on the media item version. Typically one defined by theEntityEvent
interface.source
- The source object on which the event was published.websites
- Web sites to be updated.
-
MediaItemVersionEvent
public MediaItemVersionEvent(Event.Type eventType, MediaItemVersion mediaItemVersion, MediaItemVersion originalMediaItemVersion, String eventAction, Object source, Website[] websites, Class<? extends MediaItemVersion> scope)
Constructor of the media item event.- Parameters:
eventType
- The event type which can be either PRE or POST.mediaItemVersion
- The media item version which is the result of the performed action.originalMediaItemVersion
- The media item version on which the action is performed. Useful in combination withEntityEvent.COPY
where media item version is not the same as original media item version.eventAction
- Action performed on the media item. Typically one defined by theEntityEvent
interface.source
- The source object on which the event was published.websites
- Web sites to be updated.scope
- Scope of the event.
-
-
Method Detail
-
getEventType
public Event.Type getEventType()
Returns the type of the event.- Specified by:
getEventType
in interfaceEvent
- Returns:
- the type of the event
-
getMediaItemVersion
public MediaItemVersion getMediaItemVersion()
Returns the media item version associated with the event.- Returns:
- the media item version associated with the event
-
getOriginalMediaItemVersion
public MediaItemVersion getOriginalMediaItemVersion()
Returns the original media item version associated with the event.- Returns:
- The original media item version.
-
getWebsites
public Website[] getWebsites()
Returns the owner webid of this media item- Returns:
- Id of the owner webid
-
getEntity
public Object getEntity()
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()
Returns the action that has been performed- Specified by:
getEventAction
in interfaceEvent
- Returns:
- the action that has been performed.
-
getScope
public Class<?> getScope()
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()
Returns the object that published the event
-
-