E - the entry class for the bound subtype.public abstract class MediaEntry<E extends BaseEntry<E>> extends BaseEntry<E> implements IMediaEntry
BaseEntry.AtomHandler, BaseEntry.EntryStateExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandlerAbstractExtension.AttributesHandlerxmlBloblocalName, namespace| Modifier | Constructor and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
protected Content.ChildHandlerInfo |
getContentHandlerInfo(ExtensionProfile extProfile,
org.xml.sax.Attributes attrs)
Returns information about the content element processing.
|
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. |
addAdaptor, addHtmlLink, addLink, addLink, delete, generate, generateAtom, generateRss, getAdaptedEntry, getAdaptor, getAdaptors, getAuthors, getCanEdit, getCategories, getContent, getContributors, getEdited, getEditLink, getEtag, getHandler, getHtmlLink, getId, getKind, getLink, getLinks, getLinks, getPlainTextContent, getPubControl, getPublished, getResumableEditMediaLink, getRights, getSelectedFields, getSelf, getSelfLink, getService, getSource, getSummary, getTextContent, getTitle, getUpdated, getVersionId, isDraft, parseAtom, parseAtom, parseAtom, readEntry, readEntry, removeLinks, removeLinks, setCanEdit, setContent, setContent, setDraft, setEdited, setEtag, setId, setKind, setPubControl, setPublished, setRights, setSelectedFields, setSource, setSummary, setTitle, setUpdated, setVersionId, update, visitChildrenaddExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChildconsumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCanEdit, getContent, getEdited, getEditLink, getPublished, getResumableEditMediaLink, getSelectedFields, getSummary, setCanEdit, setEdited, setPublished, setSelectedFieldsaddLink, getAuthors, getCategories, getEtag, getId, getKind, getLink, getLinks, getSelfLink, getTitle, getUpdated, getVersionId, removeLinks, removeLinks, setEtag, setId, setKind, setUpdated, setVersionIddeclareExtensionsprotected MediaEntry()
protected MediaEntry(BaseEntry<?> sourceEntry)
Kind.Adaptor subclasses
of BaseEntry can use this constructor to create adaptor
instances of an entry that share state with the original.public void setService(Service v)
IAtomsetService in interface IAtomsetService in class BaseEntry<E extends BaseEntry<E>>public void setMediaSource(MediaSource mediaSource)
IMediaEntryMediaSource that contains the media data for the entry.setMediaSource in interface IMediaEntrypublic MediaSource getMediaSource()
IMediaEntryMediaSource that contains the media data for the entry.getMediaSource in interface IMediaEntrypublic Link getMediaEditLink()
getMediaEditLink in interface IEntrygetMediaEditLink in class BaseEntry<E extends BaseEntry<E>>public E updateMedia(boolean updateEntry) throws java.io.IOException, ServiceException
MediaSource of the entry to the associated
GData service. Can optionally update the entry content at the same time.updateEntry - set to {code boolean} true if the current entry
content should be updated with the media.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.java.lang.UnsupportedOperationException - If update is not supported for the target entry.java.io.IOException - If there is an error communicating with the GData service.protected Content.ChildHandlerInfo getContentHandlerInfo(ExtensionProfile extProfile, org.xml.sax.Attributes attrs) throws ParseException, java.io.IOException
BaseEntrygetContentHandlerInfo in class BaseEntry<E extends BaseEntry<E>>ParseExceptionjava.io.IOException