//File upload in google drive DocumentListEntry uploadFile = new DocumentListEntry(); uploadFile.setTitle(new PlainTextConstruct("FILE_NAME_DISPLAY_IN_DRIVE")); uploadFile.setFile(new File("FILE_PATH"), "MIME_TYPE_OF_FILE"); uploadFile = docsService.insert(GOOGLE_DRIVE_FEED_URL, uploadFile);
SpreadsheetEntry spreadsheetEntry= spreadsheets.get (0); URL worksheetFeedUrl= spreadsheetEntry.getWorksheetFeedUrl (); log.severe (worksheetFeedUrl.toString ()); WorksheetFeed worksheetFeed= spreadsheetService.getFeed (
/** * Sets the suggested filename for this document. * * @param filename the filename */ public void setSuggestedFilename(String filename) { if (filename == null) { removeExtension(SuggestedFilename.class); } else { setExtension(new SuggestedFilename(filename)); } }
/** * Sets whether users classed as writers can invite other collaborators * * @param writersCanInvite true if writers can invite */ public void setWritersCanInvite(Boolean writersCanInvite) { if (writersCanInvite == null) { removeExtension(WritersCanInvite.class); } else { this.setExtension(new WritersCanInvite(writersCanInvite)); } }
/** * Returns a flag for whether writers can invite other collaborators * * @return whether writers can invite */ public Boolean isWritersCanInvite(){ WritersCanInvite writersCanInvite = getExtension(WritersCanInvite.class); return writersCanInvite == null ? null : writersCanInvite.getValue(); }
public AclFeed getAclFeed() { DocumentListAclFeedLink feedLink = getAclFeedLink(); return (feedLink != null) ? feedLink.getFeed() : null; }
/** * Set the MD5 checksum calculated for the document. * * @param md5Checksum the MD5 checksum */ public void setMd5Checksum(String md5Checksum) { if (md5Checksum == null) { removeExtension(Md5Checksum.class); } else { setExtension(new Md5Checksum(md5Checksum)); } }
/** * Sets the description of this document. * * @param description the description */ public void setDescription(String description) { if (description == null) { removeExtension(Description.class); } else { setExtension(new Description(description)); } }
/** * Sets the time when the document was last commented by the user. * * @param lastCommented the last commented time */ public void setLastCommented(DateTime lastCommented) { if (lastCommented == null) { removeExtension(LastCommented.class); } else { setExtension(new LastCommented(lastCommented)); } }
/** * Returns the suggested filename for this document. * * @return the filename */ public String getSuggestedFilename() { SuggestedFilename filename = getExtension(SuggestedFilename.class); return filename == null ? null : filename.getValue(); }
/** * Returns the description of this document. * * @return the description ({@code null} means no description was set, whereas the empty-string * means the description is empty) */ public String getDescription() { Description description = getExtension(Description.class); if (description == null) { return null; } return description.getValue() == null ? "" : description.getValue(); }
/** * Returns the time when the document was last commented by the user. * * @return the last commented time */ public DateTime getLastCommented() { LastCommented lastCommented = getExtension(LastCommented.class); return lastCommented == null ? null : lastCommented.getValue(); }
/** * Returns the original filename for this document. * * @return the filename */ public String getFilename() { Filename filename = getExtension(Filename.class); return filename == null ? null : filename.getValue(); }
/** * Returns the MD5 checksum calculated for the document. * * @return the MD5 checksum */ public String getMd5Checksum() { Md5Checksum md5Checksum = getExtension(Md5Checksum.class); return md5Checksum == null ? null : md5Checksum.getValue(); }
/** * Set the MD5 checksum calculated for the document. * * @param md5Checksum the MD5 checksum */ public void setMd5Checksum(String md5Checksum) { if (md5Checksum == null) { removeExtension(Md5Checksum.class); } else { setExtension(new Md5Checksum(md5Checksum)); } }
/** * Sets whether changes to the document are automatically re-published. * * @param publishAuto true if auto re-published */ public void setPublishAuto(Boolean publishAuto) { if (publishAuto == null) { removeExtension(PublishAuto.class); } else { setExtension(new PublishAuto(publishAuto)); } }
/** * Sets whether the document is published outside of its domain. * * @param publishOutsideDomain true if outside domain */ public void setPublishOutsideDomain(Boolean publishOutsideDomain) { if (publishOutsideDomain == null) { removeExtension(PublishOutsideDomain.class); } else { setExtension(new PublishOutsideDomain(publishOutsideDomain)); } } }
/** * Returns whether the revision is published. * * @return whether revision is published */ public Boolean isPublish() { Publish publish = getExtension(Publish.class); return publish == null ? null : publish.getValue(); }
/** * Sets whether users classed as writers can invite other collaborators * * @param writersCanInvite true if writers can invite */ public void setWritersCanInvite(Boolean writersCanInvite) { if (writersCanInvite == null) { removeExtension(WritersCanInvite.class); } else { this.setExtension(new WritersCanInvite(writersCanInvite)); } }
/** * Returns a flag for whether writers can invite other collaborators * * @return whether writers can invite */ public Boolean isWritersCanInvite(){ WritersCanInvite writersCanInvite = getExtension(WritersCanInvite.class); return writersCanInvite == null ? null : writersCanInvite.getValue(); }