protected void setWebsiteConfigImpl(String bucketName, WebsiteConfig config) throws ServiceException { Map<String, String> requestParameters = new HashMap<String, String>(); requestParameters.put(this.isTargettingGoogleStorageService() ? "websiteConfig" : "website", ""); Map<String, Object> metadata = new HashMap<String, Object>(); String xml; try { xml = config.toXml(); } catch(Exception e) { throw new ServiceException("Unable to build WebsiteConfig XML document", e); } performRestPut(bucketName, null, metadata, requestParameters, new StringEntity(xml, ContentType.create("text/plain", Constants.DEFAULT_ENCODING)), true); }
protected void setWebsiteConfigImpl(String bucketName, WebsiteConfig config) throws ServiceException { Map<String, String> requestParameters = new HashMap<String, String>(); requestParameters.put(this.isTargettingGoogleStorageService() ? "websiteConfig" : "website", ""); Map<String, Object> metadata = new HashMap<String, Object>(); String xml; try { xml = config.toXml(); } catch(Exception e) { throw new ServiceException("Unable to build WebsiteConfig XML document", e); } performRestPut(bucketName, null, metadata, requestParameters, new StringEntity(xml, ContentType.create("text/plain", Constants.DEFAULT_ENCODING)), true); }