public class LTI2Util extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SCOPE_LtiLink |
static String |
SCOPE_ToolProxy |
static String |
SCOPE_ToolProxyBinding |
| Constructor and Description |
|---|
LTI2Util() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCustomToLaunch(Properties ltiProps,
Properties custom,
boolean isLTI1) |
static boolean |
compareServiceIds(String id1,
String id2)
Compare two service ids by suffix
tcp:Result.item
#Result.item
http://sakai.ngrok.com/imsblis/lti2/#Result.item
|
static void |
filterLTI1LaunchProperties(Properties ltiProps,
org.json.simple.JSONArray enabledCapabilities,
boolean allowExt)
Make sure we never pass any un-requested LTI1 parameters to an LTI2 launch
|
static org.json.simple.JSONArray |
forceArray(Object obj) |
static org.json.simple.JSONArray |
getArray(org.json.simple.JSONObject obj,
String key) |
static org.json.simple.JSONObject |
getObject(org.json.simple.JSONObject obj,
String key) |
static Object |
getSettings(javax.servlet.http.HttpServletRequest request,
String scope,
org.json.simple.JSONObject link_settings,
org.json.simple.JSONObject binding_settings,
org.json.simple.JSONObject proxy_settings,
String link_url,
String binding_url,
String proxy_url) |
static String |
getString(org.json.simple.JSONObject obj,
String key) |
static String |
mapKeyName(String keyname) |
static boolean |
mergeLTI1Custom(Properties custom,
String customstr)
For LTI 2.x launches we do not support the semicolon-separated launches
|
static boolean |
mergeLTI2Custom(Properties custom,
String customstr) |
static boolean |
mergeLTI2Parameters(Properties custom,
String customstr) |
static org.json.simple.JSONObject |
parseJSONObject(String toolProfileString)
Parse a string and reliably return a JSONObject or null
|
static org.json.simple.JSONObject |
parseSettings(String settings) |
static String |
property2Capability(String propString) |
static Properties |
property2CapabilityMapping() |
static void |
setProperty(Properties props,
String key,
String value) |
static void |
substituteCustom(Properties custom,
Properties lti2subst) |
public static final String SCOPE_LtiLink
public static final String SCOPE_ToolProxyBinding
public static final String SCOPE_ToolProxy
public static Object getSettings(javax.servlet.http.HttpServletRequest request, String scope, org.json.simple.JSONObject link_settings, org.json.simple.JSONObject binding_settings, org.json.simple.JSONObject proxy_settings, String link_url, String binding_url, String proxy_url)
public static org.json.simple.JSONArray forceArray(Object obj)
public static org.json.simple.JSONArray getArray(org.json.simple.JSONObject obj,
String key)
public static org.json.simple.JSONObject getObject(org.json.simple.JSONObject obj,
String key)
public static org.json.simple.JSONObject parseJSONObject(String toolProfileString)
String - toolProfileString - The string representation tool_profile.
This has a single resource_handler object since this is scoped to a single
tool.public static org.json.simple.JSONObject parseSettings(String settings)
public static boolean mergeLTI1Custom(Properties custom, String customstr)
public static boolean mergeLTI2Custom(Properties custom, String customstr)
public static boolean mergeLTI2Parameters(Properties custom, String customstr)
public static void substituteCustom(Properties custom, Properties lti2subst)
public static void addCustomToLaunch(Properties ltiProps, Properties custom, boolean isLTI1)
public static void filterLTI1LaunchProperties(Properties ltiProps, org.json.simple.JSONArray enabledCapabilities, boolean allowExt)
ltiProps - - the properties as constructed by the LMSenabledCapabilities - - the list of capabilities requested by the toolallowExt - - indicates whether or not to allow the "ext_" prefixed parameterspublic static Properties property2CapabilityMapping()
public static void setProperty(Properties props, String key, String value)
Copyright 2015- Charles R. Severance and licensed CC-BY Attribution 4.0