com.atlassian.gadgets.opensocial.model
Class MediaItem.Builder

java.lang.Object
  extended by 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 Summary
MediaItem.Builder(URI url)
           
 
Method Summary
 MediaItem build()
          Returns the final constructed MediaItem
 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.
 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.
 MediaItem.Builder url(URI url)
          Set the url of the MediaItem under construction and return this Builder to allow further construction to be done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaItem.Builder

public MediaItem.Builder(URI url)
Method Detail

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


Copyright © 2014 Atlassian. All Rights Reserved.