@Override protected void setNotificationConfigImpl(String bucketName, NotificationConfig config) throws S3ServiceException { Map<String, String> requestParameters = new HashMap<String, String>(); requestParameters.put("notification", ""); Map<String, Object> metadata = new HashMap<String, Object>(); String xml; try { xml = config.toXml(); } catch (Exception e) { throw new S3ServiceException("Unable to build NotificationConfig XML document", e); } try { performRestPut(bucketName, null, metadata, requestParameters, new StringEntity(xml, "text/plain", Constants.DEFAULT_ENCODING), true); } catch (ServiceException se) { throw new S3ServiceException(se); } catch (UnsupportedEncodingException e) { throw new S3ServiceException("Unable to encode XML document", e); } }
@Override protected void setNotificationConfigImpl(String bucketName, NotificationConfig config) throws S3ServiceException { Map<String, String> requestParameters = new HashMap<String, String>(); requestParameters.put("notification", ""); Map<String, Object> metadata = new HashMap<String, Object>(); String xml; try { xml = config.toXml(); } catch (Exception e) { throw new S3ServiceException("Unable to build NotificationConfig XML document", e); } try { performRestPut(bucketName, null, metadata, requestParameters, new StringEntity(xml, "text/plain", Constants.DEFAULT_ENCODING), true); } catch (ServiceException se) { throw new S3ServiceException(se); } catch (UnsupportedEncodingException e) { throw new S3ServiceException("Unable to encode XML document", e); } }