ServiceException, DocumentListException {
if (resourceId == null || filepath == null || format == null) {
throw new DocumentListException("null passed in for required parameters");
}
UserToken docsToken = (UserToken) service.getAuthTokenFactory()
.getAuthToken();
UserToken spreadsheetsToken = (UserToken) spreadsheetsService
.getAuthTokenFactory().getAuthToken();
service.setUserToken(spreadsheetsToken.getValue());
HashMap<String, String> parameters = new HashMap<String, String>();
parameters
.put("key", resourceId.substring(resourceId.lastIndexOf(':') + 1));
parameters.put("exportFormat", format);