public abstract class

MediaEntry

extends BaseEntry<E extends BaseEntry>
implements IMediaEntry
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry>
         ↳ com.google.gdata.data.media.MediaEntry<E extends com.google.gdata.data.BaseEntry<E>>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The MediaEntry class is an abstract base class for GData services that support media content.

Summary

[Expand]
Inherited Fields
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Protected Constructors
MediaEntry()
Constructs a new BaseEntry instance.
MediaEntry(BaseEntry<?> sourceEntry)
Copy constructor that initializes a new BaseEntry instance to have identical contents to another instance, using a shared reference to the same entry state.
Public Methods
Link getMediaEditLink()
Retrieves the media resource edit link.
MediaSource getMediaSource()
Returns the MediaSource that contains the media data for the entry.
void setMediaSource(MediaSource mediaSource)
Sets the MediaSource that contains the media data for the entry.
void setService(Service v)
Sets the service that this resource is being used with.
E updateMedia(boolean updateEntry)
Updates the media content associated with this entry by sending the data contained in the MediaSource of the entry to the associated GData service.
Protected Methods
Content.ChildHandlerInfo getContentHandlerInfo(ExtensionProfile extProfile, Attributes attrs)
Returns information about the content element processing.
[Expand]
Inherited Methods
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.IAtom
From interface com.google.gdata.data.IEntry
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor
From interface com.google.gdata.data.media.IMediaEntry

Protected Constructors

protected MediaEntry ()

Constructs a new BaseEntry instance.

protected MediaEntry (BaseEntry<?> sourceEntry)

Copy constructor that initializes a new BaseEntry instance to have identical contents to another instance, using a shared reference to the same entry state. Kind.Adaptor subclasses of BaseEntry can use this constructor to create adaptor instances of an entry that share state with the original.

Parameters
sourceEntry

Public Methods

public Link getMediaEditLink ()

Retrieves the media resource edit link.

public MediaSource getMediaSource ()

Returns the MediaSource that contains the media data for the entry.

public void setMediaSource (MediaSource mediaSource)

Sets the MediaSource that contains the media data for the entry.

Parameters
mediaSource

public void setService (Service v)

Sets the service that this resource is being used with.

Parameters
v

public E updateMedia (boolean updateEntry)

Updates the media content associated with this entry by sending the data contained in the MediaSource of the entry to the associated GData service. Can optionally update the entry content at the same time.

Parameters
updateEntry Set to {code boolean} true if the current entry content should be updated with the media.
Returns
  • the updated entry returned by the Service.
Throws
ServiceException If there is no associated GData service or the service is unable to perform the update.
InvalidEntryException If the entry does not contain MediaContent or there is no MediaSource associated with the content.
UnsupportedOperationException If update is not supported for the target entry.
IOException If there is an error communicating with the GData service.

Protected Methods

protected Content.ChildHandlerInfo getContentHandlerInfo (ExtensionProfile extProfile, Attributes attrs)

Returns information about the content element processing.

Parameters
extProfile
attrs
Throws
ParseException
IOException