Class MediaItemEvent

  • All Implemented Interfaces:
    EntityEvent, Event

    public class MediaItemEvent
    extends 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
    • 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 interface Event
        Returns:
        type of event notification.
      • 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 Object getEntity()
        Description copied from interface: EntityEvent
        Return the (new) entity on which the action was performed.
        Specified by:
        getEntity in interface EntityEvent
        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 interface Event
        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
        Specified by:
        getScope in interface Event
        Returns:
        the class of the object that the action is performed on.
      • getSource

        public 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 String toString()
        Returns String representing information on the event
        Overrides:
        toString in class Object
        Returns:
        String representing information on the event