{"action":"opened","issue":{"url":"https://api.github.com/repos/marklogic/java-client-api/issues/352","labels_url":"https://api.github.com/repos/marklogic/java-client-api/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/marklogic/java-client-api/issues/352/comments","events_url":"https://api.github.com/repos/marklogic/java-client-api/issues/352/events","html_url":"https://github.com/marklogic/java-client-api/issues/352","id":103793754,"number":352,"title":"Allow auto-generated URIs in bulk document operations","user":{"login":"malteseduck","id":367817,"avatar_url":"https://avatars.githubusercontent.com/u/367817?v=3","gravatar_id":"","url":"https://api.github.com/users/malteseduck","html_url":"https://github.com/malteseduck","followers_url":"https://api.github.com/users/malteseduck/followers","following_url":"https://api.github.com/users/malteseduck/following{/other_user}","gists_url":"https://api.github.com/users/malteseduck/gists{/gist_id}","starred_url":"https://api.github.com/users/malteseduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malteseduck/subscriptions","organizations_url":"https://api.github.com/users/malteseduck/orgs","repos_url":"https://api.github.com/users/malteseduck/repos","events_url":"https://api.github.com/users/malteseduck/events{/privacy}","received_events_url":"https://api.github.com/users/malteseduck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-28T20:52:25Z","updated_at":"2015-08-28T20:52:25Z","closed_at":null,"body":"It would be nifty if DocumentWriteSet had additions similar to these:\r\n\r\n```\r\n    public DocumentWriteSet add(DocumentUriTemplate template, AbstractWriteHandle contentHandle);\r\n    public DocumentWriteSet add(DocumentUriTemplate template, DocumentMetadataWriteHandle metadataHandle, AbstractWriteHandle contentHandle);\r\n```\r\n\r\nso that we can have URIs generated in the database.  That would cause issues with DocumentWriteOperation since that only deals with uris and would need to store the template information.  \r\n\r\nThen in JerseyServices postBuilkDocuments there can be logic to check for uri vs. extension (and potentially directory) and add the appropriate content disposition for the REST endpoint, something like:\r\n\r\nattachment; extension=\"json\"; directory=\"/where/I/want/it\"\r\n\r\nIn the end, I dig through too much code for my own good and however it is implemented is not important, I would just love being able to do bulk operations yet have the URIs auto generated like I am able to do with a single document. "}}