request.addHeader("Content-Type", "application/json");
request.addHeader("rest-dspace-token", token);
//Only allow certain attributes... "name", "copyrightText", "introductoryText", "shortDescription", "sidebarText"
Logger.info("EditCommunity json: " + Json.toJson(this).toString());
ObjectNode jsonObjectNode = Json.newObject().put("name", this.name).put("copyrightText", this.copyrightText)
.put("introductoryText", this.introductoryText)
.put("shortDescription", this.shortDescription)
.put("sidebarText", this.sidebarText);
StringEntity stringEntity = new StringEntity(jsonObjectNode.toString());
Logger.info("EditCommunity certain attributes: " + jsonObjectNode.toString());
request.setEntity(stringEntity);
HttpResponse httpResponse = httpClient.execute(request);
RestResponse restResponse = new RestResponse();
restResponse.httpResponse = httpResponse;