com.google.gdata.data.media
Class MediaFeed<F extends BaseFeed,E extends BaseEntry>
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.Source
com.google.gdata.data.BaseFeed<F,E>
com.google.gdata.data.media.MediaFeed<F,E>
- Type Parameters:
F
- the feed class associated with the bound subtype.E
- the entry class associated with the bound subtype.
- All Implemented Interfaces:
- Extension, IFeed, Kind.Adaptable, Kind.Adaptor
- Direct Known Subclasses:
- DocumentListFeed, GoogleBaseMediaFeed, GphotoFeed, VideoFeed
public abstract class MediaFeed<F extends BaseFeed,E extends BaseEntry>
- extends BaseFeed<F,E>
The MediaFeed class extends BaseFeed
to add media-related
operations for feeds that contain media content.
Constructor Summary |
protected |
MediaFeed(java.lang.Class<? extends E> entryClass)
|
protected |
MediaFeed(java.lang.Class<? extends E> entryClass,
BaseFeed<?,?> sourceFeed)
|
Method Summary |
E |
insert(MediaSource media)
Inserts a new media resource into the feed, if the feed is currently
associated with a Service. |
protected
|
insert(MediaSource media,
java.lang.Class<T> mediaEntryClass)
Inserts a new media resource into the feed, if the feed is currently
associated with a Service. |
void |
setService(Service v)
Sets that GData Service instance associated with this feed. |
Methods inherited from class com.google.gdata.data.BaseFeed |
addAdaptor, createEntry, declareExtensions, generate, generateAtom, generateFeedEnd, generateFeedStart, generateRss, getAdaptedFeed, getAdaptor, getAdaptors, getCanPost, getEntries, getEntries, getEntryPostLink, getEtag, getFeedBatchLink, getHandler, getItemsPerPage, getNextLink, getPreviousLink, getSelf, getSelfLink, getService, getStartIndex, getTotalResults, insert, parseAtom, parseAtom, parseAtom, readFeed, readFeed, setCanPost, setEntries, setEtag, setItemsPerPage, setStartIndex, setTotalResults, visitChildren |
Methods inherited from class com.google.gdata.data.Source |
addHtmlLink, addLink, addLink, generateInnerAtom, getAuthors, getCategories, getContributors, getGenerator, getHtmlLink, getIcon, getId, getLink, getLinks, getLinks, getLogo, getRights, getSubtitle, getTitle, getUpdated, removeLinks, setGenerator, setGenerator, setIcon, setId, setLogo, setRights, setSubtitle, setTitle, setUpdated |
Methods inherited from class com.google.gdata.data.ExtensionPoint |
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild |
Methods inherited from class com.google.gdata.data.AbstractExtension |
consumeAttributes, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gdata.data.IFeed |
addLink, getCategories, getGenerator, getId, getLink, getLinks, getLogo, getSubtitle, getTitle, getUpdated, setGenerator, setId, setLogo, setUpdated |
MediaFeed
protected MediaFeed(java.lang.Class<? extends E> entryClass)
MediaFeed
protected MediaFeed(java.lang.Class<? extends E> entryClass,
BaseFeed<?,?> sourceFeed)
setService
public void setService(Service v)
- Description copied from class:
BaseFeed
- Sets that GData
Service
instance associated with this feed.
- Specified by:
setService
in interface IFeed
- Overrides:
setService
in class BaseFeed<F extends BaseFeed,E extends BaseEntry>
insert
public E insert(MediaSource media)
throws ServiceException,
java.io.IOException
- Inserts a new media resource into the feed, if the feed is currently
associated with a Service.
- Returns:
- the inserted media Entry returned by the Service.
- Throws:
ServiceException
- If there is no associated GData service or the service is
unable to perform the insertion.
java.lang.UnsupportedOperationException
- If insert is not supported for the target feed.
java.io.IOException
- If there is an error communicating with the GData service.
insert
protected <T extends E> T insert(MediaSource media,
java.lang.Class<T> mediaEntryClass)
throws ServiceException,
java.io.IOException
- Inserts a new media resource into the feed, if the feed is currently
associated with a Service. This method is meant for subclasses to
use when they support heterogeneous feeds.
- Returns:
- the inserted media Entry returned by the Service.
- Throws:
ServiceException
- If there is no associated GData service or the service is
unable to perform the insertion.
java.lang.UnsupportedOperationException
- If insert is not supported for the target feed.
java.io.IOException
- If there is an error communicating with the GData service.