From 83fa0fec11c802be921b387951095e102c0f6b33 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Tue, 5 Jul 2016 17:58:31 +0300 Subject: [PATCH 1/2] RM-2890 - updated json structure --- .../org/alfresco/util/WebScriptUtils.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java b/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java index 28c1fe279f..cc0ac75830 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java @@ -400,4 +400,30 @@ public final class WebScriptUtils final int status = e.getStatus(); return status >= lowerLimitInclusive && status < upperLimitExclusive; } + + /** + * Gets the {@link JSONObject} value of a given key from a json object + * + * @param jsonObject The json object + * @param key The key + * @return The {@link JSONObject} value of the given key from the json object + */ + public static JSONObject getValueFromJSONObject(JSONObject jsonObject, String key) + { + mandatory("jsonObject", jsonObject); + mandatoryString("key", key); + + JSONObject value = null; + + try + { + value = jsonObject.getJSONObject(key); + } + catch (JSONException error) + { + throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Could not get value for the key '" + key + "'.", error); + } + + return value; + } } From e928ec54a2e9d338d4baa207ce78d2e5c991df16 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Wed, 6 Jul 2016 12:27:35 +0100 Subject: [PATCH 2/2] RM-3647 (Fix Bamboo Release process) --- pom.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pom.xml b/pom.xml index 1bba046707..2fe45c1703 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,32 @@ + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + +