if (type.equals("setstate")) {
try {
String stateFile = request.getParameter("fileurl");
service.setDb(new JSONObject(fetchStateDocument(stateFile)));
} catch (JSONException e) {
throw new SocialSpiException(ResponseError.BAD_REQUEST,
"The json state file was not valid json", e);
}
} else if (type.equals("setevilness")) {
throw new SocialSpiException(ResponseError.NOT_IMPLEMENTED,
"evil data has not been implemented yet");
}
return ImmediateFuture.newInstance(null);
}