Google Data APIs Client Library (1.41.1)



com.google.gdata.data.docs
Class DocumentListEntry

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.BaseEntry<E>
              extended by com.google.gdata.data.media.MediaEntry<DocumentListEntry>
                  extended by com.google.gdata.data.docs.DocumentListEntry
All Implemented Interfaces:
Extension, IAtom, IEntry, Kind.Adaptable, Kind.Adaptor, IMediaEntry
Direct Known Subclasses:
AudioEntry, DocumentEntry, FileEntry, FolderEntry, PdfEntry, PresentationEntry, SpreadsheetEntry

public class DocumentListEntry
extends MediaEntry<DocumentListEntry>

An entry representing a single document of any type within a DocumentListFeed.


Nested Class Summary
static class DocumentListEntry.MediaType
          Represents the MIME types supported by the doclist GData feed
 
Nested classes/interfaces inherited from class com.google.gdata.data.BaseEntry
BaseEntry.AtomHandler, BaseEntry.EntryState
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
static Category CATEGORY
          Category used to label entries which are of item type.
static java.lang.String FOLDERS_NAMESPACE
           
static java.lang.String KIND
          Kind category term used to label the entries which are of item type.
static java.lang.String LABEL
          Label for category.
static java.lang.String PARENT_NAMESPACE
           
static java.lang.String REVISIONS_NAMESPACE
           
static Category UNKNOWN_CATEGORY
          Deprecated. Use CATEGORY instead.
static java.lang.String UNKNOWN_KIND
          Deprecated. Use KIND instead.
static java.lang.String UNKNOWN_LABEL
          Deprecated. Use LABEL instead.
 
Fields inherited from class com.google.gdata.data.BaseEntry
state
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
DocumentListEntry()
          Constructs a new uninitialized entry, to be populated by the GData parsers.
DocumentListEntry(BaseEntry<?> sourceEntry)
          Constructs a new entry by doing a shallow copy from another BaseEntry instance.
 
Method Summary
 void addFolder(Person owner, java.lang.String folderName)
          Deprecated. use BaseEntry.addLink(Link) with link relation PARENT_NAMESPACE instead.
 void declareExtensions(ExtensionProfile extProfile)
          Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
 AclFeed getAclFeed()
           
 DocumentListAclFeedLink getAclFeedLink()
           
 java.lang.String getDocId()
          Gets the docId or spreadsheet key from the resource id.
 Link getDocumentLink()
          Gets the link with which you can open up the document in a Web browser.
 java.util.Set<java.lang.String> getFolders()
          Deprecated. use getParentLinks() instead.
 java.lang.String getKey()
          Deprecated. use getResourceId() instead.
 LastModifiedBy getLastModifiedBy()
          Returns the user who last modified the document.
 DateTime getLastViewed()
          Returns the time when the document was last viewed by the user.
protected static java.lang.String getMimeTypeFromFileName(java.lang.String fileName)
          Returns the mime type given a file name.
 java.util.List<Link> getParentLinks()
           
 java.lang.Long getQuotaBytesUsed()
          Returns the amount of quota consumed by the document.
 java.lang.String getResourceId()
          Returns the document's resource id.
 java.lang.String getType()
          Returns the type document entry from the resource id.
 boolean isHidden()
           
 boolean isStarred()
           
 boolean isTrashed()
           
 boolean isViewed()
           
 java.lang.Boolean isWritersCanInvite()
          Returns a flag for whether writers can invite other collaborators
 void setFile(java.io.File file)
          Deprecated. use setFile(File, String) instead.
 void setFile(java.io.File file, java.lang.String mimeType)
          Associate a File with this entry with the specified mime type
 void setHidden(boolean hidden)
          Sets the hidden status of this document for the user this feed request has been authenticated under.
 void setLastModifiedBy(LastModifiedBy lastModifiedBy)
          Sets the amount of quota consumed by the document.
 void setLastViewed(DateTime lastViewed)
          Sets the time when the document was last viewed by the user.
 void setQuotaBytesUsed(java.lang.Long quotaBytesUsed)
          Sets the amount of quota consumed by the document.
 void setResourceId(java.lang.String resourceId)
          Sets the document's resource id.
 void setStarred(boolean starred)
          Sets the starred status of this document for the user this feed request has been authenticated under.
 void setTrashed(boolean trashed)
          Sets the trashed status of this document for the user this feed request has been authenticated under.
 void setViewed(boolean viewed)
          Sets the viewed status of this document for the user this feed request has been authenticated under.
 void setWritersCanInvite(java.lang.Boolean writersCanInvite)
          Sets whether users classed as writers can invite other collaborators
 
