I have a problem uploading information using the Google Document API. The task is to upload a document, then publish it right after the upload. The first part I have solved,
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);