* any user, meaning any use will have teh "viewer" role for this dataset.
*
* @param datasetId id of the dataset to make public.
*/
public void makePublic(final String datasetId) throws SodaError, InterruptedException {
SodaRequest requester = new SodaRequest<String>(datasetId,null)
{
//accessType=WEBSITE&method=setPermission&value=public.read
public ClientResponse issueRequest() throws LongRunningQueryException, SodaError
{
final URI publicationUri = UriBuilder.fromUri(viewUri)
.path(resourceId)
.queryParam("accessType", "WEBSITE")
.queryParam("method", "setPermission")
.queryParam("value", "public.read")
.build();
return httpLowLevel.putRaw(publicationUri, HttpLowLevel.JSON_TYPE, ContentEncoding.IDENTITY, "method=setPermission");
}
};
try {
requester.issueRequest();
} catch (LongRunningQueryException e) {
getHttpLowLevel().getAsyncResults(e.location, e.timeToRetry, getHttpLowLevel().getMaxRetries(), Dataset.class, requester);
}
}