Methods inherited from class com.google.gdata.data.media.MediaEntry
getContentHandlerInfo, getMediaEditLink, getMediaSource, setMediaSource, setService, updateMedia
 
Methods inherited from class com.google.gdata.data.BaseEntry
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, visitChildren
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, 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, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, 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.IEntry
getCanEdit, getContent, getEdited, getEditLink, getPublished, getResumableEditMediaLink, getSelectedFields, getSummary, setCanEdit, setEdited, setPublished, setSelectedFields
 
Methods inherited from interface com.google.gdata.data.IAtom
addLink, getAuthors, getCategories, getEtag, getId, getKind, getLink, getLinks, getSelfLink, getTitle, getUpdated, getVersionId, removeLinks, removeLinks, setEtag, setId, setKind, setUpdated, setVersionId
 

Field Detail

UNKNOWN_LABEL

@Deprecated
public static final java.lang.String UNKNOWN_LABEL
Deprecated. Use LABEL instead.
Label for category.

See Also:
Constant Field Values

UNKNOWN_KIND

@Deprecated
public static final java.lang.String UNKNOWN_KIND
Deprecated. Use KIND instead.
Kind category term used to label the entries which are of document type.

See Also:
Constant Field Values

UNKNOWN_CATEGORY

@Deprecated
public static final Category UNKNOWN_CATEGORY
Deprecated. Use CATEGORY instead.
Category used to label entries which are of document type.


LABEL

public static final java.lang.String LABEL
Label for category.

See Also:
Constant Field Values

KIND

public static final java.lang.String KIND
Kind category term used to label the entries which are of item type.

See Also:
Constant Field Values

CATEGORY

public static final Category CATEGORY
Category used to label entries which are of item type.


FOLDERS_NAMESPACE

public static final java.lang.String FOLDERS_NAMESPACE
See Also:
Constant Field Values

PARENT_NAMESPACE

public static final java.lang.String PARENT_NAMESPACE
See Also:
Constant Field Values

REVISIONS_NAMESPACE

public static final java.lang.String REVISIONS_NAMESPACE
See Also:
Constant Field Values
Constructor Detail

DocumentListEntry

public DocumentListEntry()
Constructs a new uninitialized entry, to be populated by the GData parsers.


DocumentListEntry

public DocumentListEntry(BaseEntry<?> sourceEntry)
Constructs a new entry by doing a shallow copy from another BaseEntry instance.

Method Detail

getMimeTypeFromFileName

protected static java.lang.String getMimeTypeFromFileName(java.lang.String fileName)
Returns the mime type given a file name. Not intended for extenal use, see setFile(File, String) instead. protected access for testing.

Throws:
java.lang.IllegalArgumentException - if the mime type is not known given the file name

declareExtensions

public void declareExtensions(ExtensionProfile extProfile)
Description copied from class: ExtensionPoint
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Specified by:
declareExtensions in interface Kind.Adaptor
Overrides:
declareExtensions in class ExtensionPoint
Parameters:
extProfile - the ExtensionProfile to initialize.
See Also:
ExtensionProfile.addDeclarations(Kind.Adaptor)

getDocumentLink

public Link getDocumentLink()
Gets the link with which you can open up the document in a Web browser. This is a link to the full document-specific UI (for edit if the requesting user has edit permission, and a read-only HTML rendering otherwise).

Returns:
a link to open up the web browser with

getKey

@Deprecated
public java.lang.String getKey()
Deprecated. use getResourceId() instead.

Gets the resource id that is used to access the document entry or export the document. http://docs.google.com/getdoc?id={id} http://spreadsheets.google.com/ccc?key={id}

