nl.gx.webmanager.contentapi.event
Class MediaItemEvent

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

public class MediaItemEvent
extends java.lang.Object
implements EntityEvent

This class represents a media item 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.

Author:
ivol

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
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, MediaItem originalMediaItem, java.lang.String eventAction, java.lang.Object source, int discussionId, Website[] websites)
          Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, MediaItem, String, Object, Website[])
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, MediaItem originalMediaItem, java.lang.String eventAction, java.lang.Object source, int discussionId, Website[] websites, java.lang.Class<? extends MediaItem> scope)
          Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, MediaItem, String, Object, Website[], Class)
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, MediaItem originalMediaItem, java.lang.String eventAction, java.lang.Object source, Website[] websites)
          Constructor of the media item event.
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, MediaItem originalMediaItem, java.lang.String eventAction, java.lang.Object source, Website[] websites, java.lang.Class<? extends MediaItem> scope)
          Constructor of the media item event.
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, java.lang.String eventAction, java.lang.Object source, int discussionId, Website[] websites)
          Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, String, Object, Website[])
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, java.lang.String eventAction, java.lang.Object source, int discussionId, Website[] websites, java.lang.Class<? extends MediaItem> scope)
          Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, String, Object, Website[], Class)
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, java.lang.String eventAction, java.lang.Object source, Website[] websites)
          Constructor of the media item event.
MediaItemEvent(Event.Type eventType, MediaItem mediaItem, java.lang.String eventAction, java.lang.Object source, Website[] websites, java.lang.Class<? extends MediaItem> scope)
          Constructor of the media item event.
 
Method Summary
 int getDiscussionId()
          Deprecated. As of 9.5, use getMediaItem().getPlanned().getForum().getId() instead
 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()
          Returns the type of the event.
 MediaItem getMediaItem()
          Returns the media item associated with the event.
 MediaItem getOriginalMediaItem()
          Returns the original media item associated with the 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
 Website[] getWebsites()
          Returns the owner webid of this media item
 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

MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      Website[] websites)
Constructor of the media item event.

Parameters:
eventType - The event type which can be either PRE or POST.
mediaItem - The media item which is the result of the performed action.
eventAction - Action performed on the media item. Typically one defined by the EntityEvent interface.
source - The source object on which the event was published.
websites - Web sites to be updated.

MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      Website[] websites,
                      java.lang.Class<? extends MediaItem> scope)
Constructor of the media item event.

Parameters:
eventType - The event type which can be either PRE or POST.
mediaItem - The media item which is the result of the performed action.
eventAction - Action performed on the media item. Typically one defined by the EntityEvent interface.
source - The source object on which the event was published.
websites - Web sites to be updated.
scope - Scope of the event.

MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      MediaItem originalMediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      Website[] websites)
Constructor of the media item event.

Parameters:
eventType - The event type which can be either PRE or POST.
mediaItem - The media item which is the result of the performed action.
originalMediaItem - The media item on which the action is performed. Useful in combination with EntityEvent.COPY where media item is not the same as original media item.
eventAction - Action performed on the media item. Typically one defined by the EntityEvent interface.
source - The source object on which the event was published.
websites - Web sites to be updated.

MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      MediaItem originalMediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      Website[] websites,
                      java.lang.Class<? extends MediaItem> scope)
Constructor of the media item event.

Parameters:
eventType - The event type which can be either PRE or POST.
mediaItem - The media item which is the result of the performed action.
originalMediaItem - The media item on which the action is performed. Useful in combination with EntityEvent.COPY where media item is not the same as original media item.
eventAction - Action performed on the media item. Typically one defined by the EntityEvent interface.
source - The source object on which the event was published.
websites - Web sites to be updated.
scope - Scope of the event.

MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      int discussionId,
                      Website[] websites)
Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, String, Object, Website[])


MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      int discussionId,
                      Website[] websites,
                      java.lang.Class<? extends MediaItem> scope)
Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, String, Object, Website[], Class)


MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      MediaItem originalMediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      int discussionId,
                      Website[] websites)
Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, MediaItem, String, Object, Website[])


MediaItemEvent

public MediaItemEvent(Event.Type eventType,
                      MediaItem mediaItem,
                      MediaItem originalMediaItem,
                      java.lang.String eventAction,
                      java.lang.Object source,
                      int discussionId,
                      Website[] websites,
                      java.lang.Class<? extends MediaItem> scope)
Deprecated. As of 9.5, replaced by MediaItemEvent(nl.gx.webmanager.services.event.Event.Type, MediaItem, MediaItem, String, Object, Website[], Class)

Method Detail

getEventType

public Event.Type getEventType()
Returns the type of the event.

Specified by:
getEventType in interface Event
Returns:
the type of the event

getMediaItem

public MediaItem getMediaItem()
Returns the media item associated with the event.

Returns:
the media item associated with the event

getOriginalMediaItem

public MediaItem getOriginalMediaItem()
Returns the original media item associated with the event.

Returns:
The original media item.

getDiscussionId

@Deprecated
public int getDiscussionId()
Deprecated. As of 9.5, use getMediaItem().getPlanned().getForum().getId() instead

Returns the discussion id associated with this media item

Returns:
Id of the associated discussion, -1 otherwise

getWebsites

public Website[] getWebsites()
Returns the owner webid of this media item

Returns:
Id of the owner webid

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.

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.