parentEntity.put(Constants.ID, parentId);
MapJSONStringEntity entity = new MapJSONStringEntity();
entity.put(KEY_PARENT, parentEntity);
entity.put(KEY_NAME, name);
return new StringBody(entity.toJSONString(new ObjectMapper()), Charset.forName(CharEncoding.UTF_8));
}
private static MultipartEntityWithProgressListener getNewVersionMultipartEntity(final String name, final File file) throws UnsupportedEncodingException {
MultipartEntityWithProgressListener me = new MultipartEntityWithProgressListener(HttpMultipartMode.BROWSER_COMPATIBLE);
me.addPart(name, new FileBody(file, name, "", CharEncoding.UTF_8));