Returns:
the Google Docs & Spreadsheets id

getDocId

public java.lang.String getDocId()
Gets the docId or spreadsheet key from the resource id. This is the id that can be used to construct the export url or link to google docs. http://docs.google.com/present/edit?id={id} http://spreadsheets.google.com/ccc?key={id}

Returns:
the Google Docs doc id .

getType

public java.lang.String getType()
Returns the type document entry from the resource id. If the resource id id "document:12345", then "document" is returned.

Returns:
the document type .

setFile

@Deprecated
public void setFile(java.io.File file)
Deprecated. use setFile(File, String) instead.

Associate a File with this entry, implicitly determining the mime type from the file's extension.


setFile

public void setFile(java.io.File file,
                    java.lang.String mimeType)
Associate a File with this entry with the specified mime type


setHidden

public void setHidden(boolean hidden)
Sets the hidden status of this document for the user this feed request has been authenticated under.

Parameters:
hidden - true if the document should be hidden

isHidden

public boolean isHidden()
Returns:
true if the document represented by this entry has been hidden by the user this feed request has been authenticated under.

setStarred

public void setStarred(boolean starred)
Sets the starred status of this document for the user this feed request has been authenticated under.

Parameters:
starred - true if the document should be starred

isStarred

public boolean isStarred()
Returns:
true if the document represented by this entry has been starred by the user this feed request has been authenticated under.

setViewed

public void setViewed(boolean viewed)
Sets the viewed status of this document for the user this feed request has been authenticated under.

Parameters:
viewed - true if the document has been viewed

isViewed

public boolean isViewed()
Returns:
true if the document represented by this entry has been viewed by the user this feed request has been authenticated under.

setTrashed

public void setTrashed(boolean trashed)
Sets the trashed status of this document for the user this feed request has been authenticated under.

Parameters:
trashed - true if the document should be trashed

isTrashed

public boolean isTrashed()
Returns:
true if the document represented by this entry has been trashed by the user this feed request has been authenticated under.

addFolder

@Deprecated
public void addFolder(Person owner,
                                 java.lang.String folderName)
Deprecated. use BaseEntry.addLink(Link) with link relation PARENT_NAMESPACE instead.

Adds a user-specific folder that parents this document

Parameters:
owner - the owner of the folder
folderName - the name of the folder

getFolders

@Deprecated
public java.util.Set<java.lang.String> getFolders()
Deprecated. use getParentLinks() instead.


getAclFeedLink

public DocumentListAclFeedLink getAclFeedLink()

getAclFeed

public AclFeed getAclFeed()

getParentLinks

public java.util.List<Link> getParentLinks()

getLastViewed

public DateTime getLastViewed()
Returns the time when the document was last viewed by the user.

Returns:
the last viewed time

setLastViewed

public void setLastViewed(DateTime lastViewed)
Sets the time when the document was last viewed by the user.

Parameters:
lastViewed - the last viewed time

getQuotaBytesUsed

public java.lang.Long getQuotaBytesUsed()
Returns the amount of quota consumed by the document.

Returns:
the quota used

setQuotaBytesUsed

public void setQuotaBytesUsed(java.lang.Long quotaBytesUsed)
Sets the amount of quota consumed by the document.

Parameters:
quotaBytesUsed - the quota used

isWritersCanInvite

public java.lang.Boolean isWritersCanInvite()
Returns a flag for whether writers can invite other collaborators

Returns:
whether writers can invite

setWritersCanInvite

public void setWritersCanInvite(java.lang.Boolean writersCanInvite)
Sets whether users classed as writers can invite other collaborators

Parameters:
writersCanInvite - true if writers can invite

getLastModifiedBy

public LastModifiedBy getLastModifiedBy()
Returns the user who last modified the document.

Returns:
the user who last modified the document

setLastModifiedBy

public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
Sets the amount of quota consumed by the document.

Parameters:
lastModifiedBy - the quota used

getResourceId

public java.lang.String getResourceId()
Returns the document's resource id.

Returns:
the resource id.

setResourceId

public void setResourceId(java.lang.String resourceId)
Sets the document's resource id.

Parameters:
resourceId - the resource id.