Class MediaItem.Builder

java.lang.Object
com.atlassian.gadgets.opensocial.model.MediaItem.Builder
Enclosing class:
MediaItem

public static class MediaItem.Builder extends Object
A builder that facilitates construction of MediaItem objects. The final MediaItem is created by calling the build() method
  • Constructor Details

    • Builder

      public Builder(URI url)
  • Method Details

    • mimeType

      public MediaItem.Builder mimeType(String mimeType)
      Set the mime type of the MediaItem under construction and return this Builder to allow further construction to be done.
      Parameters:
      mimeType - the mime type to use for the MediaItem
      Returns:
      this builder to allow for further construction
    • type

      public MediaItem.Builder type(MediaItem.Type type)
      Set the type of the MediaItem under construction and return this Builder to allow further construction to be done.
      Parameters:
      type - the type to use for the MediaItem
      Returns:
      this builder to allow for further construction
    • url

      public MediaItem.Builder url(URI url)
      Set the url of the MediaItem under construction and return this Builder to allow further construction to be done.
      Parameters:
      url - the mime type to use for the MediaItem
      Returns:
      this builder to allow for further construction
    • build

      public MediaItem build()
      Returns the final constructed MediaItem
      Returns:
      the MediaItem