mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'master' into feature/RM-3227-AttemptTwo
This commit is contained in:
26
pom.xml
26
pom.xml
@@ -175,6 +175,32 @@
|
|||||||
</includes>
|
</includes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@@ -400,4 +400,30 @@ public final class WebScriptUtils
|
|||||||
final int status = e.getStatus();
|
final int status = e.getStatus();
|
||||||
return status >= lowerLimitInclusive && status < upperLimitExclusive;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user