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
+
+
+
+
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;
+ }
}