Java - Google API - Publish a document

谁说胖子不能爱 提交于 2019-12-01 12:37:11

Sharing is done by modifying the document's ACL, more information can be found in the developer's guide.

Using the Java client library, to make a document read-only for everybody, you can do:

AclEntry aclEntry = new AclEntry();
aclEntry.setRole(AclRole.READER);
aclEntry.setScope(new AclScope(AclScope.Type.DEFAULT, null));
URL url = new URL(documentEntry.getAclFeedLink().getHref);

return service.insert(url, aclEntry);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!