Class AssetManagerItem

java.lang.Object
org.opencastproject.message.broker.api.assetmanager.AssetManagerItem
All Implemented Interfaces:
Serializable, MessageItem
Direct Known Subclasses:
AssetManagerItem.DeleteEpisode, AssetManagerItem.TakeSnapshot

@ParametersAreNonnullByDefault public abstract class AssetManagerItem extends Object implements MessageItem, Serializable
Serializable class that represents all of the possible messages sent through an AssetManager queue.
See Also:
  • Method Details

    • getType

      public abstract AssetManagerItem.Type getType()
    • decompose

      public abstract <A> A decompose(Function<? super AssetManagerItem.TakeSnapshot,? extends A> takeSnapshot, Function<? super AssetManagerItem.DeleteEpisode,? extends A> deleteEpisode)
    • getDate

      public final Date getDate()
    • getId

      public final String getId()
      Specified by:
      getId in interface MessageItem
    • add

      public static AssetManagerItem.TakeSnapshot add(org.opencastproject.workspace.api.Workspace workspace, org.opencastproject.mediapackage.MediaPackage mp, org.opencastproject.security.api.AccessControlList acl, long version, Date date)
      Parameters:
      workspace - The workspace
      mp - The media package to update.
      acl - The access control list of the media package to update.
      version - The version of the media package.
      date - The modification date.
      Returns:
      Builds a AssetManagerItem for taking a media package snapshot.
    • deleteEpisode

      public static AssetManagerItem deleteEpisode(String mediaPackageId, Date date)
      Parameters:
      mediaPackageId - The unique id of the media package to delete.
      date - The modification date.
      Returns:
      Builds AssetManagerItem for deleting an episode from the asset manager.